{"action":"created","issue":{"url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/1574","repository_url":"https://api.github.com/repos/letscontrolit/ESPEasy","labels_url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/1574/labels{/name}","comments_url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/1574/comments","events_url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/1574/events","html_url":"https://github.com/letscontrolit/ESPEasy/issues/1574","id":341251996,"node_id":"MDU6SXNzdWUzNDEyNTE5OTY=","number":1574,"title":"Strange behavior with ExtraTaskSettings.TaskDeviceName","user":{"login":"thomastech","id":10354989,"node_id":"MDQ6VXNlcjEwMzU0OTg5","avatar_url":"https://avatars2.githubusercontent.com/u/10354989?v=4","gravatar_id":"","url":"https://api.github.com/users/thomastech","html_url":"https://github.com/thomastech","followers_url":"https://api.github.com/users/thomastech/followers","following_url":"https://api.github.com/users/thomastech/following{/other_user}","gists_url":"https://api.github.com/users/thomastech/gists{/gist_id}","starred_url":"https://api.github.com/users/thomastech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomastech/subscriptions","organizations_url":"https://api.github.com/users/thomastech/orgs","repos_url":"https://api.github.com/users/thomastech/repos","events_url":"https://api.github.com/users/thomastech/events{/privacy}","received_events_url":"https://api.github.com/users/thomastech/received_events","type":"User","site_admin":false},"labels":[{"id":855162918,"node_id":"MDU6TGFiZWw4NTUxNjI5MTg=","url":"https://api.github.com/repos/letscontrolit/ESPEasy/labels/Category:%20Settings","name":"Category: Settings","color":"5319e7","default":false},{"id":855470727,"node_id":"MDU6TGFiZWw4NTU0NzA3Mjc=","url":"https://api.github.com/repos/letscontrolit/ESPEasy/labels/Category:%20Stabiliy","name":"Category: Stabiliy","color":"5319e7","default":false},{"id":257820027,"node_id":"MDU6TGFiZWwyNTc4MjAwMjc=","url":"https://api.github.com/repos/letscontrolit/ESPEasy/labels/Status:%20In%20Progress","name":"Status: In Progress","color":"c2e0c6","default":false},{"id":855162107,"node_id":"MDU6TGFiZWw4NTUxNjIxMDc=","url":"https://api.github.com/repos/letscontrolit/ESPEasy/labels/Status:%20Needs%20Info","name":"Status: Needs Info","color":"bfdadc","default":false},{"id":257820023,"node_id":"MDU6TGFiZWwyNTc4MjAwMjM=","url":"https://api.github.com/repos/letscontrolit/ESPEasy/labels/Type:%20Bug","name":"Type: Bug","color":"cc4543","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":70,"created_at":"2018-07-14T17:22:35Z","updated_at":"2018-08-03T09:49:18Z","closed_at":null,"author_association":"NONE","body":"<!--- If you self compile, please state this and PLEASE try to ONLY REPORT ISSUES WITH OFFICIAL BUILDS!  --->\r\n<!--- NOTE: This is not a support forum! For questions and support go here: --->\r\n<!--- https://www.letscontrolit.com/forum/viewforum.php?f=1 --->\r\n<!--- Remove topics that are not applicable to your feature request of issue --->\r\n<!--- Remember to have a \"to the point\" TITLE --->\r\n\r\n### Summarize of the problem/feature request\r\n<!--- Describe the problem or feature request --->\r\nI am self-compiling using PLUGIN_BUILD_TESTING. While adding new features to the Nextion Plugin I noticed an unusual behavior of the global ExtraTaskSettings.TaskDeviceName var. Sometimes the name is wrong during PLUGIN_WRITE.\r\n\r\n### Expected behavior\r\n<!--- Tell us what should happen? --->\r\nExtraTaskSettings.TaskDeviceName should be the name of the Plugin that is in scope.\r\n\r\n### Actual behavior\r\n<!--- Tell us what happens instead? --->\r\nWhen a  PLUGIN_WRITE action is being process the ExtraTaskSettings.TaskDeviceName is unpredictable. It is always the name of a defined 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.\r\n\r\n\r\n### Steps to reproduce\r\n<!--- How can we trigger this problem? --->\r\n1. Define several devices that have Timer and Send-to-Controller actions. For example, switches and system RSSI.\r\n2. Edit a device (I use Nextion) and add a log event to the PLUGIN_WRITE that outputs the plugin's actual name *and* the name from ExtraTaskSettings.TaskDeviceName.\r\n3. Perform many actions that will trigger the edited device's PLUGIN_WRITE.\r\n4. Watch the log as timer and rule events are handled by the other devices.\r\n5. The log file will sometimes show the TaskDeviceName contains the wrong name.\r\n\r\n<!--- Does the problem persists after powering off and on? (just resetting isn't enough sometimes) --->\r\n<!--- Please document if you have restarted the unit and if the problem is then gone etc. etc. --->\r\n### System configuration\r\nAt power up the ExtraTaskSettings.TaskDeviceName is always correct.\r\nHardware: Lolin NodeMCU V3\r\n<!--- You should also provide links to hardware pages etc where we can find more info  --->\r\n<!--- If you self compile, please state this and PLEASE try to ONLY REPORT ISSUES WITH OFFICIAL BUILDS!  --->\r\nESP Easy version: ESP_Easy_mega-20180613_test_ESP8266_4096, Jun-12-2018\r\ncompiled with PLUGIN_BUILD_TESTING using Arduino 1.8.5\r\nCompiler Settings: core_esp8266_esp8266_nodemcuv2_CpuFrequency_80,FlashSize_4M3M,LwIPVariant_v2mss536,Debug_Disabled,DebugLevel_None____,FlashErase_none\r\n\r\n<!--- In order to have a better readablity of your issue then you should place screenshots here  --->\r\n<!--- Simply drag and drop them onto this template, move the text string below the \"ESP Easy settings/screenshots\" topic  --->\r\nESP Easy settings/screenshots: \r\n![esp1](https://user-images.githubusercontent.com/10354989/42726753-67d201b4-874e-11e8-8ba1-e9d40ac0e3aa.jpg)\r\n\r\n### Rules or log data\r\n<!--- place your code/rules between the two ``` rows  --->\r\n<!--- remove if not applicable!  --->\r\n```\r\n[esp_rules.txt](https://github.com/letscontrolit/ESPEasy/files/2195117/esp_rules.txt)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/comments/410204392","html_url":"https://github.com/letscontrolit/ESPEasy/issues/1574#issuecomment-410204392","issue_url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/1574","id":410204392,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDIwNDM5Mg==","user":{"login":"TD-er","id":3751318,"node_id":"MDQ6VXNlcjM3NTEzMTg=","avatar_url":"https://avatars3.githubusercontent.com/u/3751318?v=4","gravatar_id":"","url":"https://api.github.com/users/TD-er","html_url":"https://github.com/TD-er","followers_url":"https://api.github.com/users/TD-er/followers","following_url":"https://api.github.com/users/TD-er/following{/other_user}","gists_url":"https://api.github.com/users/TD-er/gists{/gist_id}","starred_url":"https://api.github.com/users/TD-er/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TD-er/subscriptions","organizations_url":"https://api.github.com/users/TD-er/orgs","repos_url":"https://api.github.com/users/TD-er/repos","events_url":"https://api.github.com/users/TD-er/events{/privacy}","received_events_url":"https://api.github.com/users/TD-er/received_events","type":"User","site_admin":false},"created_at":"2018-08-03T09:49:18Z","updated_at":"2018-08-03T09:49:18Z","author_association":"CONTRIBUTOR","body":"@thomastech I think the MQTT crash is another issue.\r\nAnd since it will involve some changes, which may reflect all MQTT, I guess we should add another issue for it.\r\n"}}
{"actor":{"display_login":"TD-er"}}