Adding second sensor overlapping first?
-
I have a sensor working - humidity/temp. Very basic. Trying to add a second of the exact same type.
In my sketch, I've tried to manually add:
#define CHILD_ID_HUM 0
#define CHILD_ID_TEMP 1
#define NODE_ADDRESS 2
and
gw.sendSketchInfo("SecondLvl", "2.0");I already have a node 1 and it doesn't seem to be taking my node_address? I tried deleting the json file in Home Assistant, restart, add sensor 1. Everything works... try to add the second one and it gets named 1 as well?!
Jun 20 16:09:47 raspberrypi hass[11575]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 1-1-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0
Jun 20 16:09:47 raspberrypi hass[11575]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:send: 0-0-1-1 s=255,c=3,t=6,pt=0,l=1,sg=0,st=ok:M
Jun 20 16:09:49 raspberrypi hass[11575]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 1-1-0 s=255,c=3,t=11,pt=0,l=9,sg=0:SecondLvl
Jun 20 16:09:49 raspberrypi hass[11575]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 1-1-0 s=255,c=3,t=12,pt=0,l=3,sg=0:2.0
Jun 20 16:09:49 raspberrypi hass[11575]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 1-1-0 s=0,c=0,t=7,pt=0,l=0,sg=0:
Jun 20 16:09:50 raspberrypi hass[11575]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 1-1-0 s=1,c=0,t=6,pt=0,l=0,sg=0:
Jun 20 16:09:50 raspberrypi hass[11575]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:26.0
Jun 20 16:09:50 raspberrypi hass[11575]: INFO:homeassistant.components.mysensors:Adding new devices: <Entity SecondLvl 1 1: None>
Jun 20 16:09:50 raspberrypi hass[11575]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 1-1-0 s=0,c=1,t=1,pt=7,l=5,sg=0:33.0
Jun 20 16:09:50 raspberrypi hass[11575]: INFO:homeassistant.components.mysensors:Adding new devices: <Entity SecondLvl 1 0: None>
-
The node id is stored in the eeprom after the first successful connection. If you have previously used the arduino with another node id, you should clear the eeprom before uploading the new sketch. There's an example sketch for clearing the eeprom in the library.
Also, what is your begin statement, where you try to assign node id 2?
Looking at the log your node has node id 1, and the sensor is added as "sketch_name_1_0". So everything looks to be working at the HA side.
-
Thanks - that's what I needed to point me in the right direction. Issue is resolved now