MySensors integration does not create devices and entities

HA version 2022.11.1
Since now my two existing MySensors gateways (serial and IP) works fine.
Recently I have configured new MySensors IP gateway from UI.
Everything seems to work fine to the level my nodes are properly added to persistence json file, but nothing is visible in HA.
json persistence file looks OK:

{
    "0": {
        "sensor_id": 0,
        "children": {},
        "type": 18,
        "sketch_name": "ESP Gateway 03",
        "sketch_version": "1.1",
        "battery_level": 0,
        "protocol_version": "2.3.2",
        "heartbeat": 0
    },
    "11": {
        "sensor_id": 11,
        "children": {
            "1": {
                "id": 1,
                "type": 0,
                "description": "Wind_1",
                "values": {
                    "2": "0"
                }
            }
        },
        "type": 17,
        "sketch_name": "WIN_1",
        "sketch_version": "2.3",
        "battery_level": 0,
        "protocol_version": "3.2.3",
        "heartbeat": 0
    }
}

debug log when presenting (restarting) node:

2022-11-08 18:50:24.374 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 11 child 255
2022-11-08 18:50:26.436 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 11 child 255
2022-11-08 18:50:28.533 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 11 child 255
2022-11-08 18:50:30.640 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 11 child 1
2022-11-08 18:50:32.714 WARNING (MainThread) [mysensors.sensor] child_id 1 already exists in children of node 11, cannot add child
2022-11-08 18:50:34.812 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 11 child 1

debug log when restarting integration:

2022-11-08 18:50:57.636 INFO (MainThread) [mysensors.task] Stopping gateway
2022-11-08 18:50:57.637 INFO (MainThread) [mysensors.transport] Disconnecting from gateway
2022-11-08 18:50:57.721 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] discovering persistent devices: defaultdict(<class 'list'>, {})
2022-11-08 18:50:57.722 INFO (MainThread) [mysensors.gateway_tcp] Trying to connect to ('192.168.0.50', 5003)
2022-11-08 18:50:57.793 INFO (MainThread) [mysensors.transport] Connected to <_SelectorSocketTransport fd=47 read=idle write=<idle, bufsize=0>>
2022-11-08 18:50:57.830 INFO (MainThread) [mysensors.handler] n:0 c:255 t:3 s:14 p:Gateway startup complete.
2022-11-08 18:50:57.830 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 0 child 255
2022-11-08 18:50:57.862 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 0 child 255
2022-11-08 18:50:57.886 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 0 child 255
2022-11-08 18:50:57.906 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 0 child 255

Any idea why integration is not creating entities in HA?

@RobertB did you ever figure this out? I actually have 3 MySensors GWs, 2 that does not have any child nodes only local devices and one with about 13 child Nodes. The 2 without child nodes seem to work just fine but the one with 13 nodes I have 2 nodes not showing up even if they are correctly presented in the persistence file and after a just a few minutes I get no updates from any nodes. Disable/Enable integration will again let me receive updates for a few minutes only.

2023-05-30 15:10:01.830 DEBUG (MainThread) [mysensors.gateway_tcp] Connection lost with <_SelectorSocketTransport closing fd=84 read=idle write=<idle, bufsize=0>>

2023-05-30 15:10:05.898 DEBUG (SyncWorker_6) [mysensors.persistence] Saving sensors to persistence file /config/mysensors_95ea7153fb07a8f71ea25910c0426cea.json

Well, I finally managed it to work - in my case it has been my error in one of sensors sketch.
Mysensors integration seems to be very sensitive to any errors in data, especially mismatch of S_type in presentation vs V_type data.
After all, looks like the whole MySensors project is about end of life now, so I’ve migrated most of my devices to esphome, leaving only battery powered ones on Mysensors, as esp via wifi is not an real alternative here.
Wish someone will release open and easy framework for DIY zigbee . . .

I hope that I don’t need to dive in to the sensor sketches as the MySensors setup I have (interacting with Vera hub) has been now untouched running flawlessly in about 4 years. I really don’t remember much about it and it feels like I would be starting from the beginning. Luckily I now figured out that the GW I was having problems with only allows 1 Client connection so I had to completely disable it in Vera and restart it to get a stable connection in HA.
To bad that the interest for MySensors went down as it was a really powerful way to get special devices made in a cheep way. The devices I still have running are things that you just cant buy as such type of devices does not exist. They are also reliable as they have even outlived a hand full of z-wave devices.

True, but esphome or other esp8266/esp32 platforms gives excellent replacement for MySensors/atmega328 non battery-operated devices.
Why bother soldering radio and creating/maintaining gateways, while you can get your own wifi-ready device for even lower cost? You should give it a try.
I think this is the real reason why MySensors comes to end-of-life, smarthome DYI development moves to esp8266/esp32 platform now.

1 Like