So i tried to make my first dcevenz script. I have a dummy switch (selector) on/off and volumecontrol and made a simple script from within the events gui. My reciever does not work with this script... The old lua script works perfect for years...
return {
active = true,
on = {
devices = {
'denon_volume'
}
},
execute = function(domoticz, device)
IP=devices = { domoticz.variables('ipdenon').value } -- this is uservariable
if (device.state == 'On') then
os.execute ("curl http://" .. (IP) .. "/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FON" ); -- zet denon aan
else
os.execute ("curl http://" .. (IP) .. "/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FOFF" ); -- zet denon uit
end
end
}
help with simple lua script
Moderator: leecollings
-
- Posts: 822
- Joined: Wednesday 12 November 2014 15:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest b
- Contact:
help with simple lua script
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Jablotron connection, Ikea
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: help with simple lua script
try with...
ip = domoticz.variables('ipdenon').value
and then
os.execute('curl "http://'..IP..'/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FON"')
ip = domoticz.variables('ipdenon').value
and then
os.execute('curl "http://'..IP..'/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FON"')
The most dangerous phrase in any language is:
"We always done this way"
"We always done this way"
Who is online
Users browsing this forum: No registered users and 1 guest