New user, need a bit of help getting pointed in the right direction.
I’m running OpenHabian (latest) on a Pi4 using WiFi and used PaperUI to add 3 ZOOZ paddle switches which are working successfully to operate my ceiling fans. I’m starting slow so that I don’t bite off more than I can chew.
Here’s what I could use some help with:
I’d like to add the switches (and some other items) to the HABPanel, but not sure how.
I’d also like to add some on/off timers so that the fans turn off at night and on again in the morning, but I’m not clear on how or where to do that.
I remember seeing a utility that forced OpenHab to run in memory decreasing card writes. Where can I find that?
I’d eventually like to be able to check status and adjust controls when away from home via my Android phone. I’m guessing a VPN (I have NordVPN) is what I’d need, but could use some help with that.
Welcome! There are two options for using rule files to turn the fans on & off. You’ll need to read the documentation to get your environment set up, learn the correct folder & file names etc. I would also recommend that you use VS Code for your rule editor.
If you want to turn the fan on & off at specific times following rules will turn the fan on @ 8am and off at 10pm.
rule SetFanOn
when Time cron "0 0 8 * * ? *"
then Fan.postUpdate(ON)
logInfo("SetFanOn", "Fan set to {}", Fan.state.toString)
end
rule SetFanOff
when Time cron "0 0 22 * * ? *"
then Fan.postUpdate(OFF)
logInfo("SetFanOff", "Fan set to {}", Fan.state.toString)
end
If you want to turn the fan off & on based on sunrise & sunset the following use the following rules. You will need to install the Astro binding before before using the rules. Also, you may need to change astro:sun:local: to astro:sun:homel:. I can’t tell you why but I’ve seen both formats on the forum.
rule SetFanOn
when Channel "astro:sun:local:rise#event" triggered START
then Daytime.postUpdate(ON)
logInfo("SetFanOn", "Fan set to {}", Fan.state.toString)
end
rule SetFanOff
when Channel "astro:sun:local:set#event" triggered END
then Daytime.postUpdate(OFF)
logInfo("SetFanOff", "Fan set to {}", Fan.state.toString)
end
Whichever rules you use you will need to change the “Fan.” on the postUpdate commands to the name of your fan item. You could mix and match the rules if you like, e.g. turn the fans on at sunrise and off at sunset.
Ouch. I tend to not be a command line guy. Is there no GUI interface for this sort of thing? Back in the X10 days it was pretty easy. Hoping for a more intuitive solution.
That’s where I got stuck. I was using the OpenHab Android App and didn’t see the rules generator there. Added a rule for each fan to turn off @11PM and back on @7AM, it worked perfectly.