Re: Help with sketch (motion/distance)
I had some additional wiring problems so the distance sensors seams to work ok now. But It does not look like the motion-sensor part works.
I was thinking that the sensor should sleep until motion but it should report the status to the controller every 120s so that domoticz etc. does not think that the sensor is dead.
Now it starts the distance sensors directly on power and runs them for a long time and then sleeps. But I cant wake it up by moving my hand in front of it. I think it wakes up every 120s and spams the distance sensor then sleeps agin.
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=2
14 TSM:FPAR
51 TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
2058 !TSM:FPAR:NO REPLY
2060 TSM:FPAR
2096 TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
2934 TSF:MSG:READ,0-0-2,s=255,c=3,t=8,pt=1,l=1,sg=0:0
2939 TSF:MSG:FPAR OK,ID=0,D=1
4104 TSM:FPAR:OK
4105 TSM:ID
4106 TSM:ID:OK
4108 TSM:UPL
4113 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
4219 TSF:MSG:READ,0-0-2,s=255,c=3,t=25,pt=1,l=1,sg=0:1
4224 TSF:MSG:PONG RECV,HP=1
4227 TSM:UPL:OK
4228 TSM:READY:ID=2,PAR=0,DIS=1
4233 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
4366 TSF:MSG:READ,0-0-2,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
4373 TSF:MSG:SEND,2-2-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.1.1
4381 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
4648 TSF:MSG:READ,0-0-2,s=255,c=3,t=6,pt=0,l=1,sg=0:M
4656 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=11,pt=0,l=22,sg=0,ft=0,st=OK:Distance+Motion Sensor
4666 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0
4674 TSF:MSG:SEND,2-2-0-0,s=1,c=0,t=15,pt=0,l=0,sg=0,ft=0,st=OK:
4715 !TSF:MSG:SEND,2-2-0-0,s=2,c=0,t=15,pt=0,l=0,sg=0,ft=0,st=NACK:
4727 TSF:MSG:SEND,2-2-0-0,s=3,c=0,t=1,pt=0,l=0,sg=0,ft=1,st=OK:
4733 MCO:REG:REQ
4770 !TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=NACK:2
6779 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=1,st=OK:2
6848 TSF:MSG:READ,0-0-2,s=255,c=3,t=27,pt=1,l=1,sg=0:1
6852 MCO:PIM:NODE REG=1
6855 MCO:BGN:STP
6856 MCO:BGN:INIT OK,TSP=1
1
6860 TSF:MSG:SEND,2-2-0-0,s=3,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:1
Ping Sonar A: 0 cm
Ping Sonar B: 15 cm
6970 TSF:MSG:SEND,2-2-0-0,s=2,c=1,t=13,pt=2,l=2,sg=0,ft=0,st=OK:15
Ping Sonar A: 123 cm
6985 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=13,pt=2,l=2,sg=0,ft=0,st=OK:123
Ping Sonar B: 15 cm
Ping Sonar A: 126 cm
7102 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=13,pt=2,l=2,sg=0,ft=0,st=OK:126
Ping Sonar B: 15 cm
Ping Sonar A: 125 cm
7222 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=13,pt=2,l=2,sg=0,ft=0,st=OK:125
Ping Sonar B: 15 cm
Ping Sonar A: 125 cm
Ping Sonar B: 15 cm
Ping Sonar A: 126 cm
7450 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=13,pt=2,l=2,sg=0,ft=0,st=OK:126
Ping Sonar B: 15 cm
Ping Sonar A: 125 cm
7569 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=13,pt=2,l=2,sg=0,ft=0,st=OK:125
Ping Sonar B: 15 cm
Ping Sonar A: 125 cm
Ping Sonar B: 15 cm
Ping Sonar A: 125 cm
Ping Sonar B: 15 cm
Ping Sonar A: 124 cm
35517 TSF:MSG:SEND,2-2-0-0,s=2,c=1,t=13,pt=2,l=2,sg=0,ft=0,st=OK:78
Ping Sonar A: 80 cm
35544 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=13,pt=2,l=2,sg=0,ft=0,st=OK:80
Ping Sonar B: 74 cm
35656 TSF:MSG:SEND,2-2-0-0,s=2,c=1,t=13,pt=2,l=2,sg=0,ft=0,st=OK:74
Ping Sonar A: 132 cm
35707 !TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=13,pt=2,l=2,sg=0,ft=0,st=NACK:132
Ping Sonar B: 79 cm
...
35820 TSF:MSG:SEND,2-2-0-0,s=2,c=1,t=13,pt=2,l=2,sg=0,ft=1,st=OK:79
35827 MCO:SLP:MS=200,SMS=0,I1=255,M1=255,I2=255,M2=255
35831 MCO:SLP:TPD
35833 MCO:SLP:WUP=-1
35835 MCO:SLP:MS=120000,SMS=0,I1=0,M1=1,I2=255,M2=255
35841 MCO:SLP:TPD