simbaja / gehome

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

ValueError: 3 is not a valid UserWashZoneSetting #54

Open na4ma4 opened 1 year ago

na4ma4 commented 1 year ago

I'll do some testing but my dishwasher is reporting wash_zone of "3"

erd value:  0b1100000000000000000010 (3145730)
wash_zone:  0b1100000000000000000000 (3145728)

shifted value: 0b11 (3)

But the only valid values are 0-2

@enum.unique
class UserWashZoneSetting(enum.Enum):
    BOTH = 0
    LOWER = 1
    UPPER = 2

I think it has something to do with the quick dry setting, but I'm curious what the wash_zone means in context, it's a property of both the upper and lower drawers but the options are BOTH, LOWER and UPPER.

Stack trace for the error:

2023-06-21 00:06:20,775 ERROR    Could not construct user setting, using default.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/gehomesdk/erd/converters/dishwasher/erd_user_setting_converter.py", line 36, in erd_decode
    wash_zone = UserWashZoneSetting((i & 3145728) >> 20),
  File "/usr/lib/python3.10/enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "/usr/lib/python3.10/enum.py", line 710, in __new__
    raise ve_exc
ValueError: 3 is not a valid UserWashZoneSetting
2023-06-21 00:06:20,780 DEBUG    Setting ErdCode.DISHWASHER_USER_SETTING to ErdUserSetting(mute=<UserSetting.DISABLE: 0>, demo_mode=<UserSetting.DISABLE: 0>, lock_control=<UserSetting.DISABLE: 0>, sabbath=<UserSetting.DISABLE: 0>, cycle_mode=<UserCycleSetting.AUTO: 0>, presoak=<UserSetting.DISABLE: 0>, bottle_jet=<UserSetting.DISABLE: 0>, wash_temp=<UserWashTempSetting.NORMAL: 0>, rinse_aid=<UserSetting.DISABLE: 0>, dry_option=<UserDryOptionSetting.OFF: 0>, wash_zone=<UserWashZoneSetting.BOTH: 0>, delay_hours=0, raw_value='300002')
2023-06-21 00:06:20,780 ERROR    Could not construct user setting, using default.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/gehomesdk/erd/converters/dishwasher/erd_user_setting_converter.py", line 36, in erd_decode
    wash_zone = UserWashZoneSetting((i & 3145728) >> 20),
  File "/usr/lib/python3.10/enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "/usr/lib/python3.10/enum.py", line 710, in __new__
    raise ve_exc
ValueError: 3 is not a valid UserWashZoneSetting
simbaja commented 1 year ago

Based on the way you phrased the message, it sounds like you've got a dual drawer dishwasher? The original GE dishwashers could turn on/off the upper and lower racks independently. I'm guessing that the dual drawer has more options here? Perhaps they can do it for each drawer (are there two levels in each??). I can probably add an "unknown" value to get it to stop yelling, but it would be better if we can identify what it truly means. What does the official app say?

na4ma4 commented 1 year ago

I'll try and get a chance to look into it on the weekend, I'll try running the client and changing settings, seeing what causes errors.

simbaja commented 9 months ago

Any luck figuring out the setting?