Browse Source

[system] update units to new configuration (closes #13)

Maxime Alves LIRMM@home 3 years ago
parent
commit
62c1179b8f

+ 3
- 2
config/pyheatpump_fetch.service View File

@@ -1,12 +1,13 @@
1 1
 [Unit]
2 2
 Description=pyHeatpump fetch - retrieve the data from the serial port with modbus
3
-Requires=serial-getty@ttyUSB0
3
+Wants=dev-ttyUSB0.device
4 4
 
5 5
 [Service]
6 6
 Type=simple
7 7
 WorkingDirectory=/var/lib/pyheatpump/
8 8
 Environment="LOGLEVEL=INFO"
9
-ExecStart=/usr/bin/env pyheatpump fetch
9
+ExecStart=/usr/bin/env pyheatpump fetch -t D -t A -t I
10
+ExecStop=/usr/bin/env pyheatpump supervise --since
10 11
 KillMode=mixed
11 12
 TimeoutStopSec=30
12 13
 PrivateTmp=true

+ 2
- 1
config/pyheatpump_fetch.timer View File

@@ -2,7 +2,8 @@
2 2
 Description=Timer to launch pyheatpump fetch every minute
3 3
 
4 4
 [Timer]
5
-OnCalendar=*-*-* *:*:00
5
+OnStartSec=15sec
6
+OnUnitInactiveSec=1m
6 7
 
7 8
 [Install]
8 9
 WantedBy=timers.target

+ 0
- 12
config/pyheatpump_supervise.service View File

@@ -1,12 +0,0 @@
1
-[Unit]
2
-Description=pyHeatpump supervise - communicates with the supervisor
3
-After=network.target
4
-
5
-[Service]
6
-Type=simple
7
-WorkingDirectory=/var/lib/pyheatpump/
8
-Environment="LOGLEVEL=INFO"
9
-ExecStart=/usr/bin/env pyheatpump supervise --since
10
-KillMode=mixed
11
-TimeoutStopSec=30
12
-PrivateTmp=true

+ 0
- 9
config/pyheatpump_supervise.timer View File

@@ -1,9 +0,0 @@
1
-[Unit]
2
-Description=Timer to launch pyheatpump supervise every minute, with an offset of 30 seconds
3
-
4
-[Timer]
5
-OnBooSec=90s
6
-OnActiveSec=1m
7
-
8
-[Install]
9
-WantedBy=timers.target

Loading…
Cancel
Save