@hek That was it. Got node registered after clearing with 0xff.
Thanks a lot!
benya
@benya
Best posts made by benya
-
RE: MySensor auto node ID
Latest posts made by benya
-
RE: Calculation of time interval
@AWI If node requests time and values before going to sleep, it will receive them upon return from smartSleep?
void loop() { requestTime(); request(1, V_STATUS); request(2, V_STATUS); smartSleep(200); } void receive(const MyMessage &message) { ... } void receiveTime(unsigned long ts) { ... }
-
RE: Calculation of time interval
@AWI If there is no RTC, should I opt to use requestTime() and receiveTime()?
-
Calculation of time interval
I am trying to calculate time interval by calling millis() function in loop().
Looks like returned values are affected by smartSleep(). I mean time doesn't grow much during sleep.
Is there a more reliable way to detect timeout? -
RE: MySensor auto node ID
@hek That was it. Got node registered after clearing with 0xff.
Thanks a lot! -
RE: MySensor auto node ID
@mfalkvidd I added
#if MY_NODE_ID==255 #error MY_NODE_ID==255 #endif
And compiler reported
dummy_mysensor:16: error: #error MY_NODE_ID==255 #error MY_NODE_ID==255 ^ exit status 1
So MY_NODE_ID is 255.
Yes, I cleared EEPROM as well.
-
MySensor auto node ID
Setup:
- Raspberry Pi serial gateway.
- Node on Arduino Nano. Bare minimum code.
Problem:
Node fails to register when neither NODE_ID or MY_NODE_ID defined. It registers fine when MY_NODE_ID defined explicitly.Sketch:
#define MY_RADIO_NRF24 #define MY_BAUD_RATE 38400 #define MY_DEBUG #include <MySensors.h> #include <SPI.h> #define SENSOR_ID 1 #define OPEN 1 #define CLOSE 0 MyMessage msg(SENSOR_ID, V_TRIPPED); uint8_t value = OPEN; void presentation() { present(SENSOR_ID, S_DOOR); } void loop() { value = value == OPEN ? CLOSE : OPEN; send(msg.set(value)); sleep(10000); }
Gateway log when node uses MY_NODE_ID=AUTO:
mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.2.0-beta mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: MCO:BGN:STP mysgw: MCO:BGN:INIT OK,TSP=1
Node's log with MY_NODE_ID=AUTO:
0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1 10 TSM:INIT 12 TSF:WUR:MS=0 22 TSM:INIT:TSP OK 28 !TSF:SID:FAIL,ID=0 34 TSM:FAIL:CNT=1 38 TSM:FAIL:PDT 10045 TSM:FAIL:RE-INIT 10051 TSM:INIT 10061 TSM:INIT:TSP OK 10067 !TSF:SID:FAIL,ID=0 10074 TSM:FAIL:CNT=2 10080 TSM:FAIL:PDT 20086 TSM:FAIL:RE-INIT 20092 TSM:INIT 20103 TSM:INIT:TSP OK 20109 !TSF:SID:FAIL,ID=0 20115 TSM:FAIL:CNT=3 20121 TSM:FAIL:PDT
Gateway log when node uses MY_NODE_ID=1:
mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.2.0-beta mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: MCO:BGN:STP mysgw: MCO:BGN:INIT OK,TSP=1 mysgw: TSF:MSG:READ,1-1-255,s=255,c=3,t=7,pt=0,l=0,sg=0: mysgw: TSF:MSG:BC mysgw: TSF:MSG:FPAR REQ,ID=1 mysgw: TSF:PNG:SEND,TO=0 mysgw: TSF:CKU:OK mysgw: TSF:MSG:GWL OK mysgw: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 mysgw: TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 mysgw: TSF:MSG:PINGED,ID=1,HP=1 mysgw: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 mysgw: TSF:MSG:READ,1-1-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 mysgw: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 mysgw: TSF:MSG:READ,1-1-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.1.1 mysgw: TSF:MSG:READ,1-1-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0 mysgw: TSF:MSG:READ,1-1-0,s=1,c=0,t=0,pt=0,l=0,sg=0: mysgw: TSF:MSG:READ,1-1-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2 mysgw: !TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=NACK:1 mysgw: TSF:MSG:READ,1-1-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2 mysgw: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1 mysgw: TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=1,l=1,sg=0:0 mysgw: TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=1,l=1,sg=0:1
Node log with MY_NODE_ID=1:
0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1 10 TSM:INIT 12 TSF:WUR:MS=0 22 TSM:INIT:TSP OK 28 TSM:INIT:STATID=1 36 TSF:SID:OK,ID=1 43 TSM:FPAR 79 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 354 TSF:MSG:READ,0-0-1,s=255,c=3,t=8,pt=1,l=1,sg=0:0 368 TSF:MSG:FPAR OK,ID=0,D=1 2101 TSM:FPAR:OK 2105 TSM:ID 2109 TSM:ID:OK 2113 TSM:UPL 2117 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1 2136 TSF:MSG:READ,0-0-1,s=255,c=3,t=25,pt=1,l=1,sg=0:1 2150 TSF:MSG:PONG RECV,HP=1 2158 TSM:UPL:OK 2162 TSM:READY:ID=1,PAR=0,DIS=1 2207 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=NACK:0100 2228 TSF:MSG:READ,0-0-1,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 2256 TSF:MSG:SEND,1-1-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=1,st=OK:2.1.1 2293 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0 4313 TSF:MSG:SEND,1-1-0-0,s=1,c=0,t=0,pt=0,l=0,sg=0,ft=0,st=OK: 4331 MCO:REG:REQ 4370 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=NACK:2 6397 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=1,st=OK:2 6416 TSF:MSG:READ,0-0-1,s=255,c=3,t=27,pt=1,l=1,sg=0:1 6430 MCO:PIM:NODE REG=1 6436 MCO:BGN:INIT OK,TSP=1 6453 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:0 6469 MCO:SLP:MS=10000,SMS=0,I1=255,M1=255,I2=255,M2=255 6483 MCO:SLP:TPD 6490 MCO:SLP:WUP=-1
What's wrong with my setup?
-
RE: Requesting value from Domoticz
@dbemowsk said:
You can use that though to set the value that the node can grab. Are you wondering how to grab the value?
I am trying to figure what values to pass to
void request(uint8_t childSensorId, uint8_t variableType, uint8_t destination);
Where are the corresponding values show up in Domoticz UI? -
RE: Requesting value from Domoticz
You are pushing value from controller to the node.
But if node is sleeping, new value won't reach node.
To get new value node has to request it from controller after waking up from sleep. -
RE: Requesting value from Domoticz
The goal is to pass value to the sensor that could be sleeping. Domoticz doesn't support MySensors smart sleep mode and polling current value is only option now.
-
RE: Requesting value from Domoticz
Thanks.
What if need to get value from dummy sensor controlled by Domoticz (not by another MySensors node)?
Where is corresponding childSensorId?
My RPi runs both MySensors gateway and Domoticz.