View single post by steefdebruijn
 Posted: Thursday Jun 14th, 2018 10:47 pm
 PM  Quote  Reply  Full Topic 
steefdebruijn

 

Joined: Sunday Jul 29th, 2012
Location: Netherlands
Posts: 28
Status: 
Offline

  back to top

About starting the thing on a raspberry pi: that system (I use dietpi but others probably the same) uses systemd. So to use it unattended and autostart on boot, create a systemd service file (example below) and enable and start it.

The file (place in /etc/systemd/system/comfort2.service):

[Unit]
Description=Cytech Comfort to MQTT bridge
After=local-fs.target network.target

[Service]
Type=simple
ExecStart=/usr/bin/python3 /root/comfort2.py

[Install]
WantedBy=multi-user.target


Enable and start it:
systemctl daemon-reload
systemctl enable comfort2
systemctl start comfort2


Steef

 Close Window