New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Rules by time, temperature and sunset for the boiler and balcony light in the apartment

Rules by time, temperature and sunset for the boiler and balcony light in the apartment

Solved 4 3

Translated from Türkçe by AI ·

My work is on the water side, but this question is entirely about home, I hope that’s not a problem 🙂 The apartment has an ESP32 board with two relays: one is connected to the room thermostat input of the boiler (it fires when the contact closes), the other controls the balcony light. There’s also a temperature sensor in the living room. Everything is in Hermetry; I added a relay.set command to the device profile, and I can switch it on and off manually from the control card on the dashboard.I want three things:On weekdays the boiler should turn on at 06:30. If the living room stays above 22 degrees, it should turn off; if it drops below 20, it should turn on. The balcony light should come on at sunset and turn off at 00:30.I first tried it with an alarm rule: above 22 the alarm turns on, but of course no command is sent. I looked at the flow editor and got scared. Is there a simpler way?

♥ 0

Translated from Türkçe by AI ·

The flow editor looks scary but is easy once it’s set up. I think you do it with a Schedule trigger + Send command block. I don’t know about the sunset part.

♥ 0

Translated from Türkçe by AI ·

No flow is needed for this, the Rules card on the dashboard is made for exactly this. I did the same at home.First, create a site called “Home” in Sites & Assets, enter its latitude and longitude, and place the ESP32 there. Then add the Rules card to a dashboard and lock the card to that location. Rules:

1) When: A time of day, 06:30, Mon-Fri
   Then: Send a command -> esp32-ev, relay.set {"ch":1,"on":true}

2) When: salon_temp rises above 22, and stays so for 10 minutes
   Then: Send a command -> relay.set {"ch":1,"on":false}

3) When: salon_temp falls below 20
   Then: Send a command -> relay.set {"ch":1,"on":true}

4) When: Sunset, offset 0
   Then: relay.set {"ch":2,"on":true}
5) When: A time of day, 00:30, every day
   Then: relay.set {"ch":2,"on":false}

“rises above” triggers on the edge, so it runs once at the moment it goes above 22, not on every message. The gap between 22 and 20 also prevents the boiler from switching on and off constantly. Sunset needs the location of the place, otherwise it warns “Sunrise and sunset need this place’s location” when you save.When going on holiday, set the place’s Auto/Manual button to Manual; the rules then send nothing. Details: Rules card: triggers.

Sahadan selamlar.
Accepted solution♥ 6

Translated from Türkçe by AI ·

Thanks a lot, Ilgaz, the five rules were set up in ten minutes. I hadn’t entered the site’s location, so the sunset rule wasn’t saved; once I entered the location it worked. This evening the balcony light turned on by itself at 17:12, and my wife was really impressed 😄

♥ 1

Translated from Türkçe by AI ·

Okay, I also pointed you in the wrong direction by calling it a flow, I didn’t know that. I’ve taken a note for my own home.

♥ 0
Viewing 5 posts – 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Join the conversation

Sign in to ask and answer, like helpful posts and mark the reply that solved your problem. Every contribution earns points and levels.

Share