[Solved] OpenHAB not assigning Mysensors node id

I just built two new Humidity/Temp/Motion sensors. I’m using OpenHAB 1.3.8 with Mysensors 1.5.1

I can see that things are working okay in Arduino IDE:

req id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
sensor started, id=255, parent=0, distance=1
req id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
req id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
req id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
req id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
req id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
0
req id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
req id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
T: 80.60
req id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
H: 40.00

Netcat to my ethernet gateway shows this:

root@debian#  nc 192.168.0.99 5003
255;255;3;0;3;
255;255;3;0;3;
255;255;3;0;3;
255;255;3;0;3;
255;255;3;0;3;
255;255;3;0;3;
255;255;3;0;3;
255;255;3;0;3;

OpenHAB is receiving information from my other Mysensors nodes and those values update. I am not seeing anything in the logs about the new sensors not being assigned. It’s like it’s not seeing them.

Can anyone help?

I don’t think the mysensors node-id assignment is automatic with Openhab. Its the Controllers role ( or the mysensors plugin on the controller ) to perform the assignment.

I personally assign the nodeid myself in the sketch. ( I use mysensors MQTT gateway however )

1 Like

That’s a really old version of Openhab you are running!

I assume you have followed this:

Don’t know how far you are with your Openhab config, but you might like to upgrade to 2.0b and use this:

Yeah… my typo. 1.8.3 is what I’m running.

So do something like this:


@NotYetRated said:

@dzairo I am having the same issue, but only with certain of my sensors.

Define:
int node_id = X; (X as the node id you have open to assign)

and add

gw.begin(NULL, node_id);

FYI, I have four or five nodes and have not had to do anything special for them to get their ids. I certainly will try this if it will work though. Thanks for the help.

Assigning the node id manually worked like a charm! Thanks for help!