Multiple time switches for different sprinkler zones


#1

Hi,
I have recently set up a sprinkler system using NodeMCU. It works great, but I would like to add separate time buttons for each sprinkler zone. I created a sample switch below; I also included my sitemap and items below. Basically, I would like to click a time I would like the sprinkler to run for and then press on the switch, and once the time runs out, it would switch off.

How would you guys recommend going about it?

https://drive.google.com/file/d/1qjfYO-RJQoXCNmKhJsPQwYCyRJwfSq_F/view?usp=sharing

Sitemap

Switch item=ABSprinklerSystemZone1
Switch item=ABSprinklerSystemZone2
Switch item=ABSprinklerSystemZone3
Switch item=ABSprinklerSystemZone4
Switch item=ABSprinklerSystemZone5

Switch item=SprinklerCycle
Switch item=SprinklerSystemSchedule

Items

//Sprinkler System

Switch SprinklerCycle “20 Minute Cycle” [ “Switchable” ]
Switch SprinklerSystemSchedule “Sprinkler System Schedule” [ “Switchable” ]

Switch ABSprinklerSystemZone1 “Greenhouse Micro Irrigation” [ “Switchable” ] {mqtt=">[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1:command:ON:Z1ON],>[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1:command:OFF:Z1OFF],<[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1/state:state:ON:Z1ON],<[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1/state:state:OFF:Z1OFF]", autoupdate=“false”}
Switch ABSprinklerSystemZone2 “Greenhouse Dripper Hose” [ “Switchable” ] {mqtt=">[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1:command:ON:Z2ON],>[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1:command:OFF:Z2OFF],<[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1/state:state:ON:Z2ON],<[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1/state:state:OFF:Z2OFF]", autoupdate=“false”}
Switch ABSprinklerSystemZone3 “Backyard Plants” [ “Switchable” ] {mqtt=">[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1:command:ON:Z3ON],>[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1:command:OFF:Z3OFF],<[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1/state:state:ON:Z3ON],<[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1/state:state:OFF:Z3OFF]", autoupdate=“false”}
Switch ABSprinklerSystemZone4 “Frontyard Plants” [ “Switchable” ] {mqtt=">[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1:command:ON:Z4ON],>[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1:command:OFF:Z4OFF],<[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1/state:state:ON:Z4ON],<[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1/state:state:OFF:Z4OFF]", autoupdate=“false”}
Switch ABSprinklerSystemZone5 “Sideyard Plants” [ “Switchable” ] {mqtt=">[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1:command:ON:Z5ON],>[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1:command:OFF:Z5OFF],<[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1/state:state:ON:Z5ON],<[broker:AB-SmartHouse/utilities/AB-SprinklerSystem1/state:state:OFF:Z5OFF]", autoupdate=“false”}