rule "Monitor Display Status On"
    when
        Item Monitor_Display_State changed to ON
    then
        var state = Monitor_Display_State.state;
        Monitor_Display.postUpdate(ON)
end

rule "Monitor Display Status Off"
    when
        Item Monitor_Display_State changed to OFF
    then
        var state = Monitor_Display_State.state;
        Monitor_Display.postUpdate(OFF)
end
    
rule "Monitor Display"
  when
      Item Monitor_Display received command
  then
      logInfo("Monitor_Display", "Command received:" + receivedCommand)

      if(receivedCommand == ON) {
          // "on" argument to set_dpms.sh
          Monitor_Display_Command_Args.sendCommand("on")
      }
      else {
          Monitor_Display_Command_Args.sendCommand("off")
      }
end

iot/openhab2/control_dpms_monitor/rules/display.rules.txt ยท Last modified: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.