Sarcas wrote: Monday 01 February 2021 16:02
I did the things described
here in the forum to get a curl thing to enable and disable a hue labs scene. I fail miserably to convert the curl command to a dzVents command. I have this:
The right syntax to convert a curl PUT to dzVents openURL is
curl -H 'Content-Type: application/json' -X PUT -d '{"bri": 1,"ct":450}' h ttp://192.168.192.72/api/<API Key>/lights/27/state
Code: Select all
return {
on = {
devices = {
'Hue Trigger',
}
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = 'hue',
},
execute = function(dz)
dz.openURL(
{
url = 'http://192.168.192.72/api/<API Key>/lights/27/state',
method = 'PUT',
headers = { ['Content-Type'] = 'application/json' },
postData = '{ "bri": 123,"ct":450 }'
})
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>>
dzVents wiki