eschava / broadlink-mqtt

MQTT client to control BroadLink devices
MIT License
221 stars 60 forks source link

starting mqtt as a service #83

Closed hi-flyer closed 3 years ago

hi-flyer commented 3 years ago

I am using latest version of mqtt.py on Ubuntu 18.04 with an RM4 Pro. Lookup Discovery does not work for either mjg59 software or mqtt software. If I set the device to rm4, ip address and mac, it works just fine starting with python3 mqtt.py. custom.conf is otherwise unmodified from mqtt.conf if I use the Auto-startup (Linux) configuration (only modifying the line ExecStart=/usr/bin/python3 /home/pi/broadlink-mqtt/mqtt.py to ExecStart=/usr/bin/python3 /home/beckstein/broadlink-mqtt/mqtt.py), i get a failed notice of ● broadlink-mqtt.service - Broadlink MQTT Service Loaded: loaded (/lib/systemd/system/broadlink-mqtt.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2020-10-12 21:43:22 EDT; 11h ago Main PID: 5925 (code=exited, status=1/FAILURE)

Oct 12 21:43:22 BEE-XPS15-9500 systemd[1]: Started Broadlink MQTT Service. Oct 12 21:43:22 BEE-XPS15-9500 systemd[1]: broadlink-mqtt.service: Main process exited, code=exited, status=1/FAILURE Oct 12 21:43:22 BEE-XPS15-9500 systemd[1]: broadlink-mqtt.service: Failed with result 'exit-code'.

any clue what I am doing wrong or that I might try to get auto start working?

hi-flyer commented 3 years ago

Never Mind. I need to modify the auto start to add User. I added both the User and StandardOutput=syslog before the execute line and that fixed my problem.