Hi,
stumbled upon this thread (again) and thought I’d share what I “built” recently.
First of all, I have to mention that I use edge automation as a fallback where possible. E.g., that’s the key reason I decided to use the Homematic IP system around my house, because the devices have timers integrated and can interact without the central server.
Furthermore you can (partly) control how often status messages are sent and thus reduce electromagnetic waves.
So, I have an electric kettle, this guy (coffee addict - but that’s another story…)
The kettle keeps the water at the selected temperature. As the water cools down, the heating element fires up for a moment, until the target temperature is reached.
It even detects if there’s no water inside, just not to heat up then. And this is the part of the kettle, that does not work reliable.
I found it “warming” up some time after I used it, just because I forgot to disarm it manually.
To come around this, I used a smart plug able to be flashed with Tasmota. Nowadays, it’s not that easy to find one of those. So I bought one which came with Tasmota preloaded from Aliexpress - a good source for information is here.
After I flashed the device with a clean instance of Tasmota (never trust the manufacturer ), the fun started.
Firstly, please make sure to calibrate your plug. I won’t go in detail here, the process is perfectly described over at the Tasmota docs.
I built 3 rules to achieve my goals. They are in the order I programmed them, you can swap, if you want.
Rule 1
The 1st rule manages the behaviour of the user button. If you do a long press, you can toggle Wifi on/off.
To get this to work, you have to set some options once via the Tasmota console:
Backlog ButtonTopic 0; SetOption1 1; SetOption11 0; SetOption32 20
Then put the rule in:
Rule1
ON System#Boot DO var1 1 ENDON
ON Button2#State=3 DO IF (var1==1) Wifi 0; var1 0 ELSE Wifi 1; var1 1 ENDIF ENDON
Activate the rule with command Rule1 1
.
Rule 2
Rule2
ON Energy#Power<1000 DO RuleTimer1 600 ENDON
ON Energy#Power>=1000 DO RuleTimer1 0 ENDON
ON Rules#Timer=1 DO Power 0 ENDON
It checks it the power drawn is more than 1 kilowatt. That’s only the case when heating up the whole kettle first, not when keeping water warm.
If the power is less than this threshold, you’re either in standby or warming mode. The rule sets a timer to expire in 10 Minutes. If you start a heating process, the timer is reset (line 2).
For this rule, you have to activate the one shot detection (Rule2 5
)and turn it on (Rule2 1
).
Rule 3
Turns off wifi 2 minutes after device is powered up.
Rule3
ON System#Boot DO RuleTimer2 120 ENDON
ON Rules#Timer=2 DO Backlog Wifi 0; var1 0 ENDON
Activation via Rule3 1
, as above.
I hope that’s not too much text. I wanted everyone to be able to do this (in my opinion) very handy automation, too. Want to expand it to my washing machine as it’s a similar use case.
As the title says, here’s a picture:
Regards Grizzle