Page 1 of 1

MySensor 2 and Motion Sensor

Posted: Monday 22 August 2016 23:05
by fr3sh
Hi

Could somebody can help me? I have made serial Gateway and motion sensor. In domoticz Motion sensor are included as in attachment. Is it correct? Why I could not see this motion sensor on the devices tab? How can I use this motion sensros?
On Arduino serial monitor the motion sensor work properly.

Re: MySensor 2 and Motion Sensor

Posted: Tuesday 23 August 2016 21:40
by fr3sh
Realy nobody can help me?
Why I dont see any of the device in the device tab? I even made a humidity sensor and install a brand new domoticz with no luck

Re: MySensor 2 and Motion Sensor

Posted: Tuesday 23 August 2016 22:14
by fr3sh
Logs:

ALL
2016-08-23 21:58:19.312 EventSystem: reset all events...
2016-08-23 21:58:19.313 EventSystem: reset all device statuses...
2016-08-23 21:58:19.315 EventSystem: Started
2016-08-23 21:59:01.044 MySensors: Using serial port: /dev/ttyUSB0
2016-08-23 21:59:02.532 MySensors: Gateway Ready...
2016-08-23 21:59:02.609 MySensors: Gateway Version: 2.0.0
2016-08-23 21:59:48.420 MySensors: Node: 1, Sketch Name: TemperatureAndHumidity
2016-08-23 21:59:48.421 MySensors: Node: 1, Sketch Version: 1.1


STATUS:
2016-08-23 21:58:19.312 EventSystem: reset all events...
2016-08-23 21:58:19.313 EventSystem: reset all device statuses...
2016-08-23 21:58:19.315 EventSystem: Started
2016-08-23 21:59:01.044 MySensors: Using serial port: /dev/ttyUSB0
2016-08-23 21:59:48.420 MySensors: Node: 1, Sketch Name: TemperatureAndHumidity
2016-08-23 21:59:48.421 MySensors: Node: 1, Sketch Version: 1.1

Re: MySensor 2 and Motion Sensor

Posted: Wednesday 24 August 2016 8:32
by gizmocuz
Have you seen the time between your posts? getting a little bit inpatient there ?
First check if you enabled 'accept new hardware' in the settings
If it is, has this sketch ever send a 'tripped' message to domoticz ?

Re: MySensor 2 and Motion Sensor

Posted: Wednesday 24 August 2016 11:58
by fr3sh
gizmocuz wrote:Have you seen the time between your posts? getting a little bit inpatient there ?
First check if you enabled 'accept new hardware' in the settings
If it is, has this sketch ever send a 'tripped' message to domoticz ?
Between first and second is one day :)
Maybe Im little inpatient because if you do something whole day and it's not working with no clue why you also be little frustrated like me.
The accept new hardware is by default enabled.
How can I see if the sketch send this message 'tripped' to domoticz? If it's not what to check more?

Re: MySensor 2 and Motion Sensor

Posted: Wednesday 24 August 2016 12:00
by gizmocuz
You can debug your sketch in the arduino IDE, and adding debug messages... Serial.println stuff.... you should take more time to familiar yourself with mysensors/arduino first.
Also, do not expect a 1 day response

Re: MySensor 2 and Motion Sensor

Posted: Wednesday 24 August 2016 20:19
by fr3sh
Ok I will be a little be more patient.
As i said in my first post "On Arduino serial monitor the motion sensor work properly." They are talk each other (gateway and sensor).
I think that the radio what I have is causing the problems but I dont know why becouse they are communicating. My radio is NRF24L01+ but look like this one:
https://forum.mysensors.org/topic/878/n ... d-radios/8

Re: MySensor 2 and Motion Sensor

Posted: Wednesday 24 August 2016 22:45
by fr3sh
Here it 's proof that on arduino in serial monitor everything is working as it should be .

GATEWAY LOGS:

0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSM:RADIO:OK
0;255;3;0;9;TSM:GW MODE
0;255;3;0;9;TSM:READY
0;255;3;0;14;Gateway startup complete.
0;255;0;0;18;2.0.0
0;255;3;0;9;No registration required
0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
0;255;3;0;9;TSP:MSG:READ 1-1-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:FPAR REQ (sender=1)
0;255;3;0;9;TSP:CHKUPL:OK
0;255;3;0;9;TSP:MSG:GWL OK
0;255;3;0;9;TSP:MSG:SEND 0-0-1-1 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=ok:0
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=3,t=24,pt=1,l=1,sg=0:1
0;255;3;0;9;TSP:MSG:PINGED (ID=1, hops=1)
0;255;3;0;9;TSP:MSG:SEND 0-0-1-1 s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=ok:1
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=3,t=15,pt=6,l=2,sg=0:0100
0;255;3;0;9;TSP:MSG:SEND 0-0-1-1 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=0,t=17,pt=0,l=5,sg=0:2.0.0
1;255;0;0;17;2.0.0
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0
1;255;3;0;6;0
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=3,t=11,pt=0,l=13,sg=0:Motion Sensor
1;255;3;0;11;Motion Sensor
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
1;255;3;0;12;1.0
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=1,c=0,t=1,pt=0,l=0,sg=0:
1;1;0;0;1;
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=3,t=26,pt=1,l=1,sg=0:2
0;255;3;0;9;TSP:MSG:SEND 0-0-1-1 s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=ok:1
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=1,c=1,t=16,pt=0,l=1,sg=0:0
1;1;1;0;16;0
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=1,c=1,t=16,pt=0,l=1,sg=0:1
1;1;1;0;16;1
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=1,c=1,t=16,pt=0,l=1,sg=0:0
1;1;1;0;16;0
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=1,c=1,t=16,pt=0,l=1,sg=0:1
1;1;1;0;16;1
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=1,c=1,t=16,pt=0,l=1,sg=0:0
1;1;1;0;16;0
0;255;3;0;9;TSP:SANCHK:OK
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=1,c=1,t=16,pt=0,l=1,sg=0:1

Motion Sensor LOG:

Starting sensor (RNNNA-, 2.0.0)
TSM:INIT
TSM:RADIO:OK
TSP:ASSIGNID:OK (ID=1)
TSM:FPAR
TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSP:MSG:READ 0-0-1 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=1)
TSM:UPL
TSP:PING:SEND (dest=0)
TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
TSP:MSG:READ 0-0-1 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 1-1-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
TSP:MSG:SEND 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0
TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0
TSP:MSG:READ 0-0-1 s=255,c=3,t=6,pt=0,l=1,sg=0:M
TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=11,pt=0,l=13,sg=0,ft=0,st=ok:Motion Sensor
TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=ok:1.0
TSP:MSG:SEND 1-1-0-0 s=1,c=0,t=1,pt=0,l=0,sg=0,ft=0,st=ok:
Request registration...
TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=ok:2
TSP:MSG:READ 0-0-1 s=255,c=3,t=27,pt=1,l=1,sg=0:1
Node registration=1
Init complete, id=1, parent=0, distance=1, registration=1
0
TSP:MSG:SEND 1-1-0-0 s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=ok:0
1
TSP:MSG:SEND 1-1-0-0 s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=ok:1
0
TSP:MSG:SEND 1-1-0-0 s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=ok:0
1
TSP:MSG:SEND 1-1-0-0 s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=ok:1

Re: MySensor 2 and Motion Sensor

Posted: Thursday 25 August 2016 14:05
by gizmocuz
Add a serial log line when the motion is triggered, and send to domoticz plz

Re: MySensor 2 and Motion Sensor

Posted: Friday 26 August 2016 12:35
by fr3sh
you mean to add something like that in motion sensor in void loop () :
 
Serial.println("SOMETHING");
send(msg.set("SOMETHING2")); // Send text value to gw THIS WILL SHOW ON LOGS IN DOMOTICZ?

I have dig a little bit more and I found that when i change the :
#define CHILD_ID 1
in the motion sensor sketch the sensor show up in device . Maybe my sensor was wrong before and domoticz remember this and not allow add device on this id ? Strange behavior. I will look at the next sensor.

Re: MySensor 2 and Motion Sensor

Posted: Tuesday 30 August 2016 9:36
by pj-r
From the log I could say its working. Its not coming to devices?

Node sends first 0 and then 1:
TSP:MSG:SEND 1-1-0-0 s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=ok:0
TSP:MSG:SEND 1-1-0-0 s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=ok:1

Gateway gets the message:
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=1,c=1,t=16,pt=0,l=1,sg=0:0
0;255;3;0;9;TSP:MSG:READ 1-1-0 s=1,c=1,t=16,pt=0,l=1,sg=0:1

Your gateway has include time:
// Set inclusion mode duration (in seconds)
#define MY_INCLUSION_MODE_DURATION 60
fr3sh wrote:The accept new hardware is by default enabled.
How can I see if the sketch send this message 'tripped' to domoticz?
When the "accept new hardware" is enabled and node is sending message within the first minute the device should show up in devices tab. From there you should be able to add it as "used device" and give a name for it. After its added from devices tab you should see every update in log.