simbaja / gehome

Python SDK for GE smart appliances
MIT License
45 stars 31 forks source link

Feature Request: Add Advantium #7

Closed ChevySSinSD closed 3 years ago

ChevySSinSD commented 3 years ago

I have an Advantium, and I'm hoping to add to the gehomesdk. Here is the log file for the Advantium:

advantiumlog.txt

Also, here are the ERD codes I've been able to figure out so far: 0x0035 0x0050 - Kitchen Timer setpoint 0x5400 0x5401 - Cooking modes/status 0x5402 0x5403 - Cook time remaining 0x5404 0x5405 0x5406 0x5407 0x5408 0x5409 0x540A 0x5C12 0x5C14 0x5C18

simbaja commented 3 years ago

Can you check the latest version and see if it gets most of these? I'm still working on deciphering the control stuff (seems like 0x5402 is how changes/updates are done), but most of the others hopefully should be mapped.

warrenrees commented 3 years ago

Hi @SSinSD I just caught the other thread in ha_components and noticed that you have GFD65 gas dryer.

Would you mind joining the Unknown Laundry codes thread and maybe we could try and sort out some of the unknown dryer codes if you have some time to do some trial and error testing?

ChevySSinSD commented 3 years ago

Can you check the latest version and see if it gets most of these? I'm still working on deciphering the control stuff (seems like 0x5402 is how changes/updates are done), but most of the others hopefully should be mapped.

I just tried pip install gehomesdk -U but it says I have the latest. Do I need to clone the repository to get the latest?

warrenrees commented 3 years ago

You'll need to clone the repo and use that for testing, once we can confirm that everything is working properly and get things ironed out, we'll increment the version and publish the new version to pypi.

ChevySSinSD commented 3 years ago

Here is the full log running the latest version from github: updated.log

DEBUG Setting ErdCode.MODEL_NUMBER to ZSB9131N1SS DEBUG Setting ErdCode.SERIAL_NUMBER to HR400004L DEBUG Setting ErdCode.TEMPERATURE_UNIT to ErdMeasurementUnits.IMPERIAL DEBUG Setting ErdCode.APPLIANCE_TYPE to ErdApplianceType.ADVANTIUM DEBUG Setting ErdCode.UNIT_TYPE to ErdUnitType.TYPE_120V_MONOGRAM DEBUG Setting ErdCode.ADVANTIUM_KITCHEN_TIME_REMAINING to 0:00:00 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION to 0.0.2.68 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE to 0.0.0.0 DEBUG Setting ErdCode.APPLIANCE_UPDATING to False DEBUG Setting ErdCode.LCD_SW_VERSION to 0.0.9.9 DEBUG Setting ErdCode.LCD_SW_VERSION_AVAILABLE to 0.0.0.0 DEBUG Setting ErdCode.LCD_UPDATING to False DEBUG Setting ErdCode.END_TONE to ErdEndTone.REPEATED_BEEP DEBUG Setting ErdCode.CONVECTION_CONVERSION to False DEBUG Setting ErdCode.OVEN_MODE_MIN_MAX_TEMP to OvenRanges(lower=245, upper=450) DEBUG Setting ErdCode.UPPER_OVEN_DISPLAY_TEMPERATURE to 126 DEBUG Setting ErdCode.UPPER_OVEN_REMOTE_ENABLED to True DEBUG Setting ErdCode.MICROWAVE_RECIPE_STATUS to 0 DEBUG Setting ErdCode.ADVANTIUM_REMOTE_COOK_MODE_CONFIG to b'\x0f\x03GGEGwtw\x0b\x03\x03\x05\x00\x00\x00\x01\x00\x00\x004\xa4\x0e\x00\x0f\xd9\x06\x00\x04\x00\x00\x00' DEBUG client - state = CLOSING DEBUG client > Frame(fin=True, opcode=<Opcode.CLOSE: 8>, data=b'\x03\xe8', rsv1=False, rsv2=False, rsv3=False) DEBUG client - event = data_received(<4 bytes>) DEBUG client < Frame(fin=True, opcode=<Opcode.CLOSE: 8>, data=b'\x03\xe8', rsv1=False, rsv2=False, rsv3=False) DEBUG client - event = connection_lost(None) DEBUG client - state = CLOSED DEBUG client x code = 1000, reason = [no reason] DEBUG client x closing TCP connection INFO Unhandled exception while running client: new() missing 12 required positional arguments: 'cook_action', 'cook_mode', 'termination_reason', 'preheat_status', 'temperature', 'power_level', 'door_status', 'sensing_active', 'cooling_fan_status', 'oven_light_status', 'warm_status', and 'raw_value', ignoring and restarting DEBUG Waiting before reconnecting

simbaja commented 3 years ago

Clearly, I missed something :). I think it's with the status field, that was a bit of a pain. I'll take a look after work and update.

Actually, had a little time between calls. Can you re-pull and let me know if it works now?

ChevySSinSD commented 3 years ago

Seems to be same error with the updated files: DEBUG Setting ErdCode.MODEL_NUMBER to ZSB9131N1SS DEBUG Setting ErdCode.SERIAL_NUMBER to HR400004L DEBUG Setting ErdCode.TEMPERATURE_UNIT to ErdMeasurementUnits.IMPERIAL DEBUG Setting ErdCode.APPLIANCE_TYPE to ErdApplianceType.ADVANTIUM DEBUG Setting ErdCode.UNIT_TYPE to ErdUnitType.TYPE_120V_MONOGRAM DEBUG Setting ErdCode.ADVANTIUM_KITCHEN_TIME_REMAINING to 0:00:00 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION to 0.0.2.68 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE to 0.0.0.0 DEBUG Setting ErdCode.APPLIANCE_UPDATING to False DEBUG Setting ErdCode.LCD_SW_VERSION to 0.0.9.9 DEBUG Setting ErdCode.LCD_SW_VERSION_AVAILABLE to 0.0.0.0 DEBUG Setting ErdCode.LCD_UPDATING to False DEBUG Setting ErdCode.END_TONE to ErdEndTone.REPEATED_BEEP DEBUG Setting ErdCode.CONVECTION_CONVERSION to False DEBUG Setting ErdCode.OVEN_MODE_MIN_MAX_TEMP to OvenRanges(lower=245, upper=450) DEBUG Setting ErdCode.UPPER_OVEN_DISPLAY_TEMPERATURE to 126 DEBUG Setting ErdCode.UPPER_OVEN_REMOTE_ENABLED to True DEBUG Setting ErdCode.MICROWAVE_RECIPE_STATUS to 0 DEBUG Setting ErdCode.ADVANTIUM_REMOTE_COOK_MODE_CONFIG to b'\x0f\x03GGEGwtw\x0b\x03\x03\x05\x00\x00\x00\x01\x00\x00\x004\xa4\x0e\x00\x0f\xd9\x06\x00\x04\x00\x00\x00' DEBUG client - state = CLOSING DEBUG client > Frame(fin=True, opcode=<Opcode.CLOSE: 8>, data=b'\x03\xe8', rsv1=False, rsv2=False, rsv3=False) DEBUG client - event = data_received(<4 bytes>) DEBUG client < Frame(fin=True, opcode=<Opcode.CLOSE: 8>, data=b'\x03\xe8', rsv1=False, rsv2=False, rsv3=False) DEBUG client - event = connection_lost(None) DEBUG client - state = CLOSED DEBUG client x code = 1000, reason = [no reason] DEBUG client x closing TCP connection INFO Unhandled exception while running client: new() missing 12 required positional arguments: 'cook_action', 'cook_mode', 'termination_reason', 'preheat_status', 'temperature', 'power_level', 'door_status', 'sensing_active', 'cooling_fan_status', 'oven_light_status', 'warm_status', and 'raw_value', ignoring and restarting

simbaja commented 3 years ago

Hmm... must be going through the exception path, and I didn't fix those yet (just the main path). I just found a typo in there and updated a new version, can you check that? If it still doesn't work, we probably will need to add some debug statements in the erd_advantium_cook_status_converter.py file to figure out what's going on.

ChevySSinSD commented 3 years ago

That may have done the trick!

DEBUG Setting ErdCode.MODEL_NUMBER to ZSB9131N1SS DEBUG Setting ErdCode.SERIAL_NUMBER to HR400004L DEBUG Setting ErdCode.TEMPERATURE_UNIT to ErdMeasurementUnits.IMPERIAL DEBUG Setting ErdCode.APPLIANCE_TYPE to ErdApplianceType.ADVANTIUM DEBUG Setting ErdCode.UNIT_TYPE to ErdUnitType.TYPE_120V_MONOGRAM DEBUG Setting ErdCode.ADVANTIUM_KITCHEN_TIME_REMAINING to 0:00:00 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION to 0.0.2.68 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE to 0.0.0.0 DEBUG Setting ErdCode.APPLIANCE_UPDATING to False DEBUG Setting ErdCode.LCD_SW_VERSION to 0.0.9.9 DEBUG Setting ErdCode.LCD_SW_VERSION_AVAILABLE to 0.0.0.0 DEBUG Setting ErdCode.LCD_UPDATING to False DEBUG Setting ErdCode.END_TONE to ErdEndTone.REPEATED_BEEP DEBUG Setting ErdCode.CONVECTION_CONVERSION to False DEBUG Setting ErdCode.OVEN_MODE_MIN_MAX_TEMP to OvenRanges(lower=245, upper=450) DEBUG Setting ErdCode.UPPER_OVEN_DISPLAY_TEMPERATURE to 140 DEBUG Setting ErdCode.UPPER_OVEN_REMOTE_ENABLED to True DEBUG Setting ErdCode.MICROWAVE_RECIPE_STATUS to 0 DEBUG Setting ErdCode.ADVANTIUM_REMOTE_COOK_MODE_CONFIG to b'\x0f\x03GGEGwtw\x0b\x03\x03\x05\x00\x00\x00\x01\x00\x00\x004\xa4\x0e\x00\x0f\xd9\x06\x00\x04\x00\x00\x00' DEBUG Setting ErdCode.ADVANTIUM_COOK_STATUS to ErdAdvantiumCookStatus(cook_action=<CookAction.STOP: (0,)>, cook_mode=<CookMode.NO_MODE: (0,)>, termination_reason=<TerminationReason.UNKNOWN: (0,)>, preheat_status=<PreheatStatus.NO_PREHEAT: (0,)>, temperature=0, power_level=0, door_status=<DoorStatus.CLOSED: 1>, sensing_active=<SensingActive.INACTIVE: (0,)>, cooling_fan_status=<CoolingFanStatus.OFF: 0>, oven_light_status=<OvenLightStatus.OFF: 0>, warm_status=<WarmStatus.OFF: (0,)>, raw_value=None) DEBUG Setting ErdCode.ADVANTIUM_COOK_CONTROL to b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_REMAINING to 0:00:00 DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_ADJUST to 0 DEBUG client - state = CLOSING

simbaja commented 3 years ago

Hmm... it may/may not have worked. It looks like it picked an error path, so I think I still have it wrong. In erd_advantium_cook_status_converter.py, on line 16, can you put in debug line that print out the "value", "values", and "int_values" variables? I'm thinking I need to do a conversion there, but want to manually decode to confirm.

ChevySSinSD commented 3 years ago

edited with fixes: I added the following to erd_advantium_cook_status_converter.py

int_values_list = list(int_values)
_LOGGER.debug(f'value: {value}, values: {values}, int_values: {int_values_list}')

Here are the results: DEBUG Setting ErdCode.ADVANTIUM_REMOTE_COOK_MODE_CONFIG to b'\x0f\x03GGEGwtw\x0b\x03\x03\x05\x00\x00\x00\x01\x00\x00\x004\xa4\x0e\x00\x0f\xd9\x06\x00\x04\x00\x00\x00' DEBUG value: 7F00000100000000000A000100000000, values: ['7F', '00', '00', '01', '00', '00', '00', '00', '00', '0A', '00', '01', '00', '00', '00', '00'], int_values: [127, 0, 0, 1, 0, 0, 0, 0, 0, 10, 0, 1, 0, 0, 0, 0] DEBUG Setting ErdCode.ADVANTIUM_COOK_STATUS to ErdAdvantiumCookStatus(cook_action=<CookAction.STOP: (0,)>, cook_mode=<CookMode.NO_MODE: (0,)>, termination_reason=<TerminationReason.UNKNOWN: (0,)>, preheat_status=<PreheatStatus.NO_PREHEAT: (0,)>, temperature=0, power_level=0, door_status=<DoorStatus.CLOSED: 1>, sensing_active=<SensingActive.INACTIVE: (0,)>, cooling_fan_status=<CoolingFanStatus.OFF: 0>, oven_light_status=<OvenLightStatus.OFF: 0>, warm_status=<WarmStatus.OFF: (0,)>, raw_value=None) DEBUG value: 7F00000100000000000A000100000000, values: ['7F', '00', '00', '01', '00', '00', '00', '00', '00', '0A', '00', '01', '00', '00', '00', '00'], int_values: [127, 0, 0, 1, 0, 0, 0, 0, 0, 10, 0, 1, 0, 0, 0, 0] DEBUG Setting ErdCode.ADVANTIUM_COOK_CONTROL to b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_REMAINING to 0:00:00 DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_ADJUST to 0 DEBUG client - state = CLOSING

simbaja commented 3 years ago

I think it was that I forgot to convert the map -> list (you had the raw value in your original message which clued me into my mistake), and your edit essentially did that conversion too. Can you give the newest pull a shot and hopefully it converts it ok.

ChevySSinSD commented 3 years ago

With latest pull:

DEBUG Setting ErdCode.MODEL_NUMBER to ZSB9131N1SS DEBUG Setting ErdCode.SERIAL_NUMBER to HR400004L DEBUG Setting ErdCode.TEMPERATURE_UNIT to ErdMeasurementUnits.IMPERIAL DEBUG Setting ErdCode.APPLIANCE_TYPE to ErdApplianceType.ADVANTIUM DEBUG Setting ErdCode.UNIT_TYPE to ErdUnitType.TYPE_120V_MONOGRAM DEBUG Setting ErdCode.ADVANTIUM_KITCHEN_TIME_REMAINING to 0:00:00 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION to 0.0.2.68 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE to 0.0.0.0 DEBUG Setting ErdCode.APPLIANCE_UPDATING to False DEBUG Setting ErdCode.LCD_SW_VERSION to 0.0.9.9 DEBUG Setting ErdCode.LCD_SW_VERSION_AVAILABLE to 0.0.0.0 DEBUG Setting ErdCode.LCD_UPDATING to False DEBUG Setting ErdCode.END_TONE to ErdEndTone.REPEATED_BEEP DEBUG Setting ErdCode.CONVECTION_CONVERSION to False DEBUG Setting ErdCode.OVEN_MODE_MIN_MAX_TEMP to OvenRanges(lower=245, upper=450) DEBUG Setting ErdCode.UPPER_OVEN_DISPLAY_TEMPERATURE to 140 DEBUG Setting ErdCode.UPPER_OVEN_REMOTE_ENABLED to True DEBUG Setting ErdCode.MICROWAVE_RECIPE_STATUS to 0 DEBUG Setting ErdCode.ADVANTIUM_REMOTE_COOK_MODE_CONFIG to b'\x0f\x03GGEGwtw\x0b\x03\x03\x05\x00\x00\x00\x01\x00\x00\x004\xa4\x0e\x00\x0f\xd9\x06\x00\x04\x00\x00\x00' DEBUG Setting ErdCode.ADVANTIUM_COOK_STATUS to ErdAdvantiumCookStatus(cook_action=<CookAction.STOP: (0,)>, cook_mode=<CookMode.NO_MODE: (0,)>, termination_reason=<TerminationReason.UNKNOWN: (0,)>, preheat_status=<PreheatStatus.NO_PREHEAT: (0,)>, temperature=0, power_level=0, door_status=<DoorStatus.CLOSED: 1>, sensing_active=<SensingActive.INACTIVE: (0,)>, cooling_fan_status=<CoolingFanStatus.OFF: 0>, oven_light_status=<OvenLightStatus.OFF: 0>, warm_status=<WarmStatus.OFF: (0,)>, raw_value=None) DEBUG Setting ErdCode.ADVANTIUM_COOK_CONTROL to b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_REMAINING to 0:00:00 DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_ADJUST to 0 DEBUG client - state = CLOSING DEBUG client > Frame(fin=True, opcode=<Opcode.CLOSE: 8>, data=b'\x03\xe8', rsv1=False, rsv2=False, rsv3=False) DEBUG client - event = data_received(<4 bytes>) DEBUG client < Frame(fin=True, opcode=<Opcode.CLOSE: 8>, data=b'\x03\xe8', rsv1=False, rsv2=False, rsv3=False) DEBUG client - event = connection_lost(None) DEBUG client - state = CLOSED DEBUG client x code = 1000, reason = [no reason] DEBUG client x closing TCP connection INFO Unhandled exception while running client: 'ascii' codec can't decode byte 0xd8 in position 0: ordinal not in range(128), ignoring and restarting DEBUG Waiting before reconnecting DEBUG Client changed state: GeClientState.CONNECTED to GeClientState.DROPPED DEBUG Client changed state: GeClientState.DROPPED to GeClientState.WAITING

simbaja commented 3 years ago

I just added some additional debugging to the exception case, hopefully it reveals the stupid mistake I probably made. I also changed the data type for precision version based on the above log - apparently it's not a string (or at least not an ascii one). Hopefully we can figure out what's going on here and resolve it.

I also hopefully got the remote config deciphered, but we'll see what it generates in your next log.

ChevySSinSD commented 3 years ago

I get the following error when attempting to run websocket_example with the latest pull:

$ python3 websocket_example.py Traceback (most recent call last): File "websocket_example.py", line 16, in from gehomesdk import ( File "/usr/local/lib/python3.8/dist-packages/gehomesdk/init.py", line 6, in from .clients import File "/usr/local/lib/python3.8/dist-packages/gehomesdk/clients/init.py", line 17, in from .base_client import GeBaseClient File "/usr/local/lib/python3.8/dist-packages/gehomesdk/clients/base_client.py", line 12, in from ..erd import ErdCode, ErdCodeType File "/usr/local/lib/python3.8/dist-packages/gehomesdk/erd/init.py", line 3, in from .values import File "/usr/local/lib/python3.8/dist-packages/gehomesdk/erd/values/init.py", line 8, in from .advantium import * File "/usr/local/lib/python3.8/dist-packages/gehomesdk/erd/values/advantium/init.py", line 6, in from .erd_advantium_remote_cook_mode_config import ErdAdvantiumRemoteCookModeConfig File "/usr/local/lib/python3.8/dist-packages/gehomesdk/erd/values/advantium/erd_advantium_remote_cook_mode_config.py", line 6, in class ErdAdvantiumRemoteCookModeConfig: File "/usr/lib/python3.8/dataclasses.py", line 1011, in wrap return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen) File "/usr/lib/python3.8/dataclasses.py", line 925, in _process_class _init_fn(flds, File "/usr/lib/python3.8/dataclasses.py", line 502, in _init_fn raise TypeError(f'non-default argument {f.name!r} ' TypeError: non-default argument 'raw_value' follows default argument

simbaja commented 3 years ago

I guess that's what I get for doing it in a hurry :). Should be fixed.

ChevySSinSD commented 3 years ago

Latest output:

2021-06-16 07:21:17,305 DEBUG Setting ErdCode.MODEL_NUMBER to ZSB9131N1SS 2021-06-16 07:21:17,305 DEBUG Setting ErdCode.SERIAL_NUMBER to HR400004L 2021-06-16 07:21:17,305 DEBUG Setting ErdCode.TEMPERATURE_UNIT to ErdMeasurementUnits.IMPERIAL 2021-06-16 07:21:17,305 DEBUG Setting ErdCode.APPLIANCE_TYPE to ErdApplianceType.ADVANTIUM 2021-06-16 07:21:17,305 DEBUG Setting ErdCode.UNIT_TYPE to ErdUnitType.TYPE_120V_MONOGRAM 2021-06-16 07:21:17,305 DEBUG Setting ErdCode.ADVANTIUM_KITCHEN_TIME_REMAINING to 0:00:00 2021-06-16 07:21:17,305 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION to 0.0.2.68 2021-06-16 07:21:17,306 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE to 0.0.0.0 2021-06-16 07:21:17,306 DEBUG Setting ErdCode.APPLIANCE_UPDATING to False 2021-06-16 07:21:17,306 DEBUG Setting ErdCode.LCD_SW_VERSION to 0.0.9.9 2021-06-16 07:21:17,306 DEBUG Setting ErdCode.LCD_SW_VERSION_AVAILABLE to 0.0.0.0 2021-06-16 07:21:17,306 DEBUG Setting ErdCode.LCD_UPDATING to False 2021-06-16 07:21:17,306 DEBUG Setting ErdCode.END_TONE to ErdEndTone.REPEATED_BEEP 2021-06-16 07:21:17,306 DEBUG Setting ErdCode.CONVECTION_CONVERSION to False 2021-06-16 07:21:17,306 DEBUG Setting ErdCode.OVEN_MODE_MIN_MAX_TEMP to OvenRanges(lower=245, upper=450) 2021-06-16 07:21:17,306 DEBUG Setting ErdCode.UPPER_OVEN_DISPLAY_TEMPERATURE to 140 2021-06-16 07:21:17,306 DEBUG Setting ErdCode.UPPER_OVEN_REMOTE_ENABLED to True 2021-06-16 07:21:17,307 DEBUG Setting ErdCode.MICROWAVE_RECIPE_STATUS to 0 2021-06-16 07:21:17,307 ERROR Could not construct remote cook mode config, using default. Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/gehomesdk/erd/converters/advantium/erd_advantium_remote_cook_mode_config_converter.py", line 18, in erd_decode return ErdAdvantiumRemoteCookModeConfig(values, value) File "/usr/local/lib/python3.8/dist-packages/gehomesdk/erd/values/advantium/erd_advantium_remote_cook_mode_config.py", line 50, in init self.check_convection_bake(values[0]) File "/usr/local/lib/python3.8/dist-packages/gehomesdk/erd/values/advantium/erd_advantium_remote_cook_mode_config.py", line 70, in check_convection_bake self.convection_bake_enable = value & 1 == 1 TypeError: unsupported operand type(s) for &: 'str' and 'int' 2021-06-16 07:21:17,307 DEBUG client - state = CLOSING 2021-06-16 07:21:17,307 DEBUG client > Frame(fin=True, opcode=<Opcode.CLOSE: 8>, data=b'\x03\xe8', rsv1=False, rsv2=False, rsv3=False) 2021-06-16 07:21:17,346 DEBUG client - event = data_received(<4 bytes>) 2021-06-16 07:21:17,346 DEBUG client < Frame(fin=True, opcode=<Opcode.CLOSE: 8>, data=b'\x03\xe8', rsv1=False, rsv2=False, rsv3=False) 2021-06-16 07:21:17,347 DEBUG client - event = connection_lost(None) 2021-06-16 07:21:17,347 DEBUG client - state = CLOSED 2021-06-16 07:21:17,347 DEBUG client x code = 1000, reason = [no reason] 2021-06-16 07:21:17,348 DEBUG client x closing TCP connection 2021-06-16 07:21:17,348 INFO Unhandled exception while running client: 'NoneType' object is not subscriptable, ignoring and restarting 2021-06-16 07:21:17,349 DEBUG Waiting before reconnecting 2021-06-16 07:21:17,349 DEBUG Client changed state: GeClientState.CONNECTED to GeClientState.DROPPED 2021-06-16 07:21:17,349 DEBUG Client changed state: GeClientState.DROPPED to GeClientState.WAITING

simbaja commented 3 years ago

Again, too much hurrying, not enough testing... I'll have to write some test cases to prevent this kind of stuff go forward... hopefully that's the last of my stupid errors.

ChevySSinSD commented 3 years ago

Some progress with the latest, thanks again for all of this!

2021-06-16 07:43:20,827 DEBUG Setting ErdCode.MODEL_NUMBER to ZSB9131N1SS 2021-06-16 07:43:20,827 DEBUG Setting ErdCode.SERIAL_NUMBER to HR400004L 2021-06-16 07:43:20,827 DEBUG Setting ErdCode.TEMPERATURE_UNIT to ErdMeasurementUnits.IMPERIAL 2021-06-16 07:43:20,827 DEBUG Setting ErdCode.APPLIANCE_TYPE to ErdApplianceType.ADVANTIUM 2021-06-16 07:43:20,827 DEBUG Setting ErdCode.UNIT_TYPE to ErdUnitType.TYPE_120V_MONOGRAM 2021-06-16 07:43:20,827 DEBUG Setting ErdCode.ADVANTIUM_KITCHEN_TIME_REMAINING to 0:00:00 2021-06-16 07:43:20,828 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION to 0.0.2.68 2021-06-16 07:43:20,828 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE to 0.0.0.0 2021-06-16 07:43:20,828 DEBUG Setting ErdCode.APPLIANCE_UPDATING to False 2021-06-16 07:43:20,828 DEBUG Setting ErdCode.LCD_SW_VERSION to 0.0.9.9 2021-06-16 07:43:20,829 DEBUG Setting ErdCode.LCD_SW_VERSION_AVAILABLE to 0.0.0.0 2021-06-16 07:43:20,829 DEBUG Setting ErdCode.LCD_UPDATING to False 2021-06-16 07:43:20,829 DEBUG Setting ErdCode.END_TONE to ErdEndTone.REPEATED_BEEP 2021-06-16 07:43:20,829 DEBUG Setting ErdCode.CONVECTION_CONVERSION to False 2021-06-16 07:43:20,829 DEBUG Setting ErdCode.OVEN_MODE_MIN_MAX_TEMP to OvenRanges(lower=245, upper=450) 2021-06-16 07:43:20,829 DEBUG Setting ErdCode.UPPER_OVEN_DISPLAY_TEMPERATURE to 140 2021-06-16 07:43:20,830 DEBUG Setting ErdCode.UPPER_OVEN_REMOTE_ENABLED to True 2021-06-16 07:43:20,830 DEBUG Setting ErdCode.MICROWAVE_RECIPE_STATUS to 0 2021-06-16 07:43:20,830 DEBUG Setting ErdCode.ADVANTIUM_REMOTE_COOK_MODE_CONFIG to ErdAdvantiumRemoteCookModeConfig(microwave_staged_time_enable=True, microwave_staged_temp_enable=True, microwave_slow_cook_time_enable=True, microwave_slow_cook_temp_enable=False, precision_cook_time_enable=True, precision_cook_temp_enable=False, precision_cook_staged_time_enable=True, precision_cook_staged_temp_enable=False, precision_cook_custom_time_enable=True, precision_cook_custom_temp_enable=False, precision_cook_custom_upper_heater_enable=True, precision_cook_custom_lower_heater_enable=True, precision_cook_custom_microwave_enable=True, precision_cook_custom_convection_enable=False, warm_enable=True, warm_time_enable=False, warm_temp_enable=True, proof_enable=True, proof_time_enable=False, proof_temp_enable=False, toast_enable=True, toast_time_enable=False, toast_temp_enable=False, steam_clean_time_enable=True, steam_clean_temp_enable=False, convection_bake_enable=True, convection_bake_time_enable=True, convection_bake_temp_enable=True, broil_enable=True, broil_time_enable=False, broil_temp_enable=False, microwave_time_enable=True, microwave_temp_enable=False, microwave_sensor_time_enable=True, microwave_sensor_temp_enable=False, raw_value='0F03474745477774770B0303050000000100000034A40E000FD9060004000000') 2021-06-16 07:43:20,830 ERROR Could not construct cook status, using default. ValueError: 0 is not a valid CookAction

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/gehomesdk/erd/converters/advantium/erd_advantium_cook_status_converter.py", line 21, in erd_decode cook_action = CookAction(int_values[1]), File "/usr/lib/python3.8/enum.py", line 309, in call return cls.new(cls, value) File "/usr/lib/python3.8/enum.py", line 600, in new raise exc File "/usr/lib/python3.8/enum.py", line 584, in new result = cls.missing(value) File "/usr/lib/python3.8/enum.py", line 613, in missing raise ValueError("%r is not a valid %s" % (value, cls.name)) ValueError: 0 is not a valid CookAction 2021-06-16 07:43:20,834 DEBUG Setting ErdCode.ADVANTIUM_COOK_STATUS to ErdAdvantiumCookStatus(cook_action=<CookAction.STOP: (0,)>, cook_mode=<CookMode.NO_MODE: (0,)>, termination_reason=<TerminationReason.UNKNOWN: (0,)>, preheat_status=<PreheatStatus.NO_PREHEAT: (0,)>, temperature=0, power_level=0, door_status=<DoorStatus.CLOSED: 1>, sensing_active=<SensingActive.INACTIVE: (0,)>, cooling_fan_status=<CoolingFanStatus.OFF: 0>, oven_light_status=<OvenLightStatus.OFF: 0>, warm_status=<WarmStatus.OFF: (0,)>, raw_value='7F00000100000000000A000100000000') 2021-06-16 07:43:20,834 ERROR Could not construct cook status, using default. ValueError: 0 is not a valid CookAction

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/gehomesdk/erd/converters/advantium/erd_advantium_cook_status_converter.py", line 21, in erd_decode cook_action = CookAction(int_values[1]), File "/usr/lib/python3.8/enum.py", line 309, in call return cls.new(cls, value) File "/usr/lib/python3.8/enum.py", line 600, in new raise exc File "/usr/lib/python3.8/enum.py", line 584, in new result = cls.missing(value) File "/usr/lib/python3.8/enum.py", line 613, in missing raise ValueError("%r is not a valid %s" % (value, cls.name)) ValueError: 0 is not a valid CookAction 2021-06-16 07:43:20,836 DEBUG Setting ErdCode.ADVANTIUM_COOK_CONTROL to b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 2021-06-16 07:43:20,836 DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_REMAINING to 0:00:00 2021-06-16 07:43:20,836 DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_ADJUST to 0 2021-06-16 07:43:20,837 DEBUG Setting ErdCode.ADVANTIUM_PRECISIONVERSION to b'\xd8\x1e\xb1\xd7@\x07\x9at\x82\xc7\x15\xbc\xadF\xbes\x11q\xfe\xf4@2\xed\xd5\xe9n\x0f\x1d\xbf.\xf7' 2021-06-16 07:43:20,837 DEBUG Setting ErdCode.ADVANTIUM_UNKNOWN03 to 4294901761 2021-06-16 07:43:20,837 DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_MIN_MAX to ErdAdvantiumCookTimeMinMax(is_valid=True, convection_min_time=60, convection_max_time=10800, broil_min_time=0, broil_max_time=0, warm_min_time=0, warm_max_time=0, proof_min_time=0, proof_max_time=0, slow_cook_min_time=0, slow_cook_max_time=0, raw_value='003C2A3000000000000000000000000000000000000000000000000000000000') 2021-06-16 07:43:20,837 DEBUG Setting ErdCode.ADVANTIUM_MICROWAVE_MIN_MAX to ErdAdvantiumMicrowaveMinMax(is_valid=True, min_time=15, max_time=360, slow_cook_min_time=1, slow_cook_max_time=5940, raw_value='000F016800011734000117340001173400000000000000000000000000000000') 2021-06-16 07:43:20,837 DEBUG Setting ErdCode.ADVANTIUM_PRECISION_MIN_MAX to ErdAdvantiumPrecisionMinMax(is_valid=True, min_time=0, max_time=5940, custom_low_min_time=1, custom_low_max_time=5940, custom_high_min_time=1, custom_high_max_time=5940, raw_value='0001173400011734000117340000000000000000000000000000000000000000') 2021-06-16 07:43:20,837 DEBUG Setting 0x540A to b'\x00\x01\xa8\xc0' 2021-06-16 07:43:20,837 DEBUG Setting 0x5C12 to b'\x03\xcf' 2021-06-16 07:43:20,837 DEBUG Setting 0x5C14 to b'\x00' 2021-06-16 07:43:20,838 DEBUG Setting 0x5C18 to b'\x00\x00\x00\x00\x00\x00' 2021-06-16 07:43:20,838 DEBUG Got initial appliance type for GeAppliance(D828C9453A4C) (ErdApplianceType.ADVANTIUM) 2021-06-16 07:43:20,838 DEBUG Appliance state change detected in GeAppliance(D828C9453A4C) (ErdApplianceType.ADVANTIUM). Updated keys: ErdCode.MODEL_NUMBER, ErdCode.SERIAL_NUMBER, ErdCode.TEMPERATURE_UNIT, ErdCode.APPLIANCE_TYPE, ErdCode.UNIT_TYPE, ErdCode.ADVANTIUM_KITCHEN_TIME_REMAINING, ErdCode.WIFI_MODULE_SW_VERSION, ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE, ErdCode.APPLIANCE_UPDATING, ErdCode.LCD_SW_VERSION, ErdCode.LCD_SW_VERSION_AVAILABLE, ErdCode.LCD_UPDATING, ErdCode.END_TONE, ErdCode.CONVECTION_CONVERSION, ErdCode.OVEN_MODE_MIN_MAX_TEMP, ErdCode.UPPER_OVEN_DISPLAY_TEMPERATURE, ErdCode.UPPER_OVEN_REMOTE_ENABLED, ErdCode.MICROWAVE_RECIPE_STATUS, ErdCode.ADVANTIUM_REMOTE_COOK_MODE_CONFIG, ErdCode.ADVANTIUM_COOK_STATUS, ErdCode.ADVANTIUM_COOK_CONTROL, ErdCode.ADVANTIUM_COOK_TIME_REMAINING, ErdCode.ADVANTIUM_COOK_TIME_ADJUST, ErdCode.ADVANTIUM_PRECISION_VERSION, ErdCode.ADVANTIUM_UNKNOWN03, ErdCode.ADVANTIUM_COOK_TIME_MIN_MAX, ErdCode.ADVANTIUM_MICROWAVE_MIN_MAX, ErdCode.ADVANTIUM_PRECISION_MIN_MAX, 0x540A, 0x5C12, 0x5C14, 0x5C18 2021-06-16 07:43:20,838 DEBUG client - event = data_received(<61 bytes>) 2021-06-16 07:43:20,838 DEBUG client - event = data_received(<21 bytes>) 2021-06-16 07:43:20,838 DEBUG client - event = data_received(<52 bytes>) 2021-06-16 07:43:20,839 DEBUG Appliance state change detected in GeAppliance(D828C9453A4C) (ErdApplianceType.ADVANTIUM)

simbaja commented 3 years ago

Ok, give it one more shot - apparently the linter didn't catch that my enum definitions had commas (holdover from reverse engineering), so it was treating the enums as literals with "," at the end causing nothing to match...

ChevySSinSD commented 3 years ago

Latest pull: 2021-06-16 08:04:05,950 DEBUG Setting ErdCode.MODEL_NUMBER to ZSB9131N1SS 2021-06-16 08:04:05,950 DEBUG Setting ErdCode.SERIAL_NUMBER to HR400004L 2021-06-16 08:04:05,950 DEBUG Setting ErdCode.TEMPERATURE_UNIT to ErdMeasurementUnits.IMPERIAL 2021-06-16 08:04:05,950 DEBUG Setting ErdCode.APPLIANCE_TYPE to ErdApplianceType.ADVANTIUM 2021-06-16 08:04:05,950 DEBUG Setting ErdCode.UNIT_TYPE to ErdUnitType.TYPE_120V_MONOGRAM 2021-06-16 08:04:05,950 DEBUG Setting ErdCode.ADVANTIUM_KITCHEN_TIME_REMAINING to 0:00:00 2021-06-16 08:04:05,950 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION to 0.0.2.68 2021-06-16 08:04:05,951 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE to 0.0.0.0 2021-06-16 08:04:05,951 DEBUG Setting ErdCode.APPLIANCE_UPDATING to False 2021-06-16 08:04:05,951 DEBUG Setting ErdCode.LCD_SW_VERSION to 0.0.9.9 2021-06-16 08:04:05,951 DEBUG Setting ErdCode.LCD_SW_VERSION_AVAILABLE to 0.0.0.0 2021-06-16 08:04:05,951 DEBUG Setting ErdCode.LCD_UPDATING to False 2021-06-16 08:04:05,951 DEBUG Setting ErdCode.END_TONE to ErdEndTone.REPEATED_BEEP 2021-06-16 08:04:05,951 DEBUG Setting ErdCode.CONVECTION_CONVERSION to False 2021-06-16 08:04:05,951 DEBUG Setting ErdCode.OVEN_MODE_MIN_MAX_TEMP to OvenRanges(lower=245, upper=450) 2021-06-16 08:04:05,951 DEBUG Setting ErdCode.UPPER_OVEN_DISPLAY_TEMPERATURE to 140 2021-06-16 08:04:05,951 DEBUG Setting ErdCode.UPPER_OVEN_REMOTE_ENABLED to True 2021-06-16 08:04:05,952 DEBUG Setting ErdCode.MICROWAVE_RECIPE_STATUS to 0 2021-06-16 08:04:05,952 DEBUG Setting ErdCode.ADVANTIUM_REMOTE_COOK_MODE_CONFIG to ErdAdvantiumRemoteCookModeConfig(microwave_staged_time_enable=True, microwave_staged_temp_enable=True, microwave_slow_cook_time_enable=True, microwave_slow_cook_temp_enable=False, precision_cook_time_enable=True, precision_cook_temp_enable=False, precision_cook_staged_time_enable=True, precision_cook_staged_temp_enable=False, precision_cook_custom_time_enable=True, precision_cook_custom_temp_enable=False, precision_cook_custom_upper_heater_enable=True, precision_cook_custom_lower_heater_enable=True, precision_cook_custom_microwave_enable=True, precision_cook_custom_convection_enable=False, warm_enable=True, warm_time_enable=False, warm_temp_enable=True, proof_enable=True, proof_time_enable=False, proof_temp_enable=False, toast_enable=True, toast_time_enable=False, toast_temp_enable=False, steam_clean_time_enable=True, steam_clean_temp_enable=False, convection_bake_enable=True, convection_bake_time_enable=True, convection_bake_temp_enable=True, broil_enable=True, broil_time_enable=False, broil_temp_enable=False, microwave_time_enable=True, microwave_temp_enable=False, microwave_sensor_time_enable=True, microwave_sensor_temp_enable=False, raw_value='0F03474745477774770B0303050000000100000034A40E000FD9060004000000') 2021-06-16 08:04:05,952 DEBUG Setting ErdCode.ADVANTIUM_COOK_STATUS to ErdAdvantiumCookStatus(cook_action=<CookAction.STOP: 0>, cook_mode=<CookMode.NO_MODE: 0>, termination_reason=<TerminationReason.COOK_TIME_COMPLETE: 1>, preheat_status=<PreheatStatus.NO_PREHEAT: 0>, temperature=0, power_level=10, door_status=<DoorStatus.CLOSED: 1>, sensing_active=<SensingActive.INACTIVE: 0>, cooling_fan_status=<CoolingFanStatus.OFF: 0>, oven_light_status=<OvenLightStatus.OFF: 0>, warm_status=<WarmStatus.OFF: 0>, raw_value='7F00000100000000000A000100000000') 2021-06-16 08:04:05,952 DEBUG Setting ErdCode.ADVANTIUM_COOK_CONTROL to b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 2021-06-16 08:04:05,952 DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_REMAINING to 0:00:00 2021-06-16 08:04:05,952 DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_ADJUST to 0 2021-06-16 08:04:05,952 DEBUG Setting ErdCode.ADVANTIUM_PRECISIONVERSION to b'\xd8\x1e\xb1\xd7@\x07\x9at\x82\xc7\x15\xbc\xadF\xbes\x11q\xfe\xf4@2\xed\xd5\xe9n\x0f\x1d\xbf.\xf7' 2021-06-16 08:04:05,952 DEBUG Setting ErdCode.ADVANTIUM_UNKNOWN03 to 4294901761 2021-06-16 08:04:05,952 DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_MIN_MAX to ErdAdvantiumCookTimeMinMax(is_valid=True, convection_min_time=60, convection_max_time=10800, broil_min_time=0, broil_max_time=0, warm_min_time=0, warm_max_time=0, proof_min_time=0, proof_max_time=0, slow_cook_min_time=0, slow_cook_max_time=0, raw_value='003C2A3000000000000000000000000000000000000000000000000000000000') 2021-06-16 08:04:05,952 DEBUG Setting ErdCode.ADVANTIUM_MICROWAVE_MIN_MAX to ErdAdvantiumMicrowaveMinMax(is_valid=True, min_time=15, max_time=360, slow_cook_min_time=1, slow_cook_max_time=5940, raw_value='000F016800011734000117340001173400000000000000000000000000000000') 2021-06-16 08:04:05,953 DEBUG Setting ErdCode.ADVANTIUM_PRECISION_MIN_MAX to ErdAdvantiumPrecisionMinMax(is_valid=True, min_time=0, max_time=5940, custom_low_min_time=1, custom_low_max_time=5940, custom_high_min_time=1, custom_high_max_time=5940, raw_value='0001173400011734000117340000000000000000000000000000000000000000') 2021-06-16 08:04:05,953 DEBUG Setting 0x540A to b'\x00\x01\xa8\xc0' 2021-06-16 08:04:05,953 DEBUG Setting 0x5C12 to b'\x03\xcf' 2021-06-16 08:04:05,953 DEBUG Setting 0x5C14 to b'\x00' 2021-06-16 08:04:05,953 DEBUG Setting 0x5C18 to b'\x00\x00\x00\x00\x00\x00' 2021-06-16 08:04:05,953 DEBUG Got initial appliance type for GeAppliance(D828C9453A4C) (ErdApplianceType.ADVANTIUM) 2021-06-16 08:04:05,953 DEBUG Appliance state change detected in GeAppliance(D828C9453A4C) (ErdApplianceType.ADVANTIUM). Updated keys: ErdCode.MODEL_NUMBER, ErdCode.SERIAL_NUMBER, ErdCode.TEMPERATURE_UNIT, ErdCode.APPLIANCE_TYPE, ErdCode.UNIT_TYPE, ErdCode.ADVANTIUM_KITCHEN_TIME_REMAINING, ErdCode.WIFI_MODULE_SW_VERSION, ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE, ErdCode.APPLIANCE_UPDATING, ErdCode.LCD_SW_VERSION, ErdCode.LCD_SW_VERSION_AVAILABLE, ErdCode.LCD_UPDATING, ErdCode.END_TONE, ErdCode.CONVECTION_CONVERSION, ErdCode.OVEN_MODE_MIN_MAX_TEMP, ErdCode.UPPER_OVEN_DISPLAY_TEMPERATURE, ErdCode.UPPER_OVEN_REMOTE_ENABLED, ErdCode.MICROWAVE_RECIPE_STATUS, ErdCode.ADVANTIUM_REMOTE_COOK_MODE_CONFIG, ErdCode.ADVANTIUM_COOK_STATUS, ErdCode.ADVANTIUM_COOK_CONTROL, ErdCode.ADVANTIUM_COOK_TIME_REMAINING, ErdCode.ADVANTIUM_COOK_TIME_ADJUST, ErdCode.ADVANTIUM_PRECISION_VERSION, ErdCode.ADVANTIUM_UNKNOWN03, ErdCode.ADVANTIUM_COOK_TIME_MIN_MAX, ErdCode.ADVANTIUM_MICROWAVE_MIN_MAX, ErdCode.ADVANTIUM_PRECISION_MIN_MAX, 0x540A, 0x5C12, 0x5C14, 0x5C18 2021-06-16 08:04:05,953 DEBUG Appliance state change detected in GeAppliance(D828C9453A4C) (ErdApplianceType.ADVANTIUM)

simbaja commented 3 years ago

Looks good now! Looks like we just have three unknown microwave-related codes (5C12, 5C14, and 5C18) and two unknown advantium related codes (UNKNOWN03 and 540A) to go. Then, I have to decipher the ADVANTIUM_COOK_CONTROL value (this is what is used to remotely control the device). At that point, I think we're good with Advantium support (unless someone else has different functions), and we can probably start thinking about getting it into HA.

ChevySSinSD commented 3 years ago

Fantastic, thank you so much! I can also try to help out with the unknown codes over time (I'm also trying to help out with the dryer codes too)

simbaja commented 3 years ago

Actually, I screwed up the registration of the erd codes (the hex needs to be lower case). So, 540a and 5c14 are known and registered (re-pull to see new results). That leaves two unknown microwave codes and one unknown advantium code. I'll keep digging through the source and see if I can spot them somewhere. Probably aren't that important though (hopefully). I think the priority is deciphering the control mechanism - hopefully it's not too bad.

ChevySSinSD commented 3 years ago

Now with 3 unknowns:

2021-06-16 08:40:35,714 DEBUG Setting ErdCode.MODEL_NUMBER to ZSB9131N1SS 2021-06-16 08:40:35,715 DEBUG Setting ErdCode.SERIAL_NUMBER to HR400004L 2021-06-16 08:40:35,715 DEBUG Setting ErdCode.TEMPERATURE_UNIT to ErdMeasurementUnits.IMPERIAL 2021-06-16 08:40:35,715 DEBUG Setting ErdCode.APPLIANCE_TYPE to ErdApplianceType.ADVANTIUM 2021-06-16 08:40:35,715 DEBUG Setting ErdCode.UNIT_TYPE to ErdUnitType.TYPE_120V_MONOGRAM 2021-06-16 08:40:35,715 DEBUG Setting ErdCode.ADVANTIUM_KITCHEN_TIME_REMAINING to 0:00:00 2021-06-16 08:40:35,715 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION to 0.0.2.68 2021-06-16 08:40:35,715 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE to 0.0.0.0 2021-06-16 08:40:35,715 DEBUG Setting ErdCode.APPLIANCE_UPDATING to False 2021-06-16 08:40:35,715 DEBUG Setting ErdCode.LCD_SW_VERSION to 0.0.9.9 2021-06-16 08:40:35,715 DEBUG Setting ErdCode.LCD_SW_VERSION_AVAILABLE to 0.0.0.0 2021-06-16 08:40:35,716 DEBUG Setting ErdCode.LCD_UPDATING to False 2021-06-16 08:40:35,716 DEBUG Setting ErdCode.END_TONE to ErdEndTone.REPEATED_BEEP 2021-06-16 08:40:35,716 DEBUG Setting ErdCode.CONVECTION_CONVERSION to False 2021-06-16 08:40:35,716 DEBUG Setting ErdCode.OVEN_MODE_MIN_MAX_TEMP to OvenRanges(lower=245, upper=450) 2021-06-16 08:40:35,716 DEBUG Setting ErdCode.UPPER_OVEN_DISPLAY_TEMPERATURE to 140 2021-06-16 08:40:35,716 DEBUG Setting ErdCode.UPPER_OVEN_REMOTE_ENABLED to True 2021-06-16 08:40:35,716 DEBUG Setting ErdCode.MICROWAVE_RECIPE_STATUS to 0 2021-06-16 08:40:35,716 DEBUG Setting ErdCode.ADVANTIUM_REMOTE_COOK_MODE_CONFIG to ErdAdvantiumRemoteCookModeConfig(microwave_staged_time_enable=True, microwave_staged_temp_enable=True, microwave_slow_cook_time_enable=True, microwave_slow_cook_temp_enable=False, precision_cook_time_enable=True, precision_cook_temp_enable=False, precision_cook_staged_time_enable=True, precision_cook_staged_temp_enable=False, precision_cook_custom_time_enable=True, precision_cook_custom_temp_enable=False, precision_cook_custom_upper_heater_enable=True, precision_cook_custom_lower_heater_enable=True, precision_cook_custom_microwave_enable=True, precision_cook_custom_convection_enable=False, warm_enable=True, warm_time_enable=False, warm_temp_enable=True, proof_enable=True, proof_time_enable=False, proof_temp_enable=False, toast_enable=True, toast_time_enable=False, toast_temp_enable=False, steam_clean_time_enable=True, steam_clean_temp_enable=False, convection_bake_enable=True, convection_bake_time_enable=True, convection_bake_temp_enable=True, broil_enable=True, broil_time_enable=False, broil_temp_enable=False, microwave_time_enable=True, microwave_temp_enable=False, microwave_sensor_time_enable=True, microwave_sensor_temp_enable=False, raw_value='0F03474745477774770B0303050000000100000034A40E000FD9060004000000') 2021-06-16 08:40:35,716 DEBUG Setting ErdCode.ADVANTIUM_COOK_STATUS to ErdAdvantiumCookStatus(cook_action=<CookAction.STOP: 0>, cook_mode=<CookMode.NO_MODE: 0>, termination_reason=<TerminationReason.USER_CANCELED: 2>, preheat_status=<PreheatStatus.NO_PREHEAT: 0>, temperature=0, power_level=0, door_status=<DoorStatus.CLOSED: 1>, sensing_active=<SensingActive.INACTIVE: 0>, cooling_fan_status=<CoolingFanStatus.OFF: 0>, oven_light_status=<OvenLightStatus.OFF: 0>, warm_status=<WarmStatus.OFF: 0>, raw_value='7F000002000000000000000100000000') 2021-06-16 08:40:35,716 DEBUG Setting ErdCode.ADVANTIUM_COOK_CONTROL to b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 2021-06-16 08:40:35,717 DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_REMAINING to 0:00:00 2021-06-16 08:40:35,717 DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_ADJUST to 0 2021-06-16 08:40:35,717 DEBUG Setting ErdCode.ADVANTIUM_PRECISIONVERSION to b'\xd8\x1e\xb1\xd7@\x07\x9at\x82\xc7\x15\xbc\xadF\xbes\x11q\xfe\xf4@2\xed\xd5\xe9n\x0f\x1d\xbf.\xf7' 2021-06-16 08:40:35,717 DEBUG Setting ErdCode.ADVANTIUM_UNKNOWN03 to 4294901767 2021-06-16 08:40:35,717 DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_MIN_MAX to ErdAdvantiumCookTimeMinMax(is_valid=True, convection_min_time=60, convection_max_time=10800, broil_min_time=0, broil_max_time=0, warm_min_time=0, warm_max_time=0, proof_min_time=0, proof_max_time=0, slow_cook_min_time=0, slow_cook_max_time=0, raw_value='003C2A3000000000000000000000000000000000000000000000000000000000') 2021-06-16 08:40:35,717 DEBUG Setting ErdCode.ADVANTIUM_MICROWAVE_MIN_MAX to ErdAdvantiumMicrowaveMinMax(is_valid=True, min_time=15, max_time=360, slow_cook_min_time=1, slow_cook_max_time=5940, raw_value='000F016800011734000117340001173400000000000000000000000000000000') 2021-06-16 08:40:35,717 DEBUG Setting ErdCode.ADVANTIUM_PRECISION_MIN_MAX to ErdAdvantiumPrecisionMinMax(is_valid=True, min_time=0, max_time=5940, custom_low_min_time=1, custom_low_max_time=5940, custom_high_min_time=1, custom_high_max_time=5940, raw_value='0001173400011734000117340000000000000000000000000000000000000000') 2021-06-16 08:40:35,717 DEBUG Setting ErdCode.ADVANTIUM_KITCHEN_TIMER_MIN_MAX to ErdAdvantiumKitchenTimerMinMax(min_time=1, max_time=43200, raw_value='0001A8C0') 2021-06-16 08:40:35,717 DEBUG Setting ErdCode.MICROWAVE_UNKNOWN01 to 975 2021-06-16 08:40:35,717 DEBUG Setting ErdCode.MICROWAVE_REMOTE_ENABLE to True 2021-06-16 08:40:35,717 DEBUG Setting ErdCode.MICROWAVE_UNKNOWN02 to 0 2021-06-16 08:40:35,717 DEBUG Got initial appliance type for GeAppliance(D828C9453A4C) (ErdApplianceType.ADVANTIUM) 2021-06-16 08:40:35,718 DEBUG Appliance state change detected in GeAppliance(D828C9453A4C) (ErdApplianceType.ADVANTIUM). Updated keys: ErdCode.MODEL_NUMBER, ErdCode.SERIAL_NUMBER, ErdCode.TEMPERATURE_UNIT, ErdCode.APPLIANCE_TYPE, ErdCode.UNIT_TYPE, ErdCode.ADVANTIUM_KITCHEN_TIME_REMAINING, ErdCode.WIFI_MODULE_SW_VERSION, ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE, ErdCode.APPLIANCE_UPDATING, ErdCode.LCD_SW_VERSION, ErdCode.LCD_SW_VERSION_AVAILABLE, ErdCode.LCD_UPDATING, ErdCode.END_TONE, ErdCode.CONVECTION_CONVERSION, ErdCode.OVEN_MODE_MIN_MAX_TEMP, ErdCode.UPPER_OVEN_DISPLAY_TEMPERATURE, ErdCode.UPPER_OVEN_REMOTE_ENABLED, ErdCode.MICROWAVE_RECIPE_STATUS, ErdCode.ADVANTIUM_REMOTE_COOK_MODE_CONFIG, ErdCode.ADVANTIUM_COOK_STATUS, ErdCode.ADVANTIUM_COOK_CONTROL, ErdCode.ADVANTIUM_COOK_TIME_REMAINING, ErdCode.ADVANTIUM_COOK_TIME_ADJUST, ErdCode.ADVANTIUM_PRECISION_VERSION, ErdCode.ADVANTIUM_UNKNOWN03, ErdCode.ADVANTIUM_COOK_TIME_MIN_MAX, ErdCode.ADVANTIUM_MICROWAVE_MIN_MAX, ErdCode.ADVANTIUM_PRECISION_MIN_MAX, ErdCode.ADVANTIUM_KITCHEN_TIMER_MIN_MAX, ErdCode.MICROWAVE_UNKNOWN01, ErdCode.MICROWAVE_REMOTE_ENABLE, ErdCode.MICROWAVE_UNKNOWN02 2021-06-16 08:40:35,718 DEBUG Appliance state change detected in GeAppliance(D828C9453A4C) (ErdApplianceType.ADVANTIUM)

simbaja commented 3 years ago

I've enabled reading/writing of the cook setting (0x5402), but the actual control logic will have to go into the HA component I think. I've also fixed up time conversions throughout. Let me know if you can figure out what the remaining unknowns are, but I think we probably have enough to build the support into HA at this point.

Let me know if you run into issues using the latest version, hopefully I didn't do anything stupid :).

ChevySSinSD commented 3 years ago

Here is the error I get with latest pull:

Traceback (most recent call last): File "websocket_example.py", line 16, in from gehomesdk import ( File "/usr/local/lib/python3.8/dist-packages/gehomesdk/init.py", line 6, in from .clients import File "/usr/local/lib/python3.8/dist-packages/gehomesdk/clients/init.py", line 17, in from .base_client import GeBaseClient File "/usr/local/lib/python3.8/dist-packages/gehomesdk/clients/base_client.py", line 12, in from ..erd import ErdCode, ErdCodeType File "/usr/local/lib/python3.8/dist-packages/gehomesdk/erd/init.py", line 3, in from .values import File "/usr/local/lib/python3.8/dist-packages/gehomesdk/erd/values/init.py", line 4, in from .dishwasher import * File "/usr/local/lib/python3.8/dist-packages/gehomesdk/erd/values/dishwasher/init.py", line 9, in from .erd_user_setting import ErdUserSetting File "/usr/local/lib/python3.8/dist-packages/gehomesdk/erd/values/dishwasher/erd_user_setting.py", line 5, in class UserSetting(enum): TypeError: module() takes at most 2 arguments (3 given)

ChevySSinSD commented 3 years ago

I made a fix so it will run and put in a pull request, not sure if that is the right way to do it, but its working on my machine now.

10

simbaja commented 3 years ago

Whoops, I just forgot to add the Enum.enum... I corrected mine, let me know if you still have issues

ChevySSinSD commented 3 years ago

Results for Advantium on latest pull, let me know when you would like me to test on the ha_components side.

2021-06-20 08:29:27,897 DEBUG Received feature CLOTHES_DRYER_V1_EXTENDED_TUMBLE for D828C94FC70D 2021-06-20 08:29:27,897 DEBUG Setting ErdCode.MODEL_NUMBER to ZSB9131N1SS 2021-06-20 08:29:27,897 DEBUG Setting ErdCode.SERIAL_NUMBER to HR400004L 2021-06-20 08:29:27,898 DEBUG Setting ErdCode.TEMPERATURE_UNIT to ErdMeasurementUnits.IMPERIAL 2021-06-20 08:29:27,898 DEBUG Setting ErdCode.APPLIANCE_TYPE to ErdApplianceType.ADVANTIUM 2021-06-20 08:29:27,898 DEBUG Setting ErdCode.UNIT_TYPE to ErdUnitType.TYPE_120V_MONOGRAM 2021-06-20 08:29:27,898 DEBUG Setting ErdCode.ADVANTIUM_KITCHEN_TIME_REMAINING to 0:00:00 2021-06-20 08:29:27,898 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION to 0.0.2.68 2021-06-20 08:29:27,898 DEBUG Setting ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE to 0.0.0.0 2021-06-20 08:29:27,898 DEBUG Setting ErdCode.APPLIANCE_UPDATING to False 2021-06-20 08:29:27,898 DEBUG Setting ErdCode.LCD_SW_VERSION to 0.0.9.9 2021-06-20 08:29:27,899 DEBUG Setting ErdCode.LCD_SW_VERSION_AVAILABLE to 0.0.0.0 2021-06-20 08:29:27,899 DEBUG Setting ErdCode.LCD_UPDATING to False 2021-06-20 08:29:27,899 DEBUG Setting ErdCode.END_TONE to ErdEndTone.REPEATED_BEEP 2021-06-20 08:29:27,899 DEBUG Setting ErdCode.CONVECTION_CONVERSION to False 2021-06-20 08:29:27,899 DEBUG Setting ErdCode.OVEN_MODE_MIN_MAX_TEMP to OvenRanges(lower=245, upper=450) 2021-06-20 08:29:27,899 DEBUG Setting ErdCode.UPPER_OVEN_DISPLAY_TEMPERATURE to 140 2021-06-20 08:29:27,899 DEBUG Setting ErdCode.UPPER_OVEN_REMOTE_ENABLED to True 2021-06-20 08:29:27,899 DEBUG Setting ErdCode.MICROWAVE_RECIPE_STATUS to b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 2021-06-20 08:29:27,899 DEBUG Setting ErdCode.ADVANTIUM_REMOTE_COOK_MODE_CONFIG to ErdAdvantiumRemoteCookModeConfig(microwave_staged_time_enable=True, microwave_staged_temp_enable=True, microwave_slow_cook_time_enable=True, microwave_slow_cook_temp_enable=False, precision_cook_time_enable=True, precision_cook_temp_enable=False, precision_cook_staged_time_enable=True, precision_cook_staged_temp_enable=False, precision_cook_custom_time_enable=True, precision_cook_custom_temp_enable=False, precision_cook_custom_upper_heater_enable=True, precision_cook_custom_lower_heater_enable=True, precision_cook_custom_microwave_enable=True, precision_cook_custom_convection_enable=False, warm_enable=True, warm_time_enable=False, warm_temp_enable=True, proof_enable=True, proof_time_enable=False, proof_temp_enable=False, toast_enable=True, toast_time_enable=False, toast_temp_enable=False, steam_clean_time_enable=True, steam_clean_temp_enable=False, convection_bake_enable=True, convection_bake_time_enable=True, convection_bake_temp_enable=True, broil_enable=True, broil_time_enable=False, broil_temp_enable=False, microwave_time_enable=True, microwave_temp_enable=False, microwave_sensor_time_enable=True, microwave_sensor_temp_enable=False, raw_value='0F03474745477774770B0303050000000100000034A40E000FD9060004000000') 2021-06-20 08:29:27,900 DEBUG Setting ErdCode.ADVANTIUM_COOK_STATUS to ErdAdvantiumCookStatus(cook_action=<CookAction.STOP: 0>, cook_mode=<CookMode.NO_MODE: 0>, termination_reason=<TerminationReason.COOK_TIME_COMPLETE: 1>, preheat_status=<PreheatStatus.NO_PREHEAT: 0>, temperature=0, power_level=10, door_status=<DoorStatus.CLOSED: 1>, sensing_active=<SensingActive.INACTIVE: 0>, cooling_fan_status=<CoolingFanStatus.OFF: 0>, oven_light_status=<OvenLightStatus.OFF: 0>, warm_status=<WarmStatus.OFF: 0>, raw_value='7F00000100000000000A000100000000') 2021-06-20 08:29:27,900 DEBUG Setting ErdCode.ADVANTIUM_COOK_SETTING to b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 2021-06-20 08:29:27,900 DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_REMAINING to 0:00:00 2021-06-20 08:29:27,900 DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_ADJUST to 0 2021-06-20 08:29:27,900 DEBUG Setting ErdCode.ADVANTIUM_PRECISIONVERSION to b'\xd8\x1e\xb1\xd7@\x07\x9at\x82\xc7\x15\xbc\xadF\xbes\x11q\xfe\xf4@2\xed\xd5\xe9n\x0f\x1d\xbf.\xf7' 2021-06-20 08:29:27,900 DEBUG Setting ErdCode.ADVANTIUM_UNKNOWN_5406 to b'\xff\xff\x00\x00' 2021-06-20 08:29:27,900 DEBUG Setting ErdCode.ADVANTIUM_COOK_TIME_MIN_MAX to ErdAdvantiumCookTimeMinMax(is_valid=True, convection_min_time=datetime.timedelta(seconds=60), convection_max_time=datetime.timedelta(seconds=10800), broil_min_time=datetime.timedelta(0), broil_max_time=datetime.timedelta(0), warm_min_time=datetime.timedelta(0), warm_max_time=datetime.timedelta(0), proof_min_time=datetime.timedelta(0), proof_max_time=datetime.timedelta(0), slow_cook_min_time=datetime.timedelta(0), slow_cook_max_time=datetime.timedelta(0), raw_value='003C2A3000000000000000000000000000000000000000000000000000000000') 2021-06-20 08:29:27,900 DEBUG Setting ErdCode.ADVANTIUM_MICROWAVE_MIN_MAX to ErdAdvantiumMicrowaveMinMax(is_valid=True, min_time=datetime.timedelta(seconds=15), max_time=datetime.timedelta(seconds=360), slow_cook_min_time=datetime.timedelta(seconds=1), slow_cook_max_time=datetime.timedelta(seconds=5940), raw_value='000F016800011734000117340001173400000000000000000000000000000000') 2021-06-20 08:29:27,901 DEBUG Setting ErdCode.ADVANTIUM_PRECISION_MIN_MAX to ErdAdvantiumPrecisionMinMax(is_valid=True, min_time=datetime.timedelta(0), max_time=datetime.timedelta(seconds=5940), custom_low_min_time=datetime.timedelta(seconds=1), custom_low_max_time=datetime.timedelta(seconds=5940), custom_high_min_time=datetime.timedelta(seconds=1), custom_high_max_time=datetime.timedelta(seconds=5940), raw_value='0001173400011734000117340000000000000000000000000000000000000000') 2021-06-20 08:29:27,901 DEBUG Setting ErdCode.ADVANTIUM_KITCHEN_TIMER_MIN_MAX to ErdAdvantiumKitchenTimerMinMax(min_time=datetime.timedelta(seconds=1), max_time=datetime.timedelta(seconds=43200), raw_value='0001A8C0') 2021-06-20 08:29:27,901 DEBUG Setting ErdCode.MICROWAVE_UNKNOWN_5C12 to b'\x03\xcf' 2021-06-20 08:29:27,901 DEBUG Setting ErdCode.MICROWAVE_REMOTE_ENABLE to False 2021-06-20 08:29:27,901 DEBUG Setting ErdCode.MICROWAVE_UNKNOWN_5C18 to b'\x00\x00\x00\x00\x00\x00' 2021-06-20 08:29:27,901 DEBUG Got initial appliance type for GeAppliance(D828C9453A4C) (ErdApplianceType.ADVANTIUM)

simbaja commented 3 years ago

Looks good (as does dishwasher stuff, hopefully). I think these two are pretty much ready for the initial inclusion into HA. Let's give warren a little bit to finish up changes to laundry, and then we can publish a new version of this and get going on the HA side.

warrenrees commented 3 years ago

Will be submitting a pull request this after once the little one goes for a nap.

warrenrees commented 3 years ago

11 submitted. Once approved if @SSinSD can test and ensure I didn't mess up anything...

simbaja commented 3 years ago

@SSinSD, can you pull down the newest dev branch of the HA component and give it a shot? I've integrated support for Avantium in there, and am curious how close I got on the control functionality...

I think I have to create services to set times (like kitchen/cook time), but that's a challenge for a different day.

If you could create a new issue over on the HA component repository for the debugging when you have a moment, that would be appreciated.