in the domoticz website, the wiki page, there is description on how to use domoticz api json url
I cannot write the url here. Very strange
Just below the contents there is a format describing the url to change a switch or whatever.
I can NOT show this url here??
and if I have a script like
Code: Select all
return {
on = {
customEvents = {
'testTrigger' -- event triggered by emitEvent
}
},
execute = function(XX, XXX,triggerinfo)
XXdevices(13).switchOn() --end
XXlog('Test succeeded = ' .. XXX data(0), XX LOG_ERROR)
end
}
I replaced dz with XX and device with XXX.
Is this the way I have to post a problem?
My problem is that if the script is executed I want to use the parameters I included in the url
---jeessoonhtm?type=command¶m=customevent&event=testTrigger&idx=10&switchcmd=Set%20Level&level=25
(I cannot include json with a dot and then htm or http in the line above)
I tried dz DOT log('Test succeeded = ' .. device DOT data, dz DOT LOG_ERROR)
but it gives me an error