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

Airthings not starting on boot, possibly related to the new BLE integration? #18

Open
bobloadmire opened this issue Aug 17, 2022 · 12 comments

Comments

@bobloadmire
Copy link

Since the last update, the AT addon won't auto start, even thought its toggled on the addon page. I do have the new bluetooth integration enabled, related? I can manually start AT add on after boot though, no logged errors.

@mjmccans
Copy link
Owner

Do you have the watchdog toggle selected? I ask because if the add-on fails to communicate with the bluetooth adapter when it first boots it relies on the watchdog function to keep restarting the add-on until it can. Please give that a try and let me know if it helps. Thank you.

@bobloadmire
Copy link
Author

the watchdog is enabled. I looked at the logs, not seeing anything useful.

@mjmccans
Copy link
Owner

Very strange. I gather from your comment that the add-on just doesn't start on boot despite the option being selected. I could be wrong, but this seems like a Home Assistant issue and not a bug in the add-on because you would have log entries / errors if the add-on was started. Probably not super helpful, but I suggest trying uninstalling and reinstalling the add-on and see if that helps anything. Sorry about not being able to provide more guidance; this is not an issue that I am seeing or anyone else has reported.

@bobloadmire
Copy link
Author

no worries, I can start it manually, just thought you would like to know.

@bobloadmire
Copy link
Author

Ok think I finally got a relevant log:

[2022-08-18 08:37:14] ERROR: A message handler raised an exception: 'org.bluez.Device1'. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/dbus_next/message_bus.py", line 668, in _process_message result = handler(msg) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 746, in _parse_msg condition_callback() File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 658, in callback self._properties[device_path][defs.DEVICE_INTERFACE][property_name] KeyError: 'org.bluez.Device1' [2022-08-18 08:37:14] ERROR: A message handler raised an exception: 'org.bluez.Device1'. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/dbus_next/message_bus.py", line 668, in _process_message result = handler(msg) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 746, in _parse_msg condition_callback() File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 658, in callback self._properties[device_path][defs.DEVICE_INTERFACE][property_name] KeyError: 'org.bluez.Device1' [2022-08-18 08:37:14] ERROR: A message handler raised an exception: 'org.bluez.Device1'. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/dbus_next/message_bus.py", line 668, in _process_message result = handler(msg) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 746, in _parse_msg condition_callback() File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 658, in callback self._properties[device_path][defs.DEVICE_INTERFACE][property_name] KeyError: 'org.bluez.Device1' [2022-08-18 08:37:14] ERROR: A message handler raised an exception: 'org.bluez.Device1'. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/dbus_next/message_bus.py", line 668, in _process_message result = handler(msg) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 746, in _parse_msg condition_callback() File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 658, in callback self._properties[device_path][defs.DEVICE_INTERFACE][property_name] KeyError: 'org.bluez.Device1' [2022-08-18 08:37:14] ERROR: A message handler raised an exception: 'org.bluez.Device1'. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/dbus_next/message_bus.py", line 668, in _process_message result = handler(msg) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 746, in _parse_msg condition_callback() File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 658, in callback self._properties[device_path][defs.DEVICE_INTERFACE][property_name] KeyError: 'org.bluez.Device1' [2022-08-18 08:37:14] ERROR: A message handler raised an exception: 'org.bluez.Device1'. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/dbus_next/message_bus.py", line 668, in _process_message result = handler(msg) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 746, in _parse_msg condition_callback() File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 658, in callback self._properties[device_path][defs.DEVICE_INTERFACE][property_name] KeyError: 'org.bluez.Device1' [2022-08-18 08:37:14] ERROR: A message handler raised an exception: 'org.bluez.Device1'. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/dbus_next/message_bus.py", line 668, in _process_message result = handler(msg) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 746, in _parse_msg condition_callback() File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 658, in callback self._properties[device_path][defs.DEVICE_INTERFACE][property_name] KeyError: 'org.bluez.Device1' [2022-08-18 08:38:19] ERROR: A message handler raised an exception: 'org.bluez.Device1'. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/dbus_next/message_bus.py", line 668, in _process_message result = handler(msg) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 746, in _parse_msg condition_callback() File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 658, in callback self._properties[device_path][defs.DEVICE_INTERFACE][property_name] KeyError: 'org.bluez.Device1' [2022-08-18 08:38:19] ERROR: A message handler raised an exception: 'org.bluez.Device1'. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/dbus_next/message_bus.py", line 668, in _process_message result = handler(msg) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 746, in _parse_msg condition_callback() File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 658, in callback self._properties[device_path][defs.DEVICE_INTERFACE][property_name] KeyError: 'org.bluez.Device1' [2022-08-18 08:38:19] ERROR: A message handler raised an exception: 'org.bluez.Device1'. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/dbus_next/message_bus.py", line 668, in _process_message result = handler(msg) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 746, in _parse_msg condition_callback() File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 658, in callback self._properties[device_path][defs.DEVICE_INTERFACE][property_name] KeyError: 'org.bluez.Device1'

@mjmccans
Copy link
Owner

All of that appears to be in Home Assistant Core and not the add-on, although it is interesting that it seeks to bork automatic startup of the add-on. I will do a bit of digging to see if I can find anything else to help, but I cannot seem to reproduce the error. However, the best news that I may have for you is that someone is working on bringing support for Airthings devices to Home Assistant Core using the new bluetooth support. In my mind this is a better option than using my add-on, and if done will render this add-on obsolete. If you are interested you can go here to see the discussion.

@peregrines2
Copy link

Same problem here. Watchdog and Autostart enabled. Very strange :(

@mjmccans
Copy link
Owner

Apologies for the delay responding. I was away for a while, but more importantly I am holding off making changes to this addon because it looks like support for Airthings devices is likely being brought into Home Assistant Core (see this pull request). I understand that it almost made it into 2022.09 and is currently slated to be included with 2022.10. The addition to Core includes the changes I made to use the new Bleak library, and is a better solution than this addon. For example, it will include device discovery, which is a much better user experience. Fingers crossed it will make it in and this addon will be rendered obsolete.

@bobloadmire
Copy link
Author

good news. Is there a temporary work around for now?

@mjmccans
Copy link
Owner

Unfortunately I have not been able to recreate the issue so I do not have a workaround to suggest. Not sure if this would help, but have you tried uninstalling the addon, perhaps rebooting Home Assistant, and then re-installing the addon? Another option would be to disable the new bluetooth integration to see if that is interfering, but I have it installed and it is not causing an issue on my system. Not great suggestions but I am not sure where things are going off the rails.

@bobloadmire
Copy link
Author

Did this make it to 2022.10 release? only seeing the standard cloud integration.

@mjmccans
Copy link
Owner

It did not make the 2022.10 release (it just missed the deadline), but I believe it will be included in the 2022.11 release. You can see the new integration in the Home Assistant Core git repository at the following: https://github.com/home-assistant/core/tree/dev/homeassistant/components/airthings_ble

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