Here are the actual configs and logs:
#define OPEN 1
#define CLOSE 0
#define MY_NODE_ID 3
#define MY_CHILD_ID 3
#define MY_RADIO_NRF24
#define MY_DEBUG // Enables debug messages in the serial log
#include <MySensors.h>
#include <SPI.h>
MyMessage msg(MY_NODE_ID, V_TRIPPED);
uint8_t value = OPEN;
void presentation()
{
present(MY_CHILD_ID, S_DOOR);
}
void loop()
{
value = value == OPEN ? CLOSE : OPEN;
send(msg.set(value));
sleep(10000);
}
The Console of the Arduino Software shows this:
TSP:MSG:SEND 3-3-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSP:MSG:READ 0-0-3 s=255,c=3,t=8,pt=1,l=1,sg=0:0
TSP:MSG:FPAR RES (ID=0, dist=0)
TSP:MSG:PAR OK (ID=0, dist=1)
TSM:FPAR:OK
TSM:ID
TSM:CHKID:OK (ID=3)
TSM:UPL
TSP:PING:SEND (dest=0)
TSP:MSG:SEND 3-3-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
TSP:MSG:READ 0-0-3 s=255,c=3,t=25,pt=1,l=1,sg=0:1
TSP:MSG:PONG RECV (hops=1)
TSP:CHKUPL:OK
TSM:UPL:OK
TSM:READY
TSP:MSG:SEND 3-3-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
TSP:MSG:SEND 3-3-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0
TSP:MSG:SEND 3-3-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0
TSP:MSG:READ 0-0-3 s=255,c=3,t=15,pt=6,l=2,sg=0:0100
TSP:MSG:SEND 3-3-0-0 s=3,c=0,t=0,pt=0,l=0,sg=0,ft=0,st=ok:
Request registration...
TSP:MSG:SEND 3-3-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=ok:2
TSP:MSG:READ 0-0-3 s=255,c=3,t=27,pt=1,l=1,sg=0:1
Node registration=1
Init complete, id=3, parent=0, distance=1, registration=1
TSP:MSG:SEND 3-3-0-0 s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=ok:0
TSP:MSG:SEND 3-3-0-0 s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=ok:1
TSP:MSG:SEND 3-3-0-0 s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=ok:0
And on the ssh terminal on the Raspi I see this:
sudo screen /dev/serial/by-path/platform-3f980000.usb-usb-0:1.4:1.0-port0 115200
0;255;3;0;9;
TSP:MSG:READ 3-3-0 s=3,c=1,t=16,pt=1,l=1,sg=0:1
3;3;1;0;16;1
0;255;3;0;9;
TSP:MSG:READ 3-3-0 s=3,c=1,t=16,pt=1,l=1,sg=0:0
3;3;1;0;16;0
In the Pimatic config is the following:
{
"plugin": "mysensors",
"driver": "serialport",
"protocols": "1.5.4",
"driverOptions": {
"serialDevice": "/dev/serial/by-path/platform-3f980000.usb-usb-0:1.4:1.0-port0",
"baudrate": 115200
},
"startingNodeId": 3
},
{
"nodeid": 3,
"sensorid": 3,
"id": "mysensort1",
"name": "MySensorT1",
"class": "MySensorsButton"
}
But now I’m really confused… today the sensor stands “opend” so I looked at the Graph and I see that the state changed sometimes. But the state have to change every 10 seconds what the hell goes here wrong???