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
domoticz.openURL does (not ) work
Moderator: leecollings
-
- Posts: 3
- Joined: Sunday 12 January 2020 15:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.11590
- Location: Waddinxveen, Netherlands
- Contact:
Re: domoticz.openURL does (not ) work
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?
Does that work for you too?
-
- Posts: 67
- Joined: Wednesday 26 April 2017 20:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: Germany
- Contact:
Re: domoticz.openURL does (not ) work
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...
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...
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: domoticz.openURL does (not ) work
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 ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 67
- Joined: Wednesday 26 April 2017 20:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: Germany
- Contact:
Re: domoticz.openURL does (not ) work
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...
The basic question is, how do I tell dzvents not to wait for a response and just send out the http message...
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: domoticz.openURL does (not ) work
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
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Who is online
Users browsing this forum: No registered users and 1 guest