openenergymonitor / EmonESP

ESP8266 WIFI serial to emoncms link
159 stars 78 forks source link

State is not published to MQTT when smartplug is controlled via MQTT #88

Open glynhudson opened 3 years ago

glynhudson commented 3 years ago

When the smartplug is controlled via the web UI the state correctly updates on MQTT e.g

Topic: <basetopic>/<smartplugID>/out/ctrlmode Message: On or Off

However, if the smart plug is controlled via MQTT e.g

Topic: <basetopic>/<smartplugID>/in/ctrlmode Message: On or Off

The status out topic does not update, the http JSON /status always return the correct statue. Having the correct state always available via MQTT would be very useful for integration with other control systems e.g Home Assistant

glynhudson commented 3 years ago

Update I'm running V3.1.0. Just had a look at the code, this issue may be been fixed in the latest version. I'll update on Monday and test.