system daemon with a timer for relay activation

Talk about the project itself, the community, where we are and what we need. Great place to introduce yourself and make friends as well.

system daemon with a timer for relay activation

Postby tomasm » Thu Jun 22, 2017 6:05 pm


Ive wrote for myself a system daemon that updates the status of 3 independent outputs depending on a given time.

i use it with this HAT for the RPI2 i.o to activate a few things i want running only at night.

i thought someone might find it useful.

All gpio actions are done through the wiringpi library and configuration using the iniparser library.

daemon code and systemd unit available through github.

heres a PKGBUILD to build this package for anyone interested.

comments are appreciated. keep in mind code might be a bit rough. but it works (tm).

Code: Select all
pkgdesc="A simple daemon to automatically switch the relays on and off every day"
depends=('wiringpi' 'iniparser')

 build() {
        cd $srcdir/auto-rele
        make auto-rele

 package() {
         cd $srcdir/auto-rele
         make DESTDIR=$pkgdir install
         install -Dm 644 "auto-rele.service" "$pkgdir/usr/lib/systemd/system/auto-rele.service"
         install -Dm 644 "auto-rele.conf" "$pkgdir/etc/auto-rele/auto-rele.conf"
Posts: 7
Joined: Thu Jun 22, 2017 5:59 pm

Return to Community

Who is online

Users browsing this forum: No registered users and 2 guests