From c73c91c2a8aecbf11d248fc08bb08b28033cf87f Mon Sep 17 00:00:00 2001 From: do Date: Sun, 24 May 2020 17:08:45 +0200 Subject: [PATCH] fans! --- base/hostconfig/wohnz.sls | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/base/hostconfig/wohnz.sls b/base/hostconfig/wohnz.sls index faeb68f..e71d626 100644 --- a/base/hostconfig/wohnz.sls +++ b/base/hostconfig/wohnz.sls @@ -1,3 +1,21 @@ hardware: raspberrypi: - has_fan: True + fan: + has_fan: True + controller: /usr/local/bin/fan_ctrl.py + service_name: fancontroller + +systemd: + service: + fancontroller: + Unit: + Description: Controlling the Fan via PWM + After: base.target + + Service: + ExecStart: /usr/local/bin/fan_ctrl.py + User: pi + Group: gpio + Environment: RPI_FANPIN=21 + Install: + WantedBy: multi-user.target