dknowles2 / ha-pitboss

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

Add support for passwords #69

Open pwostran opened 1 month ago

pwostran commented 1 month ago

System Health details

System Information

version core-2024.10.2
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.46-haos
arch x86_64
timezone America/New_York
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok HACS Data | ok GitHub API Calls Remaining | 5000 Installed Version | 2.0.1 Stage | running Available Repositories | 1504 Downloaded Repositories | 14
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | November 1, 2024 at 8:00 PM relayer_connected | true relayer_region | us-east-1 remote_enabled | true remote_connected | true alexa_enabled | true google_enabled | true remote_server | us-east-1-13.ui.nabu.casa certificate_status | ready instance_id | 6629dbaf146e476098be73ac3fdbd90e can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 13.1 -- | -- update_channel | stable supervisor_version | supervisor-2024.10.0 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 468.7 GB disk_used | 15.1 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | board | generic-x86-64 supervisor_api | ok version_api | ok installed_addons | File editor (5.8.0), Mosquitto broker (6.4.1), Govee to MQTT Bridge (2024.07.13-82ddc6e9), Get HACS (1.3.1), Samba Backup (5.2.0), Zigbee2MQTT (1.40.2-1), ESPHome (2024.9.2), Studio Code Server (5.17.1)
Dashboards dashboards | 5 -- | -- resources | 7 views | 24 mode | storage
Recorder oldest_recorder_run | October 1, 2024 at 4:45 PM -- | -- current_recorder_run | October 11, 2024 at 1:08 PM estimated_db_size | 401.74 MiB database_engine | sqlite database_version | 3.45.3

Checklist

Describe the issue

When you try and change the temp there is an "Unknown Error". I'm using a PB850PS2. This is my first time submitting a bug report so if I missed anything or didn't get the correct info please let me know.

Reproduction steps

  1. try to change temp
  2. get unknown error
  3. ...

Debug logs

2024-10-10 19:41:11.181 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB:  FE0B000500090600090600000000000000030000030000020100000000000000000001000000000100000000FF [90]')
2024-10-10 19:41:11.181 DEBUG (MainThread) [pytboss] State received: FE0B000500090600090600000000000000030000030000020100000000000000000001000000000100000000FF
2024-10-10 19:41:11.191 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data
2024-10-10 19:41:12.712 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB:  FE0C00050009060009060000000000000003000003000003000001FF [56]')
2024-10-10 19:41:12.712 DEBUG (MainThread) [pytboss] State received: FE0C00050009060009060000000000000003000003000003000001FF
2024-10-10 19:41:12.720 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data
2024-10-10 19:41:14.789 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB:  FE0B000500090600090600000000000000030000030000020100000000000000000001000000000100000000FF [90]')
2024-10-10 19:41:14.789 DEBUG (MainThread) [pytboss] State received: FE0B000500090600090600000000000000030000030000020100000000000000000001000000000100000000FF
2024-10-10 19:41:14.798 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data
2024-10-10 19:41:18.047 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB:  FE0C00050009060009060000000000000003000003000003000001FF [56]')
2024-10-10 19:41:18.047 DEBUG (MainThread) [pytboss] State received: FE0C00050009060009060000000000000003000003000003000001FF
2024-10-10 19:41:18.054 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data
2024-10-10 19:41:18.370 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140125128027168] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 996, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 1029, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/pitboss/climate.py", line 102, in async_set_temperature
    await self.coordinator.api.set_grill_temperature(temp)
  File "/usr/local/lib/python3.12/site-packages/pytboss/api.py", line 155, in set_grill_temperature
    return await self._send_command("set-temperature", temp)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pytboss/api.py", line 141, in _send_command
    return await self._send_hex_command(cmd(*args))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pytboss/api.py", line 137, in _send_hex_command
    return await self._conn.send_command("PB.SendMCUCommand", {"command": cmd})
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pytboss/ble.py", line 190, in send_command
    return await future
           ^^^^^^^^^^^^
pytboss.exceptions.RPCError: Unknown error
2024-10-10 19:41:18.769 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB:  FE0B000500090600090600000000000000030000030000020100000000000000000001000100000100000000FF [90]')
2024-10-10 19:41:18.769 DEBUG (MainThread) [pytboss] State received: FE0B000500090600090600000000000000030000030000020100000000000000000001000100000100000000FF
2024-10-10 19:41:18.778 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data
2024-10-10 19:41:20.693 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB:  FE0C00050009060009060000000000000003000003000003000001FF [56]')
2024-10-10 19:41:20.693 DEBUG (MainThread) [pytboss] State received: FE0C00050009060009060000000000000003000003000003000001FF
2024-10-10 19:41:20.701 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data
2024-10-10 19:41:25.418 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB:  FE0B000500090600090600000000000000030000030000020100000000000000000001000100000100000000FF [90]')
2024-10-10 19:41:25.418 DEBUG (MainThread) [pytboss] State received: FE0B000500090600090600000000000000030000030000020100000000000000000001000100000100000000FF
2024-10-10 19:41:25.427 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data
2024-10-10 19:41:25.428 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB:  FE0C00050009060009060000000000000003000003000003000001FF [56]')
2024-10-10 19:41:25.429 DEBUG (MainThread) [pytboss] State received: FE0C00050009060009060000000000000003000003000003000001FF
2024-10-10 19:41:25.436 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data
2024-10-10 19:41:25.809 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140125128027168] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 996, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 1029, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/pitboss/climate.py", line 102, in async_set_temperature
    await self.coordinator.api.set_grill_temperature(temp)
  File "/usr/local/lib/python3.12/site-packages/pytboss/api.py", line 155, in set_grill_temperature
    return await self._send_command("set-temperature", temp)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pytboss/api.py", line 141, in _send_command
    return await self._send_hex_command(cmd(*args))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pytboss/api.py", line 137, in _send_hex_command
    return await self._conn.send_command("PB.SendMCUCommand", {"command": cmd})
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pytboss/ble.py", line 190, in send_command
    return await future
           ^^^^^^^^^^^^
pytboss.exceptions.RPCError: Unknown error
2024-10-10 19:41:26.872 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB:  FE0B000500090600090600000000000000030000030000020100000000000000000001000100000100000000FF [90]')
2024-10-10 19:41:26.872 DEBUG (MainThread) [pytboss] State received: FE0B000500090600090600000000000000030000030000020100000000000000000001000100000100000000FF
2024-10-10 19:41:26.881 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data
2024-10-10 19:41:29.200 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB:  FE0C00050009060009060000000000000003000003000003000001FF [56]')
2024-10-10 19:41:29.201 DEBUG (MainThread) [pytboss] State received: FE0C00050009060009060000000000000003000003000003000001FF
2024-10-10 19:41:29.208 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data
2024-10-10 19:41:29.393 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140125128027168] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 996, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 1029, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/pitboss/climate.py", line 102, in async_set_temperature
    await self.coordinator.api.set_grill_temperature(temp)
  File "/usr/local/lib/python3.12/site-packages/pytboss/api.py", line 155, in set_grill_temperature
    return await self._send_command("set-temperature", temp)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pytboss/api.py", line 141, in _send_command
    return await self._send_hex_command(cmd(*args))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pytboss/api.py", line 137, in _send_hex_command
    return await self._conn.send_command("PB.SendMCUCommand", {"command": cmd})
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pytboss/ble.py", line 190, in send_command
    return await future
           ^^^^^^^^^^^^
pytboss.exceptions.RPCError: Unknown error
2024-10-10 19:41:30.764 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB:  FE0B000500090600090600000000000000030000030000020100000000000000000001000100000100000000FF [90]')
2024-10-10 19:41:30.764 DEBUG (MainThread) [pytboss] State received: FE0B000500090600090600000000000000030000030000020100000000000000000001000100000100000000FF
2024-10-10 19:41:30.772 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data
2024-10-10 19:41:32.772 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB:  FE0C00050009060009060000000000000003000003000003000001FF [56]')
2024-10-10 19:41:32.773 DEBUG (MainThread) [pytboss] State received: FE0C00050009060009060000000000000003000003000003000001FF
2024-10-10 19:41:32.780 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data
2024-10-10 19:41:34.862 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB:  FE0B000500090600090600000000000000030003030003020100000000000000000001000100000100000000FF [90]')
2024-10-10 19:41:34.863 DEBUG (MainThread) [pytboss] State received: FE0B000500090600090600000000000000030003030003020100000000000000000001000100000100000000FF
2024-10-10 19:41:34.872 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data
2024-10-10 19:41:36.870 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB:  FE0C00050009060009060000000000000003000303000003000301FF [56]')
2024-10-10 19:41:36.870 DEBUG (MainThread) [pytboss] State received: FE0C00050009060009060000000000000003000303000003000301FF
2024-10-10 19:41:36.881 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data

Diagnostics dump

No response

dknowles2 commented 1 month ago

Thanks for the report. I pushed 2024.10.1 which should fix the error handling and at least show the correct error message. I'll leave this open for now in case there's another bug that was being masked by the bad error handling.

pwostran commented 1 month ago

After 2024.10.1 The error was unauthorized. I removed my grill password and it is working now. Here is the log for the unauthorized error. Thanks for your work on this integration its nice to have the grill in HA.

2024-10-12 14:27:40.541 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB: FE0B000500090600090600000000000000000701000701020100000000000000000001010000000100000000FF [90]') 2024-10-12 14:27:40.543 DEBUG (MainThread) [pytboss] State received: FE0B000500090600090600000000000000000701000701020100000000000000000001010000000100000000FF 2024-10-12 14:27:40.551 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data 2024-10-12 14:27:42.493 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB: FE0C00050009060009060000000000000000070101080000070101FF [56]') 2024-10-12 14:27:42.493 DEBUG (MainThread) [pytboss] State received: FE0C00050009060009060000000000000000070101080000070101FF 2024-10-12 14:27:42.501 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data 2024-10-12 14:27:44.832 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB: FE0B000500090600090600000000000000000609000609020100000000000000000001010000000100000000FF [90]') 2024-10-12 14:27:44.832 DEBUG (MainThread) [pytboss] State received: FE0B000500090600090600000000000000000609000609020100000000000000000001010000000100000000FF 2024-10-12 14:27:44.842 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data 2024-10-12 14:27:46.588 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB: FE0C00050009060009060000000000000000070301080000070301FF [56]') 2024-10-12 14:27:46.588 DEBUG (MainThread) [pytboss] State received: FE0C00050009060009060000000000000000070301080000070301FF 2024-10-12 14:27:46.595 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data 2024-10-12 14:27:49.511 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB: FE0B000500090600090600000000000000000701000701020100000000000000000001010000000100000000FF [90]') 2024-10-12 14:27:49.512 DEBUG (MainThread) [pytboss] State received: FE0B000500090600090600000000000000000701000701020100000000000000000001010000000100000000FF 2024-10-12 14:27:49.520 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data 2024-10-12 14:27:49.708 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140638803773616] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 996, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 1029, in async_service_temperature_set await entity.async_set_temperature(*kwargs) File "/config/custom_components/pitboss/climate.py", line 102, in async_set_temperature await self.coordinator.api.set_grill_temperature(temp) File "/usr/local/lib/python3.12/site-packages/pytboss/api.py", line 155, in set_grill_temperature return await self._send_command("set-temperature", temp) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pytboss/api.py", line 141, in _send_command return await self._send_hex_command(cmd(args)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pytboss/api.py", line 137, in _send_hex_command return await self._conn.send_command("PB.SendMCUCommand", {"command": cmd}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pytboss/ble.py", line 190, in send_command return await future ^^^^^^^^^^^^ pytboss.exceptions.RPCError: Unauthorized 2024-10-12 14:27:50.781 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB: FE0C00050009060009060000000000000000070101080000070101FF [56]') 2024-10-12 14:27:50.781 DEBUG (MainThread) [pytboss] State received: FE0C00050009060009060000000000000000070101080000070101FF 2024-10-12 14:27:50.790 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data 2024-10-12 14:27:52.632 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB: FE0B000500090600090600000000000000000701000701020100000000000000000001010100000100000000FF [90]') 2024-10-12 14:27:52.633 DEBUG (MainThread) [pytboss] State received: FE0B000500090600090600000000000000000701000701020100000000000000000001010100000100000000FF 2024-10-12 14:27:52.642 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data 2024-10-12 14:27:54.680 DEBUG (MainThread) [pytboss] Debug log received: bytearray(b'<==PB: FE0C00050009060009060000000000000000070101080000070101FF [56]') 2024-10-12 14:27:54.680 DEBUG (MainThread) [pytboss] State received: FE0C00050009060009060000000000000000070101080000070101FF 2024-10-12 14:27:54.688 DEBUG (MainThread) [custom_components.pitboss] Manually updated pitboss data