Washing Machine State Machine

power
Tags: #<Tag:0x00007fd314ec3fa8>

(Olaf) #122

I can´t read the power consumption, voltage etc. from a Sonoff POW flashed with Sonoff-Tasmota. The information page on the device says “Program version 5.0.6”

I have tried a few MQTT lines, such as:

Number nWama_Energy "Energy [%.1f]"  { mqtt="<[mosquitto:tele/sonoff-wama/ENERGY:state:default]" }

Number nWama_Energy "Energy [%.1f]"  { mqtt="<[mosquitto:tele/sonoff-wama/Power:state:default]" }

From the device console I see the following messages

01:10:22 MQTT: tele/sonoff-wama/STATE = {"Time":"2017-07-25T01:10:22", "Uptime":2, "Vcc":3.189, "POWER":"ON", "Wifi":{"AP":1, "SSID":"Home Zone", "RSSI":100, "APMac":"34:31:C4:5F:AC:8A"}}
01:10:22 MQTT: tele/sonoff-wama/ENERGY = {"Time":"2017-07-25T01:10:22", "Total":0.040, "Yesterday":0.015, "Today":0.025, "Period":2, "Power":30, "Factor":0.91, "Voltage":230, "Current":0.143}

I either see a dash or 0.0 as the item value.

Can somebody please give me a hint or share his items configuration?


(Sergey M) #123
Switch		box_heater				"Heater [%s]"				<radiator>	(gILeft)	{ mqtt="<[mqtt-loc:stat/box-heater/POWER:state:default],
																								<[mqtt-loc:tele/box-heater/STATE:state:JSONPATH($.POWER)],
																								>[mqtt-loc:cmnd/box-heater/power:command:*:default]"}
Number		box_heater_voltage		"Voltage [%d V]"			<energy>				{ mqtt="<[mqtt-loc:tele/box-heater/ENERGY:state:JSONPATH($.Voltage)]"}
Number		box_heater_current		"Current [%.3f А]"			<energy>				{ mqtt="<[mqtt-loc:tele/box-heater/ENERGY:state:JSONPATH($.Current)]"}
Number		box_heater_power		"Power [%.1f Wt]"			<energy>				{ mqtt="<[mqtt-loc:tele/box-heater/ENERGY:state:JSONPATH($.Power)]"}
Number		box_heater_today		"Today [%.3f kWt]"			<line>					{ mqtt="<[mqtt-loc:tele/box-heater/ENERGY:state:JSONPATH($.Today)]"}
Number		box_heater_yesterday	"Yesterday [%.3f кВт]"		<line>					{ mqtt="<[mqtt-loc:tele/box-heater/ENERGY:state:JSONPATH($.Yesterday)]"}

DateTime	box_heater_update		"Update [%1$ta %1$tR]"		<clock>					{ mqtt="<[mqtt-loc:tele/box-heater/STATE:state:JSONPATH($.Time)]"}
Number		box_heater_uptime		"Uptime [%d]"				<clock>					{ mqtt="<[mqtt-loc:tele/box-heater/STATE:state:JSONPATH($.Uptime)]"}
String		box_heater_state		"State [%s]"				<switch>				{ mqtt="<[mqtt-loc:tele/box-heater/STATE:state:JSONPATH($.POWER)]"}
Number		box_heater_rssi			"RSSI [%d %%]"				<signal>				{ mqtt="<[mqtt-loc:tele/box-heater/STATE:state:JSONPATH($.Wifi.RSSI)]"}
String		box_heater_lwt			"LWT [%s]"					<signal>				{ mqtt="<[mqtt-loc:tele/box-heater/LWT:state:default]"}


ITEAD Sonoff switches and sockets - cheap ESP8266 Wifi+MQTT hardware
(Olaf) #124

Thank you so much for sharing.
In order for that JSONPATH thing to work, I would need a rule, correct? If yes, would you also share your rule, please?


(Sergey M) #125

Rule is not necessary, you need to establish a transformation.


(Olaf) #126

Bingo, thank you!!!


( ) #127

Also check out: https://github.com/arendst/Sonoff-Tasmota/wiki/openHAB#mandatory-topics--items

@Olymp feel free to add your items to the wiki article (in the right place)


(Olaf) #128

When I use the command

grep "Washingmachine_Power changed" /var/log/openhab2/events.log

on a Linux machine the output is only

Binary file /var/log/openhab2/events.log matches

instead of that nice listing . How can I extract the lines "nWama_Current changed " from the log file?


(Sebastian) #129

That does not seem to be the active log file but rather a compressed historical logfile.
You could do ‘zcat logfile | grep pattern’.
But if you’re looking for recent events you habe to Check the active logfile.


(Hallo Ween) #130

Short question:

This values

val Number MODE_OFF = 0
val Number MODE_STANDBY = 1
val Number MODE_ACTIVE = 2
val Number MODE_FINISHED = 3

Can i use them inside my sitemap to make some visibility-switches too?

Or can i use this only inside the one rule rules-file, in that this is declared?


(Jerome) #131

This values are limited to the rules file if I remember correctly.

But you could of course add a number item and map it to on of the 4 available states within your rules.


(Hallo Ween) #132

I already have this, because without the number item the state machine will not work???

So my number item has 0, 1, 2 , … and inside the rules file i can use the declared strings “mode_off” and so on.

So my sitemap looks like this:

Switch item=Switch_Dummy  visibility=[number_item==0]

But this would be more readable if i can use it like this:

Switch item=Switch_Dummy  visibility=[number_item==MODE_OFF]

But that´s ok, it works well with the numbers, would be only nice to have if i can use the declared names everywhere.


( ) #133

The variable names, e.g. MODE_OFF can not be used outside the rule. They are defined locally in that file.

However what is possible and I learned to be the better solution for such cases is to use Strings instead of Numbers for the state:

//Item:
String Washingmachine_OpState "Washingmachine State [MAP(opstate.map):%s]"

// In rule:
Washingmachine_OpState.postUpdate("FINISHED")

From a programmers point of view that might be a bit weird but it’s the better option from a openHAB pov.


(Kevin) #134

This is my Solution for my Dryer … The crease protection had driven me crazy

Now it works very fine :slight_smile: I became a Notification when the Crease Protection begins :slight_smile:

val Number MODE_OFF = 0
val Number MODE_STANDBY = 1
val Number MODE_ACTIVE = 2
val Number MODE_FINISHED = 3
val Number MODE_CREASE_PROTECTION = 4
var Number Trockner_Counter = 0

//#########################################################################//
//Trockner Status anhand des aktuellen Stromverbrauches setzen             //
//Wenn Status Fertig, dann Telegram senden und Sprachausgabe Funkgong + LED//
//#########################################################################//

    rule "Trockner Status"
    when
        Item Steckdose_Trockner_Power changed
    then
      if (Steckdose_Trockner_Power.state < 1) Trockner_Status.postUpdate(MODE_OFF)
      else if (Steckdose_Trockner_Power.state > 100  && Trockner_Status.state !== (MODE_CREASE_PROTECTION) || Steckdose_Trockner_Power.state > 500){
        Trockner_Status.postUpdate(MODE_ACTIVE)
      }
      if (Trockner_Status.state == (MODE_ACTIVE) && Steckdose_Trockner_Power.state < 2){
        Trockner_Counter = Trockner_Counter + 1
      }
      if (Steckdose_Trockner_Power.state > 1 && Steckdose_Trockner_Power.averageSince(now.minusMinutes(2)) < 2) {
        if (Trockner_Status.state == MODE_OFF) Trockner_Status.postUpdate(MODE_STANDBY)
      }
      if (Trockner_Counter > 6){
        if (Trockner_Status.state == MODE_ACTIVE){
          Trockner_Counter = 0
          Trockner_Status.postUpdate(MODE_CREASE_PROTECTION)
        }
      }
      if (Steckdose_Trockner_Power.averageSince(now.minusMinutes(30)) < 150){
        if (Trockner_Status.state == (MODE_CREASE_PROTECTION)) Trockner_Status.postUpdate(MODE_FINISHED)
      }
    end

And this is my Log from the Dryer

21:23:16.691 - Steckdose_Trockner_Power changed from 0.03 to 352.47
21:23:32.137 - Steckdose_Trockner_Power changed from 352.47 to 2215.889999
21:23:48.764 - Steckdose_Trockner_Power changed from 2215.889999 to 2210.389999
21:24:04.159 - Steckdose_Trockner_Power changed from 2210.389999 to 2206.719997
21:24:20.138 - Steckdose_Trockner_Power changed from 2206.719997 to 2208.07
21:24:36.147 - Steckdose_Trockner_Power changed from 2208.07 to 2198.519997
21:24:52.135 - Steckdose_Trockner_Power changed from 2198.519997 to 2189.179996
21:25:08.154 - Steckdose_Trockner_Power changed from 2189.179996 to 2201.489998
21:25:16.619 - Steckdose_Trockner_Power changed from 2201.489998 to 2184.589996
21:25:24.152 - Steckdose_Trockner_Power changed from 2184.589996 to 2085.439999
21:25:40.140 - Steckdose_Trockner_Power changed from 2085.439999 to 2109.439999
21:25:56.534 - Steckdose_Trockner_Power changed from 2109.439999 to 2092.889999
21:26:12.212 - Steckdose_Trockner_Power changed from 2092.889999 to 2092.929996
21:26:28.146 - Steckdose_Trockner_Power changed from 2092.929996 to 2098.599998
21:26:44.125 - Steckdose_Trockner_Power changed from 2098.599998 to 2089.919998
21:27:00.135 - Steckdose_Trockner_Power changed from 2089.919998 to 2103.32
21:27:16.140 - Steckdose_Trockner_Power changed from 2103.32 to 1.31
21:27:32.159 - Steckdose_Trockner_Power changed from 1.31 to 14.19
21:27:48.140 - Steckdose_Trockner_Power changed from 14.19 to 2059.459999
21:27:50.383 - Steckdose_Trockner_Power changed from 2059.459999 to 2064.969997
21:28:04.171 - Steckdose_Trockner_Power changed from 2064.969997 to 2058.169998
21:28:20.165 - Steckdose_Trockner_Power changed from 2058.169998 to 2041.699999
21:28:36.158 - Steckdose_Trockner_Power changed from 2041.699999 to 2047.309999
21:28:52.160 - Steckdose_Trockner_Power changed from 2047.309999 to 2140.269997
21:29:08.677 - Steckdose_Trockner_Power changed from 2140.269997 to 2141.829998
21:29:25.183 - Steckdose_Trockner_Power changed from 2141.829998 to 2156.25
21:29:40.149 - Steckdose_Trockner_Power changed from 2156.25 to 2158.339996
21:29:56.118 - Steckdose_Trockner_Power changed from 2158.339996 to 2160.549999
21:30:09.628 - Steckdose_Trockner_Power changed from 2160.549999 to 2156.169998
21:30:12.117 - Steckdose_Trockner_Power changed from 2156.169998 to 2153.689999
21:30:28.119 - Steckdose_Trockner_Power changed from 2153.689999 to 2147.589996
21:30:44.698 - Steckdose_Trockner_Power changed from 2147.589996 to 2145.109997
21:31:00.119 - Steckdose_Trockner_Power changed from 2145.109997 to 2052.619999
21:31:16.117 - Steckdose_Trockner_Power changed from 2052.619999 to 2147.329998
21:31:32.121 - Steckdose_Trockner_Power changed from 2147.329998 to 1458.949999
21:31:48.117 - Steckdose_Trockner_Power changed from 1458.949999 to 145.06
21:32:04.134 - Steckdose_Trockner_Power changed from 145.06 to 2133.869999
21:32:28.134 - Steckdose_Trockner_Power changed from 2133.869999 to 2120.049999
21:32:44.150 - Steckdose_Trockner_Power changed from 2120.049999 to 2127.639999
21:33:00.145 - Steckdose_Trockner_Power changed from 2127.639999 to 2136.919998
21:33:16.157 - Steckdose_Trockner_Power changed from 2136.919998 to 2132.169998
21:33:32.146 - Steckdose_Trockner_Power changed from 2132.169998 to 2135.519997
21:33:48.146 - Steckdose_Trockner_Power changed from 2135.519997 to 2136.639999
21:34:05.395 - Steckdose_Trockner_Power changed from 2136.639999 to 2155.059998
21:34:20.146 - Steckdose_Trockner_Power changed from 2155.059998 to 2140.579998
21:34:36.143 - Steckdose_Trockner_Power changed from 2140.579998 to 2140.91
21:34:52.143 - Steckdose_Trockner_Power changed from 2140.91 to 2142.369999
21:35:08.146 - Steckdose_Trockner_Power changed from 2142.369999 to 2139.149998
21:35:08.835 - Steckdose_Trockner_Power changed from 2139.149998 to 2139.029999
21:35:24.145 - Steckdose_Trockner_Power changed from 2139.029999 to 2141.449997
21:35:40.145 - Steckdose_Trockner_Power changed from 2141.449997 to 2142.419998
21:35:56.144 - Steckdose_Trockner_Power changed from 2142.419998 to 145.68
21:36:12.143 - Steckdose_Trockner_Power changed from 145.68 to 1350.369999
21:36:28.151 - Steckdose_Trockner_Power changed from 1350.369999 to 2144.029999
21:36:44.143 - Steckdose_Trockner_Power changed from 2144.029999 to 2139.32
21:37:00.148 - Steckdose_Trockner_Power changed from 2139.32 to 2136.519997
21:37:16.125 - Steckdose_Trockner_Power changed from 2136.519997 to 2135.539997
21:37:32.126 - Steckdose_Trockner_Power changed from 2135.539997 to 2135.439999
21:37:49.083 - Steckdose_Trockner_Power changed from 2135.439999 to 2138.329998
21:38:04.123 - Steckdose_Trockner_Power changed from 2138.329998 to 2138.989998
21:38:20.124 - Steckdose_Trockner_Power changed from 2138.989998 to 2136.639999
21:38:36.125 - Steckdose_Trockner_Power changed from 2136.639999 to 2138.679996
21:38:52.124 - Steckdose_Trockner_Power changed from 2138.679996 to 2156.75
21:39:08.123 - Steckdose_Trockner_Power changed from 2156.75 to 2152.739998
21:39:24.126 - Steckdose_Trockner_Power changed from 2152.739998 to 2151.25
21:39:40.125 - Steckdose_Trockner_Power changed from 2151.25 to 2136.469997
21:39:56.154 - Steckdose_Trockner_Power changed from 2136.469997 to 2146.32
21:40:12.158 - Steckdose_Trockner_Power changed from 2146.32 to 256.07
21:40:14.352 - Steckdose_Trockner_Power changed from 256.07 to 145.80
21:40:28.146 - Steckdose_Trockner_Power changed from 145.80 to 1.36
21:40:44.403 - Steckdose_Trockner_Power changed from 1.36 to 2146.219997
21:41:00.148 - Steckdose_Trockner_Power changed from 2146.219997 to 2142.429996
21:41:16.159 - Steckdose_Trockner_Power changed from 2142.429996 to 2145.239998
21:41:32.152 - Steckdose_Trockner_Power changed from 2145.239998 to 2138.809998
21:41:48.164 - Steckdose_Trockner_Power changed from 2138.809998 to 2146.339996
21:42:04.848 - Steckdose_Trockner_Power changed from 2146.339996 to 2147.969997
21:42:20.153 - Steckdose_Trockner_Power changed from 2147.969997 to 2145.669998
21:42:36.148 - Steckdose_Trockner_Power changed from 2145.669998 to 2138.519997
21:42:52.154 - Steckdose_Trockner_Power changed from 2138.519997 to 2142.739998
21:43:08.136 - Steckdose_Trockner_Power changed from 2142.739998 to 2150.119999
21:43:24.147 - Steckdose_Trockner_Power changed from 2150.119999 to 2148.759998
21:43:40.158 - Steckdose_Trockner_Power changed from 2148.759998 to 2135.439999
21:43:56.156 - Steckdose_Trockner_Power changed from 2135.439999 to 2154.259998
21:44:16.147 - Steckdose_Trockner_Power changed from 2154.259998 to 2135.009998
21:44:32.282 - Steckdose_Trockner_Power changed from 2135.009998 to 144.45
21:44:48.149 - Steckdose_Trockner_Power changed from 144.45 to 1376.539999
21:45:04.146 - Steckdose_Trockner_Power changed from 1376.539999 to 2157.369999
21:45:20.147 - Steckdose_Trockner_Power changed from 2157.369999 to 2156.989998
21:45:26.135 - Steckdose_Trockner_Power changed from 2156.989998 to 2160.269997
21:45:55.139 - Steckdose_Trockner_Power changed from 2160.269997 to 2146.889999
21:46:12.157 - Steckdose_Trockner_Power changed from 2146.889999 to 2157.049999
21:46:28.152 - Steckdose_Trockner_Power changed from 2157.049999 to 2147.32
21:46:44.148 - Steckdose_Trockner_Power changed from 2147.32 to 2128.019997
21:47:00.148 - Steckdose_Trockner_Power changed from 2128.019997 to 2142.199997
21:47:16.151 - Steckdose_Trockner_Power changed from 2142.199997 to 2088.889999
21:47:32.133 - Steckdose_Trockner_Power changed from 2088.889999 to 2099.299999
21:47:48.127 - Steckdose_Trockner_Power changed from 2099.299999 to 2160.969997
21:48:04.127 - Steckdose_Trockner_Power changed from 2160.969997 to 2153.739998
21:48:12.382 - Steckdose_Trockner_Power changed from 2153.739998 to 2155.789997
21:48:21.116 - Steckdose_Trockner_Power changed from 2155.789997 to 2141.929996
21:48:37.223 - Steckdose_Trockner_Power changed from 2141.929996 to 2149.349998
21:48:53.178 - Steckdose_Trockner_Power changed from 2149.349998 to 143.78
21:49:09.145 - Steckdose_Trockner_Power changed from 143.78 to 2192.009998
21:49:25.132 - Steckdose_Trockner_Power changed from 2192.009998 to 2146.139999
21:50:04.171 - Steckdose_Trockner_Power changed from 2146.139999 to 2162.269997
21:50:44.106 - Steckdose_Trockner_Power changed from 2162.269997 to 2164.079998
21:51:14.151 - Steckdose_Trockner_Power changed from 2164.079998 to 2172.559998
21:51:30.153 - Steckdose_Trockner_Power changed from 2172.559998 to 2157.379997
21:51:46.151 - Steckdose_Trockner_Power changed from 2157.379997 to 2152.639999
21:52:02.143 - Steckdose_Trockner_Power changed from 2152.639999 to 2151.619999
21:52:18.151 - Steckdose_Trockner_Power changed from 2151.619999 to 2166.169998
21:52:34.156 - Steckdose_Trockner_Power changed from 2166.169998 to 1377.109999
21:52:50.153 - Steckdose_Trockner_Power changed from 1377.109999 to 1367.799999
21:53:01.681 - Steckdose_Trockner_Power changed from 1367.799999 to 1598.389999
21:53:06.453 - Steckdose_Trockner_Power changed from 1598.389999 to 2165.379997
21:53:22.187 - Steckdose_Trockner_Power changed from 2165.379997 to 2144.549999
21:53:38.138 - Steckdose_Trockner_Power changed from 2144.549999 to 2137.339996
21:53:54.131 - Steckdose_Trockner_Power changed from 2137.339996 to 2138.429996
21:54:10.132 - Steckdose_Trockner_Power changed from 2138.429996 to 2138.57
21:54:26.136 - Steckdose_Trockner_Power changed from 2138.57 to 2138.809998
21:54:42.133 - Steckdose_Trockner_Power changed from 2138.809998 to 2141.41
21:54:58.132 - Steckdose_Trockner_Power changed from 2141.41 to 2141.209999
21:55:04.613 - Steckdose_Trockner_Power changed from 2141.209999 to 2137.649998
21:55:14.147 - Steckdose_Trockner_Power changed from 2137.649998 to 2138.359997
21:55:30.133 - Steckdose_Trockner_Power changed from 2138.359997 to 2153.019997
21:55:46.136 - Steckdose_Trockner_Power changed from 2153.019997 to 2155.41
21:56:02.189 - Steckdose_Trockner_Power changed from 2155.41 to 1373.619999
21:56:18.133 - Steckdose_Trockner_Power changed from 1373.619999 to 1372.629999
21:56:34.156 - Steckdose_Trockner_Power changed from 1372.629999 to 237.84
21:56:50.157 - Steckdose_Trockner_Power changed from 237.84 to 72.73
21:57:06.165 - Steckdose_Trockner_Power changed from 72.73 to 1357.969999
21:57:22.158 - Steckdose_Trockner_Power changed from 1357.969999 to 2169.389999
21:57:38.160 - Steckdose_Trockner_Power changed from 2169.389999 to 2163.309998
21:57:57.138 - Steckdose_Trockner_Power changed from 2163.309998 to 2161.899998
21:57:58.266 - Steckdose_Trockner_Power changed from 2161.899998 to 2151.019997
21:58:14.155 - Steckdose_Trockner_Power changed from 2151.019997 to 2163.149998
21:58:32.178 - Steckdose_Trockner_Power changed from 2163.149998 to 2148.989998
21:58:48.147 - Steckdose_Trockner_Power changed from 2148.989998 to 2122.309998
21:59:04.165 - Steckdose_Trockner_Power changed from 2122.309998 to 2110.619999
21:59:20.168 - Steckdose_Trockner_Power changed from 2110.619999 to 2124.639999
21:59:36.166 - Steckdose_Trockner_Power changed from 2124.639999 to 2171.509998
21:59:52.158 - Steckdose_Trockner_Power changed from 2171.509998 to 2163.039997
22:00:17.168 - Steckdose_Trockner_Power changed from 2163.039997 to 2140.00
22:00:33.162 - Steckdose_Trockner_Power changed from 2140.00 to 1362.099998
22:00:35.395 - Steckdose_Trockner_Power changed from 1362.099998 to 1359.639999
22:00:49.159 - Steckdose_Trockner_Power changed from 1359.639999 to 1.25
22:01:05.148 - Steckdose_Trockner_Power changed from 1.25 to 123.72
22:01:21.161 - Steckdose_Trockner_Power changed from 123.72 to 1357.41
22:01:37.166 - Steckdose_Trockner_Power changed from 1357.41 to 1609.469999
22:01:53.167 - Steckdose_Trockner_Power changed from 1609.469999 to 2143.759998
22:02:09.181 - Steckdose_Trockner_Power changed from 2143.759998 to 2165.149998
22:02:57.147 - Steckdose_Trockner_Power changed from 2165.149998 to 2149.379997
22:02:59.136 - Steckdose_Trockner_Power changed from 2149.379997 to 2149.66
22:03:45.125 - Steckdose_Trockner_Power changed from 2149.66 to 2131.759998
22:04:01.125 - Steckdose_Trockner_Power changed from 2131.759998 to 2150.50
22:04:17.143 - Steckdose_Trockner_Power changed from 2150.50 to 2114.789997
22:04:33.135 - Steckdose_Trockner_Power changed from 2114.789997 to 2146.049999
22:04:49.159 - Steckdose_Trockner_Power changed from 2146.049999 to 1349.74
22:05:05.124 - Steckdose_Trockner_Power changed from 1349.74 to 1317.15
22:05:08.392 - Steckdose_Trockner_Power changed from 1317.15 to 51.28
22:05:21.153 - Steckdose_Trockner_Power changed from 51.28 to 147.75
22:05:37.154 - Steckdose_Trockner_Power changed from 147.75 to 1336.679998
22:05:53.168 - Steckdose_Trockner_Power changed from 1336.679998 to 1354.559999
22:06:09.181 - Steckdose_Trockner_Power changed from 1354.559999 to 2129.079998
22:06:25.172 - Steckdose_Trockner_Power changed from 2129.079998 to 2123.169998
22:06:41.161 - Steckdose_Trockner_Power changed from 2123.169998 to 2122.239998
22:06:57.161 - Steckdose_Trockner_Power changed from 2122.239998 to 2119.209999
22:07:13.162 - Steckdose_Trockner_Power changed from 2119.209999 to 2111.099998
22:07:29.162 - Steckdose_Trockner_Power changed from 2111.099998 to 1988.139999
22:07:45.141 - Steckdose_Trockner_Power changed from 1988.139999 to 180.26
22:07:47.645 - Steckdose_Trockner_Power changed from 180.26 to 180.49
22:08:17.906 - Steckdose_Trockner_Power changed from 180.49 to 190.35
22:09:28.914 - Steckdose_Trockner_Power changed from 190.35 to 202.29
22:10:12.391 - Steckdose_Trockner_Power changed from 202.29 to 202.86
22:11:46.881 - Steckdose_Trockner_Power changed from 202.86 to 212.69
22:12:22.880 - Steckdose_Trockner_Power changed from 212.69 to 212.26
22:12:28.912 - Steckdose_Trockner_Power changed from 212.26 to 145.02
22:12:44.914 - Steckdose_Trockner_Power changed from 145.02 to 168.46
22:13:00.896 - Steckdose_Trockner_Power changed from 168.46 to 192.48
22:13:29.914 - Steckdose_Trockner_Power changed from 192.48 to 203.18
22:15:22.913 - Steckdose_Trockner_Power changed from 203.18 to 210.16
22:16:02.922 - Steckdose_Trockner_Power changed from 210.16 to 213.80
22:17:27.936 - Steckdose_Trockner_Power changed from 213.80 to 197.02
22:17:43.922 - Steckdose_Trockner_Power changed from 197.02 to 1.53
22:18:08.423 - Steckdose_Trockner_Power changed from 1.53 to 1.49
22:18:08.902 - Steckdose_Trockner_Power changed from 1.49 to 102.53
22:18:24.900 - Steckdose_Trockner_Power changed from 102.53 to 1.49
22:18:43.909 - Steckdose_Trockner_Power changed from 1.49 to 152.92
22:18:59.923 - Steckdose_Trockner_Power changed from 152.92 to 1.53
22:19:18.924 - Steckdose_Trockner_Power changed from 1.53 to 201.87
22:19:34.882 - Steckdose_Trockner_Power changed from 201.87 to 1.50
22:19:53.893 - Steckdose_Trockner_Power changed from 1.50 to 245.68
22:20:09.878 - Steckdose_Trockner_Power changed from 245.68 to 1.49
22:20:28.891 - Steckdose_Trockner_Power changed from 1.49 to 288.21
22:20:39.651 - Steckdose_Trockner_Power changed from 288.21 to 1.50
22:20:44.876 - Steckdose_Trockner_Power changed from 1.50 to 1.51
22:21:03.875 - Steckdose_Trockner_Power changed from 1.51 to 322.35
22:21:19.888 - Steckdose_Trockner_Power changed from 322.35 to 1.50
22:21:37.890 - Steckdose_Trockner_Power changed from 1.50 to 36.36
22:21:53.885 - Steckdose_Trockner_Power changed from 36.36 to 1.51
22:22:12.984 - Steckdose_Trockner_Power changed from 1.51 to 84.23
22:22:28.887 - Steckdose_Trockner_Power changed from 84.23 to 1.51
22:22:47.915 - Steckdose_Trockner_Power changed from 1.51 to 136.36
22:22:56.377 - Steckdose_Trockner_Power changed from 136.36 to 1.51
22:23:03.968 - Steckdose_Trockner_Power changed from 1.51 to 1.50
22:23:22.951 - Steckdose_Trockner_Power changed from 1.50 to 188.04
22:23:38.943 - Steckdose_Trockner_Power changed from 188.04 to 1.49
22:23:57.913 - Steckdose_Trockner_Power changed from 1.49 to 236.39
22:24:13.913 - Steckdose_Trockner_Power changed from 236.39 to 1.50
22:24:32.912 - Steckdose_Trockner_Power changed from 1.50 to 272.52
22:24:48.911 - Steckdose_Trockner_Power changed from 272.52 to 1.50
22:25:07.912 - Steckdose_Trockner_Power changed from 1.50 to 306.62
22:25:24.808 - Steckdose_Trockner_Power changed from 306.62 to 1.49
22:25:41.912 - Steckdose_Trockner_Power changed from 1.49 to 9.62
22:25:57.932 - Steckdose_Trockner_Power changed from 9.62 to 1.49
22:26:16.951 - Steckdose_Trockner_Power changed from 1.49 to 65.57
22:26:32.893 - Steckdose_Trockner_Power changed from 65.57 to 1.50
22:26:51.892 - Steckdose_Trockner_Power changed from 1.50 to 122.00
22:27:07.896 - Steckdose_Trockner_Power changed from 122.00 to 1.51
22:27:26.896 - Steckdose_Trockner_Power changed from 1.51 to 174.69
22:27:42.894 - Steckdose_Trockner_Power changed from 174.69 to 1.51
22:27:50.655 - Steckdose_Trockner_Power changed from 1.51 to 1.50
22:28:01.898 - Steckdose_Trockner_Power changed from 1.50 to 221.06
22:28:17.894 - Steckdose_Trockner_Power changed from 221.06 to 1.51
22:28:36.892 - Steckdose_Trockner_Power changed from 1.51 to 268.87
22:28:52.916 - Steckdose_Trockner_Power changed from 268.87 to 1.51
22:29:11.893 - Steckdose_Trockner_Power changed from 1.51 to 301.41
22:29:27.927 - Steckdose_Trockner_Power changed from 301.41 to 1.50
22:29:46.925 - Steckdose_Trockner_Power changed from 1.50 to 334.18
22:30:02.928 - Steckdose_Trockner_Power changed from 334.18 to 1.51
22:30:20.919 - Steckdose_Trockner_Power changed from 1.51 to 44.13
22:30:28.135 - Steckdose_Trockner_Power changed from 44.13 to 1.50
22:30:36.920 - Steckdose_Trockner_Power changed from 1.50 to 1.51
22:30:55.931 - Steckdose_Trockner_Power changed from 1.51 to 102.96
22:31:11.946 - Steckdose_Trockner_Power changed from 102.96 to 1.51
22:31:30.933 - Steckdose_Trockner_Power changed from 1.51 to 156.05
22:31:46.924 - Steckdose_Trockner_Power changed from 156.05 to 1.51
22:32:05.920 - Steckdose_Trockner_Power changed from 1.51 to 206.73
22:32:21.919 - Steckdose_Trockner_Power changed from 206.73 to 1.51
22:32:40.922 - Steckdose_Trockner_Power changed from 1.51 to 252.11
22:32:51.161 - Steckdose_Trockner_Power changed from 252.11 to 1.51
22:33:15.927 - Steckdose_Trockner_Power changed from 1.51 to 292.88
22:33:31.919 - Steckdose_Trockner_Power changed from 292.88 to 1.51
22:33:50.921 - Steckdose_Trockner_Power changed from 1.51 to 323.71
22:34:06.921 - Steckdose_Trockner_Power changed from 323.71 to 1.50
22:34:24.929 - Steckdose_Trockner_Power changed from 1.50 to 25.38
22:34:40.919 - Steckdose_Trockner_Power changed from 25.38 to 1.50
22:35:00.146 - Steckdose_Trockner_Power changed from 1.50 to 80.77
22:35:15.930 - Steckdose_Trockner_Power changed from 80.77 to 1.50
22:35:36.381 - Steckdose_Trockner_Power changed from 1.50 to 138.87
22:35:50.906 - Steckdose_Trockner_Power changed from 138.87 to 1.50
22:36:09.936 - Steckdose_Trockner_Power changed from 1.50 to 192.32
22:36:27.416 - Steckdose_Trockner_Power changed from 192.32 to 1.50
22:36:44.929 - Steckdose_Trockner_Power changed from 1.50 to 237.83
22:37:00.930 - Steckdose_Trockner_Power changed from 237.83 to 1.50
22:37:19.921 - Steckdose_Trockner_Power changed from 1.50 to 277.71
22:37:35.920 - Steckdose_Trockner_Power changed from 277.71 to 1.50
22:37:54.959 - Steckdose_Trockner_Power changed from 1.50 to 312.56
22:37:58.162 - Steckdose_Trockner_Power changed from 312.56 to 203.88
22:38:10.930 - Steckdose_Trockner_Power changed from 203.88 to 1.50
22:38:28.937 - Steckdose_Trockner_Power changed from 1.50 to 4.76
22:38:44.899 - Steckdose_Trockner_Power changed from 4.76 to 1.50
22:39:03.886 - Steckdose_Trockner_Power changed from 1.50 to 66.86
22:39:19.901 - Steckdose_Trockner_Power changed from 66.86 to 1.50
22:39:38.905 - Steckdose_Trockner_Power changed from 1.50 to 113.94
22:39:54.897 - Steckdose_Trockner_Power changed from 113.94 to 1.50
22:40:13.910 - Steckdose_Trockner_Power changed from 1.50 to 169.73
22:40:29.896 - Steckdose_Trockner_Power changed from 169.73 to 1.50
22:40:48.915 - Steckdose_Trockner_Power changed from 1.50 to 216.44
22:41:04.897 - Steckdose_Trockner_Power changed from 216.44 to 1.50
22:41:23.895 - Steckdose_Trockner_Power changed from 1.50 to 262.29
22:41:39.914 - Steckdose_Trockner_Power changed from 262.29 to 1.50
22:41:58.915 - Steckdose_Trockner_Power changed from 1.50 to 296.88
22:42:14.956 - Steckdose_Trockner_Power changed from 296.88 to 1.51
22:42:33.974 - Steckdose_Trockner_Power changed from 1.51 to 336.66
22:42:49.937 - Steckdose_Trockner_Power changed from 336.66 to 1.50
22:43:07.924 - Steckdose_Trockner_Power changed from 1.50 to 44.10
22:43:11.137 - Steckdose_Trockner_Power changed from 44.10 to 204.19
22:43:23.921 - Steckdose_Trockner_Power changed from 204.19 to 1.50
22:43:42.923 - Steckdose_Trockner_Power changed from 1.50 to 99.47
22:43:58.918 - Steckdose_Trockner_Power changed from 99.47 to 1.50
22:44:17.903 - Steckdose_Trockner_Power changed from 1.50 to 152.13
22:44:33.922 - Steckdose_Trockner_Power changed from 152.13 to 1.50
22:44:52.921 - Steckdose_Trockner_Power changed from 1.50 to 201.96
22:45:08.913 - Steckdose_Trockner_Power changed from 201.96 to 1.50
22:45:26.167 - Steckdose_Trockner_Power changed from 1.50 to 1.51
22:45:27.912 - Steckdose_Trockner_Power changed from 1.51 to 249.38
22:45:43.902 - Steckdose_Trockner_Power changed from 249.38 to 1.51
22:46:02.901 - Steckdose_Trockner_Power changed from 1.51 to 287.04
22:46:18.905 - Steckdose_Trockner_Power changed from 287.04 to 1.50
22:46:37.901 - Steckdose_Trockner_Power changed from 1.50 to 323.31
22:46:53.906 - Steckdose_Trockner_Power changed from 323.31 to 1.51
22:47:11.907 - Steckdose_Trockner_Power changed from 1.51 to 18.92
22:47:26.655 - Steckdose_Trockner_Power changed from 18.92 to 1.50
22:50:16.644 - Steckdose_Trockner_Power changed from 1.50 to 1.42

(Frank Kintrup) #135

I’m currently trying to build this myself. I’ve added a Tasmota flashed Sonoff POW to my washing maschine and can successfully communicate with it via MQTT :slight_smile:

Right now I’m relying on the telemetry messages from the POW every 10 seconds to sample the power levels. While that works fine I really don’t want to send the telemetry then so often, especially when the washer is off.

I read through most of this thread and also through the Tasmota Wiki about all available MQTT commands and other configuration options, but I could not find anything that would enable the POW to publish MQTT messages whenever the power level changes a certain amount of Watt, say 3 Watts or more. Is this possible?
If not, how did you sample the power levels? Thanks!


(Thomas Binder) #136

simply add a rule, which sends a Sonoff Command to change the interval, I have this one:

Number Sensoren_SonoffHeatingIR_TelePeriod	"IR-Heizung Intervall [%d s]"  	{ mqtt=">[<BROKER>:cmnd/sonoffHeatingIR/TelePeriod:command:*:default],<[<BROKER>:stat/sonoffHeatingIR/RESULT:state:JSONPATH($.TelePeriod):.*TelePeriod.*]" }

This item sends the “TelePeriod” command to the Sonoff and receives the present TelePeriod from the JSON-RESULT.

rule "Sonoff toggle Teleperiod IR-Partykeller"
when
	Item Sensoren_Status_SonoffHeatingIR changed
then
	if (Sensoren_Status_SonoffHeatingIR.state == ON) Sensoren_SonoffHeatingIR_TelePeriod.sendCommand(20)
	if (Sensoren_Status_SonoffHeatingIR.state == OFF) Sensoren_SonoffHeatingIR_TelePeriod.sendCommand(3600)
end

So, if the Heating is ON the period is 20secs, if it’s OFF, ist 3600secs.


(Andreas Imhof) #137

I am also using Sonoff POWs with Tasmota and MQTT. I have the TelePeriod set to 60s and think it is a good compromise of regular datas and amount of data Transfers.

Within openhab I use a mean value of the last 5 or 10 minutes to have accurate switching points to define the start ans end time of the washing machine (the same for the tumble dryer).

In my opinion it doesn’t care if you get the machine finished message a few minutes later than it is, AND my wife hates to get false messages…

Andreas


(Hallo Ween) #138

I use reentrant lock with 10 seconds to debounce my waching machine state machine.

Is this a problem, when i raise the time to 2 minutes?

If i make a thread sleep for that long time, it might be a problem, but how is this with reentrant lock?

My waching machine goes to a very low poer consumption, but sometimes after 1-2 minutes it raises up again one more time and then the washing process is finished. Now i get a message with “wasching machine finished” and some minutes later i get the same message once again.

Is a longer reentrant lock time the right way to solve this problem?

Could this time even be much longer without getting problems?


(Daniel N.) #139

Hello together,

i have a Problem with:

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 kel_wmaschine_energy changed
then
    if (kel_wmaschine_energy.averageSince(now.minusMinutes(2)) < 0.2) kel_wmaschine.postUpdate(MODE_OFF)
    else if (kel_wmaschine_energy.averageSince(now.minusMinutes(2)) > 10) kel_wmaschine.postUpdate(MODE_ACTIVE)
    else if (kel_wmaschine_energy.averageSince(now.minusMinutes(2)) < 5) {
        if (kel_wmaschine.state == MODE_OFF) kel_wmaschine.postUpdate(MODE_STANDBY)
        else if (kel_wmaschine.state == MODE_ACTIVE) kel_wmaschine.postUpdate(MODE_FINISHED)
    }
end

I get the following error when the rule is running:

2018-05-29 22:13:44.520 [WARN ] [nce.extensions.PersistenceExtensions] - There is no queryable persistence service registered with the id ‘rrd4j’

I did not install “rrd4j”, I use “InfluxDB”.
Is there a way to fix this with influxDB or do I need to install rrd4j?

Unfortunately, the following does not work with “InfluxDB” either:

…kel_wmaschine_energy.averageSince(now.minusMinutes(2), ‘rrd4j’)…

Please help, I despair at the moment :smiley:


(Thomas Binder) #140

please read the docs on persistence: https://www.openhab.org/docs/configuration/persistence.html

tl:dr>


(Daniel N.) #141

Sorry, for the late replay. After i set persistence to influxdb it works.

But now I have another problem, after an update to Tasmota 6.01, the measurements have become worse. With the Tasmota version 5.11 POW has always show (in standby) stats between 0W and 1,2xxW. Now (washing machine switched on) is always drawn to 0. So the machine does not change from Active_Mode to Finished_Mode anymore, because openhab dont update energy-item.

Does anyone have an idea for this?