Lightwave Generation 2 component

The next line is the response:

2019-07-14 16:02:34 DEBUG (MainThread) [lightwave2.lightwave2] Response received: {'version': 1, 'senderId': 1, 'direction': 'response', 'items': [{'itemId': 2, 'success': True, 'payload': {'groupId': '5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e7740', 'name': 'My Group', 'type': 'root', 'parents': [], 'parentGroups': [], 'order': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e7741'], 'subGroups': {'5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e7741': {'5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e7745': {'5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e7746': {'5bf5c33e28b22a79b28e773f-5bf5c58c28b22a79b28fb7d0': {}, '5bf5c33e28b22a79b28e773f-5c4f81b7ba8b9162e075d36f': {}, '5bf5c33e28b22a79b28e773f-5c4f81f7ba8b9162e075d371': {}, '5bf5c33e28b22a79b28e773f-5c6d97a04901af54a4cca3a4': {}}}, '5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e7742': {'5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d': {}}, '5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e7743': {'5bf5c33e28b22a79b28e773f-5c6dba464901af54a4cca57d': {}, '5bf5c33e28b22a79b28e773f-5c6dba704901af54a4cca57e': {}, '5bf5c33e28b22a79b28e773f-5c6dba9c4901af54a4cca57f': {}, '5bf5c33e28b22a79b28e773f-5c6dbaa24901af54a4cca580': {}}, '5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e7744': {}, '5bf5c33e28b22a79b28e773f-5ca5f915df7045781a0c5522': {}}}, 'features': {'5bf5c33e28b22a79b28e773f-18-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-18-3157336705+1', 'name': 'Lounge Curtains', 'deviceId': '5bf5c33e28b22a79b28e773f-4-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c58c28b22a79b28fb7d0'], 'createdDate': '2018-11-21T20:52:28.626Z', 'attributes': {'featureId': 18, 'writable': True, 'channel': 0, 'type': 'threeWayRelay', 'value': 0, 'status': 'init', 'name': 'Lounge Curtains'}}, '5bf5c33e28b22a79b28e773f-29-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-29-3157336705+1', 'name': 'Lounge Curtains', 'deviceId': '5bf5c33e28b22a79b28e773f-4-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c58c28b22a79b28fb7d0'], 'createdDate': '2019-06-05T04:56:26.403Z', 'attributes': {'featureId': 29, 'writable': True, 'channel': 0, 'type': 'identify', 'value': 0, 'status': 'unknown', 'name': 'Lounge Curtains'}}, '5bf5c33e28b22a79b28e773f-22-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-22-3157336705+1', 'name': 'Drinks Cabinet', 'deviceId': '5bf5c33e28b22a79b28e773f-8-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5c4f81b7ba8b9162e075d36f'], 'createdDate': '2019-01-28T22:27:03.203Z', 'attributes': {'featureId': 22, 'writable': True, 'channel': 0, 'type': 'switch', 'value': 0, 'status': 'init', 'name': 'Drinks Cabinet'}}, '5bf5c33e28b22a79b28e773f-23-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-23-3157336705+1', 'name': 'Drinks Cabinet', 'deviceId': '5bf5c33e28b22a79b28e773f-8-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5c4f81b7ba8b9162e075d36f'], 'createdDate': '2019-01-28T22:27:03.204Z', 'attributes': {'featureId': 23, 'writable': True, 'channel': 0, 'type': 'protection', 'value': 0, 'status': 'init', 'name': 'Drinks Cabinet'}}, '5bf5c33e28b22a79b28e773f-30-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-30-3157336705+1', 'name': 'Drinks Cabinet', 'deviceId': '5bf5c33e28b22a79b28e773f-8-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5c4f81b7ba8b9162e075d36f'], 'createdDate': '2019-06-05T04:56:27.475Z', 'attributes': {'featureId': 30, 'writable': True, 'channel': 0, 'type': 'identify', 'value': 0, 'status': 'unknown', 'name': 'Drinks Cabinet'}}, '5bf5c33e28b22a79b28e773f-24-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-24-3157336705+1', 'name': 'Display Cabinet', 'deviceId': '5bf5c33e28b22a79b28e773f-9-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5c4f81f7ba8b9162e075d371'], 'createdDate': '2019-01-28T22:28:07.700Z', 'attributes': {'featureId': 24, 'writable': True, 'channel': 0, 'type': 'switch', 'value': 0, 'status': 'init', 'name': 'Display Cabinet'}}, '5bf5c33e28b22a79b28e773f-25-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-25-3157336705+1', 'name': 'Display Cabinet', 'deviceId': '5bf5c33e28b22a79b28e773f-9-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5c4f81f7ba8b9162e075d371'], 'createdDate': '2019-01-28T22:28:07.701Z', 'attributes': {'featureId': 25, 'writable': True, 'channel': 0, 'type': 'protection', 'value': 0, 'status': 'init', 'name': 'Display Cabinet'}}, '5bf5c33e28b22a79b28e773f-31-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-31-3157336705+1', 'name': 'Display Cabinet', 'deviceId': '5bf5c33e28b22a79b28e773f-9-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5c4f81f7ba8b9162e075d371'], 'createdDate': '2019-06-05T04:56:27.578Z', 'attributes': {'featureId': 31, 'writable': True, 'channel': 0, 'type': 'identify', 'value': 0, 'status': 'unknown', 'name': 'Display Cabinet'}}, '5bf5c33e28b22a79b28e773f-27-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-27-3157336705+1', 'name': 'Lounge Curtains', 'deviceId': '5bf5c33e28b22a79b28e773f-10-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5c6d97a04901af54a4cca3a4'], 'createdDate': '2019-02-20T18:08:32.515Z', 'attributes': {'featureId': 27, 'writable': True, 'channel': 0, 'type': 'threeWayRelay', 'value': 0, 'status': 'init', 'name': 'Lounge Curtains'}}, '5bf5c33e28b22a79b28e773f-32-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-32-3157336705+1', 'name': 'Lounge Curtains', 'deviceId': '5bf5c33e28b22a79b28e773f-10-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5c6d97a04901af54a4cca3a4'], 'createdDate': '2019-06-05T04:56:27.670Z', 'attributes': {'featureId': 32, 'writable': True, 'channel': 0, 'type': 'identify', 'value': 0, 'status': 'unknown', 'name': 'Lounge Curtains'}}, '5bf5c33e28b22a79b28e773f-1-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2018-11-21T20:42:38.968Z', 'attributes': {'featureId': 1, 'writable': False, 'channel': 0, 'type': 'currentTime', 'value': 1542832958, 'status': 'ok', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-2-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-2-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2018-11-21T20:42:38.968Z', 'attributes': {'featureId': 2, 'writable': False, 'channel': 0, 'type': 'buttonPress', 'value': 1, 'status': 'init', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-3-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-3-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2018-11-21T20:42:38.969Z', 'attributes': {'featureId': 3, 'writable': False, 'channel': 0, 'type': 'time', 'value': 74558, 'status': 'ok', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-4-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-4-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2018-11-21T20:42:38.969Z', 'attributes': {'featureId': 4, 'writable': False, 'channel': 0, 'type': 'date', 'value': 8268565, 'status': 'ok', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-5-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-5-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2018-11-21T20:42:38.969Z', 'attributes': {'featureId': 5, 'writable': False, 'channel': 0, 'type': 'monthArray', 'value': 0, 'status': 'ok', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-6-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-6-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2018-11-21T20:42:38.969Z', 'attributes': {'featureId': 6, 'writable': False, 'channel': 0, 'type': 'weekdayArray', 'value': 4, 'status': 'ok', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-7-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-7-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2018-11-21T20:42:38.970Z', 'attributes': {'featureId': 7, 'writable': True, 'channel': 0, 'type': 'timeZone', 'value': 0, 'status': 'ok', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-8-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-8-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2018-11-21T20:42:38.970Z', 'attributes': {'featureId': 8, 'writable': True, 'channel': 0, 'type': 'locationLongitude', 'value': -1890401, 'status': 'ok', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-9-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-9-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2018-11-21T20:42:38.970Z', 'attributes': {'featureId': 9, 'writable': True, 'channel': 0, 'type': 'locationLatitude', 'value': 52486243, 'status': 'ok', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-10-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-10-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2018-11-21T20:42:38.970Z', 'attributes': {'featureId': 10, 'writable': False, 'channel': 0, 'type': 'duskTime', 'value': 58031, 'status': 'ok', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-11-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-11-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2018-11-21T20:42:38.970Z', 'attributes': {'featureId': 11, 'writable': False, 'channel': 0, 'type': 'dawnTime', 'value': 27579, 'status': 'ok', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-12-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-12-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2018-11-21T20:42:38.971Z', 'attributes': {'featureId': 12, 'writable': True, 'channel': 0, 'type': 'rgbColor', 'value': 32768, 'status': 'init', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-13-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-13-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2018-11-21T20:42:38.971Z', 'attributes': {'featureId': 13, 'writable': False, 'channel': 0, 'type': 'day', 'value': 21, 'status': 'ok', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-14-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-14-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2018-11-21T20:42:38.971Z', 'attributes': {'featureId': 14, 'writable': False, 'channel': 0, 'type': 'month', 'value': 11, 'status': 'ok', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-15-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-15-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2018-11-21T20:42:38.971Z', 'attributes': {'featureId': 15, 'writable': False, 'channel': 0, 'type': 'year', 'value': 2018, 'status': 'ok', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-26-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-26-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2019-02-18T16:53:13.165Z', 'attributes': {'featureId': 26, 'writable': False, 'channel': 0, 'type': 'weekday', 'value': 1, 'status': 'ok', 'name': 'LinkPlus'}}, '5bf5c33e28b22a79b28e773f-28-3157336705+1': {'featureId': '5bf5c33e28b22a79b28e773f-28-3157336705+1', 'name': 'LinkPlus', 'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d'], 'createdDate': '2019-06-05T04:56:25.326Z', 'attributes': {'featureId': 28, 'writable': True, 'channel': 0, 'type': 'identify', 'value': 0, 'status': 'init', 'name': 'LinkPlus'}}}, 'blocks': {'5bf5c33e28b22a79b28e773f-4-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-4-3157336705+1', 'type': 'input', 'function': 'equal', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-3-3157336705+1'}, 'rightReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-11-3157336705+1'}}, '5bf5c33e28b22a79b28e773f-5-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-5-3157336705+1', 'type': 'input', 'function': 'bitwiseAnd', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-6-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 127}}, '5bf5c33e28b22a79b28e773f-6-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-6-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-27-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 1}}, '5bf5c33e28b22a79b28e773f-23-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-23-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-18-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 1}}, '5bf5c33e28b22a79b28e773f-31-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-31-3157336705+1', 'type': 'input', 'function': 'equal', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-3-3157336705+1'}, 'rightReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-10-3157336705+1'}}, '5bf5c33e28b22a79b28e773f-32-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-32-3157336705+1', 'type': 'input', 'function': 'bitwiseAnd', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-6-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 127}}, '5bf5c33e28b22a79b28e773f-33-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-33-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-27-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 2}}, '5bf5c33e28b22a79b28e773f-34-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-34-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-18-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 2}}, '5bf5c33e28b22a79b28e773f-12-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-12-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-27-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 1}}, '5bf5c33e28b22a79b28e773f-13-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-13-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-18-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 1}}, '5bf5c33e28b22a79b28e773f-14-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-14-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-27-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 2}}, '5bf5c33e28b22a79b28e773f-15-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-15-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-18-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 2}}, '5bf5c33e28b22a79b28e773f-16-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-16-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-24-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 1}}, '5bf5c33e28b22a79b28e773f-17-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-17-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-22-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 1}}, '5bf5c33e28b22a79b28e773f-18-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-18-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-24-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 0}}, '5bf5c33e28b22a79b28e773f-19-3157336705+1': {'blockId': '5bf5c33e28b22a79b28e773f-19-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-22-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 0}}}, 'scripts': {'5bf5c33e28b22a79b28e773f-3-3157336705+1': {'scriptId': '5bf5c33e28b22a79b28e773f-3-3157336705+1', 'name': 'Open the curtains in the morning ', 'category': 'timer', 'type': 'mixed', 'function': 'all', 'delayValue': 0, 'delayType': 'mixed', 'inputs': [{'function': 'onTrue', 'delayType': 'execute', 'delayValue': 0, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-4-3157336705+1', 'type': 'input', 'function': 'equal', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-3-3157336705+1'}, 'rightReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-11-3157336705+1'}}}, {'function': 'onTrue', 'delayType': 'execute', 'delayValue': 0, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-5-3157336705+1', 'type': 'input', 'function': 'bitwiseAnd', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-6-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 127}}}], 'outputs': [{'function': 'onRisingEdge', 'delayType': 'execute', 'delayValue': 0, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-6-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-27-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 1}}}, {'function': 'onRisingEdge', 'delayType': 'execute', 'delayValue': 0, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-23-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-18-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 1}}}], 'active': True, 'singleRun': False, 'scriptVersion': '1.3'}, '5bf5c33e28b22a79b28e773f-4-3157336705+1': {'scriptId': '5bf5c33e28b22a79b28e773f-4-3157336705+1', 'name': 'Close the curtains in the evening ', 'category': 'timer', 'type': 'mixed', 'function': 'all', 'delayValue': 0, 'delayType': 'mixed', 'inputs': [{'function': 'onTrue', 'delayType': 'execute', 'delayValue': 0, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-31-3157336705+1', 'type': 'input', 'function': 'equal', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-3-3157336705+1'}, 'rightReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-10-3157336705+1'}}}, {'function': 'onTrue', 'delayType': 'execute', 'delayValue': 0, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-32-3157336705+1', 'type': 'input', 'function': 'bitwiseAnd', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-6-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 127}}}], 'outputs': [{'function': 'onRisingEdge', 'delayType': 'execute', 'delayValue': 0, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-33-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-27-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 2}}}, {'function': 'onRisingEdge', 'delayType': 'execute', 'delayValue': 0, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-34-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-18-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 2}}}], 'active': True, 'singleRun': False, 'scriptVersion': '1.3'}, '5bf5c33e28b22a79b28e773f-5-3157336705+1': {'scriptId': '5bf5c33e28b22a79b28e773f-5-3157336705+1', 'name': 'Open curtains', 'category': 'do', 'type': 'mixed', 'function': 'all', 'delayValue': 0, 'delayType': 'mixed', 'inputs': [], 'outputs': [{'function': 'onRisingEdge', 'delayType': 'execute', 'delayValue': 0, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-12-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-27-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 1}}}, {'function': 'onRisingEdge', 'delayType': 'execute', 'delayValue': 0, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-13-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-18-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 1}}}], 'active': True, 'singleRun': False, 'scriptVersion': '1.3'}, '5bf5c33e28b22a79b28e773f-6-3157336705+1': {'scriptId': '5bf5c33e28b22a79b28e773f-6-3157336705+1', 'name': 'Close curtains', 'category': 'do', 'type': 'mixed', 'function': 'all', 'delayValue': 0, 'delayType': 'mixed', 'inputs': [], 'outputs': [{'function': 'onRisingEdge', 'delayType': 'execute', 'delayValue': 2000, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-14-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-27-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 2}}}, {'function': 'onRisingEdge', 'delayType': 'execute', 'delayValue': 0, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-15-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-18-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 2}}}], 'active': True, 'singleRun': False, 'scriptVersion': '1.3'}, '5bf5c33e28b22a79b28e773f-7-3157336705+1': {'scriptId': '5bf5c33e28b22a79b28e773f-7-3157336705+1', 'name': 'Displays On', 'category': 'do', 'type': 'mixed', 'function': 'all', 'delayValue': 0, 'delayType': 'mixed', 'inputs': [], 'outputs': [{'function': 'onRisingEdge', 'delayType': 'execute', 'delayValue': 0, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-16-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-24-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 1}}}, {'function': 'onRisingEdge', 'delayType': 'execute', 'delayValue': 0, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-17-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-22-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 1}}}], 'active': True, 'singleRun': False, 'scriptVersion': '1.3'}, '5bf5c33e28b22a79b28e773f-8-3157336705+1': {'scriptId': '5bf5c33e28b22a79b28e773f-8-3157336705+1', 'name': 'Displays Off', 'category': 'do', 'type': 'mixed', 'function': 'all', 'delayValue': 0, 'delayType': 'mixed', 'inputs': [], 'outputs': [{'function': 'onRisingEdge', 'delayType': 'execute', 'delayValue': 0, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-18-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-24-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 0}}}, {'function': 'onRisingEdge', 'delayType': 'execute', 'delayValue': 0, 'type': 'blockObject', 'value': {'blockId': '5bf5c33e28b22a79b28e773f-19-3157336705+1', 'type': 'output', 'function': 'set', 'leftReference': {'type': 'feature', 'value': '5bf5c33e28b22a79b28e773f-22-3157336705+1'}, 'rightReference': {'type': 'value', 'value': 0}}}], 'active': True, 'singleRun': False, 'scriptVersion': '1.3'}}, 'devices': {'5bf5c33e28b22a79b28e773f-4-3157336705+1': {'deviceId': '5bf5c33e28b22a79b28e773f-4-3157336705+1', 'name': 'Lounge Curtains', 'paired': True, 'productCode': 'LW821', 'createdDate': '2018-11-21T20:52:28.625Z', 'featureIds': ['5bf5c33e28b22a79b28e773f-18-3157336705+1', '5bf5c33e28b22a79b28e773f-29-3157336705+1'], 'featureSetGroupIds': ['5bf5c33e28b22a79b28e773f-5bf5c58c28b22a79b28fb7d0']}, '5bf5c33e28b22a79b28e773f-8-3157336705+1': {'deviceId': '5bf5c33e28b22a79b28e773f-8-3157336705+1', 'name': 'Drinks Cabinet', 'paired': True, 'productCode': 'LW380', 'createdDate': '2019-01-28T22:27:03.202Z', 'featureIds': ['5bf5c33e28b22a79b28e773f-22-3157336705+1', '5bf5c33e28b22a79b28e773f-23-3157336705+1', '5bf5c33e28b22a79b28e773f-30-3157336705+1'], 'featureSetGroupIds': ['5bf5c33e28b22a79b28e773f-5c4f81b7ba8b9162e075d36f']}, '5bf5c33e28b22a79b28e773f-9-3157336705+1': {'deviceId': '5bf5c33e28b22a79b28e773f-9-3157336705+1', 'name': 'Display Cabinet', 'paired': True, 'productCode': 'LW380', 'createdDate': '2019-01-28T22:28:07.698Z', 'featureIds': ['5bf5c33e28b22a79b28e773f-24-3157336705+1', '5bf5c33e28b22a79b28e773f-25-3157336705+1', '5bf5c33e28b22a79b28e773f-31-3157336705+1'], 'featureSetGroupIds': ['5bf5c33e28b22a79b28e773f-5c4f81f7ba8b9162e075d371']}, '5bf5c33e28b22a79b28e773f-10-3157336705+1': {'deviceId': '5bf5c33e28b22a79b28e773f-10-3157336705+1', 'name': 'Lounge Curtains', 'paired': True, 'productCode': 'LW821', 'createdDate': '2019-02-20T18:08:32.514Z', 'featureIds': ['5bf5c33e28b22a79b28e773f-27-3157336705+1', '5bf5c33e28b22a79b28e773f-32-3157336705+1'], 'featureSetGroupIds': ['5bf5c33e28b22a79b28e773f-5c6d97a04901af54a4cca3a4']}, '5bf5c33e28b22a79b28e773f-1-3157336705+1': {'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'name': 'LinkPlus', 'paired': True, 'productCode': 'L2', 'createdDate': '2018-11-21T20:42:38.966Z', 'featureIds': ['5bf5c33e28b22a79b28e773f-1-3157336705+1', '5bf5c33e28b22a79b28e773f-2-3157336705+1', '5bf5c33e28b22a79b28e773f-3-3157336705+1', '5bf5c33e28b22a79b28e773f-4-3157336705+1', '5bf5c33e28b22a79b28e773f-5-3157336705+1', '5bf5c33e28b22a79b28e773f-6-3157336705+1', '5bf5c33e28b22a79b28e773f-7-3157336705+1', '5bf5c33e28b22a79b28e773f-8-3157336705+1', '5bf5c33e28b22a79b28e773f-9-3157336705+1', '5bf5c33e28b22a79b28e773f-10-3157336705+1', '5bf5c33e28b22a79b28e773f-11-3157336705+1', '5bf5c33e28b22a79b28e773f-12-3157336705+1', '5bf5c33e28b22a79b28e773f-13-3157336705+1', '5bf5c33e28b22a79b28e773f-14-3157336705+1', '5bf5c33e28b22a79b28e773f-15-3157336705+1', '5bf5c33e28b22a79b28e773f-26-3157336705+1', '5bf5c33e28b22a79b28e773f-28-3157336705+1'], 'featureSetGroupIds': ['5bf5c33e28b22a79b28e773f-5bf5c33e28b22a79b28e774d']}}}}], 'class': 'group', 'operation': 'read', 'transactionId': 2}

then the debug pattern settles before an error:

2019-07-14 16:02:34 DEBUG (MainThread) [lightwave2.lightwave2] Creating device {'featureId': '5bf5c33e28b22a79b28e773f-18-3157336705+1', 'name': 'Lounge Curtains', 'deviceId': '5bf5c33e28b22a79b28e773f-4-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c58c28b22a79b28fb7d0'], 'createdDate': '2018-11-21T20:52:28.626Z', 'attributes': {'featureId': 18, 'writable': True, 'channel': 0, 'type': 'threeWayRelay', 'value': 0, 'status': 'init', 'name': 'Lounge Curtains'}}
2019-07-14 16:02:34 DEBUG (MainThread) [lightwave2.lightwave2] Adding device features {'featureId': '5bf5c33e28b22a79b28e773f-18-3157336705+1', 'name': 'Lounge Curtains', 'deviceId': '5bf5c33e28b22a79b28e773f-4-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c58c28b22a79b28fb7d0'], 'createdDate': '2018-11-21T20:52:28.626Z', 'attributes': {'featureId': 18, 'writable': True, 'channel': 0, 'type': 'threeWayRelay', 'value': 0, 'status': 'init', 'name': 'Lounge Curtains'}}
2019-07-14 16:02:34 DEBUG (MainThread) [lightwave2.lightwave2] Adding device features {'featureId': '5bf5c33e28b22a79b28e773f-29-3157336705+1', 'name': 'Lounge Curtains', 'deviceId': '5bf5c33e28b22a79b28e773f-4-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5bf5c58c28b22a79b28fb7d0'], 'createdDate': '2019-06-05T04:56:26.403Z', 'attributes': {'featureId': 29, 'writable': True, 'channel': 0, 'type': 'identify', 'value': 0, 'status': 'unknown', 'name': 'Lounge Curtains'}}
2019-07-14 16:02:34 DEBUG (MainThread) [lightwave2.lightwave2] Creating device {'featureId': '5bf5c33e28b22a79b28e773f-22-3157336705+1', 'name': 'Drinks Cabinet', 'deviceId': '5bf5c33e28b22a79b28e773f-8-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5c4f81b7ba8b9162e075d36f'], 'createdDate': '2019-01-28T22:27:03.203Z', 'attributes': {'featureId': 22, 'writable': True, 'channel': 0, 'type': 'switch', 'value': 0, 'status': 'init', 'name': 'Drinks Cabinet'}}
2019-07-14 16:02:34 DEBUG (MainThread) [lightwave2.lightwave2] Adding device features {'featureId': '5bf5c33e28b22a79b28e773f-22-3157336705+1', 'name': 'Drinks Cabinet', 'deviceId': '5bf5c33e28b22a79b28e773f-8-3157336705+1', 'groups': ['5bf5c33e28b22a79b28e773f-5c4f81b7ba8b9162e075d36f'], 'createdDate': '2019-01-28T22:27:03.203Z', 'attributes': {'featureId': 22, 'writable': True, 'channel': 0, 'type': 'switch', 'value': 0, 'status': 'init', 'name': 'Drinks Cabinet'}}

108 lines of typical pattern, but then comes an error...

2019-07-14 16:02:38 DEBUG (MainThread) [lightwave2.lightwave2] Received WSMessage(type=<WSMsgType.TEXT: 1>, data='{"version":1,"senderId":1,"direction":"response","items":[{"itemId":29,"payload":{"value":0,"status":"init","_feature":{"deviceId":"5bf5c33e28b22a79b28e773f-1-3157336705+1","productCode":"L2","featureId":"5bf5c33e28b22a79b28e773f-28-3157336705+1","featureType":"identify"}},"success":true}],"class":"feature","operation":"read","transactionId":68458}', extra='')
2019-07-14 16:02:38 DEBUG (MainThread) [lightwave2.lightwave2] Response received: {'version': 1, 'senderId': 1, 'direction': 'response', 'items': [{'itemId': 29, 'payload': {'value': 0, 'status': 'init', '_feature': {'deviceId': '5bf5c33e28b22a79b28e773f-1-3157336705+1', 'productCode': 'L2', 'featureId': '5bf5c33e28b22a79b28e773f-28-3157336705+1', 'featureType': 'identify'}}, 'success': True}], 'class': 'feature', 'operation': 'read', 'transactionId': 29}
2019-07-14 16:02:38 DEBUG (MainThread) [lightwave2.lightwave2] Register callback <bound method LWRF2Switch.async_update_callback of <Entity Drinks Cabinet: off>>
2019-07-14 16:02:38 DEBUG (MainThread) [lightwave2.lightwave2] Register callback <bound method LWRF2Switch.async_update_callback of <Entity Display Cabinet: off>>
2019-07-14 16:02:38 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 365, in _async_add_entity
    await entity.async_update_ha_state()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 248, in _async_write_ha_state
    state = self.state
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/cover/__init__.py", line 188, in state
    closed = self.is_closed
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/cover/__init__.py", line 238, in is_closed
    raise NotImplementedError()
NotImplementedError
2019-07-14 16:02:38 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 365, in _async_add_entity
    await entity.async_update_ha_state()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 248, in _async_write_ha_state
    state = self.state
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/cover/__init__.py", line 188, in state
    closed = self.is_closed
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/cover/__init__.py", line 238, in is_closed
    raise NotImplementedError()
NotImplementedError
2019-07-14 16:02:40 DEBUG (MainThread) [lightwave2.lightwave2] Sending: {"class": "feature", "operation": "write", "version": 1, "senderId": "993b2c4f-dc83-414c-9b96-e97a601d478c", "transactionId": 30, "direction": "request", "items": [{"itemId": 30, "payload": {"featureId": "5bf5c33e28b22a79b28e773f-22-3157336705+1", "value": 0}}]}
2019-07-14 16:02:41 DEBUG (MainThread) [lightwave2.lightwave2] Received WSMessage(type=<WSMsgType.TEXT: 1>, data='{"version":1,"senderId":1,"direction":"response","items":[{"itemId":30,"payload":{"value":0,"status":"ok","_feature":{"deviceId":"5bf5c33e28b22a79b28e773f-8-3157336705+1","productCode":"LW380","featureId":"5bf5c33e28b22a79b28e773f-22-3157336705+1","featureType":"switch"}},"success":true}],"class":"feature","operation":"write","transactionId":68572}', extra='')
2019-07-14 16:02:41 DEBUG (MainThread) [lightwave2.lightwave2] Response received: {'version': 1, 'senderId': 1, 'direction': 'response', 'items': [{'itemId': 30, 'payload': {'value': 0, 'status': 'ok', '_feature': {'deviceId': '5bf5c33e28b22a79b28e773f-8-3157336705+1', 'productCode': 'LW380', 'featureId': '5bf5c33e28b22a79b28e773f-22-3157336705+1', 'featureType': 'switch'}}, 'success': True}], 'class': 'feature', 'operation': 'write', 'transactionId': 30}
2019-07-14 16:02:41 DEBUG (MainThread) [lightwave2.lightwave2] Sending: {"class": "feature", "operation": "write", "version": 1, "senderId": "993b2c4f-dc83-414c-9b96-e97a601d478c", "transactionId": 31, "direction": "request", "items": [{"itemId": 31, "payload": {"featureId": "5bf5c33e28b22a79b28e773f-24-3157336705+1", "value": 0}}]}
2019-07-14 16:02:42 DEBUG (MainThread) [lightwave2.lightwave2] Received WSMessage(type=<WSMsgType.TEXT: 1>, data='{"version":1,"senderId":1,"direction":"response","items":[{"itemId":31,"payload":{"value":0,"status":"ok","_feature":{"deviceId":"5bf5c33e28b22a79b28e773f-9-3157336705+1","productCode":"LW380","featureId":"5bf5c33e28b22a79b28e773f-24-3157336705+1","featureType":"switch"}},"success":true}],"class":"feature","operation":"write","transactionId":68680}', extra='')
2019-07-14 16:02:42 DEBUG (MainThread) [lightwave2.lightwave2] Response received: {'version': 1, 'senderId': 1, 'direction': 'response', 'items': [{'itemId': 31, 'payload': {'value': 0, 'status': 'ok', '_feature': {'deviceId': '5bf5c33e28b22a79b28e773f-9-3157336705+1', 'productCode': 'LW380', 'featureId': '5bf5c33e28b22a79b28e773f-24-3157336705+1', 'featureType': 'switch'}}, 'success': True}], 'class': 'feature', 'operation': 'write', 'transactionId': 31}

Hi Dave, no worries. Sorry it’s a bit trial and error. If you’ve got patience for another try, I’ve pushed a new version of the custom component.

Hi, Another try, but it still doesn’t work, and even the opening lines of the logs are 200k characters. Any way I can get them to you without saturating this ticket?
Curiously the reboot introduced a notification which read “Discovered HomeKit Accessory: Lightwave Link Plus 312281” I tried to follow that line of attack and managed to pair the lightwave hub to home assistant, but nothing more happened.
Still stumped,
Dave

Hi bigbadblunt,

Firstly, thank you for the work you put into this Lightwave component. It’s really taking shape for me and my setup!

I am having a little trouble with my ‘cover’ relays not showing their actual state properly. Controlling the open/stop/close is working fine, but the state in my Overview does not change and so my conditions within automations are not responding properly. Could it be that the state only has the option to be on or off the same as lights? (I have lights setup too and they report perfectly).

If you have any thoughts on it, that would be great to hear.

Thanks again.
Berto

Dave - you can DM me. Click on my username, then there will be an option to send me a message.

Berto - yes, they won’t show state. The library has no way of knowing whether they’re open or shut. I could assume state based on your actions (i.e. if you close the blinds then the component would assume they are shut), but this would break if you partially close them, or if you change the state from somewhere else.

For anyone who’s using this, it looks like something changed in the messaging from the Lightwave serves, so you’ll need to update to the latest version of the component

Usual process, files are at

https://github.com/bigbadblunt/home-assistant-custom-components

Hi @bigbadblunt

I am really struggling to get this working again after months of no issues.

I am using the latest version that you published 5 days ago however, the error I am getting is:

Error during setup of component lightwave2
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 168, in _async_setup_component
    hass, processed_config
  File "/config/custom_components/lightwave2/__init__.py", line 35, in async_setup
    from custom_components.lightwave2 import lightwave2
ImportError: cannot import name 'lightwave2' from 'custom_components.lightwave2' (/config/custom_components/lightwave2/__init__.py)

Any ideas?

Thanks

Hi, I’ll have a proper look asap, but in the meantime, can you edit __init__.py and replace

from custom_components.lightwave2 import lightwave2

with

from lightwave2 import lightwave2

and see if that helps?

That works.

Thanks for your help and for your contribution.

It’s people like you that make this such a wonderful community.

Github version is now hopefully fixed. I have no idea how I managed to break this, and why it still worked for me.

I’ve also added this component to HACS (https://hacs.netlify.com/) which should make the installation and maintenance easier for anyone using that.

1 Like

Hi @bigbadblunt,

I’m trying to setup your integration however I seem to be struggling to get the entities.

I have it installed via HACS and have added my login details to the configuration.yaml. Checking the debug logs it appears to connect using my credentials and there appear to be data exchanges however it doesn’t return any group information. Could this be why I don’t see entities?

2019-10-08 18:19:52 DEBUG (MainThread) [lightwave2.lightwave2] Reading hierarchy
2019-10-08 18:19:52 DEBUG (MainThread) [lightwave2.lightwave2] Sending: {"class": "user", "operation": "rootGroups", "version": 1, "senderId": "23c9f5df-af20-4081-b4c2-2d383a85ad52", "transactionId": 1, "direction": "request", "items": [{"itemId": 1, "payload": {}}]}
2019-10-08 18:19:52 DEBUG (MainThread) [lightwave2.lightwave2] Received WSMessage(type=<WSMsgType.TEXT: 1>, data='{"version":1,"senderId":1,"direction":"response","items":[{"itemId":1,"success":true,"payload":{"groupIds":[]}}],"class":"user","operation":"rootGroups","transactionId":1}', extra='')
2019-10-08 18:19:52 DEBUG (MainThread) [lightwave2.lightwave2] Response received: {'version': 1, 'senderId': 1, 'direction': 'response', 'items': [{'itemId': 1, 'success': True, 'payload': {'groupIds': []}}], 'class': 'user', 'operation': 'rootGroups', 'transactionId': 1}
2019-10-08 18:19:52 DEBUG (MainThread) [lightwave2.lightwave2] Reading groups []

Am I missing something else that I need to do?

Thank you so much for doing this. I just switched over from the manual custom component to using the HACS integration seamlessly last night.

This now means I no longer have any components that I need to update manually. This has really just tied up my system so nicely. Top man for all the effort and work you have put into this.

Hi @markc, your setup all seems to be fine and it’s authenticating with the lightwave server. But for some reason the Lightwave server isn’t returning a group ID. I’m not sure why not, but the problem appears to be at the Lightwave end (i.e. I don’t think there’s anything my component can do to change the behaviour). Is everything set up in the lightwave app? Are all your devices assigned to rooms? Have you got anything unusual/non-standard in how your lightwave app is configured?

Hi @bigbadblunt! Thanks for the reply! In the Lightwave app I have my devices setup and they are assigned to rooms. The app as far as I’m aware is configured as standard. I’ll try moving some devices around rooms or perhaps removing and re-pairing a couple to try! I’ll let you know how I get on.

Hi @markc. A couple more things you can try depending on your appetite for some investigation.

  1. Try adding devices as favourites
  2. (more experimental) add backend: public to your config file and send me the log output. In particular the few lines from [lightwave2.lightwave2] Sending API GET request to structures. This is a partial implementation of the public API, which might behave differently and give some more useful debugging output.

For the #2 to work you’ll need to upgrade to the latest version of the component.

Hi @bigbadblunt! Thanks very much for taking the time to try and diagnose this. I tried making some favorites as mentioned in item 1 however this still didn’t yield any results.
I also update to the latest version of your component and tried changing the backend to public. This gave the below:

2019-10-10 08:36:05 DEBUG (MainThread) [lightwave2.lightwave2] Sending API GET request to structures
2019-10-10 08:36:11 DEBUG (MainThread) [lightwave2.lightwave2] Received API response {'structures': []}
2019-10-10 08:36:11 DEBUG (MainThread) [lightwave2.lightwave2] Sending API POST request to features/read: {'features': []}
2019-10-10 08:37:14 ERROR (MainThread) [homeassistant.setup] Error during setup of component lightwave2
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 168, in _async_setup_component
    hass, processed_config
  File "/config/custom_components/lightwave2/__init__.py", line 74, in async_setup
    await link.async_get_hierarchy()
  File "/usr/local/lib/python3.7/site-packages/lightwave2/lightwave2.py", line 555, in async_get_hierarchy
    await self.async_update_featureset_states()
  File "/usr/local/lib/python3.7/site-packages/lightwave2/lightwave2.py", line 576, in async_update_featureset_states
    req = await self._async_postrequest("features/read", body)
  File "/usr/local/lib/python3.7/site-packages/lightwave2/lightwave2.py", line 513, in _async_postrequest
    _LOGGER.debug("Received API response {}".format(req.json()))
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I’m guessing the traceback is caused by the fact that there is nothing returned to decode?

@markc, I’m stumped.

Just to double check, you’re using a generation 2 Link and the “lightwave linkplus” app (the one with a green icon, not the one with a white icon).

One more thing to try. Can you log in to the web app https://my.lightwaverf.com/a/login - does everything appear as you would expect?