I set up a MQTT tasmota switch and it works great
I am asking for help setting up:
item for turning on only 15 min
Item for turning on only 30 min
item for turning on only 60 min
How do you do that?
If I am understanging you correct you wanto to send some MQTT Mesagge at certain times. Is that correct? This would be done with a cron trigger. For example:
rule "Cron"
when
Time cron "*/15 * * * * ?"
then
MQTTDevice.sendCommand(ON)
end
Turning on for a time after… what? What happens to begin timing? Are you talking about three different devices, or one? How will everything know which different time is wanted?
As a general guide, you won’t go far wrong searching this forum for “motion timer” examples.
thanks this is what if I was looking and it working
This is what I defined:
Switch Boiler “Boiler” {channel = “mqtt: topic: Boiler: Boiler”, expire = “15m, command = OFF”}
Switch Boiler “Boiler” {channel = “mqtt: topic: Boiler: Boiler”, expire = “30m, command = OFF”}
Switch Boiler “Boiler” {channel = “mqtt: topic: Boiler: Boiler”, expire = “45m, command = OFF”}
Switch Boiler “Boiler” {channel = “mqtt: topic: Boiler: Boiler”, expire = “60m, command = OFF”}
How can i add it to a sitemap
All your Items have the same name - you can’t do that! (Well, I mean, clearly you can, but it won’t work!)
If you want to switch the same Item off at varying countdown times, you’re probably better off looking at using rules with timers, as @rossko57 mentioned.
Thanks for responding, I gave each of them a different name
apparently he is trying to turn on boiler … which seems bit odd to do 15 30 45 60 min steps… I would like to know usecase really
You’re right, that’s what I’m trying to do…
quite strange approach
anyway something like this should do it. This indeed does not cover situation when you switch more switches once, first expire will win.
That can be solved by extended rule or via sitemap hidden items when something is already ON
Switch helper15 “h15” (BoilerTimer) {expire=“15m, command = OFF”}
Switch helper30 “h30 (BoilerTimer) {expire=“30m, command = OFF”}
Switch helper45 “h45 (BoilerTimer) {expire=“45m, command = OFF”}
Switch helper60 “h60” (BoilerTimer) expire=“60m, command = OFF”}
Group:Switch:OR(ON, OFF) BoilerTimer "something"
Switch Boiler "Boiler" (channel="mqtt stuff"}
rule "strange boiler ON"
when
Member of BoilerTimer changed to ON
then
Boiler.sendCommand(ON)
end
rule "strange boiler OFF"
when
Member of BoilerTimer changed to OFF
then
Boiler.sendCommand(OFF)
end
You can also send a command with the time in it to tasmota via backlog (There could be a limit on max delay time)
https://tasmota.github.io/docs/Commands/#the-power-of-backlog
Backlog Status 1; Power2 on; Delay 20; Power2 off; Status 4
or 3 RuleTimers
https://tasmota.github.io/docs/Commands/#rules
or use a PulseTime that is configured each time.
Sorry but I did not quite understand what to do here? Can you explain to me better?
thank you for your time
first I’ve defined 4 helper switches 15 30 45 60 mins and their expire. Those switches I’ve added to group BoilerTimer which will goes ON/OFF depends on the state of actual one of each switches
in rules I’ve made ON rule, which reacts to BoilerTimer group when that given group goes ON and therefore switching ON actual boilerswitch - same with OFF state.
I assume you know which parts goes where (eg. things/rules) as this is something you should know. If not, please take a look onto the documentation here:
and here
You need to tweak it for your needs or you should better explain what is your usecase bit more.
In winter there is no hot water (electric heater) and I do not have fixed hours that I return from work and I want to set a switch that will run for half an hour and another switch that will run for an hour
if you wanna complex heating example (which may work for hot water as well), you can take a look here
and adjust what you need for your specific case.
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.