New CHILD ID after reprogramming
-
How can i keep from mixing the CHILD id every time of my sensor node?
i defined#define CHILD_ID 5 #define CHILD_ID_PIR1 0 #define CHILD_ID_DOOR1 1 #define CHILD_ID_TEMP1 2
But the Serial debug shows:
4 TSF:WUR:MS=0 11 TSM:INIT:TSP OK 13 TSF:SID:OK,ID=7 14 TSM:FPAR
Thus having a sensor node where i tell them to be 5 and it is 7 ?
-
@Richard-van-der-Plas did you add the defines before including MySensors.h?
-
No i did not :
//define MY_DEBUG #define MY_RADIO_NRF24 #include <MySensors.h> #include <OneWire.h> #include <DallasTemperature.h> #define ONE_WIRE_BUS 8 OneWire oneWire(ONE_WIRE_BUS); DallasTemperature sensors(&oneWire); #define CHILD_ID 5 #define CHILD_ID_PIR1 0 #define CHILD_ID_DOOR1 1 #define CHILD_ID_TEMP1 2 #define DOOR_SWITCH 3 #define PIR_INSIDE 2 MyMessage msgPIR1(CHILD_ID_PIR1, V_TRIPPED); MyMessage msgDOOR1(CHILD_ID_DOOR1, V_TRIPPED); MyMessage msgTEMP1(CHILD_ID_TEMP1, V_TEMP); // temp ```
-
@Richard-van-der-Plas said in New CHILD ID after reprogramming:
#define CHILD_ID 5
actually you have to add #define MY_NODE_ID 5 before the #include <MySensors.h>
-
This post is deleted!
-
@gohan said in New CHILD ID after reprogramming:
#define MY_NODE_ID 5
aha MY_NODE_ID, instead of CHILD_ID