[plugin bluetooth-ping] Can someone help with this error Topic is solved

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
Dave21w
Posts: 361
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

[plugin bluetooth-ping] Can someone help with this error

Post by Dave21w »

I have been using this plugin for quite a while with no problems.
https://github.com/heggink/domoticz-bluetooth-ping
But due to how it is implemented I didn't realise that it had stopped working, it was only when i looked at the last seen time/date that i realised there was a problem. It appears that the issue has been there since the beggining of August so possibly after an update, the system it is on is only my test system so not that important but i was about to implement it at home too. Turning on the error logging for the plugin I get this:-

2024-10-07 13:13:22.070 Error: Daves iPhone Detected: Call to function 'onHeartbeat' failed, exception details:
2024-10-07 13:13:22.075 Error: Daves iPhone Detected: Traceback (most recent call last):
2024-10-07 13:13:22.076 Error: Daves iPhone Detected: File "/usr/lib/python3/dist-packages/bluetooth/bluez.py", line 322, in _gethcisock
2024-10-07 13:13:22.076 Error: Daves iPhone Detected: sock = _bt.hci_open_dev (device_id)
2024-10-07 13:13:22.076 Error: Daves iPhone Detected: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-07 13:13:22.077 Error: Daves iPhone Detected: _bluetooth.error: no available bluetoot devices
2024-10-07 13:13:22.077 Error: Daves iPhone Detected:
2024-10-07 13:13:22.077 Error: Daves iPhone Detected: During handling of the above exception, another exception occurred:
2024-10-07 13:13:22.077 Error: Daves iPhone Detected:
2024-10-07 13:13:22.078 Error: Daves iPhone Detected: Traceback (most recent call last):
2024-10-07 13:13:22.078 Error: Daves iPhone Detected: File "/home/pi/domoticz/plugins/domoticz-bluetooth-ping/plugin.py", line 174, in onHeartbeat
2024-10-07 13:13:22.078 Error: Daves iPhone Detected: _plugin.onHeartbeat()
2024-10-07 13:13:22.079 Error: Daves iPhone Detected: File "/home/pi/domoticz/plugins/domoticz-bluetooth-ping/plugin.py", line 115, in onHeartbeat
2024-10-07 13:13:22.079 Error: Daves iPhone Detected: ret = bluetooth.lookup_name(self.__address, timeout=2)
2024-10-07 13:13:22.079 Error: Daves iPhone Detected: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-07 13:13:22.080 Error: Daves iPhone Detected: File "/usr/lib/python3/dist-packages/bluetooth/bluez.py", line 84, in lookup_name
2024-10-07 13:13:22.080 Error: Daves iPhone Detected: sock = _gethcisock ()
2024-10-07 13:13:22.080 Error: Daves iPhone Detected: ^^^^^^^^^^^^^^
2024-10-07 13:13:22.080 Error: Daves iPhone Detected: File "/usr/lib/python3/dist-packages/bluetooth/bluez.py", line 325, in _gethcisock
2024-10-07 13:13:22.080 Error: Daves iPhone Detected: e.args[1])
2024-10-07 13:13:22.081 Error: Daves iPhone Detected: ~~~~~~^^^
2024-10-07 13:13:22.081 Error: Daves iPhone Detected: IndexError: tuple index out of range

Bluetooth is on and working on the pi, If I delete the device in the hardware tab and recreate it I assume it is detected because after about 1 min the switch state for the device changes to on but then never goes off even with the device out of range.

Thanks
Dave21w
Posts: 361
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Re: [plugin bluetooth-ping] Can someone help with this error

Post by Dave21w »

Resolved but I have no idea why / how. Originally I was only booting my pi to cmd line as I didn't need the desktop, I checked from the cmd line to see what the bluetooth was doing and it seemed to be OK. I enabled the gui on the pi and rebooted, error was still there in Domoticz logs but again bluetooth was fine in the pi gui, I could see and pair devices, as this seemed OK i decided to disable the gui which again needed a reboot and then all was fine :shock:

So now working again.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest