Trying to automate in Domoticz

  • Hello everyone, I just started with mysensors, I have successfully connected a serial gateway and a node that measures temperature. I'm now trying to automate on domoticz so that I can get notifications and other things of my node. I am trying to learn dzVents in the domoticz wiki:(
    The problem is that When I save and run the Quickstart code with the name of my switch the log only shows that it has been turn on and doesnt show my log message.
    return {
    on = {
    devices = {
    execute = function(domoticz, switch)
    if (switch.state == 'On') then
    domoticz.log('Hey! I am on!')
    domoticz.log('Hey! I am off!')

    I have already set the local network to and enabled dzVents.
    Does anyone now what is happening?

  • First, make sure your switch is really named 'switch', the scripts are case sensitive, so neither 'Switch' nor 'SWITCH' will work. Also, verify you don't have a trailing space in the name ('switch ').
    To check your script is run when the device is changed, add a domoticz.log first line in the execute function.
    Hope this helps.

  • @boum sadly it didnt work 😞 I made sure that the name of the switch was well written and I added a domoticz.log with a message inside the function and it didnt work.

  • the problem is "if (switch.state == 'On') then" that not works, write:

    if ( then


    if (switch.inActive) then

    Device attributes and methods for all devices

Log in to reply

Suggested Topics

  • 5
  • 8
  • 3
  • 4
  • 2
  • 1