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

Reply To: Can I switch the 12V garden lighting at the site with Hermetry City, or is there another way for now?

Translated from Türkçe by AI ·

A relay would work too, but for two switchings a day a MOSFET is quieter and cleaner. My suggestion:A logic-level N-channel MOSFET (like IRLZ44N), low-side wiring. The positive of the lamps goes directly to 12V, the negative to the MOSFET’s drain, and the source to the battery (negative). Put a 100 Ω series resistor from the Pi’s GPIO to the gate, and a 10k pull-down between gate and source. Without the pull-down the lamps will flicker while the Pi boots. At 4 A the IRLZ44N runs comfortably without a heatsink. Don’t forget to join the Pi’s negative with the battery’s negative.For scheduling, use the Rules card in Hermetry:

  • When: Sunrise or sunset, sunset, offset -15 minutes
  • Then: Send command, device Pi, command light.set, parameter on: true
  • A second rule: sunrise, on: false

You need to add the command to the Commands catalog of the device profile. The site’s location must also be entered, otherwise the card won’t save: the location of the nearest asset on the device is used. Details: Rules card: triggers.On the Pi side, subscribe to the topic v1/rpc/req/+, drive the pin when light.set arrives, and reply via v1/rpc/res/<id>. That way the seasonal worry goes away too.

Accepted solution♥ 3