Hello community!
I made a rule to show if the coffee is done or if the coffee machine is still running based on the power usage from the Fibaro Wall Plug which has power metering. If the power consumption is over 100 Watts, the text string, well, should say that the coffee making is in progress. If it is over 0 and under 100, the text says that the coffee is done, and if the value is 0, the text says that the machine is turned off.
I was happy when I got it to work, but suddenly the status doesn’t update anymore. I can still turn the power on, and the Watt metering value changes all the time, but the text string which is based on the number value doesn’t update. Can anyone see what’s wrong? I get no errors in the faillog, but I can’t see that the text string updates in the eventlog either. Last week, I could…
Items:
Switch Wallplug_Kaffetrakter_60m "Kaffetrakter timer" <poweroutlet> { expire="60m,command=OFF", channel="zwave:device:d67f18e5:node5:switch_binary" } // Timer 60 minutes
Number Wallplug_Kaffetrakter_Watt "Kaffetrakter Watt" <poweroutlet> { channel="zwave:device:d67f18e5:node5:meter_watts" } // Current Watt usage
String Wallplug_Kaffetrakter_Status // Status text line
Rules:
rule "Kaffetrakter rule"
when
Item Wallplug_Kaffetrakter_Watt changed
then
if(Wallplug_Kaffetrakter_Watt.state > 1 && Wallplug_Kaffetrakter_Watt.state < 100) postUpdate(Wallplug_Kaffetrakter_Status, "Kaffe klar, trakter på") // Text coffee ready
else if(Wallplug_Kaffetrakter_Watt.state > 100) postUpdate(Wallplug_Kaffetrakter_Status, "Kaffe traktes") // Text coffee in the making
else if(Wallplug_Kaffetrakter_Watt.state == 0) postUpdate(Wallplug_Kaffetrakter_Status, "Kaffetrakter avslått") // Text coffee machine off
else if(Wallplug_Kaffetrakter_Watt.state == "") postUpdate(Wallplug_Kaffetrakter_Status, "ingenting") // Not in use
end
Sitemap:
Frame label="Kaffetrakter" {
Switch item=Wallplug_Kaffetrakter_60m label="Kaffetrakter, 1 time" // Activates the plug for 60 minutes
Text item=Wallplug_Kaffetrakter_Status label="Status kaffetrakter [%s]" // Shows the string
Text item=Wallplug_Kaffetrakter_Watt label="Effekt kaffetrakter" // Shows Watt
}
Log:
2017-05-08 22:47:07.862 [ItemStateChangedEvent ] - Wallplug_Kaffetrakter changed from OFF to ON
2017-05-08 22:47:08.192 [ItemStateChangedEvent ] - Wallplug_Kaffetrakter_kWh changed from NULL to 13.14
2017-05-08 22:47:08.363 [ItemStateChangedEvent ] - Kaffetrakter_watt changed from 0 to 418.1
2017-05-08 22:47:09.682 [ItemStateChangedEvent ] - Wallplug_Kaffetrakter_Watt changed from 418.1 to 183.2
2017-05-08 22:47:13.661 [ItemStateChangedEvent ] - Wallplug_Kaffetrakter_Watt changed from 183.2 to 155.3
2017-05-08 22:47:20.684 [ItemStateChangedEvent ] - Wallplug_Kaffetrakter_Watt changed from 155.3 to 130.8
2017-05-08 22:47:26.681 [ItemStateChangedEvent ] - Wallplug_Kaffetrakter_Watt changed from 130.8 to 106.8
As you can see from the log, the Watt value is updated and is visible in the sitemap, but the text string gets no information.