Page 1 of 1

Unable to control Relay With Button Actuator

Posted: Monday 18 January 2016 18:45
by postaanerik
Hello,

I'm just beginning to work with Domoticz and MySensors.
I Build a few sensors like pressure, temp, humidity..all working fine.

With the Relay Actuator I got some difficulties to have it controlled by Domoticz. When I press the button attached to the sensor the relay switches and serial output is generated ( see logging below)

Hope anyone could help me out, some hints or a working sketch would be very appreciated!


Setup:
Domoticz 2.4231 running on a Windows machine.
Arduino Pro mini 3.3v with NRF24L01+ for Gateway and sensors with caps ( tested multiple Nrf's )
Voltage 3,3v verified on NRF
Default MySensors sketch for Serial gateway and Relay With Button Actuator

Act is disabled on the switch in Domoticz otherwise i got a error sending...
When i tick the button on the sensor, the status is updated in Domoticz



Serial output:

Gateway startup:

0;0;3;0;9;gateway started, id=0, parent=0, distance=0
0;0;3;0;14;Gateway startup complete.

Relay sensor startup:

send: 0-0-0-0 s=255,c=0,t=18,pt=0,l=5,sg=0,st=ok:1.5.1
send: 0-0-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
repeater started, id=0, parent=0, distance=0
send: 0-0-0-0 s=255,c=3,t=11,pt=0,l=14,sg=0,st=ok:Relay & Button
send: 0-0-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.0
send: 0-0-0-0 s=1,c=0,t=3,pt=0,l=0,sg=0,st=ok:

Press the physical button on the sensor:

send: 0-0-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0,st=ok:1
read: 0-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0:1
This is an ack from gateway
Incoming change for sensor:1, New status: 1

Press again:

send: 0-0-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0,st=ok:0
read: 0-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0:0
This is an ack from gateway
Incoming change for sensor:1, New status: 0

Gateway Response when pressing the sensor button:

0;0;3;0;9;read: 0-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0:1
0;0;3;0;9;send: 0-0-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0,st=ok:1
0;1;1;0;2;1

Press again:

0;0;3;0;9;read: 0-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0:0
0;0;3;0;9;send: 0-0-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0,st=ok:0
0;1;1;0;2;0



Thanks in advance!

Erik

Re: Unable to control Relay With Button Actuator

Posted: Monday 18 January 2016 18:47
by gizmocuz
Could you test with the MockMySensors sketch ?

Re: Unable to control Relay With Button Actuator

Posted: Monday 18 January 2016 19:51
by postaanerik
Thanks for the quick reply.

installed the Mock.. Domoticz showing FakeMysensor v0.3 and one child: S_ARDUINO_NODE 1.5.1

Is there also a way to send info to the sensors from domoticz to test that part?

serial output of the sensor showing all device types like:

send: 254-254-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,st=ok:1.5.1
send: 254-254-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
sensor started, id=254, parent=0, distance=0
GW Started
Send Sketch Info: send: 254-254-0-0 s=255,c=3,t=11,pt=0,l=14,sg=0,st=ok:FakeMySensors
send: 254-254-0-0 s=255,c=3,t=12,pt=0,l=4,sg=0,st=ok:v0.3
FakeMySensors v0.3
Get Config: Imperial
Presenting Nodes
________________
________________



#########################
RandomNumber:72
Send Battery Level
send: 254-254-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,st=ok:72
Request Time
send: 254-254-0-0 s=255,c=3,t=1,pt=0,l=0,sg=0,st=ok:
send: 254-254-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,st=ok:72
#########################

Re: Unable to control Relay With Button Actuator

Posted: Monday 18 January 2016 21:14
by postaanerik
Hmm good to first read the instruction...after enabling the option:
#define ID_S_LIGHT 4

it is presented in Domoticz as light switch device. Switching the light on and off in Domoticz is not changing the status of the sensor, it keeps on logging: OFF

#########################
RandomNumber:97
Send Battery Level
send: 254-254-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,st=ok:97
Request Time
send: 254-254-0-0 s=255,c=3,t=1,pt=0,l=0,sg=0,st=ok:
Light is: Off
send: 254-254-0-0 s=4,c=1,t=2,pt=2,l=2,sg=0,st=ok:0
send: 254-254-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,st=ok:97
#########################

Re: Unable to control Relay With Button Actuator

Posted: Monday 18 January 2016 22:59
by Boots33
Hi
I am also just starting out with Domoticz and Mysensors so probably not much help in diagnosing your problem. I can tell you the relay sketch is working for me. I am just switching a LED not a relay but that should make no difference I would think.

I am using 2.0.4210-7

Re: Unable to control Relay With Button Actuator

Posted: Monday 18 January 2016 23:25
by postaanerik
Thanks for the info. are you using domoticz on a synology nas? Im using the windows version, maybe that could be causing an issue....

Re: Unable to control Relay With Button Actuator

Posted: Wednesday 20 January 2016 18:15
by gizmocuz
postaanerik wrote:Thanks for the info. are you using domoticz on a synology nas? Im using the windows version, maybe that could be causing an issue....
This should not matter...

Re: Unable to control Relay With Button Actuator

Posted: Wednesday 20 January 2016 21:31
by postaanerik
Thanks for al the feedback, but i'm still lost, hope anyone has an idea, any help is more than welcome.
see screenshot below ( click to enlarge)

Re: Unable to control Relay With Button Actuator

Posted: Wednesday 20 January 2016 22:52
by fets
@postaanerik What is the gateway output when you click in domoticz ?

Re: Unable to control Relay With Button Actuator

Posted: Wednesday 20 January 2016 23:16
by postaanerik
I actually don't know how to monitor.....using the serial gateway, so the port is used for the communication with Domoticz

Re: Unable to control Relay With Button Actuator

Posted: Thursday 21 January 2016 9:18
by fets
Right not so easy to debug gateway.
In my case I use node-red. Take a look if you are interested in.