How to add a value in a HTTP string ? (openURL)

Easy to use, 100% Lua-based event scripting framework.
Post Reply
HFman
Posts: 48
Joined: Thursday 02 March 2017 21:28
Target OS: Linux
Domoticz version: 4.9700
Contact:

How to add a value in a HTTP string ? (openURL)

Post by HFman » Wednesday 05 December 2018 23:22

I am using domoticz.openURL to send data to an ESP module.
This works fine.

Example : domoticz.openURL('http://192.168.1.185/control?cmd=PWM,2,200')

The last 200 i need to change depending on temperature.
How can i make a varaiable from this one ?
Tried serveral ways... but not succesfull so far....
Raspberry PI 3 - Opentherm Gateway + ESP8826 - EvoHome - ESPEasy CO2 + Fancontrol - RF-Link -

HFman
Posts: 48
Joined: Thursday 02 March 2017 21:28
Target OS: Linux
Domoticz version: 4.9700
Contact:

Re: How to add a value in a HTTP string ? (openURL)

Post by HFman » Wednesday 05 December 2018 23:34

Solved.. yesterday evening didn't find it.. now i found it :

domoticz.openURL(
{ url = "http://192.168.1.185/control?cmd=PWM,2," .. FAN,
method = "GET",
callback = "getLog" ,
})
Raspberry PI 3 - Opentherm Gateway + ESP8826 - EvoHome - ESPEasy CO2 + Fancontrol - RF-Link -

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest