I like that tutorial a lot, unfortunately I’m not getting the expected results. I’m new at this which is why I suppose I’m making a beginners mistake. The only output I receive in my GUI is a “-”.
washingmachine.items:
String Washingmachine_OpState “Washingmachine State [MAP(washingmachine.map):%s]”
washingmachine.rules:
val Number MODE_OFF = 0
val Number MODE_STANDBY = 1
val Number MODE_ACTIVE = 2
val Number MODE_FINISHED = 3
rule “Washingmachine Consumption State Machine”
when
Item avmfritz_FRITZ_DECT_200_1_087610044241_power changed
then
if (avmfritz_FRITZ_DECT_200_1_087610044241_power.state < 0.2) Washingmachine_OpState.postUpdate(MODE_OFF)
else if (avmfritz_FRITZ_DECT_200_1_087610044241_power.state > 10) Washingmachine_OpState.postUpdate(MODE_ACTIVE)
else if (avmfritz_FRITZ_DECT_200_1_087610044241_power.state < 3) {
if (Washingmachine_OpState.state == MODE_OFF) Washingmachine_OpState.postUpdate(MODE_STANDBY)
else if (Washingmachine_OpState.state == MODE_ACTIVE) Washingmachine_OpState.postUpdate(MODE_FINISHED)
}
end
default.sitemap entry, embedded in a frame:
Text item=Washingmachine_OpState label=“Waschmaschine [MAP(washingmachine.map):%d]” icon=“washingmachine_2”
washingmachine.map:
0=Aus
1=Standby
2=Aktiv
3=Fertig
NULL=?
-=-
Some example lines from my measurements:
2019-02-10 15:58:39.185 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 394.390 W to 389.310 W
2019-02-10 15:58:54.815 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 389.310 W to 15.300 W
2019-02-10 15:59:09.967 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 15.300 W to 15.230 W
2019-02-10 15:59:24.975 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 15.230 W to 15.300 W
2019-02-10 15:59:39.805 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 15.300 W to 15.230 W
2019-02-10 15:59:54.821 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 15.230 W to 15.660 W
2019-02-10 16:00:10.474 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 15.660 W to 3.140 W
2019-02-10 16:00:24.803 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 3.140 W to 3.360 W
2019-02-10 16:00:54.825 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 3.360 W to 3.070 W
2019-02-10 16:01:25.005 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 3.070 W to 3.360 W
2019-02-10 16:01:39.833 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 3.360 W to 3.140 W
2019-02-10 16:01:54.927 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 3.140 W to 14.730 W
2019-02-10 16:02:10.041 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 14.730 W to 3.430 W
2019-02-10 16:02:24.927 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 3.430 W to 3.070 W
2019-02-10 16:02:54.887 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 3.070 W to 3.360 W
2019-02-10 16:03:24.864 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 3.360 W to 3.070 W
2019-02-10 16:03:54.877 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 3.070 W to 2.930 W
2019-02-10 16:04:09.840 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 2.930 W to 2.640 W
2019-02-10 16:04:39.825 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 2.640 W to 2.930 W
2019-02-10 16:04:55.208 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 2.930 W to 2.640 W
2019-02-10 16:05:24.834 [vent.ItemStateChangedEvent] - avmfritz_FRITZ_DECT_200_1_087610044241_power changed from 2.640 W to 2.930 W
Basic UI Output:

May somebody please help me to find the problem?