arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.8k stars 4.73k forks source link

Add a new ZbState called ZbLoaded to indicate that all ZbDevices and ZbLoads have been loaded successfully. #21305

Closed tasict closed 3 months ago

tasict commented 3 months ago

I hope to add a new state to indicate that all ZbDevices and ZbLoads have been loaded successfully.

sfromis commented 3 months ago

I's say that it should be safe to use the existing {"ZbState":{"Status":0,"Message":"Started"}} with an extra one-second interval for the plugin data to be loaded from the local file system.

tasict commented 3 months ago

No, at this point, the ZB device and zb driver have not actually finished loading yet. If ZbState#Status=0 is added in the rule, calling Zbinfo at this time will fail to display information properly. It requires a delay of about 2 to 3 seconds before calling zbinfo. This is exactly why there is a need to add a new state in reality.

s-hadinger commented 3 months ago

Got it. I will add it

s-hadinger commented 3 months ago

Or move Started event after the plug-ins are loaded, which sounds better

tasict commented 3 months ago

Indeed, that would be perfect!