State O-Matic Binding - Monitor your Washingmachine / Dishwasher / Electric Car Etc

Another usage is to measure energy cost for something that does not provide energy or power values.

@stuetzomat

I was just about to implement this, when I looked in the code to see that it is fully supported as of the current state of the binding.

Add a new state machine with the following config:

create these simple rules:

I tested this with my ZwaveReading Light. When the item “ZwaveReadingLightSwitch” is turned ON it will send 60W as on.
The machine will then calculate energy consumption as long as it is on until another value is sent. When turned off I send 0. If you want dimmed values, you can send 20, 30 , 40 etc.

rule "BridgeOmaticPowerTest"
when
    Item ZwaveReadingLightSwitch changed to ON
then
    logInfo("Omatic", "TestMachine send command")
    OMTestMachinePowerIn.sendCommand(60)
end

rule "BridgeOmaticPowerTestOff"
when
    Item ZwaveReadingLightSwitch changed to OFF
then
    OMTestMachinePowerIn.sendCommand(0)
end

Items:

Group    OMatic
Group    OMTestMachine               "TestMachine"                       (OMatic)
Number   OMTestMachinePowerIn         "Power In [%.2f W]" (OMTestMachine) { channel="omatic:machine:MYID:power-input" } 
Number   OMTestMachinePower         "Power [%.2f W]" (OMTestMachine) { channel="omatic:machine:MYID:power" } 
Number   OMTestMachineEnergy2         "Energy Estimated [%.2f kWh]" (OMTestMachine) { channel="omatic:machine:MYID:energy2" }
Number   OMTestMachineCost2         "Cost Estimated [%.2f EUR]" (OMTestMachine) { channel="omatic:machine:MYID:cost2" }
Number   OMTestMachineMaxPower        "Max Power [%.2f W]" (OMTestMachine) { channel="omatic:machine:MYUD:max-power" }
Number   OMTestMachineTotalEnergy2     "Total Estimated Energy [%.2f kWh]" (OMTestMachine) { channel="omatic:machine:MYID:total-energy2" }
Number   OMTestMachineTotalCost2     "Total Estimated Cost [%.2f EUR]" (OMTestMachine) { channel="omatic:machine:MYID:total-cost2" }
String   OMTestMachineState     "State [%s]" (OMTestMachine) { channel="omatic:machine:MYID:state" }
Number   OMTestMachineTime     "Running Time [%ds]" (OMTestMachine) { channel="omatic:machine:MYID:time" }
String   OMTestMachineTimeStr     "Running Time [%s]" (OMTestMachine) { channel="omatic:machine:MYID:time-str" }
String   OMTestMachineStarted "Started [%s]" (OMTestMachine)  { channel="omatic:machine:MYID:started" }
String   OMTestMachineCompleted "Completed [%s]" (OMTestMachine) { channel="omatic:machine:MYID:completed" }
Number   OMTestMachineTotalTime     "Total Running Time [%ds]" (OMTestMachine) { channel="omatic:machine:MYID:total-time" }
String   OMTestMachineTotalTimeStr     "Total Running Time [%s]" (OMTestMachine) { channel="omatic:machine:MYID:total-time-str" }
Switch   OMTestMachineRunning       "Running [%s]"    (OMTestMachine) { channel="omatic:machine:MYID:running" }
Switch   OMTestMachineReset        "Reset [%s]"    (OMTestMachine) { channel="omatic:machine:MYID:reset" }
Switch   OMTestMachineDisable        "Disable [%s]"    (OMTestMachine) { channel="omatic:machine:MYID:disable" }