Turning relay ON from Domoticz

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
nafremony2
Normal user
Posts: 2
Joined: 12 Feb 2017, 08:37

Turning relay ON from Domoticz

#1 Post by nafremony2 » 12 Feb 2017, 08:52

Hello, I know that to be able to turn relay ON/OFF from Domoticz I need to set On/Off action. But I have two problems with that and maybe somebody already has a solution.

1. With the http://esp/control?cmd=GPIO,x,y I need to know what's the GPIO number. So if I would rewire it, I would need to change it in Domoticz. I'd like to have some abstraction. I was looking at Rules. And that might be the way to go. Any reason why it's not enabled by default? Is it stable?

2. If you turn it on and ESP would be off/disconnected/whatever the switch would still be on, because there's no confirmation. Only after the Sensor Timeout in Domoticz the sensor would be "red" (and you still don't know what's the current state). Kind of lame.

paxi
Normal user
Posts: 121
Joined: 02 Feb 2017, 00:48
Location: Germany

Re: Turning relay ON from Domoticz

#2 Post by paxi » 13 Feb 2017, 02:08

1. Rules are working fine, go for it.
2. If you can propose a mechanism how an unpowered or disconnected device could communicate it's current state you're a freaking genius - otherwise I'd consider your criticism as "kind of lame". ;)

nafremony2
Normal user
Posts: 2
Joined: 12 Feb 2017, 08:37

Re: Turning relay ON from Domoticz

#3 Post by nafremony2 » 13 Feb 2017, 07:38

Of course. From an ESP's side there's not much you can do. But I was hoping for some trick on Domoticz's side. I suppose I'm not the first one to think about this.

foad62
Normal user
Posts: 6
Joined: 19 Apr 2017, 13:11

Re: Turning relay ON from Domoticz

#4 Post by foad62 » 19 Apr 2017, 14:01

I have a similar problem.
I use ESP Easy for a relay. For example when the ESP node is dead and I send an On command using Domoticz Android App. It seems the command is sent OK but of course it's not. And when I check the log messages I found the following message:
Error Opening url:http://192.168.1.101/control?cmd=GPIO,12,1
Is there a way the user be notified of this error immediately without referring to Logs?

DeNB3rt
Normal user
Posts: 120
Joined: 15 Dec 2015, 14:07

Re: Turning relay ON from Domoticz

#5 Post by DeNB3rt » 25 Apr 2017, 13:43

foad62 wrote:
19 Apr 2017, 14:01
I have a similar problem.
I use ESP Easy for a relay. For example when the ESP node is dead and I send an On command using Domoticz Android App. It seems the command is sent OK but of course it's not. And when I check the log messages I found the following message:
Error Opening url:http://192.168.1.101/control?cmd=GPIO,12,1
Is there a way the user be notified of this error immediately without referring to Logs?
hmm I was also thinking about that, my christmas tree is not there anymore :D But I can still enable/disable the lights.
It would be cool that the switch is staying 'off'. (How do you manage to get the switch in 'offline' modus? Did not find out yet)

//edit, Think I found it:
pinstate = substr(response, 64, 1)

ty!
Located in Belgium, Bruges. Working on a full DIY domoticz setup with ESPEasy.

paxi
Normal user
Posts: 121
Joined: 02 Feb 2017, 00:48
Location: Germany

Re: Turning relay ON from Domoticz

#6 Post by paxi » 29 Apr 2017, 00:17

DeNB3rt wrote:
25 Apr 2017, 13:43
...
//edit, Think I found it:
pinstate = substr(response, 64, 1)

ty!
Funny to see that here, I've posted that line of pseudocode in a completely different context - it won't do anything in domoticz or with a dead node. You may want to reread the topic where you found it. ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests