Incorrect Reding smart plug status

When I read de “power_on” channel of the smart plug device I get an incorrect reading in some cases.
When I turn the output On or Off and then I read the power_on channel then the reading is correct.
But, when I turn Off the device completely (unplug the device) and then turn it On again I get an incorrect reading… instead of getting the actual status of the output I get the last status before the device went down…

For example, my device is set with a Default State of “On”, if the last state of the output was “Off” and I reset the smart plug then I continue to get a “Off” (but the output is really On)

Yes, that is correct. I do not know how you are ‘reading’ the SmartPlug, but you would need to configure the Smart-Plug to periodically notify the gateway of both status and change.

If you unplug and replug the SmartPlug, the gateway will have NO knowledge that you have done this ‘evil’ thing :slight_smile:

If you are using the standard Digi ‘Dia’ framework, that driver does NOT aggressively enforce pasts settings. So if you use software to turn the load ON, then power-cycle the SmartPlug so that the load is off, the standard driver will think it is ON until you use software to set it off.

I guess I would call that a bug (or bad design ‘feature’) of the current driver. It neither updates it’s internal status to match new data in, nor does it attempt to enforce past operations onto the unit.

Can you confirm you are using the Digi ESP/Dia framework?

(I entered a Change-Request at Digi for you, since I agree with you this is a bad design!)

Thank you for your reply.

That’s correct, I’m using the Digi ESP/Dia framework…

I’ll try to modify the driver in order for the Smart Plug to report the status.

Thanks