Strange behavior with ExtraTaskSettings.TaskDeviceName

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Strange behavior with ExtraTaskSettings.TaskDeviceName

#1 Post by ThomasB » 14 Jul 2018, 02:47

I've noticed an unusual behavior of the global ExtraTaskSettings.TaskDeviceName var. I expect it to match the name of the Plugin that is in scope. It normally is, except for the PLUGIN_WRITE state.

When a write action is being process the ExtraTaskSettings.TaskDeviceName is unpredictable. It is always the name of a define device, but not always the correct one. What I mean is that when a PLUGIN_WRITE event is being processed by Device A, the ExtraTaskSettings.TaskDeviceName within the WRITE case state is sometimes the name of Device B or Device C, and so on.

Is this normal behavior? If it is, how can I get the correct name of the plugin while in its PLUGIN_WRITE state?

- Thomas

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Strange behavior with ExtraTaskSettings.TaskDeviceName

#2 Post by TD-er » 14 Jul 2018, 11:22

That sounds like a serious bug, or at least a potential flaw which could cause a lot of issues.

Can you add an issue for it on ESPeasy?
I was already looking into that part of the code this morning, when looking at your Nextion code and it already got my attention since the names used in those functions to load/store settings may lead to confusion. (and I don't like confusion ;) )

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Strange behavior with ExtraTaskSettings.TaskDeviceName

#3 Post by ThomasB » 14 Jul 2018, 19:23

Thanks for helping out. Case #1574 has been opened.
- Thomas

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 12 guests