Closed sevagjb closed 1 year ago
Also noticed this problem, about a month. The subscription is active on tuya.
Same problem here after last update. It doesn't refresh automatically
same here, have to restart the integration every second day at least
Same here.
Tuya integration suddenly stops working. But I can still turn on/off switches but in HA the state is not updated. i.e I turn on a switch in HA, the switch turns on, but the graphical representation (in the GUI) of the switch in HA returns to off.
If I, as suggested above, restarts the integrations all is well and everything starts to work again, but if I leave it as it is after a period of time (unknown how long) it also starts to work again.
Debug log from when it's not working:
2023-04-15 06:14:24.780 DEBUG (Thread-3038) [tuya_iot] _on_log: Sending PINGREQ 2023-04-15 06:14:24.830 DEBUG (Thread-3038) [tuya_iot] _on_log: Received PINGRESP 2023-04-15 06:14:37.327 DEBUG (SyncWorker_19) [homeassistant.components.tuya] Sending commands for device 36035202500291cc3371: [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': True}] 2023-04-15 06:14:37.327 DEBUG (SyncWorker_19) [tuya_iot] Request: method = POST, url = https://openapi.tuyaeu.com/v1.0/devices/36035202500291cc3371/commands, params = None, body = {'commands': [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': True}]}, t = 1681532077327 2023-04-15 06:14:37.616 DEBUG (SyncWorker_19) [tuya_iot] Response: { "result": true, "success": true, "t": 1681532077591, "tid": "091c055bdb4411edbe55ce1a38a7d30c" } 2023-04-15 06:15:05.008 DEBUG (SyncWorker_13) [homeassistant.components.tuya] Sending commands for device bfebc2d938d26e6ea3hc5l: [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': True}] 2023-04-15 06:15:05.009 DEBUG (SyncWorker_13) [tuya_iot] Request: method = POST, url = https://openapi.tuyaeu.com/v1.0/devices/bfebc2d938d26e6ea3hc5l/commands, params = None, body = {'commands': [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': True}]}, t = 1681532105009 2023-04-15 06:15:05.135 DEBUG (SyncWorker_13) [tuya_iot] Response: { "result": true, "success": true, "t": 1681532105109, "tid": "197fa4afdb4411edb3c5c22eba99f181" } 2023-04-15 06:15:23.549 DEBUG (SyncWorker_2) [homeassistant.components.tuya] Sending commands for device bfebc2d938d26e6ea3hc5l: [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': True}] 2023-04-15 06:15:23.549 DEBUG (SyncWorker_2) [tuya_iot] Request: method = POST, url = https://openapi.tuyaeu.com/v1.0/devices/bfebc2d938d26e6ea3hc5l/commands, params = None, body = {'commands': [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': True}]}, t = 1681532123549 2023-04-15 06:15:23.802 DEBUG (SyncWorker_2) [tuya_iot] Response: { "result": true, "success": true, "t": 1681532123777, "tid": "248c7831db4411ed8e4ade36b14ed26a" } 2023-04-15 06:15:24.889 DEBUG (Thread-3038) [tuya_iot] _on_log: Sending PINGREQ 2023-04-15 06:15:24.938 DEBUG (Thread-3038) [tuya_iot] _on_log: Received PINGRESP 2023-04-15 06:15:26.022 DEBUG (SyncWorker_7) [homeassistant.components.tuya] Sending commands for device 36035202500291cc3371: [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': True}] 2023-04-15 06:15:26.023 DEBUG (SyncWorker_7) [tuya_iot] Request: method = POST, url = https://openapi.tuyaeu.com/v1.0/devices/36035202500291cc3371/commands, params = None, body = {'commands': [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': True}]}, t = 1681532126023 2023-04-15 06:15:26.106 DEBUG (SyncWorker_7) [tuya_iot] Response: { "result": true, "success": true, "t": 1681532126081, "tid": "26058a3cdb4411ed8e4ade36b14ed26a" } 2023-04-15 06:15:37.918 DEBUG (SyncWorker_10) [homeassistant.components.tuya] Sending commands for device 36035202500291cc3371: [{'code': <DPCode.SWITCH_2: 'switch_2'>, 'value': True}] 2023-04-15 06:15:37.918 DEBUG (SyncWorker_10) [tuya_iot] Request: method = POST, url = https://openapi.tuyaeu.com/v1.0/devices/36035202500291cc3371/commands, params = None, body = {'commands': [{'code': <DPCode.SWITCH_2: 'switch_2'>, 'value': True}]}, t = 1681532137918 2023-04-15 06:15:38.004 DEBUG (SyncWorker_10) [tuya_iot] Response: { "result": true, "success": true, "t": 1681532137978, "tid": "2d1ccf5cdb4411edb3c5c22eba99f181" } 2023-04-15 06:16:24.998 DEBUG (Thread-3038) [tuya_iot] _on_log: Sending PINGREQ 2023-04-15 06:16:25.049 DEBUG (Thread-3038) [tuya_iot] _on_log: Received PINGRESP
Debug log from when it's working again:
2023-04-17 11:41:53.138 DEBUG (Thread-3703) [tuya_iot] _on_log: Sending PINGREQ 2023-04-17 11:41:53.186 DEBUG (Thread-3703) [tuya_iot] _on_log: Received PINGRESP 2023-04-17 11:41:55.756 DEBUG (SyncWorker_14) [homeassistant.components.tuya] Sending commands for device 36035202500291cc3371: [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': True}] 2023-04-17 11:41:55.756 DEBUG (SyncWorker_14) [tuya_iot] Request: method = POST, url = https://openapi.tuyaeu.com/v1.0/devices/36035202500291cc3371/commands, params = None, body = {'commands': [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': True}]}, t = 1681724515756 2023-04-17 11:41:56.270 DEBUG (SyncWorker_14) [tuya_iot] Response: { "result": true, "success": true, "t": 1681724516243, "tid": "1779d8b4dd0411edb86062d11cecfbc6" } 2023-04-17 11:41:56.908 DEBUG (Thread-3703) [tuya_iot] _on_log: Received PUBLISH (d0, q0, r0, m0), 'cloud/token/in/0f053af60161d625f70852c4446d81ea', ... (348 bytes) 2023-04-17 11:41:56.908 DEBUG (Thread-3703) [tuya_iot] payload-> b'{"data":"r0H5+x/5q3C/WMNtbUV4f2TOKIGGMKvBgXKmrR57Y9z4n4IIjsMAlPpoHt94LZJpApc/QZdL4pP48JSNT5uwVs9JXgebd/6YrfK4DgXbLzUvZC8DE+7hqQVM4bmA6oJrT+8h0TG7iK3b+tL2DaWqMXxkpSWI4pboAI+X2TWB+sm/pausmMPU/8g/6iImzU3qSxQpLIGQdDuJ4CWh5rIAqCA5fDiY2gkQtGbhztIS2VQaEcYlA2M+Fmgx5yt1sGcR","protocol":4,"pv":"2.0","sign":"a5fe77d89a8fdeeabf127eb5d90a22f8","t":1681724515}' 2023-04-17 11:41:56.909 DEBUG (Thread-3703) [tuya_iot] on_message: {'data': {'dataId': 'bbcfb224-5217-495b-8728-63feda6bcb17', 'devId': '36035202500291cc3371', 'productKey': '6rC05oJK7ln1E2dq', 'status': [{'1': True, 'code': 'switch_1', 't': '1681724515', 'value': True}]}, 'protocol': 4, 'pv': '2.0', 'sign': 'a5fe77d89a8fdeeabf127eb5d90a22f8', 't': 1681724515} 2023-04-17 11:41:56.909 DEBUG (Thread-3703) [tuya_iot] mq receive-> {'data': {'dataId': 'bbcfb224-5217-495b-8728-63feda6bcb17', 'devId': '36035202500291cc3371', 'productKey': '6rC05oJK7ln1E2dq', 'status': [{'1': True, 'code': 'switch_1', 't': '1681724515', 'value': True}]}, 'protocol': 4, 'pv': '2.0', 'sign': 'a5fe77d89a8fdeeabf127eb5d90a22f8', 't': 1681724515} 2023-04-17 11:41:56.909 DEBUG (Thread-3703) [tuya_iot] mq _on_device_report-> [{'1': True, 'code': 'switch_1', 't': '1681724515', 'value': True}] 2023-04-17 11:41:56.909 DEBUG (Thread-3703) [homeassistant.components.tuya] Received update for device 36035202500291cc3371: {'switch_1': True, 'switch_2': False} 2023-04-17 11:41:56.916 DEBUG (SyncWorker_15) [homeassistant.components.tuya] Sending commands for device bfebc2d938d26e6ea3hc5l: [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': True}] 2023-04-17 11:41:56.916 DEBUG (SyncWorker_15) [tuya_iot] Request: method = POST, url = https://openapi.tuyaeu.com/v1.0/devices/bfebc2d938d26e6ea3hc5l/commands, params = None, body = {'commands': [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': True}]}, t = 1681724516916 2023-04-17 11:41:57.015 DEBUG (SyncWorker_15) [tuya_iot] Response: { "result": true, "success": true, "t": 1681724516987, "tid": "17ee04f4dd0411edb86062d11cecfbc6" } 2023-04-17 11:41:57.020 DEBUG (SyncWorker_19) [homeassistant.components.tuya] Sending commands for device bf857ce463975fa8f9uuri: [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': True}] 2023-04-17 11:41:57.021 DEBUG (SyncWorker_19) [tuya_iot] Request: method = POST, url = https://openapi.tuyaeu.com/v1.0/devices/bf857ce463975fa8f9uuri/commands, params = None, body = {'commands': [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': True}]}, t = 1681724517021 2023-04-17 11:41:57.113 DEBUG (SyncWorker_19) [tuya_iot] Response: { "result": true, "success": true, "t": 1681724517085, "tid": "17fe1102dd0411edb86062d11cecfbc6" } 2023-04-17 11:41:57.257 DEBUG (Thread-3703) [tuya_iot] _on_log: Received PUBLISH (d0, q0, r0, m0), 'cloud/token/in/0f053af60161d625f70852c4446d81ea', ... (348 bytes) 2023-04-17 11:41:57.258 DEBUG (Thread-3703) [tuya_iot] payload-> b'{"data":"DZbilIcBPJvp+kKR8ttfPJ/kJKGNH0VyPZ34T9ooe5dOAxqZGbQgw48jQGa+nnwz/u1wlDUVk4pXqaQzp/abbuHK7M0p2qp/upPz7slo2Nao6QoT9N1cwpmbFMoEH/GTHsJjSidiN+MdqgSNoAf+oImGTNCvr/wVvHz3wkwDivig63E/RDrWZqwYqSt60WYsbjupzpz2H1hSX2pHWtyNVKwtcwb+AEwPNUXSUpQLca6qsfJbKpb9VH+L5DK5xKQ5","protocol":4,"pv":"2.0","sign":"0e3037df48f0d91ee0ad69ba97afe21f","t":1681724516}' 2023-04-17 11:41:57.258 DEBUG (Thread-3703) [tuya_iot] on_message: {'data': {'dataId': '8ab4753a-66e0-48d8-baa4-c648bde98467', 'devId': 'bfebc2d938d26e6ea3hc5l', 'productKey': 'asinhxudouvo32mi', 'status': [{'1': True, 'code': 'switch_1', 't': '1681724516', 'value': True}]}, 'protocol': 4, 'pv': '2.0', 'sign': '0e3037df48f0d91ee0ad69ba97afe21f', 't': 1681724516} 2023-04-17 11:41:57.258 DEBUG (Thread-3703) [tuya_iot] mq receive-> {'data': {'dataId': '8ab4753a-66e0-48d8-baa4-c648bde98467', 'devId': 'bfebc2d938d26e6ea3hc5l', 'productKey': 'asinhxudouvo32mi', 'status': [{'1': True, 'code': 'switch_1', 't': '1681724516', 'value': True}]}, 'protocol': 4, 'pv': '2.0', 'sign': '0e3037df48f0d91ee0ad69ba97afe21f', 't': 1681724516} 2023-04-17 11:41:57.258 DEBUG (Thread-3703) [tuya_iot] mq _on_device_report-> [{'1': True, 'code': 'switch_1', 't': '1681724516', 'value': True}] 2023-04-17 11:41:57.259 DEBUG (Thread-3703) [homeassistant.components.tuya] Received update for device bfebc2d938d26e6ea3hc5l: {'switch_1': True, 'countdown_1': 0, 'relay_status': '0', 'random_time': '', 'cycle_time': '', 'switch_inching': ''} 2023-04-17 11:41:57.310 DEBUG (Thread-3703) [tuya_iot] _on_log: Received PUBLISH (d0, q0, r0, m0), 'cloud/token/in/0f053af60161d625f70852c4446d81ea', ... (348 bytes) 2023-04-17 11:41:57.311 DEBUG (Thread-3703) [tuya_iot] payload-> b'{"data":"N1DCqcDuwVDLIaGAfjGCU5KPGxHanBMZl6rksl9EcnZ9EZ+MwZypvM+xwfiGW4DdSV3wAZsWXsHC+Qdh1cQ2tGumE0tAVzK9CItonduRNCCo6QoT9N1cwpmbFMoEH/GTWFXz5RkpadbjwN3I/upMYomGTNCvr/wVvHz3wkwDivig63E/RDrWZqwYqSt60WYsbjupzpz2H1hSX2pHWtyNVKwtcwb+AEwPNUXSUpQLca6qsfJbKpb9VH+L5DK5xKQ5","protocol":4,"pv":"2.0","sign":"b56487ebbe7e636a79bd60239d480aa9","t":1681724516}' 2023-04-17 11:41:57.311 DEBUG (Thread-3703) [tuya_iot] on_message: {'data': {'dataId': '170c25a8-eefc-4850-bda6-4bd3faec254e', 'devId': 'bf857ce463975fa8f9uuri', 'productKey': 'lcjphnvdppychbjh', 'status': [{'1': True, 'code': 'switch_1', 't': '1681724516', 'value': True}]}, 'protocol': 4, 'pv': '2.0', 'sign': 'b56487ebbe7e636a79bd60239d480aa9', 't': 1681724516} 2023-04-17 11:41:57.312 DEBUG (Thread-3703) [tuya_iot] mq receive-> {'data': {'dataId': '170c25a8-eefc-4850-bda6-4bd3faec254e', 'devId': 'bf857ce463975fa8f9uuri', 'productKey': 'lcjphnvdppychbjh', 'status': [{'1': True, 'code': 'switch_1', 't': '1681724516', 'value': True}]}, 'protocol': 4, 'pv': '2.0', 'sign': 'b56487ebbe7e636a79bd60239d480aa9', 't': 1681724516} 2023-04-17 11:41:57.312 DEBUG (Thread-3703) [tuya_iot] mq _on_device_report-> [{'1': True, 'code': 'switch_1', 't': '1681724516', 'value': True}] 2023-04-17 11:41:57.312 DEBUG (Thread-3703) [homeassistant.components.tuya] Received update for device bf857ce463975fa8f9uuri: {'switch_1': True, 'countdown_1': 0, 'add_ele': 3, 'cur_current': 0, 'cur_power': 0, 'cur_voltage': 2265} 2023-04-17 11:42:11.123 DEBUG (SyncWorker_5) [homeassistant.components.tuya] Sending commands for device 36035202500291cc3371: [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': False}] 2023-04-17 11:42:11.123 DEBUG (SyncWorker_5) [tuya_iot] Request: method = POST, url = https://openapi.tuyaeu.com/v1.0/devices/36035202500291cc3371/commands, params = None, body = {'commands': [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': False}]}, t = 1681724531123 2023-04-17 11:42:11.242 DEBUG (SyncWorker_5) [tuya_iot] Response: { "result": true, "success": true, "t": 1681724531215, "tid": "2066019add0411eda5263aeadf44bc9a" } 2023-04-17 11:42:11.329 DEBUG (Thread-3703) [tuya_iot] _on_log: Received PUBLISH (d0, q0, r0, m0), 'cloud/token/in/0f053af60161d625f70852c4446d81ea', ... (348 bytes) 2023-04-17 11:42:11.329 DEBUG (Thread-3703) [tuya_iot] payload-> b'{"data":"ZI48JCiLTV4BjEwBTwMKXn1+OgcBU5sQvh1SE+UMNOksHoNSNx1PpcUze0WwrdhNApc/QZdL4pP48JSNT5uwVs9JXgebd/6YrfK4DgXbLzUvZC8DE+7hqQVM4bmA6oJrT+8h0TG7iK3b+tL2DaWqMQd/+NSyPQs1JSwAJlh6qKeAhO5BWlbuhnuD9r4kaHbiTi8vY8KXmOD+xlh475bIytcAyL+fjp+Mkzxm5f2Svh1KZ6rA8l8X36Y2BxRzn23B","protocol":4,"pv":"2.0","sign":"71c53295b57bc673454857563cde5a58","t":1681724530}' 2023-04-17 11:42:11.330 DEBUG (Thread-3703) [tuya_iot] on_message: {'data': {'dataId': '98e93bdf-2202-4ccc-a6d7-6e323f232334', 'devId': '36035202500291cc3371', 'productKey': '6rC05oJK7ln1E2dq', 'status': [{'1': False, 'code': 'switch_1', 't': '1681724530', 'value': False}]}, 'protocol': 4, 'pv': '2.0', 'sign': '71c53295b57bc673454857563cde5a58', 't': 1681724530} 2023-04-17 11:42:11.330 DEBUG (Thread-3703) [tuya_iot] mq receive-> {'data': {'dataId': '98e93bdf-2202-4ccc-a6d7-6e323f232334', 'devId': '36035202500291cc3371', 'productKey': '6rC05oJK7ln1E2dq', 'status': [{'1': False, 'code': 'switch_1', 't': '1681724530', 'value': False}]}, 'protocol': 4, 'pv': '2.0', 'sign': '71c53295b57bc673454857563cde5a58', 't': 1681724530} 2023-04-17 11:42:11.330 DEBUG (Thread-3703) [tuya_iot] mq _on_device_report-> [{'1': False, 'code': 'switch_1', 't': '1681724530', 'value': False}] 2023-04-17 11:42:11.330 DEBUG (Thread-3703) [homeassistant.components.tuya] Received update for device 36035202500291cc3371: {'switch_1': False, 'switch_2': False} 2023-04-17 11:42:11.335 DEBUG (SyncWorker_11) [homeassistant.components.tuya] Sending commands for device bfebc2d938d26e6ea3hc5l: [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': False}] 2023-04-17 11:42:11.335 DEBUG (SyncWorker_11) [tuya_iot] Request: method = POST, url = https://openapi.tuyaeu.com/v1.0/devices/bfebc2d938d26e6ea3hc5l/commands, params = None, body = {'commands': [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': False}]}, t = 1681724531335 2023-04-17 11:42:11.436 DEBUG (SyncWorker_11) [tuya_iot] Response: { "result": true, "success": true, "t": 1681724531409, "tid": "20865eeadd0411ed8862e282fca16618" } 2023-04-17 11:42:11.442 DEBUG (SyncWorker_6) [homeassistant.components.tuya] Sending commands for device bf857ce463975fa8f9uuri: [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': False}] 2023-04-17 11:42:11.442 DEBUG (SyncWorker_6) [tuya_iot] Request: method = POST, url = https://openapi.tuyaeu.com/v1.0/devices/bf857ce463975fa8f9uuri/commands, params = None, body = {'commands': [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': False}]}, t = 1681724531442 2023-04-17 11:42:11.697 DEBUG (SyncWorker_6) [tuya_iot] Response: { "result": true, "success": true, "t": 1681724531670, "tid": "2097069fdd0411eda5263aeadf44bc9a" } 2023-04-17 11:42:12.108 DEBUG (Thread-3703) [tuya_iot] _on_log: Received PUBLISH (d0, q0, r0, m0), 'cloud/token/in/0f053af60161d625f70852c4446d81ea', ... (348 bytes) 2023-04-17 11:42:12.108 DEBUG (Thread-3703) [tuya_iot] payload-> b'{"data":"pFj57yumC/gO0Fn2fvPsiWJt6lLzN+wOpYc9zswcMmUYZWHat0aIikEXD0J1JN7k/u1wlDUVk4pXqaQzp/abbuHK7M0p2qp/upPz7slo2Nao6QoT9N1cwpmbFMoEH/GTHsJjSidiN+MdqgSNoAf+oImGTNCvr/wVvHz3wkwDivjpEWgrZr69msM/mKCDU2v8JTMDU6HyTrQkFf9AlEMYXn9qcBDlrThuUhzVTNlCkH9BSc2fuCOQXOi8oXsR6cJR","protocol":4,"pv":"2.0","sign":"467917d7b70fe24e61b1a9d9221a37c5","t":1681724531}' 2023-04-17 11:42:12.109 DEBUG (Thread-3703) [tuya_iot] on_message: {'data': {'dataId': '479fdb0d-95f7-4e12-98c9-074829cf74ea', 'devId': 'bfebc2d938d26e6ea3hc5l', 'productKey': 'asinhxudouvo32mi', 'status': [{'1': False, 'code': 'switch_1', 't': '1681724531', 'value': False}]}, 'protocol': 4, 'pv': '2.0', 'sign': '467917d7b70fe24e61b1a9d9221a37c5', 't': 1681724531} 2023-04-17 11:42:12.109 DEBUG (Thread-3703) [tuya_iot] mq receive-> {'data': {'dataId': '479fdb0d-95f7-4e12-98c9-074829cf74ea', 'devId': 'bfebc2d938d26e6ea3hc5l', 'productKey': 'asinhxudouvo32mi', 'status': [{'1': False, 'code': 'switch_1', 't': '1681724531', 'value': False}]}, 'protocol': 4, 'pv': '2.0', 'sign': '467917d7b70fe24e61b1a9d9221a37c5', 't': 1681724531} 2023-04-17 11:42:12.110 DEBUG (Thread-3703) [tuya_iot] mq _on_device_report-> [{'1': False, 'code': 'switch_1', 't': '1681724531', 'value': False}] 2023-04-17 11:42:12.110 DEBUG (Thread-3703) [homeassistant.components.tuya] Received update for device bfebc2d938d26e6ea3hc5l: {'switch_1': False, 'countdown_1': 0, 'relay_status': '0', 'random_time': '', 'cycle_time': '', 'switch_inching': ''} 2023-04-17 11:42:12.114 DEBUG (SyncWorker_12) [homeassistant.components.tuya] Sending commands for device 36035202500291cc3371: [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': False}] 2023-04-17 11:42:12.114 DEBUG (SyncWorker_12) [tuya_iot] Request: method = POST, url = https://openapi.tuyaeu.com/v1.0/devices/36035202500291cc3371/commands, params = None, body = {'commands': [{'code': <DPCode.SWITCH_1: 'switch_1'>, 'value': False}]}, t = 1681724532114 2023-04-17 11:42:12.326 DEBUG (SyncWorker_12) [tuya_iot] Response: { "result": true, "success": true, "t": 1681724532299, "tid": "21018026dd0411ed8862e282fca16618" } 2023-04-17 11:42:12.386 DEBUG (Thread-3703) [tuya_iot] _on_log: Received PUBLISH (d0, q0, r0, m0), 'cloud/token/in/0f053af60161d625f70852c4446d81ea', ... (348 bytes) 2023-04-17 11:42:12.387 DEBUG (Thread-3703) [tuya_iot] payload-> b'{"data":"9PPD8Hxs7qpA3skU3kRfpPdY0GePQpw6Sszqtrq9fifF02i7v0YMYW9w2AQNy43ySV3wAZsWXsHC+Qdh1cQ2tGumE0tAVzK9CItonduRNCCo6QoT9N1cwpmbFMoEH/GTWFXz5RkpadbjwN3I/upMYomGTNCvr/wVvHz3wkwDivjpEWgrZr69msM/mKCDU2v8JTMDU6HyTrQkFf9AlEMYXn9qcBDlrThuUhzVTNlCkH9BSc2fuCOQXOi8oXsR6cJR","protocol":4,"pv":"2.0","sign":"e560bb6d559bad76b719e22339af8ae6","t":1681724531}' 2023-04-17 11:42:12.387 DEBUG (Thread-3703) [tuya_iot] on_message: {'data': {'dataId': '802f1ceb-72b0-47fc-85a8-77edae74c265', 'devId': 'bf857ce463975fa8f9uuri', 'productKey': 'lcjphnvdppychbjh', 'status': [{'1': False, 'code': 'switch_1', 't': '1681724531', 'value': False}]}, 'protocol': 4, 'pv': '2.0', 'sign': 'e560bb6d559bad76b719e22339af8ae6', 't': 1681724531} 2023-04-17 11:42:12.388 DEBUG (Thread-3703) [tuya_iot] mq receive-> {'data': {'dataId': '802f1ceb-72b0-47fc-85a8-77edae74c265', 'devId': 'bf857ce463975fa8f9uuri', 'productKey': 'lcjphnvdppychbjh', 'status': [{'1': False, 'code': 'switch_1', 't': '1681724531', 'value': False}]}, 'protocol': 4, 'pv': '2.0', 'sign': 'e560bb6d559bad76b719e22339af8ae6', 't': 1681724531} 2023-04-17 11:42:12.388 DEBUG (Thread-3703) [tuya_iot] mq _on_device_report-> [{'1': False, 'code': 'switch_1', 't': '1681724531', 'value': False}] 2023-04-17 11:42:12.388 DEBUG (Thread-3703) [homeassistant.components.tuya] Received update for device bf857ce463975fa8f9uuri: {'switch_1': False, 'countdown_1': 0, 'add_ele': 3, 'cur_current': 0, 'cur_power': 0, 'cur_voltage': 2265} 2023-04-17 11:42:12.682 DEBUG (Thread-3703) [tuya_iot] _on_log: Received PUBLISH (d0, q0, r0, m0), 'cloud/token/in/0f053af60161d625f70852c4446d81ea', ... (348 bytes) 2023-04-17 11:42:12.682 DEBUG (Thread-3703) [tuya_iot] payload-> b'{"data":"vvQdD81HplBlKLdNontLTNWzf09Z0O78a+7fDWwetWdR8sV0dmnU4vDR6JYKl8YjApc/QZdL4pP48JSNT5uwVs9JXgebd/6YrfK4DgXbLzUvZC8DE+7hqQVM4bmA6oJrT+8h0TG7iK3b+tL2DaWqMQd/+NSyPQs1JSwAJlh6qKeAhO5BWlbuhnuD9r4kaHbiTi8vY8KXmOD+xlh475bIyn+HYhPzsHYf1GB2ezWnW3VKZ6rA8l8X36Y2BxRzn23B","protocol":4,"pv":"2.0","sign":"3ec8d9989c66741c230439164e8b63b4","t":1681724531}' 2023-04-17 11:42:12.683 DEBUG (Thread-3703) [tuya_iot] on_message: {'data': {'dataId': '6ded2f50-632a-4725-8360-77ad44369da6', 'devId': '36035202500291cc3371', 'productKey': '6rC05oJK7ln1E2dq', 'status': [{'1': False, 'code': 'switch_1', 't': '1681724531', 'value': False}]}, 'protocol': 4, 'pv': '2.0', 'sign': '3ec8d9989c66741c230439164e8b63b4', 't': 1681724531} 2023-04-17 11:42:12.683 DEBUG (Thread-3703) [tuya_iot] mq receive-> {'data': {'dataId': '6ded2f50-632a-4725-8360-77ad44369da6', 'devId': '36035202500291cc3371', 'productKey': '6rC05oJK7ln1E2dq', 'status': [{'1': False, 'code': 'switch_1', 't': '1681724531', 'value': False}]}, 'protocol': 4, 'pv': '2.0', 'sign': '3ec8d9989c66741c230439164e8b63b4', 't': 1681724531} 2023-04-17 11:42:12.683 DEBUG (Thread-3703) [tuya_iot] mq _on_device_report-> [{'1': False, 'code': 'switch_1', 't': '1681724531', 'value': False}] 2023-04-17 11:42:12.683 DEBUG (Thread-3703) [homeassistant.components.tuya] Received update for device 36035202500291cc3371: {'switch_1': False, 'switch_2': False}
As you can see the "Received PUBLISH" is missing from when it's not working. If it weren't for the fact that it starts to work after a restart I would say it's a problem om the Tuya's side but now I'm not so sure it is.
i found this solution temporally:
alias: ++Tuya Reload
description: ""
trigger:
- platform: time_pattern
hours: "3"
condition: []
action:
- service: homeassistant.reload_config_entry
data: {}
target:
device_id: {{ add any tuya entity_id, it will reload the all entities for tuya integration }}
mode: single
Found this: https://github.com/home-assistant/core/issues/90661#issuecomment-1506465495 Hopefully it's related so this also will be fixed in end of May.
Found this: #90661 (comment) Hopefully it's related so this also will be fixed in end of May.
Your effort is very valuable
Is this still an issue?
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
I have 72 devices 85% is zigbee some randomly device stop syncing the status with home assistant, to fix the problem i need to reload the Tuya integration to fix the problem, it happens in irregularly some days 2 or 3 times is Very frustrating any advice??
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4584 Installed Version | 1.32.1 Stage | running Available Repositories | 1263 Downloaded Repositories | 58AccuWeather
can_reach_server | ok -- | -- remaining_requests | 41Home Assistant Cloud
logged_in | true -- | -- subscription_expiration | April 28, 2023 at 2:00 AM relayer_connected | true relayer_region | eu-central-1 remote_enabled | true remote_connected | true alexa_enabled | false google_enabled | true remote_server | eu-central-1-10.ui.nabu.casa can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okHome Assistant Supervisor
host_os | Home Assistant OS 9.5 -- | -- update_channel | stable supervisor_version | supervisor-2023.04.0 agent_version | 1.4.1 docker_version | 20.10.22 disk_total | 458.4 GB disk_used | 31.6 GB healthy | true supported | true board | yellow supervisor_api | ok version_api | ok installed_addons | Duck DNS (1.15.0), Samba share (10.0.0), Terminal & SSH (9.6.1), Mosquitto broker (6.2.0), AirCast (3.5.2), Home Assistant Google Drive Backup (0.110.3), TasmoAdmin (0.24.0), Spotify Connect (0.12.3), Studio Code Server (5.5.6), SSH & Web Terminal (13.1.0), VLC (0.1.3), Samba Backup (5.2.0), Vaultwarden (Bitwarden) (0.19.3), eWeLink Smart Home (1.4.3), MariaDB (2.5.2), ESPHome (2023.3.2), Tailscale (0.10.1), Cloudflared (4.1.0), Music Assistant (2.0.0b4), Uptime Kuma (0.7.2)Dashboards
dashboards | 4 -- | -- resources | 28 views | 28 mode | storageRecorder
oldest_recorder_run | April 5, 2023 at 8:07 PM -- | -- current_recorder_run | April 10, 2023 at 8:52 PM estimated_db_size | 867.00 MiB database_engine | mysql database_version | 10.6.10Sonoff
version | 3.5.1 (122751c) -- | -- cloud_online | 6 / 6 local_online | 3 / 3Spotify
api_endpoint_reachable | ok -- | --What version of Home Assistant Core has the issue?
System Information version | core-2023.4.2 -- | -- installation_type | Home Assistant OS dev | false hassio | true docker | true user | root virtualenv | false python_version | 3.10.10 os_name | Linux os_version | 5.15.84-v8 arch | aarch64 timezone | Europe/Amsterdam config_dir | /config
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4584 Installed Version | 1.32.1 Stage | running Available Repositories | 1263 Downloaded Repositories | 58AccuWeather
can_reach_server | ok -- | -- remaining_requests | 41Home Assistant Cloud
logged_in | true -- | -- subscription_expiration | April 28, 2023 at 2:00 AM relayer_connected | true relayer_region | eu-central-1 remote_enabled | true remote_connected | true alexa_enabled | false google_enabled | true remote_server | eu-central-1-10.ui.nabu.casa can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okHome Assistant Supervisor
host_os | Home Assistant OS 9.5 -- | -- update_channel | stable supervisor_version | supervisor-2023.04.0 agent_version | 1.4.1 docker_version | 20.10.22 disk_total | 458.4 GB disk_used | 31.7 GB healthy | true supported | true board | yellow supervisor_api | ok version_api | ok installed_addons | Duck DNS (1.15.0), Samba share (10.0.0), Terminal & SSH (9.6.1), Mosquitto broker (6.2.0), AirCast (3.5.2), Home Assistant Google Drive Backup (0.110.3), TasmoAdmin (0.24.0), Spotify Connect (0.12.3), Studio Code Server (5.5.6), SSH & Web Terminal (13.1.0), VLC (0.1.3), Samba Backup (5.2.0), Vaultwarden (Bitwarden) (0.19.3), eWeLink Smart Home (1.4.3), MariaDB (2.5.2), ESPHome (2023.3.2), Tailscale (0.10.1), Cloudflared (4.1.0), Music Assistant (2.0.0b4), Uptime Kuma (0.7.2)Dashboards
dashboards | 4 -- | -- resources | 28 views | 28 mode | storageRecorder
oldest_recorder_run | April 5, 2023 at 8:07 PM -- | -- current_recorder_run | April 10, 2023 at 8:52 PM estimated_db_size | 867.00 MiB database_engine | mysql database_version | 10.6.10Sonoff
version | 3.5.1 (122751c) -- | -- cloud_online | 6 / 6 local_online | 3 / 3Spotify
api_endpoint_reachable | ok -- | --What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response