battery level doesn't appear ?
-
I have several nodes reporting battery level to Domoticz.
-
hello,
here is logs from gateway2;4;1;1;3;70;0;3;0;9;send: 0-0-2-2 s=4,c=1,t=3,pt=0,l=1,sg=0,st=fail:7 Finished 0;0;3;0;18;PINGFinished 2;4;1;1;3;70;0;3;0;9;send: 0-0-2-2 s=4,c=1,t=3,pt=0,l=1,sg=0,st=fail:7 0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:97 0;0;3;0;9;send: 0-0-1-1 s=255,c=3,t=0,pt=1,l=1,sg=0,st=ok:97 1;255;3;0;0;97 Finished 0;0;3;0;18;PING0;0;3;0;9;read: 65-65-0 s=255,c=3,t=0,pt=1,l=1,sg=0:99 0;0;3;0;9;send: 0-0-65-65 s=255,c=3,t=0,pt=1,l=1,sg=0,st=fail:99 65;255;3;0;0;99 0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:97 0;0;3;0;9;send: 0-0-1-1 s=255,c=3,t=0,pt=1,l=1,sg=0,st=ok:97 1;255;3;0;0;97 FinishedIs there a documentation to understand better ?
thanks
-
This is from my GW
0;0;3;0;18;PING0;0;3;0;9;read: 12-12-0 s=255,c=3,t=0,pt=1,l=1,sg=0:98 12;255;3;0;0;98 0;0;3;0;9;read: 12-12-0 s=1,c=1,t=38,pt=7,l=5,sg=0:2.979 12;1;1;0;38;2.979 0;0;3;0;9;read: 12-12-0 s=0,c=1,t=23,pt=3,l=2,sg=0:66 12;0;1;0;23;66 Finished98% battery
2.979 voltage
66 lux -
my loop(){}
// the loop routine runs over and over again forever: void loop() { // Process incoming messages (like config from server) gw.process(); //---------------Lecture des ouvertures de porte------------------ doorOpenOffState = digitalRead(HALLOFFICEDOOR); // lecture à chaque cycle (urgence) if (doorOpenOffState != doorOpenOffChange){ gw.send(msgDoorOffice.setSensor(OFFICEDOOR).set(doorOpenOffState)); doorOpenOffChange = doorOpenOffState; } doorOpenBedState = digitalRead(HALLBEDROOMDOOR); // lecture à chaque cycle (urgence) if (doorOpenBedState != doorOpenBedChange){ gw.send(msgDoorBedroom.setSensor(BEDROOMDOOR).set(doorOpenBedState)); doorOpenBedChange = doorOpenBedState; } if (digitalRead(ECLEXT) != oldInterExt){ oldInterExt = !oldInterExt; eclState = !eclState; gw.send(msgLightSwitch.set(eclState)); } //---------------Envoi du niveau de batterie !! pour rester eveillé------------------ /*if ((millis() - myTime) > 10000) { // toutes les dix secondes myTime = millis(); gw.sendBatteryLevel(97,1); } else { if ((millis() - myTime) < 0) { myTime = millis(); } }*/ gw.sendBatteryLevel(97,1); // ---------------Traitement volet 1----------------- analogUpV1 = analogRead(UPV1); if ((analogUpV1 <25) && !manOnV1) { //analogUp proche de zéro et ancienne valeur niveau haut (en l'air) digitalWrite(TRIAC5, HIGH); digitalWrite(TRIAC2, LOW); triacTempoV1 = millis(); triacManPriorityV1 = true; manOnV1 = true; memoStopV1 = false; } else { analogDownV1 = analogRead(DOWNV1); if ((analogDownV1 <25) && !manOnV1) { //proche de zéro digitalWrite(TRIAC5, LOW); digitalWrite(TRIAC2, HIGH); triacTempoV1 = millis(); triacManPriorityV1 = true; manOnV1 = true; memoStopV1 = false; } else { if (analogUpV1 > 800 && analogDownV1 > 800 && !memoStopV1){ // les deux fils en l'air digitalWrite(TRIAC5, LOW); digitalWrite(TRIAC2, LOW); triacManPriorityV1 = false; manOnV1 = false; memoStopV1 = true; } else { if (!triacManPriorityV1){ if (shutterOff1State && shutterOff2State) { shutterOff1State = false; shutterOff2State = false; digitalWrite(TRIAC5, LOW); digitalWrite(TRIAC2, LOW); } else { if (shutterOff1State) { shutterOff1State = false; digitalWrite(TRIAC5, HIGH); digitalWrite(TRIAC2, LOW); triacTempoV1 = millis(); } else { if (shutterOff2State) { shutterOff2State = false; digitalWrite(TRIAC5, LOW); digitalWrite(TRIAC2, HIGH); triacTempoV1 = millis(); } } } } } } } if (((triacTempoV1 + TEMPOOPENV1) < millis())) { digitalWrite(TRIAC5, LOW); digitalWrite(TRIAC2, LOW); triacManPriorityV1 = false; } // --------------------------Traitement volet 2------------------------ analogUpV2 = analogRead(UPV2); if ((analogUpV2 <25) && !manOnV2) { //analogUp proche de zéro et ancienne valeur niveau haut (en l'air) digitalWrite(TRIAC3, HIGH); digitalWrite(TRIAC4, LOW); triacTempoV2 = millis(); triacManPriorityV2 = true; manOnV2 = true; memoStopV2 = false; } else { analogDownV2 = analogRead(DOWNV2); if ((analogDownV2 <25) && !manOnV2) { //proche de zéro digitalWrite(TRIAC3, LOW); digitalWrite(TRIAC4, HIGH); triacTempoV2 = millis(); triacManPriorityV2 = true; manOnV2 = true; memoStopV2 = false; } else { if (analogUpV2 > 800 && analogDownV2 > 800 && !memoStopV2){ // les deux fils en l'air digitalWrite(TRIAC3, LOW); digitalWrite(TRIAC4, LOW); //triac3 = false; //triac4 = false; triacManPriorityV2 = false; manOnV2 = false; memoStopV2 = true; } else { if (!triacManPriorityV2){ if (shutterBed1State && shutterBed2State) { shutterBed1State = false; shutterBed2State = false; digitalWrite(TRIAC3, LOW); digitalWrite(TRIAC4, LOW); } else { if (shutterBed1State) { shutterBed1State = false; digitalWrite(TRIAC3, HIGH); digitalWrite(TRIAC4, LOW); triacTempoV2 = millis(); } else { if (shutterBed2State) { shutterBed2State = false; digitalWrite(TRIAC3, LOW); digitalWrite(TRIAC4, HIGH); triacTempoV2 = millis(); } } } } } } } if (((triacTempoV2 + TEMPOOPENV2) < millis())) { digitalWrite(TRIAC3, LOW); digitalWrite(TRIAC4, LOW); triacManPriorityV2 = false; } } -
my loop(){}
// the loop routine runs over and over again forever: void loop() { // Process incoming messages (like config from server) gw.process(); //---------------Lecture des ouvertures de porte------------------ doorOpenOffState = digitalRead(HALLOFFICEDOOR); // lecture à chaque cycle (urgence) if (doorOpenOffState != doorOpenOffChange){ gw.send(msgDoorOffice.setSensor(OFFICEDOOR).set(doorOpenOffState)); doorOpenOffChange = doorOpenOffState; } doorOpenBedState = digitalRead(HALLBEDROOMDOOR); // lecture à chaque cycle (urgence) if (doorOpenBedState != doorOpenBedChange){ gw.send(msgDoorBedroom.setSensor(BEDROOMDOOR).set(doorOpenBedState)); doorOpenBedChange = doorOpenBedState; } if (digitalRead(ECLEXT) != oldInterExt){ oldInterExt = !oldInterExt; eclState = !eclState; gw.send(msgLightSwitch.set(eclState)); } //---------------Envoi du niveau de batterie !! pour rester eveillé------------------ /*if ((millis() - myTime) > 10000) { // toutes les dix secondes myTime = millis(); gw.sendBatteryLevel(97,1); } else { if ((millis() - myTime) < 0) { myTime = millis(); } }*/ gw.sendBatteryLevel(97,1); // ---------------Traitement volet 1----------------- analogUpV1 = analogRead(UPV1); if ((analogUpV1 <25) && !manOnV1) { //analogUp proche de zéro et ancienne valeur niveau haut (en l'air) digitalWrite(TRIAC5, HIGH); digitalWrite(TRIAC2, LOW); triacTempoV1 = millis(); triacManPriorityV1 = true; manOnV1 = true; memoStopV1 = false; } else { analogDownV1 = analogRead(DOWNV1); if ((analogDownV1 <25) && !manOnV1) { //proche de zéro digitalWrite(TRIAC5, LOW); digitalWrite(TRIAC2, HIGH); triacTempoV1 = millis(); triacManPriorityV1 = true; manOnV1 = true; memoStopV1 = false; } else { if (analogUpV1 > 800 && analogDownV1 > 800 && !memoStopV1){ // les deux fils en l'air digitalWrite(TRIAC5, LOW); digitalWrite(TRIAC2, LOW); triacManPriorityV1 = false; manOnV1 = false; memoStopV1 = true; } else { if (!triacManPriorityV1){ if (shutterOff1State && shutterOff2State) { shutterOff1State = false; shutterOff2State = false; digitalWrite(TRIAC5, LOW); digitalWrite(TRIAC2, LOW); } else { if (shutterOff1State) { shutterOff1State = false; digitalWrite(TRIAC5, HIGH); digitalWrite(TRIAC2, LOW); triacTempoV1 = millis(); } else { if (shutterOff2State) { shutterOff2State = false; digitalWrite(TRIAC5, LOW); digitalWrite(TRIAC2, HIGH); triacTempoV1 = millis(); } } } } } } } if (((triacTempoV1 + TEMPOOPENV1) < millis())) { digitalWrite(TRIAC5, LOW); digitalWrite(TRIAC2, LOW); triacManPriorityV1 = false; } // --------------------------Traitement volet 2------------------------ analogUpV2 = analogRead(UPV2); if ((analogUpV2 <25) && !manOnV2) { //analogUp proche de zéro et ancienne valeur niveau haut (en l'air) digitalWrite(TRIAC3, HIGH); digitalWrite(TRIAC4, LOW); triacTempoV2 = millis(); triacManPriorityV2 = true; manOnV2 = true; memoStopV2 = false; } else { analogDownV2 = analogRead(DOWNV2); if ((analogDownV2 <25) && !manOnV2) { //proche de zéro digitalWrite(TRIAC3, LOW); digitalWrite(TRIAC4, HIGH); triacTempoV2 = millis(); triacManPriorityV2 = true; manOnV2 = true; memoStopV2 = false; } else { if (analogUpV2 > 800 && analogDownV2 > 800 && !memoStopV2){ // les deux fils en l'air digitalWrite(TRIAC3, LOW); digitalWrite(TRIAC4, LOW); //triac3 = false; //triac4 = false; triacManPriorityV2 = false; manOnV2 = false; memoStopV2 = true; } else { if (!triacManPriorityV2){ if (shutterBed1State && shutterBed2State) { shutterBed1State = false; shutterBed2State = false; digitalWrite(TRIAC3, LOW); digitalWrite(TRIAC4, LOW); } else { if (shutterBed1State) { shutterBed1State = false; digitalWrite(TRIAC3, HIGH); digitalWrite(TRIAC4, LOW); triacTempoV2 = millis(); } else { if (shutterBed2State) { shutterBed2State = false; digitalWrite(TRIAC3, LOW); digitalWrite(TRIAC4, HIGH); triacTempoV2 = millis(); } } } } } } } if (((triacTempoV2 + TEMPOOPENV2) < millis())) { digitalWrite(TRIAC3, LOW); digitalWrite(TRIAC4, LOW); triacManPriorityV2 = false; } }@flylowgofast
Look ok -
hello,
here is logs from gateway2;4;1;1;3;70;0;3;0;9;send: 0-0-2-2 s=4,c=1,t=3,pt=0,l=1,sg=0,st=fail:7 Finished 0;0;3;0;18;PINGFinished 2;4;1;1;3;70;0;3;0;9;send: 0-0-2-2 s=4,c=1,t=3,pt=0,l=1,sg=0,st=fail:7 0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:97 0;0;3;0;9;send: 0-0-1-1 s=255,c=3,t=0,pt=1,l=1,sg=0,st=ok:97 1;255;3;0;0;97 Finished 0;0;3;0;18;PING0;0;3;0;9;read: 65-65-0 s=255,c=3,t=0,pt=1,l=1,sg=0:99 0;0;3;0;9;send: 0-0-65-65 s=255,c=3,t=0,pt=1,l=1,sg=0,st=fail:99 65;255;3;0;0;99 0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:97 0;0;3;0;9;send: 0-0-1-1 s=255,c=3,t=0,pt=1,l=1,sg=0,st=ok:97 1;255;3;0;0;97 FinishedIs there a documentation to understand better ?
thanks
@flylowgofast for information on the logs take a look at the debug topic
-
My real problem is not to send battery level. I try to do that because after 24 or 48 hours my node stop sending messages . So, I hoped that was a way to make it awake !
-
My real problem is not to send battery level. I try to do that because after 24 or 48 hours my node stop sending messages . So, I hoped that was a way to make it awake !
@flylowgofast From what I read from your sketch you seem to do some high voltage / current switching. Especially the radio doesn't like all kinds of electronic disturbances (emc etc.) To avoid lockups you need to pay special attention/separate power supplies (if you haven't done already).
-
Hello AWI,
Thanks for your reply, yes my node trigs 5 triacs. I use snubber, regulator, capacitor. And ond the other hand, all commands to the node work properly ? just battery level doesn't work and after several hours NRF24L01 stop to work.
I would like to reset NRF24L01 but with MySensors we don't have direct access to it anymore. Perhaps there is a way to reset the sketch globaly ?thanks for your help
-
My real problem is not to send battery level. I try to do that because after 24 or 48 hours my node stop sending messages . So, I hoped that was a way to make it awake !
@flylowgofast said:
My real problem is not to send battery level. I try to do that because after 24 or 48 hours my node stop sending messages . So, I hoped that was a way to make it awake !
It would have been nice if you had wrote this in your first post.:disappointed:
So everyone could focus on the main problem -
Hello @flopp ,
Sorry I was myself focus on this second problem that's interesting to solve too ?
At the end twice aren't solve ! :disappointed: -
Hello all,
At the end, I choose to do a software reset every 24 hours. This solution is very bad for me but it works !!
bye
-
@flylowgofast One simple thing can be to move the radio away a bit and see if that helps. Its as AWI said probably interferance power-radio.
-
@flylowgofast One simple thing can be to move the radio away a bit and see if that helps. Its as AWI said probably interferance power-radio.
Hello @sundberg84,
I already considered this idea but my node have been running perfectly for two days before failed. So I think, power consideration are not the problem. I can trigg on and off my shutters many and many times without problem.