Page 1 of 1

Bluetooth Beacon Presence plugin for Domoticz [SOLVED]

Posted: Saturday 13 June 2020 21:03
by alarm_guy1
Hi guys,

I have been following this Plugin installation:
https://github.com/mrin/domoticz-bt-presence

All goes well until I get to this section:

Code: Select all

Add to system services:

# check your path here:
sudo ln -s /home/pi/domoticz/plugins/bt-presence/ble_scanner.sh /etc/init.d/ble_scanner
# add to startup:
sudo update-rc.d ble_scanner defaults
sudo systemctl daemon-reload
once I reboot the Pi4 the service isnt running, however I can run it by changing into the the correct folder
/domoticz/plugins/bt-presence $ sudo ./ble_scanner.py
This works fine
I have tried to create a .sh file that runs at boot via Crontab but I get an error when Re-booting:
2020-06-13 19:34:14 - INFO - Ok hci0 interface Up n running !
2020-06-13 19:34:15 - DEBUG - new bt socket
2020-06-13 19:34:15 - DEBUG - Connected to bluetooth device hci0
Traceback (most recent call last):
File "./ble_scanner.py", line 287, in <module>
udp.sendto(json.dumps(['beacon', SCANNER_NAME, macAddress, rssi]), (SERVER_IP, SERVER_PORT))
socket.error: [Errno 101] Network is unreachable
Any help greatly appreciated, I had this working until recently but a crash occured (Own fault) and only had a Domoticz backup and for the life of me cannot remember how I got it going

Re: Bluetooth Beacon Presence plugin for Domoticz [SOLVED]

Posted: Saturday 13 June 2020 22:11
by alarm_guy1
Solved using Crontab -e and putting a 1 minute timer