zha-device-handlers: [BUG] XBee quirk - alot of warnings "FOREIGN KEY constraint failed" in log
Describe the bug I setup new zha network with some XBee modules. I adding, and configuring 8 modules, disable unneeded switches and sensors in device configs. All looking good except of one node. That node send the IO sampling of enabled pins every 1 minute. And every minute i see in log 6 messages “FOREIGN KEY constraint failed”:
2020-03-21 18:05:50 DEBUG (MainThread) [zigpy_xbee.uart] Frame received: b'\x91\x00\x13\xa2\x00AUJ\x1a\x03F\xe8\xe8\x00\x92\xc1\x05\x01\x01\x0c\xb8\x00\x00('
2020-03-21 18:05:50 DEBUG (MainThread) [zigpy_xbee.api] Frame received: explicit_rx_indicator
2020-03-21 18:05:50 DEBUG (MainThread) [zigpy_xbee.api] _handle_explicit_rx: (00:13:a2:00:41:55:4a:1a, 0x0346, 232, 146, 1, b'010cb8000028')
2020-03-21 18:05:50 DEBUG (MainThread) [zigpy.zcl] [0x0346:232:0x0092] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=False disable_default_response=False> manufacturer=None tsn=5 command_id=0>
2020-03-21 18:05:50 DEBUG (MainThread) [zigpy.zcl] [0x0346:232:0x0092] ZCL request 0x0000: [{'digital_pins': [0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0], 'analog_pins': [0, 0, 0, 0, 0, 0, 0, 0], 'digital_samples': [0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0], 'analog_samples': [0, 0, 0, 0, 0, 0, 0, 0]}]
2020-03-21 18:05:50 WARNING (MainThread) [zigpy.util] Error calling listener.attribute_updated: FOREIGN KEY constraint failed
2020-03-21 18:05:50 WARNING (MainThread) [zigpy.util] Error calling listener.attribute_updated: FOREIGN KEY constraint failed
2020-03-21 18:05:50 WARNING (MainThread) [zigpy.util] Error calling listener.attribute_updated: FOREIGN KEY constraint failed
2020-03-21 18:05:50 WARNING (MainThread) [zigpy.util] Error calling listener.attribute_updated: FOREIGN KEY constraint failed
2020-03-21 18:05:50 WARNING (MainThread) [zigpy.util] Error calling listener.attribute_updated: FOREIGN KEY constraint failed
2020-03-21 18:05:50 WARNING (MainThread) [zigpy.util] Error calling listener.attribute_updated: FOREIGN KEY constraint failed
I even can’t see, what is the query was (what is the content of that “FOREIGN KEY”), because there is no such debug logger in HA (or not finded them). We started to discuss it here but have stull.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (9 by maintainers)
Permanent. It was added to maintain db consistency as in the past we had issues XBee modules when used like this do not really behave like “real zigbee devices”, but instead most of functionality is implemented in software to mimic a real HW device and that causes problem, cause all On_Off endpoint are virtual one and do not exist on the physical device