I’ve been exploring ways to automate my smart home setup more efficiently, and I came across a really interesting challenge that I wanted to share and get some feedback on.
Currently, I use a Shelly relay to control an outdoor socket, which I switch between powering Christmas lights in the winter and a water feature in the summer. I’ve set up separate switch items for each function—one that turns on at dusk and off at sunrise for the lights, and another that’s manually controlled with a two-hour timer for the water feature.
The issue I’m facing is that every year when the seasons change, I have to manually unlink and relink the Shelly relay to the respective items. It’s a small inconvenience, but I’d love to automate this process entirely. My idea is to create a script that runs on specific dates—December 1st to switch to the Christmas lights and January 5th to revert back to the water feature.
I’m wondering if anyone has experience with scripting in OpenHAB or knows of any existing solutions that could help me achieve this. I’m thinking of using a cron job to trigger the script, but I’m not entirely sure how to structure the unlinking and relinking process within the script itself.
This kind of automation would not only save me time but also make my setup more seamless and efficient. I’d love to hear if others have tackled similar challenges or have any tips or resources to share.
Cheers, [Your Name]