Page 1 of 1

domoticz.openURL does (not ) work

Posted: Saturday 15 February 2020 13:14
by lumjajo
hello out there,
I am trying to switch a ESPEasy device LED according to the status of the switch:
I do NOT want to get any feedback from any devices I am calling, its a simple http command:

its a simple if/else:
domoticz.openURL'http://192.168.6.146/control?cmd=neopixel,8,0,20,0' or even this:
domoticz.openURL('http://192.168.6.146/control?cmd=neopixel,8,0,20,0')
gives me both the following result in the log:
Error opening url: http://192.168.6.146/control?cmd=neopixel,8,0,20,0

The good thing is it obviously works, means it sends the http command. But how can I solve the error in the log files?
There must be something wrong...
Cheers Jo

Re: domoticz.openURL does (not ) work

Posted: Saturday 15 February 2020 21:24
by cncforhobby
I too use a few ESP's with Leds. I set the colours with a switch and put the http request in "on action" (when you edit the switch from the switches menu).
Does that work for you too?

Re: domoticz.openURL does (not ) work

Posted: Sunday 16 February 2020 10:53
by lumjajo
In Domoitcz I have set up 5 switches, which do perform a http command exactly as in the script, at turning on and turning off. This worked well.
The difficulty I had was when the ESPeasy reboots and there was no action at all, it does not show the actual status of the switches as it is triggered by the action on of off.
With the dcVents script I am checking the status of the switches every minute and then according to the status the neopixel change.What I could do is to make parallel switches which will be triggered every minute by the script and they then send out the exactly same http command at turning on or off.
This is a good idea..maybe I will use it if there is no other way round.

But maybe for other purposes, is there an possibility to send a simple http command via dzvents? just a trigger command for a switch for espeasy?

By the way, the funny thing is my solution works...it just creates failure entries in the log...as there is no feedback from ESPeasy...

Re: domoticz.openURL does (not ) work

Posted: Sunday 16 February 2020 14:56
by waaren
lumjajo wrote: Sunday 16 February 2020 10:53 By the way, the funny thing is my solution works...it just creates failure entries in the log...as there is no feedback from ESPeasy...
The openURL's are just fine but domoticz expects a repsonse and generates an error message when it does not receive one. Does the ESP sends one and is it blocked somewhere in your network or does the ESP simply does not send any response ?

Re: domoticz.openURL does (not ) work

Posted: Sunday 16 February 2020 17:28
by lumjajo
no the ESP is not supposed to send any response, it should simple set a neopixel to the given data...

The basic question is, how do I tell dzvents not to wait for a response and just send out the http message...

Re: domoticz.openURL does (not ) work

Posted: Sunday 16 February 2020 23:11
by waaren
lumjajo wrote: Sunday 16 February 2020 17:28 no the ESP is not supposed to send any response, it should simple set a neopixel to the given data...
The basic question is, how do I tell dzvents not to wait for a response and just send out the http message...
dzVents does not wait for a response unless it is asked to do so in your script (using the httpResponse in the on = section)
The error message is not from dzVents; it is generated by domoticz. Domoticz expects a response from the ESP. As a minimum it should send an OK.
https://en.wikipedia.org/wiki/Hypertext ... r_Protocol