HAP-python icon indicating copy to clipboard operation
HAP-python copied to clipboard

HAP Run at boot

Open macaaw opened this issue 5 years ago • 1 comments

I have written my accessory and it runs perfectly fine when executed as:

python3 hap/main.py

Here is my /etc/systemd/system/HAP-python.service file:

[Unit] Description = HAP-python daemon

[Service] User = pi ExecStart = /usr/bin/python3 /home/pi/hap/main.py

[Install] WantedBy = multi-user.target

But when I run it as a service I get the following output:

sudo systemctl start HAP-python sudo journalctl -u HAP-python

Oct 05 20:45:35 frontgate systemd[1]: Started HAP-python daemon. Oct 05 20:45:36 frontgate python3[1471]: [accessory_driver] Loading Accessory state from accessory.state Oct 05 20:45:37 frontgate python3[1471]: [accessory_driver] Starting the event loop Oct 05 20:45:37 frontgate python3[1471]: [accessory_driver] Starting accessory Door on address 10.55.1.155, port 51826. Oct 05 20:45:37 frontgate python3[1471]: Setup payload: X-HM://00BZGPCCH089F Oct 05 20:45:37 frontgate python3[1471]: Scan this code with your HomeKit app on your iOS device: Oct 05 20:45:38 frontgate python3[1471]:
Oct 05 20:45:38 frontgate python3[1471]:
Oct 05 20:45:38 frontgate python3[1471]:
Oct 05 20:45:38 frontgate python3[1471]:
Oct 05 20:45:38 frontgate python3[1471]:
Oct 05 20:45:38 frontgate python3[1471]:
Oct 05 20:45:38 frontgate python3[1471]:
Oct 05 20:45:38 frontgate python3[1471]:

Why is this asking me to scan an invisible code? How do I get around this?

macaaw avatar Oct 05 '20 19:10 macaaw

you need to use "pip3 install HAP-python[QRCode]"

Pythonaire avatar Nov 29 '20 19:11 Pythonaire