Mysensors not always reloading on restart after latest update (0.33.0)

After the latest update (0.33.0) I noticed that when restarting home assistant (same if restarting entire raspberry pi) that the mysensor nodes (from the json file) are not always reloaded or visible at all. Usually on the second restart it will populate the front end with everything again. Tried over and over and it keeps repeating.

If i revert to previous version it doesn’t happen, even after 10+ restarts in a row it always reloads everything from the mysensors json flawlessly.

Is this a bug possibly? Am I the only experiencing this?

Can you post a debug level log after start where this problem happens?

I’m having the same issue after updating to 0.33.3 (was on 0.32)

I have 5 motion/contact sensors, they doesn’t show up after a restart, but if I trigger them, they show on the UI. Seems they doesn’t get loaded from the .json file.
This is the only thing I found on the log for mysensors stuff

16-11-23 12:46:39 INFO (Thread-7) [mysensors.mysensors] Trying to connect to ('192.168.1.49', 5003)
16-11-23 12:46:39 INFO (Thread-7) [mysensors.mysensors] Connected to ('192.168.1.49', 5003)
16-11-23 12:46:39 INFO (MainThread) [homeassistant.loader] Loaded binary_sensor from homeassistant.components.binary_sensor
16-11-23 12:46:39 INFO (MainThread) [homeassistant.loader] Loaded switch.mysensors from homeassistant.components.switch.mysensors
16-11-23 12:46:39 DEBUG (Thread-2) [homeassistant.components.mysensors] Update persistence: node 1
16-11-23 12:46:39 DEBUG (Thread-2) [homeassistant.components.mysensors] Update persistence: node 2

I also have 3 mysensors lights that also doesn’t show in the UI.

You should have more lines for mysensors than that. This could have something to do with the order of how things are set up, but to find out, I need to see a more complete log.

@martinhjelmare

node 3,36 & 39 don’t show up in my frontend

http://paste.debian.net/899409/

I got pretty much similar mysensor.mysensor debug output like @koen01

This is everything I have tried to eliminate stuff for my setup just-in-case:

  1. Re-install entire Raspberry Pi, update everything to latest, including mysensor gateway + nodes to latest Mysensors 2.1.0 dev branch libraries. Yes this took 5+ hours due to the setup… but I got patience and I wanted to start fresh for some time already anyway…
    Results:
    Still doesn’t show up on frontend after a hass-restart, except for motion-sensors/temperature who shows up when triggered like @danichispa mentioned, lights (mysensor rgb lights) do not ever show up unless I manually restart the nodes so they re-register on the gateway… so it’s very impractical that the .json file isn’t re-read…

  2. When going back to earlier hass version than 0.33.x (like 0.32.4) it works great again, the .json gets loaded on the frontend on each restart of hass, no issues whatsoever, and this is still with latest mysensors dev branch (2.1.0)

My solution for now is that I’ve gone to the nodes sketches and added additional code in loop to re-send a initial value (just a “0”) to one of the mysensor-switches rarely ever used on each node, once every hour, and then the nodes start to re-appear on the front end again one by one within a hour of restart, with all their sensors/switches etc. Still not a ideal solution since everything works great on hass versions prior to 0.33.x without this…

So what really happened at/after 0.33.x that is so different

This is the complete log, from another try (just a few minutes ago), after a fresh update from 0.32.4.
http://hastebin.com/irapocogom.sql

No sensors or lights show on the UI. Just if I trigger a sensor (e.g. walking around), it appears again.

This is same log after reverting back to 0.32.4
http://hastebin.com/otasevabux.sql

Thanks everyone for the logs! This confirms my suspicion, and I think @balloob has already pushed a fix:

2 Likes