Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi auto start #84

Open
peterbeeston opened this issue Oct 21, 2020 · 2 comments
Open

Raspberry Pi auto start #84

peterbeeston opened this issue Oct 21, 2020 · 2 comments

Comments

@peterbeeston
Copy link

Installed on Raspberry Pi 3, all worked after loading Python3 utilities.
Runs fine executing python3 mqtt.py and /usr/bin/python3 /home/pi/broadlink-mqtt/mqtt.py (command in service file)

Contents of /lib/systemd/system/broadlink-mqtt.service

[Unit]
Description=Broadlink MQTT Service
After=multi-user.target
[email protected]

[Service]
Type=simple
ExecStart=/usr/bin/python3 /home/pi/broadlink-mqtt/mqtt.py
StandardInput=tty-force

[Install]
WantedBy=multi-user.target

sudo systemctl start broadlink-mqtt.service gives no error
sudo systemctl status broadlink-mqtt.service gives the following:

● broadlink-mqtt.service - Broadlink MQTT Service
   Loaded: loaded (/lib/systemd/system/broadlink-mqtt.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2020-10-21 16:08:09 BST; 7min ago
  Process: 8674 ExecStart=/usr/bin/python3 /home/pi/broadlink-mqtt/mqtt.py (code=exited, status=1/FAILURE)
 Main PID: 8674 (code=exited, status=1/FAILURE)

Oct 21 16:08:09 bg1mqtt systemd[1]: Started Broadlink MQTT Service.
Oct 21 16:08:09 bg1mqtt systemd[1]: broadlink-mqtt.service: Main process exited, code=exited, status=1/FAILURE
Oct 21 16:08:09 bg1mqtt systemd[1]: broadlink-mqtt.service: Failed with result 'exit-code'.

Good work, integrated with HomeAssistant great.

@eschava
Copy link
Owner

eschava commented Oct 21, 2020

@VincentSC maybe you could help?

@fapgomes
Copy link

@peterbeeston can you run manually the command

/usr/bin/python3 /home/pi/broadlink-mqtt/mqtt.py

in the console to see the error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants