Hi, I’m using the latest Openhabian on RPI3.
I have managed to setup an item and sitemap for one project and it works fine, but this project needs to switch a pump on for different time periods and also to setup up a scheduled pump time for particular days.
I have setup the items with different expire periods and the buttons work as required but only one of the items will operate the relay switch. Here is my coding:
Items:
//Relays
Switch channel1 "Pump for 2 Hours" { gpio="pin:26 force:yes activelow:no", expire="2s,command=OFF" }
//Relays
Switch channel2 "Pump for 1 Hour" { gpio="pin:26 force:yes activelow:no", expire="4s,command=OFF" }
//Relays
Switch channel3 "Pump for 1/2 Hour" { gpio="pin:26 force:yes activelow:no", expire="6s,command=OFF" }
Sitemap:
sitemap home label="Bore Pump to Tank"
{
Frame label="Pump for 2 Hours"
{
Switch item=channel1
}
Frame label="Pump for 1 Hour"
{
Switch item=channel2
}
Frame label="Pump for 1/2 Hour"
{
Switch item=channel3
}
}
Times in the code are only in seconds for testing, once working I will change them to the correct values.
Any help would be appreciated.
Mark