dknowles2 / ha-pitboss

Home Assistant Custom Integration for PitBoss smokers and grills
MIT License
32 stars 4 forks source link

PB850PS2 wont update sensors #31

Closed 007GTCS closed 1 year ago

007GTCS commented 1 year ago

System Health details

System Information

version core-2023.11.1
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.6
os_name Linux
os_version 6.1.59
arch x86_64
timezone America/Chicago
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4418 Installed Version | 1.33.0 Stage | running Available Repositories | 1332 Downloaded Repositories | 30
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 11.1 -- | -- update_channel | stable supervisor_version | supervisor-2023.10.1 agent_version | 1.6.0 docker_version | 24.0.6 disk_total | 30.8 GB disk_used | 24.6 GB healthy | true supported | true board | ova supervisor_api | ok version_api | ok installed_addons | Terminal & SSH (9.7.1), File editor (5.6.0), Home Assistant Google Drive Backup (0.111.1), Duck DNS (1.15.0), NGINX Home Assistant SSL proxy (3.5.0), Vaultwarden (Bitwarden) (0.20.1), Studio Code Server (5.13.0), Z-Wave JS UI (3.0.1), Cloudflared (4.2.10)
keymaster zwave_integration | zwave_js -- | -- network_status | on
Dashboards dashboards | 1 -- | -- resources | 15 views | 5 mode | storage
Recorder oldest_recorder_run | October 29, 2023 at 9:23 PM -- | -- current_recorder_run | November 6, 2023 at 12:48 PM estimated_db_size | 842.46 MiB database_engine | sqlite database_version | 3.41.2

Checklist

Describe the issue

I have connected my Pitboss PB850PS2 via bluetooth and none of the sensor data is updated. Looks like there is a time out issue.

Reproduction steps

Connect Smoker Turn On

Debug logs

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/pitboss/coordinator.py:58
Integration: PitBoss (documentation, issues)
First occurred: 12:50:29 PM (1 occurrences)
Last logged: 12:50:29 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/bleak/backends/bluezdbus/client.py", line 209, in connect
    reply = await self._bus.call(
            ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/dbus_fast/aio/message_bus.py", line 399, in call
    await future
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/bleak_retry_connector/__init__.py", line 350, in establish_connection
    await client.connect(
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/wrappers.py", line 292, in connect
    connected = await super().connect(**kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bleak/__init__.py", line 605, in connect
    return await self._backend.connect(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bleak/backends/bluezdbus/client.py", line 146, in connect
    async with async_timeout(timeout):
  File "/usr/local/lib/python3.11/asyncio/timeouts.py", line 111, in __aexit__
    raise TimeoutError from exc_val
TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/pitboss/coordinator.py", line 58, in reset_device
    await self.api.start()
  File "/usr/local/lib/python3.11/site-packages/pytboss/api.py", line 143, in start
    await self._conn.connect()
  File "/usr/local/lib/python3.11/site-packages/pytboss/ble.py", line 87, in connect
    self._ble_client = await bleak_retry_connector.establish_connection(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bleak_retry_connector/__init__.py", line 374, in establish_connection
    _raise_if_needed(name, device.address, exc)
  File "/usr/local/lib/python3.11/site-packages/bleak_retry_connector/__init__.py", line 314, in _raise_if_needed
    raise BleakNotFoundError(msg) from exc
bleak_retry_connector.BleakNotFoundError: PBL-0297D6C - 4A:55:D4:67:84:66: Failed to connect after 4 attempt(s): TimeoutError

Diagnostics dump

No response

dknowles2 commented 1 year ago

I can think of a few things that could cause this:

  1. Your HA machine being too far away from your grill/smoker, causing too much latency in the bluetooth connection
  2. The PitBoss firmware being super picky about connections it will accept
  3. Bluetooth generally being a disaster and Linux APIs being even worse

Hopefully this is just (1), but (2) and (3) are unfortunately also common. ☹️

007GTCS commented 1 year ago

Unfortunately I don't think it is number 1. My phone can connect just fine from the same spot via bluetooth.

Anyway I can help determine the other 2?

007GTCS commented 1 year ago

Fyi I figured this out. My bluetooth adapter was not compatible. Tried a different one, working now. Thank you!

hoopsta1423 commented 12 months ago

Fyi I figured this out. My bluetooth adapter was not compatible. Tried a different one, working now. Thank you!

What adapter did you use that ended up working because I have similar issues

007GTCS commented 11 months ago

Fyi I figured this out. My bluetooth adapter was not compatible. Tried a different one, working now. Thank you!

What adapter did you use that ended up working because I have similar issues

I am using the Sena UD100-G03 (CSR8510A10). I just upgraded for better range and connectivity. I would highly suggest the following controllers, as they seem to work with home assistant far better. I tried the ESPHOME bluetooth proxy setup, it did not work as well.

https://home-assistant.io/integrations/bluetooth/#known-working-high-performance-adapters

KNOWN WORKING HIGH-PERFORMANCE ADAPTERS Cambridge Silicon Radio (CSR) -based adapters ANNE PRO CSR 4.0 (CSR8510A10) Avantree BTDG-40S (CSR8510A10) DIGITUS DN-30210-1 (CSR8510A10) Enbiawit BT403 (CSR8510A10) Feasycom FSC-BP119 (CSR8510A10) 📶 Gold Touch E-USB-BT4 (CSR8510A10) HIDEEZ BT0015-01 (CSR8510A10) Maxesla CSR 4.0 (CSR8510A10) Nuu You BT40 (CSR8510A10) ORICO BTA-403 (CSR8510A10) ORICO BTA-409 (CSR8510A10) Panda Wireless PBU40 (CSR8510A10) PlanexCOMM BT-Micro4 (CSR8510A10) QGOO BT-06A (CSR8510A10) ROCKETEK BT4Y (CSR8510A10) SABRENT BT-UB40 (CSR8510A10) Sena UD100-G03 (CSR8510A10) 📶 StarTech USBBT1EDR4 (CSR8510A10) Techkey PBT06H (CSR8510A10) TRENDnet TBW-107UB (CSR8510A10) UGREEN CM109 (CSR8510A10) Warmstor WBT-AD01 (CSR8510A10) WAVLINK WL-BT4001 (CSR8510A10)