@martinhjelmare Thanks, you post helped me in the right direction for a problem I had My hass also would not register a sensor and it's solved now.
Mark69
@Mark69
Best posts made by Mark69
-
RE: Home Assistant does not recognise the switch
-
RE: !TSM:FPAR:FAIL - node not connecting to working GW
Hi there, I had a similar problem gw and sensor saw each other but the sensor did not get an id. Later I found that the controller hands out the id's, not the gateway. So when I connected the controller to the gw and configured it to use the gw arduino it worked. Not sure if this is your problem also but just in case
Greets,
Mark
Latest posts made by Mark69
-
RE: keep getting child_id 8 already exists in children of node
Thanks all for the advice. I cleared the eeprom and pushed the sketch again. The arduino does get a new device_id so that worked. After unplugging it from power and putting it back on I got the same message however and no readings.
I found however that another sensor I have that is working and sending readings also gives a 'child_id already exists warning' when I powercycle it. So now I am thinking that the warning is normal behaviour when an already registered sensor comes back online.
Than I compared the serial output in de log parser (amazing what a handy thing that is) with output from a working sensor.
I noticed that everything looks the same upto the the lineCallback setup()
My not working sensor gave no more output after that but the working sensor continued by sending a reading and going to sleep.
So I suspect there is something wrong with the sensor or sketch causing it to never correctly initialize. -
RE: keep getting child_id 8 already exists in children of node
@gohan I just tried that but still getting the same reply.
I am wondering where this message points to.
I.E. where the child_id is found. Is this a mysensors issue ? Or does this come from the controller ? -
RE: keep getting child_id 8 already exists in children of node
#define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 #include <SPI.h> #include <MySensors.h> #include <Wire.h> #include <Adafruit_BMP085.h> #define BARO_CHILD 0 #define TEMP_CHILD 1 const float ALTITUDE = 1; // <-- adapt this value to your own location's altitude. // Sleep time between reads (in seconds). Do not change this value as the forecast algorithm needs a sample every minute. const unsigned long SLEEP_TIME = 60000; Adafruit_BMP085 bmp = Adafruit_BMP085(); // Digital Pressure Sensor float lastPressure = -1; float lastTemp = -1; int lastForecast = -1; // this CONVERSION_FACTOR is used to convert from Pa to kPa in forecast algorithm // get kPa/h be dividing hPa by 10 #define CONVERSION_FACTOR (1.0/10.0) float dP_dt; bool metric; MyMessage tempMsg(TEMP_CHILD, V_TEMP); MyMessage pressureMsg(BARO_CHILD, V_PRESSURE); void setup() { if (!bmp.begin()) { Serial.println('Could not find a valid BMP085 sensor, check wiring!'); while (1) {} } metric = getControllerConfig().isMetric; } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("TemperatureAndPressure", "1.4"); // Register sensors to gw (they will be created as child devices) present(BARO_CHILD, S_BARO); present(TEMP_CHILD, S_TEMP); } void loop() { float pressure = bmp.readSealevelPressure(ALTITUDE) / 100.0; float temperature = bmp.readTemperature(); if (!metric) { // Convert to fahrenheit temperature = temperature * 9.0 / 5.0 + 32.0; } Serial.print("Temperature = "); Serial.print(temperature); Serial.println(metric ? " *C" : " *F"); Serial.print("Pressure = "); Serial.print(pressure); Serial.println(" hPa"); if (temperature != lastTemp) { send(tempMsg.set(temperature, 1)); lastTemp = temperature; } if (pressure != lastPressure) { send(pressureMsg.set(pressure, 0)); lastPressure = pressure; } sleep(SLEEP_TIME); }
-
keep getting child_id 8 already exists in children of node
Hello all,
I'm having a problem when I want to add a new sensor. Using mysensors 2.1.1. and try to register the 'PressureSensor' sketch from the MySensorsArduinoExamples git repository and have a bmp180 sensor connected.
I know the MySensorsArduinoExamples repository is a 'use at own risk' area but I checked the sketch and it looks to be properly formed.What happens is that every time I try to add a sensor I get a message like this in the homeassistant logs :
WARNING:mysensors:child_id 0 already exists in children of node 8, cannot add child
The debug log on the arduino gives :
0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
3 TSM:INIT
4 TSF:WUR:MS=0
11 TSM:INIT:TSP OK
13 TSF:SID:OK,ID=8
14 TSM:FPAR
51 TSF:MSG:SEND,8-8-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
399 TSF:MSG:READ,0-0-8,s=255,c=3,t=8,pt=1,l=1,sg=0:0
403 TSF:MSG:FPAR OK,ID=0,D=1
2058 TSM:FPAR:OK
2059 TSM:ID
2060 TSM:ID:OK
2062 TSM:UPL
2065 TSF:MSG:SEND,8-8-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
2075 TSF:MSG:READ,0-0-8,s=255,c=3,t=25,pt=1,l=1,sg=0:1
2079 TSF:MSG:PONG RECV,HP=1
2082 TSM:UPL:OK
2084 TSM:READY:ID=8,PAR=0,DIS=1
2088 TSF:MSG:SEND,8-8-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
2098 TSF:MSG:READ,0-0-8,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
2105 TSF:MSG:SEND,8-8-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.1.1
2113 TSF:MSG:SEND,8-8-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
2392 TSF:MSG:READ,0-0-8,s=255,c=3,t=6,pt=0,l=1,sg=0:M
2402 TSF:MSG:SEND,8-8-0-0,s=255,c=3,t=11,pt=0,l=22,sg=0,ft=0,st=OK:TemperatureAndPressure
2412 TSF:MSG:SEND,8-8-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.2
2420 TSF:MSG:SEND,8-8-0-0,s=0,c=0,t=8,pt=0,l=0,sg=0,ft=0,st=OK:
2427 TSF:MSG:SEND,8-8-0-0,s=1,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=OK:
2434 MCO:REG:REQ
2439 TSF:MSG:SEND,8-8-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
2446 TSF:MSG:READ,0-0-8,s=255,c=3,t=27,pt=1,l=1,sg=0:1
2451 MCO:PIM:NODE REG=1
2453 MCO:BGN:STPSo the arduino tries to register but somehow it doesn't work. I ran the log parser and the last 2 lines of the output mean
Registration response received, registration status 1
Callback setup()Which I don't know what it means.
In all of the homeassistant database and persistence file there is no record of a node 8 anywhere so it seems to come from mysensors...
Anyone has an idea of what could be the reason failing registration ?
Thanks in advance -
child_id 0 already exists in children of node after loading other sketch
Hello, I am having an issue with a sensor with a BMP180 sensor. I can't get the sensor to properly register it seems.
A fews months ago I tested the same arduino with bmp180 with a modified PressurSensor sketch from the MySensorsArduinoExamples git repo.
Now I wanted to load the normal PressureSensor sketch with also has a weather prediction included.I loaded the PressureSensor sketch on the arduino and it starts but in the HomeAssistant logs i get a message like this :
Sep 09 15:59:05 keo hass[18926]: WARNING:mysensors:child_id 1 already exists in children of node 6, cannot add child
So I stopped HA and deleted the whole '6' device from the persistence/mysensors.json
Started HA and switched on the sensor, same message.
I record all the readings in a mysql database so I thought maybe that could be the problmen so I deleted the old recordings of the '6_*' entity_id from the states table, stopped HA, removed the '6_' entries from persistence file and switched on the arduino.. Same message again.
So it appears HA or the gateway arduino already finds the devices somewhere and therefore can't add the new ones. But I fail to see why that is.Here is the output of the serial terminal from when I load the sketch on the sensor.
0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
3 TSM:INIT
4 TSF:WUR:MS=0
11 TSM:INIT:TSP OK
13 TSF:SID:OK,ID=6
14 TSM:FPAR
51 TSF:MSG:SEND,6-6-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
781 TSF:MSG:READ,0-0-6,s=255,c=3,t=8,pt=1,l=1,sg=0:0
785 TSF:MSG:FPAR OK,ID=0,D=1
2058 TSM:FPAR:OK
2059 TSM:ID
2060 TSM:ID:OK
2062 TSM:UPL
2065 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
2075 TSF:MSG:READ,0-0-6,s=255,c=3,t=25,pt=1,l=1,sg=0:1
2079 TSF:MSG:PONG RECV,HP=1
2082 TSM:UPL:OK
2083 TSM:READY:ID=6,PAR=0,DIS=1
2091 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
2098 TSF:MSG:READ,0-0-6,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
2109 TSF:MSG:SEND,6-6-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.1.1
2117 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
2132 TSF:MSG:READ,0-0-6,s=255,c=3,t=6,pt=0,l=1,sg=0:M
2146 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=11,pt=0,l=22,sg=0,ft=0,st=OK:TemperatureAndPressure
2156 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.1
2164 TSF:MSG:SEND,6-6-0-0,s=0,c=0,t=8,pt=0,l=0,sg=0,ft=0,st=OK:
2171 TSF:MSG:SEND,6-6-0-0,s=1,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=OK:
2178 MCO:REG:REQ
2183 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
2189 TSF:MSG:READ,0-0-6,s=255,c=3,t=27,pt=1,l=1,sg=0:1
2194 MCO:PIM:NODE REG=1
2196 MCO:BGN:STPIs there anything I am missing here ?
Any pointers are appreciated -
RE: Home Assistant does not recognise the switch
@martinhjelmare Thanks, you post helped me in the right direction for a problem I had My hass also would not register a sensor and it's solved now.
-
RE: Correct presentation of Sensebender temperature and humidity?
Hi Madhias, would you mind sharing your final sketch ?
I am trying to get the very same thing working right now and am very new to programming for arduino's.
Thanks in advance -
RE: !TSM:FPAR:FAIL - node not connecting to working GW
Hi there, I had a similar problem gw and sensor saw each other but the sensor did not get an id. Later I found that the controller hands out the id's, not the gateway. So when I connected the controller to the gw and configured it to use the gw arduino it worked. Not sure if this is your problem also but just in case
Greets,
Mark