💬 Door, Window and Push-button Sensor
-
This post is deleted!
-
I was build a new button node with new arduino (8mhz) and new nrf24, then update to 2.3.0 gateway and all other devices
But now have a worse result than before16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.3.0 26 TSM:INIT 28 TSF:WUR:MS=0 34 TSM:INIT:TSP OK 36 TSF:SID:OK,ID=11 38 TSM:FPAR 75 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 403 TSF:MSG:READ,0-0-11,s=255,c=3,t=8,pt=1,l=1,sg=0:0 409 TSF:MSG:FPAR OK,ID=0,D=1 2084 TSM:FPAR:OK 2084 TSM:ID 2086 TSM:ID:OK 2088 TSM:UPL 2093 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1 2099 TSF:MSG:READ,0-0-11,s=255,c=3,t=25,pt=1,l=1,sg=0:1 2105 TSF:MSG:PONG RECV,HP=1 2109 TSM:UPL:OK 2111 TSM:READY:ID=11,PAR=0,DIS=1 2129 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 2138 TSF:MSG:READ,0-0-11,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 2168 TSF:MSG:SEND,11-11-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.3.0 2179 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0 2187 TSF:MSG:READ,0-0-11,s=255,c=3,t=6,pt=0,l=1,sg=0:M 2220 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=11,pt=0,l=11,sg=0,ft=0,st=OK:Door button 2230 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.5 2240 TSF:MSG:SEND,11-11-0-0,s=3,c=0,t=0,pt=0,l=0,sg=0,ft=0,st=OK: 2246 MCO:REG:REQ 2252 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2 2260 TSF:MSG:READ,0-0-11,s=255,c=3,t=27,pt=1,l=1,sg=0:1 2267 MCO:PIM:NODE REG=1 2269 MCO:BGN:STP 2271 MCO:BGN:INIT OK,TSP=1 2275 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 2279 TSF:TDI:TSL 2281 MCO:SLP:WUP=-1 2283 TSF:TRI:TSB 2287 TSF:MSG:SEND,11-11-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:0 2295 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 2299 TSF:TDI:TSLthe pressing button twice
30343 MCO:SLP:WUP=0 30345 TSF:TRI:TSB 30347 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 30353 TSF:TDI:TSL 30355 MCO:SLP:WUP=-1 30357 TSF:TRI:TSB 32043 !TSF:MSG:SEND,11-11-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=3,st=NACK:1 32049 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 32055 TSF:TDI:TSL 32057 MCO:SLP:WUP=0 32059 TSF:TRI:TSB 32061 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 32067 TSF:TDI:TSL 32069 MCO:SLP:WUP=-1 32071 TSF:TRI:TSB 32073 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 32079 TSF:TDI:TSL 32081 MCO:SLP:WUP=0 32083 TSF:TRI:TSB 32086 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 32092 TSF:TDI:TSL 32094 MCO:SLP:WUP=-1 32096 TSF:TRI:TSB 33779 !TSF:MSG:SEND,11-11-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=4,st=NACK:0 33787 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 33794 TSF:TDI:TSLBut no incoming messages at the gateway. Only several random messages coming to controller from one hundred button clicks
Sometimes after fast series of clicks I get this:23179 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23183 !MCO:SLP:TNR 23185 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23191 !MCO:SLP:TNR 23218 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23222 !MCO:SLP:TNR 23224 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23230 !MCO:SLP:TNR 23257 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23261 !MCO:SLP:TNR 23263 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23269 !MCO:SLP:TNR 23296 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23300 !MCO:SLP:TNR 23302 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23308 !MCO:SLP:TNR 23336 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23341 !MCO:SLP:TNR 23343 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23349 !MCO:SLP:TNR 23377 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23382 !MCO:SLP:TNR 23384 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23390 !MCO:SLP:TNR 23418 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23422 !MCO:SLP:TNR 23425 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23431 !MCO:SLP:TNR 23459 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23463 !MCO:SLP:TNR 23465 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23472 !MCO:SLP:TNR 23500 !TSF:SND:TNR 23502 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23506 !MCO:SLP:TNR 23508 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23515 !MCO:SLP:TNR 23543 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23547 !MCO:SLP:TNR 23549 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23556 !MCO:SLP:TNR 23584 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23588 !MCO:SLP:TNR 23590 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23597 !MCO:SLP:TNR 23625 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23629 !MCO:SLP:TNR 23631 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23638 !MCO:SLP:TNR 23666 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23670 !MCO:SLP:TNR 23672 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23678 !MCO:SLP:TNR 23707 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23711 !MCO:SLP:TNR 23713 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23719 !MCO:SLP:TNR 23746 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23750 !MCO:SLP:TNR 23752 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23758 !MCO:SLP:TNR 23785 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23789 !MCO:SLP:TNR 23791 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23797 !MCO:SLP:TNR 23824 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23828 !MCO:SLP:TNR 23830 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23836 !MCO:SLP:TNR 23863 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23867 !MCO:SLP:TNR 23869 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23875 !MCO:SLP:TNR 23902 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23906 !MCO:SLP:TNR 23908 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23914 !MCO:SLP:TNR 23941 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23945 !MCO:SLP:TNR 23947 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23953 !MCO:SLP:TNR 23980 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 23984 !MCO:SLP:TNR 23986 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 23992 !MCO:SLP:TNR 24014 TSF:MSG:READ,0-0-11,s=255,c=3,t=8,pt=1,l=1,sg=0:0 24020 TSF:MSG:FPAR OK,ID=0,D=1 24025 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24029 !MCO:SLP:TNR 24031 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24037 !MCO:SLP:TNR 24064 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24068 !MCO:SLP:TNR 24070 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24076 !MCO:SLP:TNR 24104 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24109 !MCO:SLP:TNR 24111 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24117 !MCO:SLP:TNR 24145 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24150 !MCO:SLP:TNR 24152 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24158 !MCO:SLP:TNR 24186 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24190 !MCO:SLP:TNR 24193 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24199 !MCO:SLP:TNR 24227 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24231 !MCO:SLP:TNR 24233 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24240 !MCO:SLP:TNR 24268 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24272 !MCO:SLP:TNR 24274 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24281 !MCO:SLP:TNR 24309 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24313 !MCO:SLP:TNR 24315 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24322 !MCO:SLP:TNR 24350 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24354 !MCO:SLP:TNR 24356 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24363 !MCO:SLP:TNR 24391 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24395 !MCO:SLP:TNR 24397 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24403 !MCO:SLP:TNR 24432 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24436 !MCO:SLP:TNR 24438 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24444 !MCO:SLP:TNR 24471 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24475 !MCO:SLP:TNR 24477 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24483 !MCO:SLP:TNR 24510 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24514 !MCO:SLP:TNR 24516 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24522 !MCO:SLP:TNR 24549 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24553 !MCO:SLP:TNR 24555 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24561 !MCO:SLP:TNR 24588 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24592 !MCO:SLP:TNR 24594 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24600 !MCO:SLP:TNR 24627 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24631 !MCO:SLP:TNR 24633 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24639 !MCO:SLP:TNR 24666 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24670 !MCO:SLP:TNR 24672 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24678 !MCO:SLP:TNR 24705 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24709 !MCO:SLP:TNR 24711 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24717 !MCO:SLP:TNR 24745 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24750 !MCO:SLP:TNR 24752 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24758 !MCO:SLP:TNR 24786 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24791 !MCO:SLP:TNR 24793 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24799 !MCO:SLP:TNR 24827 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24832 !MCO:SLP:TNR 24834 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24840 !MCO:SLP:TNR 24868 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24872 !MCO:SLP:TNR 24875 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24881 !MCO:SLP:TNR 24909 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24913 !MCO:SLP:TNR 24915 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24922 !MCO:SLP:TNR 24950 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24954 !MCO:SLP:TNR 24956 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255 24963 !MCO:SLP:TNR 24991 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 24995 !MCO:SLP:TNR 24997 MCO:SLP:MS=25,Then it continue works as before
Actually I have problems only with fu@ing button, most simplest device. Several month I can't to start use it.
All other devices are working properly even on 2.3.0 ver. :stuck_out_tongue_winking_eye: -
This post is deleted!
-
@gohan the default sketch with debounce library works better, but now i see my primary problem.
Occasionally I have an ACK errors4231 TSF:MSG:SEND,21-21-0-0,s=3,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:0 4239 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 4245 TSF:TDI:TSL 4247 MCO:SLP:WUP=0 4249 TSF:TRI:TSB 4290 !TSF:MSG:SEND,21-21-0-0,s=3,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=NACK:1 4298 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255 4302 TSF:TDI:TSL 4304 MCO:SLP:WUP=0 4306 TSF:TRI:TSB 4313 TSF:MSG:SEND,21-21-0-0,s=3,c=1,t=16,pt=2,l=2,sg=0,ft=1,st=OK:0 4321 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255I tried to icrease the time ack on my controller - it does not help
Ithink that I need to ckeck ack state on the node and send the message again, but have no idea how to do -
you are at the limit of the radio range I'd say so randomly it looses a message, so you need to either increase power or get a better antenna (I hope you aren't using any buck/boost converter as power supply)
@gohan how you know?
Id 21 from range 0..255. Are you sure that is limit?Same with any different IDs, I tried sending message 3 times, this guarantees delivery of payload, but it using too much power
Now I use power supply with 1117
But my other nodes powered by CR2032 with boost 0.8-3.3V dc/dc with inductor coil on the NRF24 supply pin without any troubles
-
@gohan how you know?
Id 21 from range 0..255. Are you sure that is limit?Same with any different IDs, I tried sending message 3 times, this guarantees delivery of payload, but it using too much power
Now I use power supply with 1117
But my other nodes powered by CR2032 with boost 0.8-3.3V dc/dc with inductor coil on the NRF24 supply pin without any troubles
@pavel-polititsky said in 💬 Door, Window and Push-button Sensor:
@gohan how you know?
Id 21 from range 0..255. Are you sure that is limit?He means radio range (distance) not ID of node ;)
-
@pavel-polititsky said in 💬 Door, Window and Push-button Sensor:
@gohan how you know?
Id 21 from range 0..255. Are you sure that is limit?He means radio range (distance) not ID of node ;)
@nca78 oke, undestood
Problem stiil not resolved. I want to send message again to the gateway if NACK but dont know how to do it.send(msg.set(value == HIGH), true);in this case i have additional ack log in the serial debug, nothing more
-
A quick ACK example:
static boolean tryAgainLater = false; // should we resend? if(send(msgDust.setSensor(CHILD_ID_DUST_PM25).set(sensorValue),1)){ Serial.println(F("Received ACK")); tryAgainLater = false; }else { Serial.println(F("Connection problem, try again")); tryAgainLater = true; } -
@mfalkvidd said in 💬 Door, Window and Push-button Sensor:
Ah, thanks. So ACK basically always happens?
in that case, do you have any better example code on how to check if the ACK is received?
-
@mfalkvidd said in 💬 Door, Window and Push-button Sensor:
Ah, thanks. So ACK basically always happens?
in that case, do you have any better example code on how to check if the ACK is received?
@alowhum on nrf24, "hardware" ack is always on. "Software" ack is controlled by the second parameter in the send() function. Read https://forum.mysensors.org/post/34267 for an attempt to sort out the details. It is still quite confusing for me.
-
What will happen if i cut the power OFF of the radio after each transmission? is it needed to be initialize again before next transmission?
-
Thanks for fast reply, actually 900nA is to big number and i prefer to use xxx_POWER_PIN to cut the power of the NRF module.
I am building switch powered with CR2032 battery and i want to extend battery live as much as possible, for a switch is not needed to keep radio alive, i need it ON only when transmit signal -
Thanks for fast reply, actually 900nA is to big number and i prefer to use xxx_POWER_PIN to cut the power of the NRF module.
I am building switch powered with CR2032 battery and i want to extend battery live as much as possible, for a switch is not needed to keep radio alive, i need it ON only when transmit signal@tiana 900nA on a cr2032 is 27.9 years battery life. The self discharge of a cr2032 is around 250nA.
But yes, use the power pin setting if you want to.Would be interesting to see how long sleep times are needed to make up for the extra time needed to wake up the radio from power off compared to sleep. The mcu and the radio will need to be awake for 100ms longer time when starting from power off than when starting from sleep.