In my project I use a HTTP string to send a command to an ESPEasy device.
The string :
Code: Select all
http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page3.b5.bco=1024As far as I remember, this used to work fine.
Is there something wrong with my URL?
Moderator: leecollings
Code: Select all
http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page3.b5.bco=1024I create this URL in dzVents like:
Code: Select all
domoticz.openURL({
url = http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page3.b5.bco=1024
})Does this URL works when entered from a browser?BertB wrote:I create this URL in dzVents like:Code: Select all
domoticz.openURL({ url = http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page3.b5.bco=1024 })
Yes, it works also with a normal browser, but I get no error.waaren wrote: Monday 13 August 2018 17:00Does this URL works when entered from a browser?BertB wrote:I create this URL in dzVents like:Code: Select all
domoticz.openURL({ url = http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page3.b5.bco=1024 })
What is the error message when entered from dzVents?
If you set loglevel to debug for this script what do you see in the domoticz log (what URL is being send by dzVents)
Verstuurd vanaf mijn ONEPLUS A3003 met Tapatalk
Code: Select all
2018-08-13 18:15:56.528 Status: dzVents: MySubType = ARC
2018-08-13 18:15:56.528 Status: dzVents: page0.vAcht.val=0
2018-08-13 18:15:56.528 Status: dzVents: Debug: OpenURL: url = http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page0.vAcht.val=0
2018-08-13 18:15:56.528 Status: dzVents: Debug: OpenURL: method = GET
2018-08-13 18:15:56.528 Status: dzVents: Debug: OpenURL: post data = nil
2018-08-13 18:15:56.528 Status: dzVents: Debug: OpenURL: headers = nil
2018-08-13 18:15:56.528 Status: dzVents: Debug: OpenURL: callback = nil
2018-08-13 18:15:56.528 Status: dzVents: URL =http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page0.vAcht.val=0
2018-08-13 18:15:56.528 Status: dzVents: -----------------
2018-08-13 18:15:56.529 Status: dzVents: Debug: Constructed timed-command: Off
2018-08-13 18:15:56.529 Status: dzVents: Info: ------ Finished dzE16ConfigMult
2018-08-13 18:15:56.529 Status: dzVents: Debug: Commands sent to Domoticz:
2018-08-13 18:15:56.529 Status: dzVents: Debug: - OpenURL = {["URL"]="http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page7.t0.txt="270"", ["method"]="GET"}
2018-08-13 18:15:56.529 Status: dzVents: Debug: - OpenURL = {["URL"]="http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page7.t1.txt="2.4000000953674"", ["method"]="GET"}
2018-08-13 18:15:56.529 Status: dzVents: Debug: - OpenURL = {["URL"]="http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page0.vFont.val=0", ["method"]="GET"}
2018-08-13 18:15:56.529 Status: dzVents: Debug: - OpenURL = {["URL"]="http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page0.vLight.val=0", ["method"]="GET"}
2018-08-13 18:15:56.529 Status: dzVents: Debug: - OpenURL = {["URL"]="http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page0.vErf.val=0", ["method"]="GET"}
2018-08-13 18:15:56.529 Status: dzVents: Debug: - OpenURL = {["URL"]="http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page0.vAcht.val=0", ["method"]="GET"}
2018-08-13 18:15:56.529 Status: dzVents: Debug: - E16Conf = Off
2018-08-13 18:15:56.529 Status: dzVents: Debug: =====================================================
2018-08-13 18:15:56.612 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2018-08-13 18:15:56.981 Status: dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2018-08-13 18:15:56.698 Error: Error opening url: http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page7.t0.txt="270"
2018-08-13 18:15:56.774 Error: Error opening url: http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page7.t1.txt="2.4000000953674"
2018-08-13 18:15:56.839 Error: Error opening url: http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page0.vFont.val=0
2018-08-13 18:15:56.904 Error: Error opening url: http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page0.vLight.val=0
2018-08-13 18:15:56.963 Error: Error opening url: http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page0.vErf.val=0
2018-08-13 18:15:57.059 (E16Config) Light/Switch (E16Conf)
2018-08-13 18:15:57.049 Status: dzVents: Debug: Processing device-adapter for LivingThSP: Thermostat setpoint device adapter
2018-08-13 18:15:57.049 Status: dzVents: Debug: dzVents version: 2.4.7
2018-08-13 18:15:57.049 Status: dzVents: Debug: Event triggers: Code: Select all
domoticz.openURL({
url = 'http://xxx.xxx.xxx.xxx/control?cmd=NEXTION,page3.b5.bco=1024'
})
Code: Select all
local url = "http://api.waqi.info/feed/geo:".. location .. "/?token=" .. apiKey
dz.openURL({ url = url,
method = "GET"
})
Thank you, but my problem was caused by a lack of response by ESPEasy.waaren wrote: Monday 13 August 2018 19:23 You could try to put your URL in a veriable.
Some chars mess up your URL when used directly.
example:Code: Select all
local url = "http://api.waqi.info/feed/geo:".. location .. "/?token=" .. apiKey dz.openURL({ url = url, method = "GET" })
Users browsing this forum: No registered users and 1 guest