I have connected my iron with a z-wave switch.
I only turn this switch on by hand.
but I sometimes forget to turn it off.
I want to make sure he is not on for more than 20 minutes after I switch it on.
Ideally I would also make a button that only has the function to turn off the z-wave switch.
I have looked at examples of a timer, but I do not get it.
This is what I have done so far:
I have a physical switch called E2_Strijkijzer
I have a virtual switch called E2_StrijkijzerOff
and the rules below.
Some parts are missing and maybe there is a better / more stable way to do this.
Any advice and code examples are welcome.
rule "strijkijzer uit na x minuten"
when
Item E2_Strijkijzer changed from OFF to ON
then
{
????If x minutes have passed????
E2_Strijkijzer.sendCommand(OFF)
}
end
rule "strijkijzer uit"
when
Item E2_StrijkijzerOff changed
then
{
E2_Strijkijzer.sendCommand(OFF)
}
end
this iron becomes very hot and for security reasons I never want to turn it on via the sitemap. I only want to turn it on when I’m standing next to it.
I want to be able to use the sitemap to turn it off and if I forget this automatically after 20 minutes.
A lot of zwave switches are able to switch off the power after a predefined time, for example the Fibaro’s: https://manuals.fibaro.com/switch-2/
This would even allow to have the iron switched off if your homeautomation fails.
It took a while before I realized how simple it was. I only needed to add “expire =” 20m, command = OFF “” to an existing item in one of my item file.