sebirdman / hass_traeger

Hass Plugin for Traeger (WIP)
MIT License
90 stars 21 forks source link

Exception 'traeger' calls async_create_task Please report it to the author of the 'traeger' custom integration. #66

Open wasteduk opened 3 months ago

wasteduk commented 3 months ago

Version of the custom_component

const.py : 0.1.0

Configuration


Done via the app.

Describe the bug

All sensors and controls show as unavailable in the front-end. I tried removing and reinstalling, adding back my grill which is discovered and added ok, just that all the controls and sensors are unavailable.

Debug log

2024-06-28T16:08:42.760418141Z 2024-06-28 17:08:42.759 INFO (MainThread) [custom_components.traeger] Task Already Dead
2024-06-28T16:09:23.450765936Z 2024-06-28 17:09:23.449 INFO (MainThread) [custom_components.traeger] Task Already Dead
2024-06-28T16:14:19.275089081Z 2024-06-28 17:14:19.269 INFO (MainThread) [custom_components.traeger] Call_Later in: 30 seconds.
2024-06-28T16:14:19.319488685Z 2024-06-28 17:14:19.297 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.traeger.climate.TraegerClimateEntity'>) implements HVACMode(s): heat, off, cool and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/sebirdman/hass_traeger/issues
2024-06-28T16:14:49.271448682Z 2024-06-28 17:14:49.270 DEBUG (MainThread) [custom_components.traeger] @Call_Later SyncMain CreatingTask for async Main.
2024-06-28T16:14:49.272254567Z 2024-06-28 17:14:49.270 DEBUG (MainThread) [custom_components.traeger] Current Main Loop Time: 1719591289.2702782
2024-06-28T16:14:49.272474004Z 2024-06-28 17:14:49.270 DEBUG (MainThread) [custom_components.traeger] MQTT Logger Token Time Remaining:3569.1664333343506 MQTT Time Remaining:-30.833576679229736
2024-06-28T16:14:49.812753805Z 2024-06-28 17:14:49.812 DEBUG (MainThread) [custom_components.traeger] MQTT URL:wss://aqmix2am7g1w-ats.iot.us-west-2.amazonaws.com/mqtt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAYCV2Q4WGZZZZZZ%2F20240628%2Fus-west-2%2Fiotdevicegateway%2Faws4_request&X-Amz-Date=20240628T161449Z&X-Amz-SignedHeaders=host&X-Amz-Signature=a2deae08c61ef2b111111111a3946b4e4cf39f2c5aa16a23058842a06679&X-Amz-Security-Token=FwoGZXIvYXdzEHIaDXXXXXXXXXXByL2Al1x4%2BmpOmXi678c305VSk4saqzAThpb2fZNVIQOTePCZQovXbG2NnabHxxxxxxxxxgqaC66WXIiRIO%2Fs5DkuQ6FWs57jhvw%2FkqLYalVvQcBcoFe4Gs3Lq%2FHDG%2FxYDJUcao%2FCN%2FCfP3iOo%2BicW5x%2BLgkLwWFIzCsh47p24exxxxxttZjxfgk1MFWFBlcBYxT2n4UxzbZBBxN5nH6BpyeN4U6xNhyE%2FdnMRaGbP1TtlZXT4lq6lfCSNCYw15HxQ8bcA0ka4E9XTE2Ee3KxxxxxxxxoonrYHGRru6WOtoevbrl%2F06rieifK%2BmHM4Ei7rtAFl1BRc7sJo%2FzbXh6Qz%2BqEMkJ%2BSj%2BVLKYQgiSeskfhD4VpshvBalXnaPTPTuTqgpAURXUfBYKT3f4fXPBKx2An0bHCKSpkYdpvTqfio5CTWZHgpkVzNkqpqZlb3S%2Frxxxxxxx%2BO3Ip35lOCwzKtF0HLcvmtePV%2F53KPnC%2B7MGMi1RxixT4VSEfw3lOkX%2F1U87QIsTfQi%2FPr9j1H%2BtYYg0oPxsQj9GLVmQ3cJ45gE%3D Expires @:1719594889.270448
2024-06-28T16:14:49.814485839Z 2024-06-28 17:14:49.814 INFO (MainThread) [custom_components.traeger] Thread Active Count:88
2024-06-28T16:14:50.501735116Z 2024-06-28 17:14:50.500 DEBUG (MainThread) [custom_components.traeger] Sock.Open.Report...Client: <paho.mqtt.client.Client object at 0x7f417edc8080> UserData: None Sock: <paho.mqtt.client.WebsocketWrapper object at 0x7f4186332a20>
2024-06-28T16:14:50.502312931Z 2024-06-28 17:14:50.500 DEBUG (MainThread) [custom_components.traeger] Sending CONNECT (u0, p0, wr0, wq0, wf0, c1, k300) client_id=b''
2024-06-28T16:14:50.502640053Z 2024-06-28 17:14:50.500 DEBUG (MainThread) [custom_components.traeger] Sock.Regi.Write....Client: <paho.mqtt.client.Client object at 0x7f417edc8080> UserData: None Sock: <paho.mqtt.client.WebsocketWrapper object at 0x7f4186332a20>
2024-06-28T16:14:50.502912972Z 2024-06-28 17:14:50.500 DEBUG (Thread-1915 (_mqtt_connect_func)) [custom_components.traeger] Start MQTT Loop Forever
2024-06-28T16:14:50.503215550Z 2024-06-28 17:14:50.500 DEBUG (MainThread) [custom_components.traeger] Call_Later @: 1719594889.270448
2024-06-28T16:14:50.503525243Z 2024-06-28 17:14:50.501 DEBUG (Thread-1915 (_mqtt_connect_func)) [custom_components.traeger] Sock.UnRg.Write....Client: <paho.mqtt.client.Client object at 0x7f417edc8080> UserData: None Sock: <paho.mqtt.client.WebsocketWrapper object at 0x7f4186332a20>
2024-06-28T16:14:50.683809351Z 2024-06-28 17:14:50.683 DEBUG (Thread-1915 (_mqtt_connect_func)) [custom_components.traeger] Received CONNACK (0, 0)
2024-06-28T16:14:50.684163694Z 2024-06-28 17:14:50.683 INFO (Thread-1915 (_mqtt_connect_func)) [custom_components.traeger] Grill Connected
2024-06-28T16:14:50.684413184Z 2024-06-28 17:14:50.683 DEBUG (Thread-1915 (_mqtt_connect_func)) [custom_components.traeger] Sending SUBSCRIBE (d0, m1) [(b'prod/thing/update/80342874347B', 1)]
2024-06-28T16:14:50.684576607Z 2024-06-28 17:14:50.683 DEBUG (Thread-1915 (_mqtt_connect_func)) [custom_components.traeger] Sock.Regi.Write....Client: <paho.mqtt.client.Client object at 0x7f417edc8080> UserData: None Sock: <paho.mqtt.client.WebsocketWrapper object at 0x7f4186332a20>
2024-06-28T16:14:50.684738693Z 2024-06-28 17:14:50.683 DEBUG (Thread-1915 (_mqtt_connect_func)) [custom_components.traeger] Sock.UnRg.Write....Client: <paho.mqtt.client.Client object at 0x7f417edc8080> UserData: None Sock: <paho.mqtt.client.WebsocketWrapper object at 0x7f4186332a20>
2024-06-28T16:14:50.886107884Z 2024-06-28 17:14:50.881 DEBUG (Thread-1915 (_mqtt_connect_func)) [custom_components.traeger] Received SUBACK
2024-06-28T16:14:50.887263468Z 2024-06-28 17:14:50.882 DEBUG (Thread-1915 (_mqtt_connect_func)) [custom_components.traeger] OnSubscribe Callback. Client:<paho.mqtt.client.Client object at 0x7f417edc8080> userdata:None mid:1 granted_qos:(1,)
2024-06-28T16:14:50.887784030Z 2024-06-28 17:14:50.885 ERROR (Thread-1915 (_mqtt_connect_func)) [custom_components.traeger] Caught exception in on_subscribe: Detected that custom integration 'traeger' calls async_create_task from a thread at custom_components/traeger/traeger.py, line 230: self.hass.async_create_task(self.update_state(grill_id)). Please report it to the author of the 'traeger' custom integration.
2024-06-28T16:18:03.746808506Z 2024-06-28 17:18:03.744 INFO (MainThread) [custom_components.traeger] Task Already Dead
2024-06-28T16:18:10.529854863Z 2024-06-28 17:18:10.529 INFO (MainThread) [custom_components.traeger] Killing Task
2024-06-28T16:18:10.530355315Z 2024-06-28 17:18:10.529 DEBUG (MainThread) [custom_components.traeger] Task Info: <TimerHandle when=2598954.1594417742 traeger.syncmain()>
2024-06-28T16:18:10.530654645Z 2024-06-28 17:18:10.529 DEBUG (MainThread) [custom_components.traeger] Task Info: <TimerHandle cancelled when=2598954.1594417742> TaskCancelled Status: True
2024-06-28T16:18:10.530880014Z 2024-06-28 17:18:10.529 DEBUG (MainThread) [custom_components.traeger] Sending DISCONNECT
2024-06-28T16:18:10.531115049Z 2024-06-28 17:18:10.529 DEBUG (MainThread) [custom_components.traeger] Sock.Regi.Write....Client: <paho.mqtt.client.Client object at 0x7f417edc8080> UserData: None Sock: <paho.mqtt.client.WebsocketWrapper object at 0x7f4186332a20>
2024-06-28T16:18:32.203943710Z 2024-06-28 17:18:32.191 INFO (MainThread) [custom_components.traeger] Task Already Dead
2024-06-28T16:19:04.033654482Z 2024-06-28 17:19:04.031 INFO (MainThread) [custom_components.traeger] Task Already Dead
2024-06-28T16:19:04.073122435Z 2024-06-28 17:19:04.072 INFO (MainThread) [custom_components.traeger] Task Already Dead
2024-06-28T16:25:53.651390899Z 2024-06-28 17:25:53.650 INFO (MainThread) [custom_components.traeger] 
2024-06-28T16:25:54.850131427Z 2024-06-28 17:25:54.845 INFO (MainThread) [custom_components.traeger] Call_Later in: 30 seconds.
2024-06-28T16:25:54.908725336Z 2024-06-28 17:25:54.906 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.traeger.climate.TraegerClimateEntity'>) implements HVACMode(s): heat, off, cool and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/sebirdman/hass_traeger/issues
2024-06-28T16:25:54.980525091Z 2024-06-28 17:25:54.968 WARNING (ImportExecutor_0) [homeassistant.components.number] custom_components.traeger.number::TraegerNumberEntity is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom integration author
2024-06-28T16:26:24.847808393Z 2024-06-28 17:26:24.846 DEBUG (MainThread) [custom_components.traeger] @Call_Later SyncMain CreatingTask for async Main.
2024-06-28T16:26:24.848507831Z 2024-06-28 17:26:24.846 DEBUG (MainThread) [custom_components.traeger] Current Main Loop Time: 1719591984.846609
2024-06-28T16:26:24.848521405Z 2024-06-28 17:26:24.846 DEBUG (MainThread) [custom_components.traeger] MQTT Logger Token Time Remaining:3568.8039693832397 MQTT Time Remaining:-31.196045637130737
2024-06-28T16:26:25.657274992Z 2024-06-28 17:26:25.656 DEBUG (MainThread) [custom_components.traeger] MQTT URL:wss://aqmix2am7g1w-ats.iot.us-west-2.amazonaws.com/mqtt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAYCV2Q4WGMDN5CNZA%2F20240628%2Fus-west-2%2Fiotdevicegateway%2Faws4_request&X-Amz-Date=20240628T162625Z&X-Amz-SignedHeaders=host&X-Amz-Signature=19f871f1ed725e6bd61c5a982bdfdba928a3bc9517c6a92eb2cceef912b22775&X-Amz-Security-Token=FwoGZXIvYXdzEHIaDLewxlXK8wxSsJg7wCL2AjMw7Q31uySu5DrqziLGuA4Du1ZDHP1m0GfB6%2BAcKXNi95w3AzM0LeO%2F820ePIxXMXSqprv%2BRdY60NwSDFNQ%2FeG6Mt8lXIFrj1g%2Ba9HFY4DahMGo2iu3Cgz3p2X6%2FvVErOCyrMIJwV%2BMCH5AUdmfEJuuj%2FgsFzmFv%2B4VS2zDgRuAWF5E3o4lInhCqUpQs5vpDhW0gqkJ%2Ft9YNsE9Gd5tC2cd%2B6H5X1%2Fin3IVBlR1GvpUfX%2B6adr4M%2B5nuTlEBqVk5cPVx63Dfwxb83%2BiczmMZyzeF%2FckvxX2qy8Pseb4jzsC4uEo7qBd%2BN1yjhLMhhm1dNFHkZIGLfbelJDL3wYJ3ZL%2F27SkeYMsmGp5UQyCU3GztHddBmTqw%2Fc6P3eV8njyGVdZWOjin4Ewr9%2Bga1Oy9maglKp1qcSatXYIgHXFGdxWMyfDWGC8jK5FNSkofZRSDjCSKpYlewVTBtAmJCljnxzUHrR%2BGfC7loVKky9%2Fj6Ft%2F0s6UymHKLHI%2B7MGMi2CBC0sqvQw7J3A2njKBwBB6U9HFOQvAhnUXuut4IWvebUz1jKz%2B4dHO0ysvAQ%3D Expires @:1719595584.8467813
2024-06-28T16:26:25.670098708Z 2024-06-28 17:26:25.657 INFO (MainThread) [custom_components.traeger] Thread Active Count:89
2024-06-28T16:26:26.409491384Z 2024-06-28 17:26:26.408 DEBUG (MainThread) [custom_components.traeger] Sock.Open.Report...Client: <paho.mqtt.client.Client object at 0x7f02fd3e4350> UserData: None Sock: <paho.mqtt.client.WebsocketWrapper object at 0x7f02fd3e4680>
2024-06-28T16:26:26.410933231Z 2024-06-28 17:26:26.408 DEBUG (MainThread) [custom_components.traeger] Sending CONNECT (u0, p0, wr0, wq0, wf0, c1, k300) client_id=b''
2024-06-28T16:26:26.411190481Z 2024-06-28 17:26:26.409 DEBUG (MainThread) [custom_components.traeger] Sock.Regi.Write....Client: <paho.mqtt.client.Client object at 0x7f02fd3e4350> UserData: None Sock: <paho.mqtt.client.WebsocketWrapper object at 0x7f02fd3e4680>
2024-06-28T16:26:26.411401784Z 2024-06-28 17:26:26.409 DEBUG (Thread-109 (_mqtt_connect_func)) [custom_components.traeger] Start MQTT Loop Forever
2024-06-28T16:26:26.411567442Z 2024-06-28 17:26:26.409 DEBUG (MainThread) [custom_components.traeger] Call_Later @: 1719595584.8467813
2024-06-28T16:26:26.411751572Z 2024-06-28 17:26:26.410 DEBUG (Thread-109 (_mqtt_connect_func)) [custom_components.traeger] Sock.UnRg.Write....Client: <paho.mqtt.client.Client object at 0x7f02fd3e4350> UserData: None Sock: <paho.mqtt.client.WebsocketWrapper object at 0x7f02fd3e4680>
2024-06-28T16:26:26.599675502Z 2024-06-28 17:26:26.599 DEBUG (Thread-109 (_mqtt_connect_func)) [custom_components.traeger] Received CONNACK (0, 0)
2024-06-28T16:26:26.600126200Z 2024-06-28 17:26:26.599 INFO (Thread-109 (_mqtt_connect_func)) [custom_components.traeger] Grill Connected
2024-06-28T16:26:26.600134932Z 2024-06-28 17:26:26.599 DEBUG (Thread-109 (_mqtt_connect_func)) [custom_components.traeger] Sending SUBSCRIBE (d0, m1) [(b'prod/thing/update/80342874347B', 1)]
2024-06-28T16:26:26.600639868Z 2024-06-28 17:26:26.599 DEBUG (Thread-109 (_mqtt_connect_func)) [custom_components.traeger] Sock.Regi.Write....Client: <paho.mqtt.client.Client object at 0x7f02fd3e4350> UserData: None Sock: <paho.mqtt.client.WebsocketWrapper object at 0x7f02fd3e4680>
2024-06-28T16:26:26.600648618Z 2024-06-28 17:26:26.599 DEBUG (Thread-109 (_mqtt_connect_func)) [custom_components.traeger] Sock.UnRg.Write....Client: <paho.mqtt.client.Client object at 0x7f02fd3e4350> UserData: None Sock: <paho.mqtt.client.WebsocketWrapper object at 0x7f02fd3e4680>
2024-06-28T16:26:26.806605051Z 2024-06-28 17:26:26.802 DEBUG (Thread-109 (_mqtt_connect_func)) [custom_components.traeger] Received SUBACK
2024-06-28T16:26:26.806799870Z 2024-06-28 17:26:26.802 DEBUG (Thread-109 (_mqtt_connect_func)) [custom_components.traeger] OnSubscribe Callback. Client:<paho.mqtt.client.Client object at 0x7f02fd3e4350> userdata:None mid:1 granted_qos:(1,)
2024-06-28T16:26:26.821143460Z 2024-06-28 17:26:26.819 ERROR (Thread-109 (_mqtt_connect_func)) [custom_components.traeger] Caught exception in on_subscribe: Detected that custom integration 'traeger' calls async_create_task from a thread at custom_components/traeger/traeger.py, line 230: self.hass.async_create_task(self.update_state(grill_id)). Please report it to the author of the 'traeger' custom integration.
njobrien1006 commented 3 months ago

See here for some discussion/suggestions in this repo.

And here for a more complete fix.