Washing Machine State Machine

Tags: #<Tag:0x00007fd310ea4dc8>

(Udo Hartmann) #142

Did you take a look at mqtt? Maybe something has changed slightly and you have to redefine your items.

(Daniel N.) #143

I have not made any changes to the MQTT, just the update of the Sonoff Pow R2 to 6.01

When the machine is on and active, everything works perfectly, but after the wash, the energy item goes to 0 and stays there (no more log entries). Before the update, there were always fluctuations between 0 and 1.2W (when the machine was on and not active)

I’ll try the downgrade to 5.11 or are there commands to make the POW “sensitive”?

My Config:

Number      kel_wmaschine           "Waschmaschine läuft? [MAP(tag.map):%s]"        <wmaschine>         (gKel, gInfo)
Number      kel_wmaschine_energy    "Waschmaschine [%.2f W]"                        <stromver>          (gKel, gEnergy)                         {mqtt="<[broker:tele/sonoff_CE0772/SENSOR:state:JSONPATH($.ENERGY.Power)]"}
Number      kel_wmaschine_geenergy  "Waschmaschine - Gesamtverbrauch [%.2f kwh]"    <stromver>          (gKel, gEnergy)                         {mqtt="<[broker:tele/sonoff_CE0772/SENSOR:state:JSONPATH($.ENERGY.Total)]"}
Number      kel_wmaschine_rssi      "Waschmaschine Empfang: RSSI [%d %%]"           <wlan>              (gKel, gEmpfang)                        {mqtt="<[broker:tele/sonoff_CE0772/STATE:state:JSONPATH($.Wifi.RSSI)]"}
val Number MODE_OFF = 0
val Number MODE_STANDBY = 1
val Number MODE_ACTIVE = 2
val Number MODE_FINISHED = 3

rule "Waschmaschine Aktivitätsregel"
    Item kel_wmaschine_energy changed
    if (kel_wmaschine_energy.averageSince(now.minusMinutes(2)) < 0.5) 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)

rule "Waschmaschine Benachrichtigung"
    Item kel_wmaschine changed to 3
    if (nog_tag.state == "ON") {
        sendCommand(gw_soundvolume, 10)
		sendCommand(gw_sound, 29)
		Thread::sleep(9000) /* wait for 9 seconds */
		sendCommand(gw_sound, 10000)
		sendCommand(gw_soundvolume, 0)
        whz_echo_tts.sendCommand('Daniel, die Waschmaschine ist fertig!')
	else if (nog_tag.state == "OFF")
		sendPushoverMessage(pushoverBuilder("[openHAB - Info] Deine Waschmaschine ist fertig!"))

(Udo Hartmann) #144

I should have been more clear :slight_smile:

Did you take a look at the mqtt data? (i.e. start mqttspy, connect to your broker, subscribe to # (or at least to the topic tele/sonoff_CE0772/#) and wait until some data was received).

(Daniel N.) #145

thanks for the Answer and sorry.

Now i fix it.

The problem was the update of the Sonoff POW R2 to Tasmota version 6.1.0, with this version the low-engery measurements are more than bad. I flashed Sonoff back to version 5.12 and it works. Now I get measurements around 0 to 1.2W in standby (machine on, but not active)

(Crxporter) #146

(post withdrawn by author, will be automatically deleted in 96 hours unless flagged)