I’m moving from a OpenHAB2 installation to Home Assistant.
My setup is using MySensors.org project to get values via MQTT around my home. The chain looks like this:
MySensor nodes -> Mysensor Gateway (MQTT client) -> Mosquitto (MQTT server) <- MQTT client from Home Assistant
On my previous setup I’ve an option to restore on startup values. This was useful for some cases. In example:
My MySensors device sends on boot it’s name and it’s sketch version, only once.
With OpenHAB2 I was able to save the name, update a date variable and take trace when the sensor was rebooted the last time.
Now on Home Assistant I’m getting this information as well, in this way, with a sensor:
The update variable is with Home Assistant not needed, because, I’ve seen, if I press on the node21_sketchname variable, I can see the last time the variable was updated. Great! It matches the last reboot.
BUT, if I reboot Home Assistant, the value gets lost and so I cannot trace it’s uptime anymore.
Is there a way to restore on startup this value and let Home Assistant think this value was never in UNKNOWN state?
Hello @firstof9 ,
Seems that this is not compatible with sensors… the above are used as sensors, but if it’s wrong to use them as sensor, it’s ok to change it (in what?) @zarthan I would avoid using external files and handle updates then.
Other suggestions apreciated?
Thanks!!
Simon
6 years later and this is still the case… i have to wait for all my sensors to push info before HA is updated. i gather there is some debate as to whether this is right or wrong, but in my book its wrong… data should be in the same last known reported position on a restart…
I really don’t know Mysensors, but about 90% of my hardware is using MQTT. The solution is to have your sensors send retained messages. So HA knows immediately on restart the state of your sensors.
hmm that may well work for mqtt but what about the plethora of other sensors where status’s have to wait for a push. id expect some centralised consistency similar to openhabs restoreonstartup especially since addons generally need a full restart rather than being loaded dynamically on change