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, parameteron: 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.
Röle de olur ama günde iki anahtarlama için MOSFET daha sessiz ve temiz. Benim önerim:
Lojik seviyeli N-kanal bir MOSFET (IRLZ44N gibi), low-side bağlantı. Lambaların artısı doğrudan 12V’a, eksisi MOSFET’in drain’ine, source aküye (eksi). Gate’e Pi’nin GPIO’sundan 100 Ω seri direnç, gate ile source arasına 10k pull-down. Pull-down olmazsa Pi açılırken lambalar yanıp söner. 4 A’de IRLZ44N soğutucusuz rahat çalışır, Pi’nin eksisi ile akünün eksisini birleştirmeyi unutma.
Zamanlama için Hermetry’de Kurallar kartını kullan:
- Ne zaman: Gün doğumu veya gün batımı, gün batımı, ofset -15 dakika
- Sonra: Komut gönder, cihaz Pi, komut
light.set, parametreon: true - İkinci bir kural: gün doğumu,
on: false
Komutu cihaz profilinin Commands kataloğuna eklemen lazım. Bir de yerin konumu girilmiş olmalı, yoksa kart kaydetmiyor: cihazın üstündeki en yakın varlığın konumu kullanılıyor. Ayrıntılar: Kurallar kartı: tetikleyiciler.
Pi tarafında v1/rpc/req/+ konusuna abone ol, light.set gelince pini sür, cevabı v1/rpc/res/<id> ile dön. Mevsim derdi de böylece kalmaz.

