Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alarm & Binary Sensor integration not working: "Unknown device properties received from Control4" #2

Open
jsb5151 opened this issue Jan 22, 2022 · 10 comments

Comments

@jsb5151
Copy link

jsb5151 commented Jan 22, 2022

EA-3 running 3.2.4, Qolsys IQPanel2 driver. Works fine from the C4 side. I get this in the logs:

2022-01-22 13:56:36 WARNING (MainThread) [custom_components.control4.alarm_control_panel] Unknown device properties received from Control4: 'details' {'type': 7, 'typeName': 'device', 'name': 'IQPanel2', 'parentId': 1793, 'id': 1794, 'filename': 'securitypanel.c4i', 'proxy': 'securitypanel', 'proxyOrder': 1, 'proxyMeta': [{'proxybindingid': 5001, 'smallSource': 'composer', 'smallImage': 'devices_sm/dsc_16.gif', 'largeSource': 'composer', 'largeImage': 'devices_lg/dsc_32.gif', 'proxy': 'securitypanel'}], 'categories': ['security'], 'siteId': 8, 'siteName': 'Home', 'buildingId': 9, 'buildingName': 'House', 'floorId': 10, 'floorName': 'System', 'roomId': 11, 'roomName': 'System', 'largeImage': 'devices_lg/Security_32.gif', 'smallImage': 'devices_sm/Security_16.gif', 'protocolId': 1793, 'protocolName': 'IQPanel2 Security Panel', 'protocolFilename': 'IQPanel2SecurityPanel.c4z', 'capabilities': {'arm_states': 'Stay,Away,Stay Instant,Away Instant', 'button_A': {'type': 'xml', 'visible': True, 'label': 'Button A Text'}, 'button_B': {'type': 'xml', 'visible': True, 'label': 'Button B Text'}, 'button_C': {'type': 'xml', 'visible': True, 'label': 'Button C Text'}, 'button_D': {'type': 'xml', 'visible': True, 'label': 'Button D Text'}, 'can_activate_partitions': True, 'can_set_time': True, 'has_fire': True, 'has_medical': False, 'has_panic': True, 'has_police': True, 'pound_label': '#', 'star_label': '*', 'ui_version': 2}, 'control': 'securitypanel', 'version': 1, 'created': '09/19/2013', 'modified': '09/19/2013', 'model': '', 'manufacturer': '', 'protocolControl': 'lua_gen', 'deviceOrder': 20, 'allControlBindingsHidden': 1, 'URIs': {'variables': '/api/v1/categories/security/1794/variables', 'network': '/api/v1/categories/security/1794/network', 'commands': '/api/v1/categories/security/1794/commands'}}
2022-01-22 13:56:36 WARNING (MainThread) [custom_components.control4.alarm_control_panel] Unknown device properties received from Control4: 'details' {'type': 7, 'typeName': 'device', 'name': 'Security System', 'parentId': 1793, 'id': 1795, 'filename': 'security.c4i', 'proxy': 'security', 'proxyOrder': 2, 'proxyMeta': [{'proxybindingid': 5001, 'smallSource': 'composer', 'smallImage': 'devices_sm/dsc_16.gif', 'largeSource': 'composer', 'largeImage': 'devices_lg/dsc_32.gif', 'proxy': 'securitypanel'}], 'categories': ['security'], 'siteId': 8, 'siteName': 'Home', 'buildingId': 9, 'buildingName': 'House', 'floorId': 10, 'floorName': 'System', 'roomId': 11, 'roomName': 'System', 'largeImage': 'devices_lg/Security_32.gif', 'smallImage': 'devices_sm/Security_16.gif', 'protocolId': 1793, 'protocolName': 'IQPanel2 Security Panel', 'protocolFilename': 'IQPanel2SecurityPanel.c4z', 'capabilities': {'arm_states': 'Stay,Away,Stay Instant,Away Instant', 'button_A': {'type': 'xml', 'visible': True, 'label': 'Button A Text'}, 'button_B': {'type': 'xml', 'visible': True, 'label': 'Button B Text'}, 'button_C': {'type': 'xml', 'visible': True, 'label': 'Button C Text'}, 'button_D': {'type': 'xml', 'visible': True, 'label': 'Button D Text'}, 'can_activate_partitions': True, 'can_set_time': True, 'has_fire': True, 'has_medical': False, 'has_panic': True, 'has_police': True, 'pound_label': '#', 'star_label': '*', 'ui_version': 2}, 'control': 'security', 'version': 3, 'created': '6/17/2005', 'modified': '11/15/2013', 'model': '', 'manufacturer': '', 'protocolControl': 'lua_gen', 'deviceOrder': 21, 'allControlBindingsHidden': 0, 'URIs': {'variables': '/api/v1/categories/security/1795/variables', 'network': '/api/v1/categories/security/1795/network', 'bindings': '/api/v1/categories/security/1795/bindings', 'commands': '/api/v1/categories/security/1795/commands'}}
2022-01-22 13:56:36 WARNING (MainThread) [custom_components.control4.binary_sensor] Unknown device properties received from Control4: {'type': 7, 'typeName': 'device', 'name': 'Front Door Motion', 'parentId': 473, 'id': 1915, 'filename': 'contactsingle_motionsensor_c4.c4i', 'proxy': 'contactsingle_motionsensor_c4', 'proxyOrder': 1, 'proxyMeta': [{'name': 'contactsingle_motionsensor_c4', 'smallImage': 'devices_sm/contactsingle_motionsensor_close.gif', 'smallSource': 'composer', 'largeImage': 'devices_lg/contactsingle_motionsensor_close.gif', 'largeSource': 'composer'}], 'categories': ['sensors'], 'siteId': 8, 'siteName': 'Home', 'buildingId': 9, 'buildingName': 'House', 'floorId': 467, 'floorName': 'First', 'roomId': 473, 'roomName': 'Entrance', 'largeImage': 'devices_lg/contactsingle_motionsensor_close.gif', 'smallImage': 'devices_sm/contactsingle_motionsensor_close.gif', 'protocolId': 1915, 'protocolName': 'Front Door Motion', 'protocolFilename': 'contactsingle_motionsensor_c4.c4i', 'capabilities': {}, 'events': [{'id': 1, 'description': 'When the NAME senses motion'}, {'id': 2, 'description': 'When the NAME stops sensing motion'}], 'conditionals': {'conditional': [{'id': 0, 'description': 'the NAME is sensing motion'}, {'id': 1, 'description': 'the NAME is not sensing motion'}]}, 'control': 'control4_contactsingle', 'version': 3, 'created': '1/20/2005 2:22:54 PM', 'modified': '12/17/2014 4:23 PM', 'model': 'Motion Sensor', 'manufacturer': 'Generic', 'protocolControl': 'control4_contactsingle', 'deviceOrder': 1, 'allControlBindingsHidden': 0, 'URIs': {'variables': '/api/v1/categories/sensors/1915/variables', 'bindings': '/api/v1/categories/sensors/1915/bindings', 'commands': '/api/v1/categories/sensors/1915/commands'}}
2022-01-22 13:56:36 WARNING (MainThread) [custom_components.control4.alarm_control_panel] Unknown device properties received from Control4: 'details' {'type': 7, 'typeName': 'device', 'name': 'Security System 2', 'parentId': 1793, 'id': 1796, 'filename': 'security.c4i', 'proxy': 'security', 'proxyOrder': 3, 'proxyMeta': [{'proxybindingid': 5001, 'smallSource': 'composer', 'smallImage': 'devices_sm/dsc_16.gif', 'largeSource': 'composer', 'largeImage': 'devices_lg/dsc_32.gif', 'proxy': 'securitypanel'}], 'categories': ['security'], 'siteId': 8, 'siteName': 'Home', 'buildingId': 9, 'buildingName': 'House', 'floorId': 10, 'floorName': 'System', 'roomId': 11, 'roomName': 'System', 'largeImage': 'devices_lg/Security_32.gif', 'smallImage': 'devices_sm/Security_16.gif', 'protocolId': 1793, 'protocolName': 'IQPanel2 Security Panel', 'protocolFilename': 'IQPanel2SecurityPanel.c4z', 'capabilities': {'arm_states': 'Stay,Away,Stay Instant,Away Instant', 'button_A': {'type': 'xml', 'visible': True, 'label': 'Button A Text'}, 'button_B': {'type': 'xml', 'visible': True, 'label': 'Button B Text'}, 'button_C': {'type': 'xml', 'visible': True, 'label': 'Button C Text'}, 'button_D': {'type': 'xml', 'visible': True, 'label': 'Button D Text'}, 'can_activate_partitions': True, 'can_set_time': True, 'has_fire': True, 'has_medical': False, 'has_panic': True, 'has_police': True, 'pound_label': '#', 'star_label': '*', 'ui_version': 2}, 'control': 'security', 'version': 3, 'created': '6/17/2005', 'modified': '11/15/2013', 'model': '', 'manufacturer': '', 'protocolControl': 'lua_gen', 'deviceOrder': 22, 'allControlBindingsHidden': 0, 'URIs': {'variables': '/api/v1/categories/security/1796/variables', 'network': '/api/v1/categories/security/1796/network', 'bindings': '/api/v1/categories/security/1796/bindings', 'commands': '/api/v1/categories/security/1796/commands'}}
@jsb5151 jsb5151 changed the title Alarm integration not working: "Unknown device properties received from Control4" Alarm & Binary Sensor integration not working: "Unknown device properties received from Control4" Jan 22, 2022
@lawtancool
Copy link
Owner

These messages are sometimes normal, since some devices on the Control4 side are not useful for controlling the alarm from Home Assistant.
Are any alarm or binary sensor devices are being added to Home Assistant at all?

@mellis
Copy link
Contributor

mellis commented Dec 24, 2022

Also getting the error about unknown device properties. I added a bit more logging around the exception to trace the source:

Traceback (most recent call last):
  File "/config/custom_components/control4/alarm_control_panel.py", line 225, in async_setup_entry
    item_setup_info = await director.getItemSetup(item_id)
  File "/usr/local/lib/python3.10/site-packages/pyControl4/director.py", line 135, in getItemSetup
    return await self.sendPostRequest(
  File "/usr/local/lib/python3.10/site-packages/pyControl4/director.py", line 99, in sendPostRequest
    await checkResponseForError(await resp.text())
  File "/usr/local/lib/python3.10/site-packages/pyControl4/error_handling.py", line 112, in checkResponseForError
    if dictionary["details"] in DIRECTOR_ERROR_DETAILS:
KeyError: 'details

Looks to be an issue in pyControl4's error handling code, it's expecting a key in the error response that does not exist (in the direct.getItemSetup call of alarm_control_panel.py

@BeHappy2021
Copy link

I'm getting the warnings similar to the first post. Looks like contact sensors and the alarm panel. Is there a way to get those to be part of the integration? I get the configuration options for the alarm panel (which I take it is left over from an older version of the integration) but it doesn't create any entities.

@granvillebarker
Copy link

The bug in getItemSetup was causing issues with this, my fix for that on pyControl4 may resolve this.
Binary Sensors are working for me.

@BeHappy2021
Copy link

@granvillebarker how do I implement your fix?

@granvillebarker
Copy link

Hopefully lawtancool will merge my pr soon, but in the meantime, look at getItemSetup inside director.py, in that call you will see "{}", change that to just {}. It should look like this:
"/api/v1/items/{}/commands".format(item_id), "GET_SETUP", {}, False

director.py is part of pyControl4, you will have to figure out where your install is running that from. I run in docker, so I have to edit it inside the container. Currently inside /usr/local/lib/python3.11/site-packages/pyControl4/. '

I would like to know if that fixes it or you get other errors, I made some other changes to binary_sensor related to issues with my alarm system, but I don't think they would help with your issue.

@mikedeluca
Copy link

I'd like to report that I implemented this change and it worked fine. Would be awesome if it can get merged in so that it will stay working...

@mellis
Copy link
Contributor

mellis commented Mar 29, 2024

@mikedeluca you should post a PR

@BeHappy2021
Copy link

I can find /usr/local/lib/python3.11/site-packages/ but not pyControl4. I'm running HassOS in VirtualBox. I've tried doing grep to fine director.py and haven't found it that way either.

@mikedeluca
Copy link

@mikedeluca you should post a PR

@granvillebarker already did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants