simbaja / gehome

Python SDK for GE smart appliances
MIT License
42 stars 29 forks source link

Portable A/C Support #23

Closed simbaja closed 3 years ago

simbaja commented 3 years ago

Per https://github.com/simbaja/ha_gehome/issues/31#issuecomment-894901134, this is the start of the discussion for getting Portable A/C unit support into the SDK.

@luddystefenson, please let me know if I can help further.

LuddyR commented 3 years ago

I think this is working correctly. Let me know what else I can do or if I messed something up running the example script. Tons of thanks for your work on this, should have a kofi or something we can donate to.

2021-08-16 22:42:52,260 DEBUG Getting OAuth2 token 2021-08-16 22:42:52,277 DEBUG Client changed state: GeClientState.INITIALIZING to GeClientState.AUTHORIZING_OAUTH 2021-08-16 22:42:54,896 DEBUG Getting WS credentials 2021-08-16 22:42:54,896 DEBUG Client changed state: GeClientState.AUTHORIZING_OAUTH to GeClientState.AUTHORIZING_CLIENT 2021-08-16 22:42:55,338 INFO Starting GE Appliances client 2021-08-16 22:42:55,360 DEBUG Client changed state: GeClientState.AUTHORIZING_CLIENT to GeClientState.CONNECTING 2021-08-16 22:42:55,445 DEBUG client - state = CONNECTING 2021-08-16 22:42:55,581 DEBUG client - event = connection_made(<asyncio.sslproto._SSLProtocolTransport object at 0x0000016F1A77EEE0>) 2021-08-16 22:42:55,582 DEBUG client > GET /?access_token=ue1cpmmffdewz71aht5tedqfj11rq2qy HTTP/1.1 2021-08-16 22:42:55,582 DEBUG client > Headers([('Host', 'ws-us-east-1.brillion.geappliances.com'), ('Upgrade', 'websocket'), ('Connection', 'Upgrade'), ('Sec-WebSocket-Key', 'PS2BoqNuo9Yy1SQ9zJD2/A=='), ('Sec-WebSocket-Version', '13'), ('Sec-WebSocket-Extensions', 'permessage-deflate; client_max_window_bits'), ('User-Agent', 'Python/3.9 websockets/9.1')]) 2021-08-16 22:42:55,794 DEBUG client - event = data_received(<212 bytes>) 2021-08-16 22:42:55,794 DEBUG client < HTTP/1.1 101 Switching Protocols 2021-08-16 22:42:55,794 DEBUG client < Headers([('Date', 'Tue, 17 Aug 2021 04:42:56 GMT'), ('Connection', 'upgrade'), ('upgrade', 'websocket'), ('sec-websocket-accept', 'Nf9sCdYKOMRE/lYDlc8jehDgkqE='), ('sec-websocket-extensions', 'permessage-deflate')]) 2021-08-16 22:42:55,795 DEBUG client - state = OPEN 2021-08-16 22:42:55,795 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#subscribe", "action": "subscribe", "resources": ["/appliance//erd/"]}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:42:55,796 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#api", "action": "api", "host": "api.brillion.geappliances.com", "method": "GET", "path": "/v1/appliance", "id": "List-appliances"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:42:55,797 DEBUG Client changed state: GeClientState.CONNECTING to GeClientState.CONNECTED 2021-08-16 22:42:55,905 DEBUG client - event = data_received(<49 bytes>) 2021-08-16 22:42:55,906 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#subscribe","success":true}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:42:56,073 DEBUG client - event = data_received(<263 bytes>) 2021-08-16 22:42:56,074 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#api","id":"List-appliances","request":{"host":"api.brillion.geappliances.com","method":"GET","path":"/v1/appliance"},"success":true,"code":200,"body":{"kind":"appliance#applianceList","userId":"ih27f273459ubyd","items":[{"applianceId":"D828C93ADB81","type":"Portable AC","brand":"Unknown","jid":"d828c93adb81_ih27f273459ubyd","nickname":"Portable AC","online":"ONLINE","onlineTime":"2021-08-14T21:58:35.000Z"}]}}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:42:56,075 DEBUG D828C93ADB81 marked available 2021-08-16 22:42:56,075 DEBUG Adding appliance D828C93ADB81 2021-08-16 22:42:56,075 DEBUG Requesting update for client D828C93ADB81 2021-08-16 22:42:56,075 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#api", "action": "api", "host": "api.brillion.geappliances.com", "method": "GET", "path": "/v1/appliance/D828C93ADB81/erd", "id": "D828C93ADB81-allErd"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:42:56,076 DEBUG Requesting features for client D828C93ADB81 2021-08-16 22:42:56,076 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#api", "action": "api", "host": "api.brillion.geappliances.com", "method": "GET", "path": "/v1/appliance/D828C93ADB81/feature", "id": "Request-features"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:42:56,077 DEBUG Registering update callback for GeAppliance(D828C93ADB81) (Unknown Type) 2021-08-16 22:42:56,252 DEBUG client - event = data_received(<16 bytes>) 2021-08-16 22:42:56,253 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#connect","success":true}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:42:56,307 DEBUG client - event = data_received(<234 bytes>) 2021-08-16 22:42:56,307 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#api","id":"D828C93ADB81-allErd","request":{"host":"api.brillion.geappliances.com","method":"GET","path":"/v1/appliance/D828C93ADB81/erd"},"success":true,"code":200,"body":{"kind":"appliance#erdList","userId":"ih27f273459ubyd","applianceId":"D828C93ADB81","items":[{"erd":"0x0001","value":"0A415057413132595A4257000000000000000000000000000000000000000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0002","value":"0000000000000000000000000000000000000000000000000000000000000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0007","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0008","value":"16","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0035","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0099","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0100","value":"00000B27","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0101","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0102","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0103","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0104","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0105","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7003","value":"0040","time":"2021-08-15T10:03:55.858Z"},{"erd":"0x7A00","value":"02","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7A01","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7A02","value":"46","time":"2021-08-17T03:49:43.938Z"},{"erd":"0x7A0F","value":"00","time":"2021-08-17T01:41:27.350Z"},{"erd":"0x7B00","value":"02","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7B0B","value":"0E","time":"2021-08-14T22:00:40.854Z"}]}}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:42:56,309 DEBUG Setting ErdCode.MODEL_NUMBER to APWA12YZBW 2021-08-16 22:42:56,309 DEBUG Setting ErdCode.SERIAL_NUMBER to 2021-08-16 22:42:56,309 DEBUG Setting ErdCode.TEMPERATURE_UNIT to ErdMeasurementUnits.IMPERIAL 2021-08-16 22:42:56,309 DEBUG Setting ErdCode.APPLIANCE_TYPE to ErdApplianceType.PORTABLE_AIR_CONDITIONER 2021-08-16 22:42:56,310 DEBUG Setting ErdCode.UNIT_TYPE to ErdUnitType.UNKNOWN 2021-08-16 22:42:56,310 DEBUG Setting ErdCode.UNKNOWN_0099 to b'\x00' 2021-08-16 22:42:56,310 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION to 0.0.11.39 2021-08-16 22:42:56,311 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE to 0.0.0.0 2021-08-16 22:42:56,311 DEBUG Setting ErdCode.ACM_UPDATING to False 2021-08-16 22:42:56,311 DEBUG Setting ErdCode.APPLIANCE_SW_VERSION to 0.0.0.0 2021-08-16 22:42:56,311 DEBUG Setting ErdCode.APPLIANCE_SW_VERSION_AVAILABLE to 0.0.0.0 2021-08-16 22:42:56,312 DEBUG Setting ErdCode.APPLIANCE_UPDATING to False 2021-08-16 22:42:56,312 DEBUG Setting ErdCode.AC_TARGET_TEMPERATURE to 64 2021-08-16 22:42:56,312 DEBUG Setting ErdCode.AC_FAN_SETTING to ErdAcFanSetting.LOW 2021-08-16 22:42:56,312 DEBUG Setting ErdCode.AC_OPERATION_MODE to ErdAcOperationMode.COOL 2021-08-16 22:42:56,313 DEBUG Setting ErdCode.AC_AMBIENT_TEMPERATURE to 70 2021-08-16 22:42:56,313 DEBUG Setting ErdCode.AC_POWER_STATUS to ErdOnOff.OFF 2021-08-16 22:42:56,313 DEBUG Setting ErdCode.SAC_AVAILABLE_MODES to ErdSacAvailableModes(has_heat=False, has_dry=True, has_eco=False, raw_value='02') 2021-08-16 22:42:56,313 DEBUG Setting 0x7B0B to b'\x0e' 2021-08-16 22:42:56,314 DEBUG Got initial appliance type for GeAppliance(D828C93ADB81) (ErdApplianceType.PORTABLE_AIR_CONDITIONER) 2021-08-16 22:42:56,314 DEBUG Appliance state change detected in GeAppliance(D828C93ADB81) (ErdApplianceType.PORTABLE_AIR_CONDITIONER). Updated keys: ErdCode.MODEL_NUMBER, ErdCode.SERIAL_NUMBER, ErdCode.TEMPERATURE_UNIT, ErdCode.APPLIANCE_TYPE, ErdCode.UNIT_TYPE, ErdCode.UNKNOWN_0099, ErdCode.WIFI_MODULE_SW_VERSION, ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE, ErdCode.ACM_UPDATING, ErdCode.APPLIANCE_SW_VERSION, ErdCode.APPLIANCE_SW_VERSION_AVAILABLE, ErdCode.APPLIANCE_UPDATING, ErdCode.AC_TARGET_TEMPERATURE, ErdCode.AC_FAN_SETTING, ErdCode.AC_OPERATION_MODE, ErdCode.AC_AMBIENT_TEMPERATURE, ErdCode.AC_POWER_STATUS, ErdCode.SAC_AVAILABLE_MODES, 0x7B0B 2021-08-16 22:42:56,314 DEBUG Appliance state change detected in GeAppliance(D828C93ADB81) (ErdApplianceType.PORTABLE_AIR_CONDITIONER) 2021-08-16 22:42:56,350 DEBUG client - event = data_received(<42 bytes>) 2021-08-16 22:42:56,351 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#api","id":"Request-features","request":{"host":"api.brillion.geappliances.com","method":"GET","path":"/v1/appliance/D828C93ADB81/feature"},"success":true,"code":200,"body":{"kind":"appliance#applianceFeature","userId":"ih27f273459ubyd","applianceId":"D828C93ADB81","features":[]}}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:42:56,351 DEBUG Received features [] for D828C93ADB81 2021-08-16 22:42:56,440 DEBUG client - event = data_received(<50 bytes>) 2021-08-16 22:42:56,440 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"resource":"/appliance//erd/","kind":"websocket#subscription","success":true,"change":"ADDED"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:43:15,799 DEBUG client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'~:\xb4G', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:43:15,853 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:43:15,854 DEBUG client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'~:\xb4G', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:43:15,854 DEBUG client - received solicited pong: 7e3ab447 2021-08-16 22:43:25,801 DEBUG Sending keepalive ping 2021-08-16 22:43:25,801 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#ping", "id": "keepalive-ping", "action": "ping"}', rsv1=False, rsv2=False, rsv3=False)
2021-08-16 22:43:25,874 DEBUG client - event = data_received(<28 bytes>) 2021-08-16 22:43:25,875 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#pong","id":"keepalive-ping"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:43:35,867 DEBUG client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'\xbbNlB', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:43:35,925 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:43:35,926 DEBUG client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'\xbbNlB', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:43:35,926 DEBUG client - received solicited pong: bb4e6c42 2021-08-16 22:43:55,814 DEBUG Sending keepalive ping 2021-08-16 22:43:55,814 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#ping", "id": "keepalive-ping", "action": "ping"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:43:55,890 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:43:55,891 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#pong","id":"keepalive-ping"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:43:55,942 DEBUG client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'\xfa\x8d\xbc\x14', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:43:56,000 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:43:56,000 DEBUG client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'\xfa\x8d\xbc\x14', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:43:56,000 DEBUG client - received solicited pong: fa8dbc14 2021-08-16 22:43:56,085 DEBUG Requesting update for GeAppliance(D828C93ADB81) (ErdApplianceType.PORTABLE_AIR_CONDITIONER) 2021-08-16 22:43:56,085 DEBUG Requesting update for client D828C93ADB81 2021-08-16 22:43:56,085 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#api", "action": "api", "host": "api.brillion.geappliances.com", "method": "GET", "path": "/v1/appliance/D828C93ADB81/erd", "id": "D828C93ADB81-allErd"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:43:56,368 DEBUG client - event = data_received(<25 bytes>) 2021-08-16 22:43:56,369 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#api","id":"D828C93ADB81-allErd","request":{"host":"api.brillion.geappliances.com","method":"GET","path":"/v1/appliance/D828C93ADB81/erd"},"success":true,"code":200,"body":{"kind":"appliance#erdList","userId":"ih27f273459ubyd","applianceId":"D828C93ADB81","items":[{"erd":"0x0001","value":"0A415057413132595A4257000000000000000000000000000000000000000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0002","value":"0000000000000000000000000000000000000000000000000000000000000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0007","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0008","value":"16","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0035","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0099","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0100","value":"00000B27","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0101","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0102","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0103","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0104","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0105","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7003","value":"0040","time":"2021-08-15T10:03:55.858Z"},{"erd":"0x7A00","value":"02","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7A01","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7A02","value":"46","time":"2021-08-17T03:49:43.938Z"},{"erd":"0x7A0F","value":"00","time":"2021-08-17T01:41:27.350Z"},{"erd":"0x7B00","value":"02","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7B0B","value":"0E","time":"2021-08-14T22:00:40.854Z"}]}}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:44:16,009 DEBUG client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'\x1cX\x11\xaf', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:44:16,063 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:44:16,064 DEBUG client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'\x1cX\x11\xaf', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:44:16,064 DEBUG client - received solicited pong: 1c5811af 2021-08-16 22:44:25,826 DEBUG Sending keepalive ping 2021-08-16 22:44:25,826 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#ping", "id": "keepalive-ping", "action": "ping"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:44:25,900 DEBUG client - event = data_received(<7 bytes>) 2021-08-16 22:44:25,900 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#pong","id":"keepalive-ping"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:44:36,067 DEBUG client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'\xee\x9d\xea2', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:44:36,124 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:44:36,124 DEBUG client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'\xee\x9d\xea2', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:44:36,124 DEBUG client - received solicited pong: ee9dea32 2021-08-16 22:44:55,836 DEBUG Sending keepalive ping 2021-08-16 22:44:55,836 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#ping", "id": "keepalive-ping", "action": "ping"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:44:55,906 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:44:55,906 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#pong","id":"keepalive-ping"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:44:56,109 DEBUG Requesting update for GeAppliance(D828C93ADB81) (ErdApplianceType.PORTABLE_AIR_CONDITIONER) 2021-08-16 22:44:56,109 DEBUG Requesting update for client D828C93ADB81 2021-08-16 22:44:56,109 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#api", "action": "api", "host": "api.brillion.geappliances.com", "method": "GET", "path": "/v1/appliance/D828C93ADB81/erd", "id": "D828C93ADB81-allErd"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:44:56,110 DEBUG client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'S\xf5 (', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:44:56,270 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:44:56,270 DEBUG client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'S\xf5 (', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:44:56,270 DEBUG client - received solicited pong: 53f52028 2021-08-16 22:44:58,007 DEBUG client - event = data_received(<24 bytes>) 2021-08-16 22:44:58,007 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#api","id":"D828C93ADB81-allErd","request":{"host":"api.brillion.geappliances.com","method":"GET","path":"/v1/appliance/D828C93ADB81/erd"},"success":true,"code":200,"body":{"kind":"appliance#erdList","userId":"ih27f273459ubyd","applianceId":"D828C93ADB81","items":[{"erd":"0x0001","value":"0A415057413132595A4257000000000000000000000000000000000000000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0002","value":"0000000000000000000000000000000000000000000000000000000000000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0007","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0008","value":"16","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0035","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0099","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0100","value":"00000B27","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0101","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0102","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0103","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0104","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0105","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7003","value":"0040","time":"2021-08-15T10:03:55.858Z"},{"erd":"0x7A00","value":"02","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7A01","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7A02","value":"46","time":"2021-08-17T03:49:43.938Z"},{"erd":"0x7A0F","value":"00","time":"2021-08-17T01:41:27.350Z"},{"erd":"0x7B00","value":"02","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7B0B","value":"0E","time":"2021-08-14T22:00:40.854Z"}]}}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:45:16,276 DEBUG client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'\x03J0\x03', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:45:16,336 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:45:16,336 DEBUG client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'\x03J0\x03', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:45:16,337 DEBUG client - received solicited pong: 034a3003 2021-08-16 22:45:25,848 DEBUG Sending keepalive ping 2021-08-16 22:45:25,848 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#ping", "id": "keepalive-ping", "action": "ping"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:45:25,920 DEBUG client - event = data_received(<7 bytes>) 2021-08-16 22:45:25,921 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#pong","id":"keepalive-ping"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:45:36,346 DEBUG client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'\xbe:\xd2\xfc', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:45:36,401 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:45:36,401 DEBUG client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'\xbe:\xd2\xfc', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:45:36,402 DEBUG client - received solicited pong: be3ad2fc 2021-08-16 22:45:55,870 DEBUG Sending keepalive ping 2021-08-16 22:45:55,870 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#ping", "id": "keepalive-ping", "action": "ping"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:45:55,945 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:45:55,945 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#pong","id":"keepalive-ping"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:45:56,109 DEBUG Requesting update for GeAppliance(D828C93ADB81) (ErdApplianceType.PORTABLE_AIR_CONDITIONER) 2021-08-16 22:45:56,109 DEBUG Requesting update for client D828C93ADB81 2021-08-16 22:45:56,109 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#api", "action": "api", "host": "api.brillion.geappliances.com", "method": "GET", "path": "/v1/appliance/D828C93ADB81/erd", "id": "D828C93ADB81-allErd"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:45:56,332 DEBUG client - event = data_received(<24 bytes>) 2021-08-16 22:45:56,332 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#api","id":"D828C93ADB81-allErd","request":{"host":"api.brillion.geappliances.com","method":"GET","path":"/v1/appliance/D828C93ADB81/erd"},"success":true,"code":200,"body":{"kind":"appliance#erdList","userId":"ih27f273459ubyd","applianceId":"D828C93ADB81","items":[{"erd":"0x0001","value":"0A415057413132595A4257000000000000000000000000000000000000000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0002","value":"0000000000000000000000000000000000000000000000000000000000000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0007","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0008","value":"16","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0035","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0099","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0100","value":"00000B27","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0101","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0102","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0103","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0104","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0105","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7003","value":"0040","time":"2021-08-15T10:03:55.858Z"},{"erd":"0x7A00","value":"02","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7A01","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7A02","value":"46","time":"2021-08-17T03:49:43.938Z"},{"erd":"0x7A0F","value":"00","time":"2021-08-17T01:41:27.350Z"},{"erd":"0x7B00","value":"02","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7B0B","value":"0E","time":"2021-08-14T22:00:40.854Z"}]}}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:45:56,412 DEBUG client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'3\xd8\xc5\xb0', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:45:56,466 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:45:56,467 DEBUG client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'3\xd8\xc5\xb0', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:45:56,467 DEBUG client - received solicited pong: 33d8c5b0 2021-08-16 22:46:16,468 DEBUG client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'<\xadl\x8e', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:46:16,522 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:46:16,523 DEBUG client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'<\xadl\x8e', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:46:16,523 DEBUG client - received solicited pong: 3cad6c8e 2021-08-16 22:46:25,877 DEBUG Sending keepalive ping 2021-08-16 22:46:25,877 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#ping", "id": "keepalive-ping", "action": "ping"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:46:25,950 DEBUG client - event = data_received(<7 bytes>) 2021-08-16 22:46:25,951 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#pong","id":"keepalive-ping"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:46:36,539 DEBUG client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'\x9c\xcc\x0e1', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:46:36,593 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:46:36,593 DEBUG client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'\x9c\xcc\x0e1', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:46:36,594 DEBUG client - received solicited pong: 9ccc0e31 2021-08-16 22:46:55,878 DEBUG Sending keepalive ping 2021-08-16 22:46:55,878 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#ping", "id": "keepalive-ping", "action": "ping"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:46:55,950 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:46:55,950 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#pong","id":"keepalive-ping"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:46:56,118 DEBUG Requesting update for GeAppliance(D828C93ADB81) (ErdApplianceType.PORTABLE_AIR_CONDITIONER) 2021-08-16 22:46:56,118 DEBUG Requesting update for client D828C93ADB81 2021-08-16 22:46:56,118 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#api", "action": "api", "host": "api.brillion.geappliances.com", "method": "GET", "path": "/v1/appliance/D828C93ADB81/erd", "id": "D828C93ADB81-allErd"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:46:56,318 DEBUG client - event = data_received(<24 bytes>) 2021-08-16 22:46:56,318 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#api","id":"D828C93ADB81-allErd","request":{"host":"api.brillion.geappliances.com","method":"GET","path":"/v1/appliance/D828C93ADB81/erd"},"success":true,"code":200,"body":{"kind":"appliance#erdList","userId":"ih27f273459ubyd","applianceId":"D828C93ADB81","items":[{"erd":"0x0001","value":"0A415057413132595A4257000000000000000000000000000000000000000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0002","value":"0000000000000000000000000000000000000000000000000000000000000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0007","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0008","value":"16","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0035","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0099","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0100","value":"00000B27","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0101","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0102","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0103","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0104","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0105","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7003","value":"0040","time":"2021-08-15T10:03:55.858Z"},{"erd":"0x7A00","value":"02","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7A01","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7A02","value":"46","time":"2021-08-17T03:49:43.938Z"},{"erd":"0x7A0F","value":"00","time":"2021-08-17T01:41:27.350Z"},{"erd":"0x7B00","value":"02","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7B0B","value":"0E","time":"2021-08-14T22:00:40.854Z"}]}}', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:46:56,596 DEBUG client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'@\xd53{', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:46:56,650 DEBUG client - event = data_received(<6 bytes>) 2021-08-16 22:46:56,650 DEBUG client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'@\xd53{', rsv1=False, rsv2=False, rsv3=False) 2021-08-16 22:46:56,651 DEBUG client - received solicited pong: 40d5337b

simbaja commented 3 years ago

Thanks for this! Good news is that it looks like (at least for your unit) that there are no additional codes to identify and that it probably works similarly to the other A/C units. I should be able to get this into the dev branch pretty quickly and we can see how it works in HA.

LuddyR commented 3 years ago

Exciting! Hope to see it soon, tag me whenever you need me to test it. 👍🙌

simbaja commented 3 years ago

I think I pretty much have the support built into the HA component. One thing I'd like to double check though is metric units. Can you put your device into metric (celsius) and then re-run the example? I would only need the log up until here:

2021-08-16 22:42:56,314 DEBUG Got initial appliance type for GeAppliance(D828C93ADB81)

(basically need the erd values settings). It looks like the portable AC is very close to the split AC, but the split AC was essentially hardcoded internally to only use imperial units. So, just want to make sure I understand the behavior of these units. Thanks for the help!

simbaja commented 3 years ago

OK, initial HA support has been added to the latest pre-release in the other repository (v0.4.3-dev4). Once you confirm the imperial/metric behavior, I think I can finalize it. Let me know how it looks for you.

LuddyR commented 3 years ago

The imperial/metric setting doesn't work in the native GE Appliances app, it briefly shows the metric readout then switches itself back to imperial. I ran the websocket_example.py script while parked on the settings page with the setting on metric but it still shows imperial for the TEMPERATURE_UNIT.

The AC unit itself does ding though when toggling the metric/imperial switch, indicating somekind of connectivity working there. It just doesn't change it on the AC unit display itself.

Looked at the manuals for the unit, it shows nothing for being able to switch between imperial and metric on the unit itself physically. Nothing obvious on it that could do it.

Also I just read over your last comment mentioning the hardcoding of imperial values, I think that's what is going on here too.

Here's the log anyways, with the AC unit running and after I switched the toggle, to make it ding. Maybe it will have something.

I'll test the v0.4.3-dev4 release shortly!

2021-08-17 20:52:38,792 DEBUG Getting OAuth2 token 2021-08-17 20:52:38,810 DEBUG Client changed state: GeClientState.INITIALIZING to GeClientState.AUTHORIZING_OAUTH 2021-08-17 20:52:40,605 DEBUG Getting WS credentials 2021-08-17 20:52:40,606 DEBUG Client changed state: GeClientState.AUTHORIZING_OAUTH to GeClientState.AUTHORIZING_CLIENT 2021-08-17 20:52:40,798 INFO Starting GE Appliances client 2021-08-17 20:52:40,820 DEBUG Client changed state: GeClientState.AUTHORIZING_CLIENT to GeClientState.CONNECTING 2021-08-17 20:52:40,903 DEBUG client - state = CONNECTING 2021-08-17 20:52:41,030 DEBUG client - event = connection_made(<asyncio.sslproto._SSLProtocolTransport object at 0x000001D3B246B700>) 2021-08-17 20:52:41,031 DEBUG client > GET /?access_token=ue1cpbcfstcb4z6uo4y3y0yysrqohv0m HTTP/1.1 2021-08-17 20:52:41,031 DEBUG client > Headers([('Host', 'ws-us-east-1.brillion.geappliances.com'), ('Upgrade', 'websocket'), ('Connection', 'Upgrade'), ('Sec-WebSocket-Key', '+MTUUUQ0CTYF3GiQGCJeHQ=='), ('Sec-WebSocket-Version', '13'), ('Sec-WebSocket-Extensions', 'permessage-deflate; client_max_window_bits'), ('User-Agent', 'Python/3.9 websockets/9.1')]) 2021-08-17 20:52:41,288 DEBUG client - event = data_received(<212 bytes>) 2021-08-17 20:52:41,289 DEBUG client < HTTP/1.1 101 Switching Protocols 2021-08-17 20:52:41,289 DEBUG client < Headers([('Date', 'Wed, 18 Aug 2021 02:52:41 GMT'), ('Connection', 'upgrade'), ('upgrade', 'websocket'), ('sec-websocket-accept', 'zdN7P5kgQqEypYGwXYYzLYigkiE='), ('sec-websocket-extensions', 'permessage-deflate')]) 2021-08-17 20:52:41,290 DEBUG client - state = OPEN 2021-08-17 20:52:41,291 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#subscribe", "action": "subscribe", "resources": ["/appliance//erd/"]}', rsv1=False, rsv2=False, rsv3=False) 2021-08-17 20:52:41,291 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#api", "action": "api", "host": "api.brillion.geappliances.com", "method": "GET", "path": "/v1/appliance", "id": "List-appliances"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-17 20:52:41,292 DEBUG Client changed state: GeClientState.CONNECTING to GeClientState.CONNECTED 2021-08-17 20:52:41,393 DEBUG client - event = data_received(<49 bytes>) 2021-08-17 20:52:41,394 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#subscribe","success":true}', rsv1=False, rsv2=False, rsv3=False) 2021-08-17 20:52:41,530 DEBUG client - event = data_received(<16 bytes>) 2021-08-17 20:52:41,530 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#connect","success":true}', rsv1=False, rsv2=False, rsv3=False) 2021-08-17 20:52:41,628 DEBUG client - event = data_received(<263 bytes>) 2021-08-17 20:52:41,628 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#api","id":"List-appliances","request":{"host":"api.brillion.geappliances.com","method":"GET","path":"/v1/appliance"},"success":true,"code":200,"body":{"kind":"appliance#applianceList","userId":"ih27f273459ubyd","items":[{"applianceId":"D828C93ADB81","type":"Portable AC","brand":"Unknown","jid":"d828c93adb81_ih27f273459ubyd","nickname":"Portable AC","online":"ONLINE","onlineTime":"2021-08-14T21:58:35.000Z"}]}}', rsv1=False, rsv2=False, rsv3=False) 2021-08-17 20:52:41,629 DEBUG D828C93ADB81 marked available 2021-08-17 20:52:41,629 DEBUG Adding appliance D828C93ADB81 2021-08-17 20:52:41,629 DEBUG Requesting update for client D828C93ADB81 2021-08-17 20:52:41,630 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#api", "action": "api", "host": "api.brillion.geappliances.com", "method": "GET", "path": "/v1/appliance/D828C93ADB81/erd", "id": "D828C93ADB81-allErd"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-17 20:52:41,631 DEBUG Requesting features for client D828C93ADB81 2021-08-17 20:52:41,631 DEBUG client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind": "websocket#api", "action": "api", "host": "api.brillion.geappliances.com", "method": "GET", "path": "/v1/appliance/D828C93ADB81/feature", "id": "Request-features"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-17 20:52:41,631 DEBUG Registering update callback for GeAppliance(D828C93ADB81) (Unknown Type) 2021-08-17 20:52:41,875 DEBUG client - event = data_received(<52 bytes>) 2021-08-17 20:52:41,875 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"resource":"/appliance//erd/","kind":"websocket#subscription","success":true,"change":"ADDED"}', rsv1=False, rsv2=False, rsv3=False) 2021-08-17 20:52:41,878 DEBUG client - event = data_received(<235 bytes>) 2021-08-17 20:52:41,878 DEBUG client - event = data_received(<42 bytes>) 2021-08-17 20:52:41,878 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#api","id":"D828C93ADB81-allErd","request":{"host":"api.brillion.geappliances.com","method":"GET","path":"/v1/appliance/D828C93ADB81/erd"},"success":true,"code":200,"body":{"kind":"appliance#erdList","userId":"ih27f273459ubyd","applianceId":"D828C93ADB81","items":[{"erd":"0x0001","value":"0A415057413132595A4257000000000000000000000000000000000000000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0002","value":"0000000000000000000000000000000000000000000000000000000000000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0007","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0008","value":"16","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0035","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0099","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0100","value":"00000B27","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0101","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0102","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0103","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0104","value":"00000000","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x0105","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7003","value":"0040","time":"2021-08-15T10:03:55.858Z"},{"erd":"0x7A00","value":"02","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7A01","value":"00","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7A02","value":"44","time":"2021-08-17T05:35:45.814Z"},{"erd":"0x7A0F","value":"01","time":"2021-08-18T02:50:50.492Z"},{"erd":"0x7B00","value":"02","time":"2021-08-14T22:00:40.854Z"},{"erd":"0x7B0B","value":"0E","time":"2021-08-14T22:00:40.854Z"}]}}', rsv1=False, rsv2=False, rsv3=False) 2021-08-17 20:52:41,879 DEBUG client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"kind":"websocket#api","id":"Request-features","request":{"host":"api.brillion.geappliances.com","method":"GET","path":"/v1/appliance/D828C93ADB81/feature"},"success":true,"code":200,"body":{"kind":"appliance#applianceFeature","userId":"ih27f273459ubyd","applianceId":"D828C93ADB81","features":[]}}', rsv1=False, rsv2=False, rsv3=False) 2021-08-17 20:52:41,880 DEBUG Setting ErdCode.MODEL_NUMBER to APWA12YZBW 2021-08-17 20:52:41,880 DEBUG Setting ErdCode.SERIAL_NUMBER to 2021-08-17 20:52:41,880 DEBUG Setting ErdCode.TEMPERATURE_UNIT to ErdMeasurementUnits.IMPERIAL 2021-08-17 20:52:41,881 DEBUG Setting ErdCode.APPLIANCE_TYPE to ErdApplianceType.PORTABLE_AIR_CONDITIONER 2021-08-17 20:52:41,881 DEBUG Setting ErdCode.UNIT_TYPE to ErdUnitType.UNKNOWN 2021-08-17 20:52:41,881 DEBUG Setting ErdCode.UNKNOWN_0099 to b'\x00' 2021-08-17 20:52:41,882 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION to 0.0.11.39 2021-08-17 20:52:41,882 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE to 0.0.0.0 2021-08-17 20:52:41,883 DEBUG Setting ErdCode.ACM_UPDATING to False 2021-08-17 20:52:41,883 DEBUG Setting ErdCode.APPLIANCE_SW_VERSION to 0.0.0.0 2021-08-17 20:52:41,883 DEBUG Setting ErdCode.APPLIANCE_SW_VERSION_AVAILABLE to 0.0.0.0 2021-08-17 20:52:41,883 DEBUG Setting ErdCode.APPLIANCE_UPDATING to False 2021-08-17 20:52:41,884 DEBUG Setting ErdCode.AC_TARGET_TEMPERATURE to 64 2021-08-17 20:52:41,884 DEBUG Setting ErdCode.AC_FAN_SETTING to ErdAcFanSetting.LOW 2021-08-17 20:52:41,884 DEBUG Setting ErdCode.AC_OPERATION_MODE to ErdAcOperationMode.COOL 2021-08-17 20:52:41,884 DEBUG Setting ErdCode.AC_AMBIENT_TEMPERATURE to 68 2021-08-17 20:52:41,885 DEBUG Setting ErdCode.AC_POWER_STATUS to ErdOnOff.ON 2021-08-17 20:52:41,885 DEBUG Setting ErdCode.SAC_AVAILABLE_MODES to ErdSacAvailableModes(has_heat=False, has_dry=True, has_eco=False, raw_value='02') 2021-08-17 20:52:41,885 DEBUG Setting 0x7B0B to b'\x0e' 2021-08-17 20:52:41,885 DEBUG Got initial appliance type for GeAppliance(D828C93ADB81) (ErdApplianceType.PORTABLE_AIR_CONDITIONER) 2021-08-17 20:52:41,886 DEBUG Appliance state change detected in GeAppliance(D828C93ADB81) (ErdApplianceType.PORTABLE_AIR_CONDITIONER). Updated keys: ErdCode.MODEL_NUMBER, ErdCode.SERIAL_NUMBER, ErdCode.TEMPERATURE_UNIT, ErdCode.APPLIANCE_TYPE, ErdCode.UNIT_TYPE, ErdCode.UNKNOWN_0099, ErdCode.WIFI_MODULE_SW_VERSION, ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE, ErdCode.ACM_UPDATING, ErdCode.APPLIANCE_SW_VERSION, ErdCode.APPLIANCE_SW_VERSION_AVAILABLE, ErdCode.APPLIANCE_UPDATING, ErdCode.AC_TARGET_TEMPERATURE, ErdCode.AC_FAN_SETTING, ErdCode.AC_OPERATION_MODE, ErdCode.AC_AMBIENT_TEMPERATURE, ErdCode.AC_POWER_STATUS, ErdCode.SAC_AVAILABLE_MODES, 0x7B0B 2021-08-17 20:52:41,886 DEBUG Appliance state change detected in GeAppliance(D828C93ADB81) (ErdApplianceType.PORTABLE_AIR_CONDITIONER) 2021-08-17 20:52:41,887 DEBUG Received features [] for D828C93ADB81

simbaja commented 3 years ago

OK, seems similar to the split A/C units then. Internally, it never switches from imperial. However, on that unit, the actual display on the unit at least switches. My guess is that they never expected that function to be needed, but had to enable it since the split units are used mainly in Europe and Asia so they kinda made it work. Thanks for confirming! I think that dev4 should be good then pending confirmation on that too.

LuddyR commented 3 years ago

It works! All functions tested...

Turning off/on Setting temp Setting mode (Dry, fan, cool) Setting fan speed!

Only weird thing is that it allows me to set the fan to auto and the temperature to ranges that the unit cannot meet. It does set the temp setting readout to red if I set it out of range though. If I set the fan to auto it just does nothing.

Other than that, it works great. Super responsive. Super cool.

simbaja commented 3 years ago

Only weird thing is that it allows me to set the fan to auto and the temperature to ranges that the unit cannot meet. It does set the temp setting readout to red if I set it out of range though. If I set the fan to auto it just does nothing.

Right now, the min/max temperatures are basically inherited from the Split A/C, which allows 60-86. For the portable units, what are the min/max temperatures allowed, is it 64-86? Also, just to confirm - there's no Auto setting for the Fan? It's just Low, Medium, and High?

LuddyR commented 3 years ago

Fan is just Low, Med and High yeah. Min-Max is 64-86 yup!

Another oddity I noticed would be that Homekit with the Climate exposed to it shows the AC of which I am able to control temperature but has no options for the fan. Perhaps that's just a limitation of Homekit/HomeAssistant though!

(Also does not show options for Fan, Cool and Dry in HomeKit but I almost guarantee myself that isn't within your control lol.)

simbaja commented 3 years ago

OK, can you give -dev5 a shot? I think the temperature ranges should be updated, and both operation mode and fan mode have been adjusted to exclude "Auto".

I'm not sure what's going on with Homekit, I'm guessing it's a limitation of some sort since I think I've got HA support done in the official way. Let me know if you see anything in some documentation that says that you have to do something special to get more than AC in Homekit and I can try to make those changes too.

LuddyR commented 3 years ago

Temperature limitations are now within spec, auto mode is gone as it should be! Perfect.

Here is two screenshots, one of my officially homekit supported thermostat for my whole home, the other of the HomeAssistant Climate integration from here. I'll look into it a bit and see if there is any way to correct this, I imagine it's not this way for just this unit too, where it lacks the controls for modes.

IMG_7020 IMG_7019

simbaja commented 3 years ago

Sounds good let me know what you find out. Hopefully, there's something simple that can be done to fully enable homekit support.

simbaja commented 3 years ago

Had a couple minutes and looked into the source for the homekit integration, and it looks like they are mapping dry and fan only all to "cool", see: https://github.com/home-assistant/core/blob/6d0ce814e79b72b13e8f2eff371e926ddba155ee/homeassistant/components/homekit/type_thermostats.py#L110

So, it looks like this might be by design and a limitation of homekit?

simbaja commented 3 years ago

Closing with the assumption that it's a HomeKit limitation, feel free to re-open if you find otherwise or if you run into any other functionality issue.