Domoticz is set-up to receive MQTT commands through with the domoticz/in prefix (this works to trigger devices already). I've created a test flow in NodeRED, which results in the following output on MQTT: The dzVents script has the following triggers defined (I'm intended to schange the MyEvent and myData description later on, but this is for the sake of testing):
Code: Select all
return {
on = {
timer = {
'at ' .. TijdAan,
'at ' .. TijdUit,
"at sunrise",
"at sunset"
},
customEvents = {
"command":"customevent", "event":"MyEvent", "data":"myData"
}
},
logging = { level = domoticz.LOG_ERROR , marker = "Lamp voorkamer"},
execute = function(dz, item)
2023-01-17 11:17:53.823 Error: dzVents: Error: (3.1.8) error loading module 'control_lamp_voorkamer' from file '/home/pi/domoticz/scripts/dzVents/scripts/control_lamp_voorkamer.lua':
2023-01-17 11:17:53.823 ...oticz/scripts/dzVents/scripts/control_lamp_voorkamer.lua:13: '}' expected near ':'