lawtancool / pyControl4

Python 3 asyncio package for interacting with Control4 systems
https://lawtancool.github.io/pyControl4
Apache License 2.0
38 stars 16 forks source link

Latest hacs-pycontrol4 release with binary sensors throwing errors. #17

Closed lorddaren closed 2 years ago

lorddaren commented 2 years ago

I am documenting the issue I am seeing with trying to load the binary sensors here instead of in the discussion thread.

2022-01-18 06:55:51 WARNING (MainThread) [custom_components.control4.binary_sensor] Unknown device properties received from Control4: {'type': 7, 'typeName': 'device', 'name': 'Garage Door Main', 'parentId': 51, 'id': 438, 'filename': 'relaycontact_garagedoor_c4.c4i', 'proxy': 'relaycontact_garagedoor_c4', 'proxyOrder': 1, 'proxyMeta': [{'name': 'relaycontact_garagedoor_c4', 'smallImage': 'devices_sm/relaysingle_garagedoor_close.gif', 'smallSource': 'composer', 'largeImage': 'devices_lg/relaysingle_garagedoor_close.gif', 'largeSource': 'composer'}], 'categories': ['sensors'], 'siteId': 7, 'siteName': 'Home', 'buildingId': 8, 'buildingName': 'House', 'floorId': 9, 'floorName': 'Main', 'roomId': 51, 'roomName': 'Garage', 'largeImage': 'devices_lg/relaysingle_garagedoor_close.gif', 'smallImage': 'devices_sm/relaysingle_garagedoor_close.gif', 'protocolId': 438, 'protocolName': 'Garage Door Main', 'protocolFilename': 'relaycontact_garagedoor_c4.c4i', 'capabilities': {}, 'events': [{'id': 1, 'description': 'When the NAME is opened'}, {'id': 2, 'description': 'When the NAME is closed'}], 'commands': {'command': [{'id': 0, 'description': 'Open the NAME'}, {'id': 1, 'description': 'Close the NAME'}, {'id': 2, 'description': 'Toggle the NAME'}]}, 'conditionals': {'conditional': [{'id': 0, 'description': 'the NAME is open'}, {'id': 1, 'description': 'the NAME is closed'}]}, 'control': 'control4_relaysingle', 'version': 3, 'created': '1/20/2005 2:22:54 PM', 'modified': '11/02/2005 12:30 PM', 'model': 'Garage Door (Sensor)', 'manufacturer': 'Generic', 'protocolControl': 'control4_relaysingle', 'deviceOrder': 8, 'allControlBindingsHidden': 0, 'URIs': {'variables': '/api/v1/categories/sensors/438/variables', 'bindings': '/api/v1/categories/sensors/438/bindings', 'commands': '/api/v1/categories/sensors/438/commands'}}

If I can get a chance to debug this I will make a PR. When I went down this path (along with fans) It started getting tricky to try and add in the sensors. I am sure something can be figured out though.

jsb5151 commented 2 years ago

Same issue here but also with Alarm System: https://github.com/lawtancool/hass-control4/issues/2

lawtancool commented 2 years ago

@Xorso Please open this issue in the hass-control4 repo, this is unrelated to the underlying pyControl4 library.

@jsb5151 Your issue is separate from this one, its mainly an issue of me not being able to test all the possible Control4 device configurations and models.