simbaja / gehome

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

Looking to contribute #25

Closed DigitalBites closed 2 years ago

DigitalBites commented 3 years ago

First off, thank you for starting to update the library.

I just started doing the same thing yesterday with ajmarks version of the library and got some additional appliances added (like a range hood). I was thinking of how to refractor things a bit and then happened to see your merge request and fork. It looks like you have made a lot of great progress...

I have a GE Washer & Dryer, GE Cafe series fridge, microwave (although I'm not sure that is wifi), dishwasher, GE Profile range hood.

I'm not sure where you are at with refactoring but did install it and got a dump of all of the sensors for my dryer and fridge. I'll have to start reading a bit more to see how you've adjusted things but wanted to start some dialog before I start investing any time into the library/code/reach and starting to contribute things back if you're good with that.

simbaja commented 3 years ago

Hey there, welcome to the project! Help is always appreciated. For the most part, I think we've identified most of the sensors available for laundry, fridges, advantium (not sure if that's what you have), and dishwashers. If you have those logs, we can double check that we've got them all interpreted (or if your devices show anything we haven't seen/figured out yet). I don't think that anyone yet has provided logs for the range hood, I didn't even know they had those wifi enabled!

The HA component is also available at github.com/simbaja/ha_gehome. You might want to see if there's any functionality that isn't available in there yet and we can maybe concentrate on that. One thing that I've never been able to test is the fridge dispenser - not sure if your model is one that has the hot water, but if so, it would be great if we can see if what I built works.

DigitalBites commented 3 years ago

Yeah I've found the ha_component as well and have them both working on a test install of HA... I'll focus on validating the fridge stuff - but at first glance I see most of the sensors there including the water temp (mine has a hot water tap on it).

I did notice that my range hood wasn't recognized so I'm adding the codes for light and fan control. I have the codes added but must have something missing as it's got getting picked up yet. Shouldn't be a big deal to work through that and I'll get a merge request in.

simbaja commented 3 years ago

Glad it looks like it's mostly working! I think the basic fridge stuff should be good (I have a regular fridge so can test some of it), but I just didn't have anyone who could test the dispenser. There's actually an open item on that in the ha_gehome repository, perhaps we can work through any issues for the dispenser over there.

In regard to getting the range hood recognized, it's a two step process. First, we have to get the codes added into the sdk (i.e. this repository). Once that is working, I'd have to publish a new version of the library, and then those codes are available for use within the HA component. At that point, we can build the HA devices/entities as required to add sensors and controls for the appliance. Hope that makes sense.

Let me know if you have any questions as you look through and thanks for your help!

Edit: Also, if it's easier for you, if you post the log generated from your devices, I can look through it and add everything needed to support it (to the extent I can interpret what it should be - there are a few codes that we haven't figured out their purpose yet).

DigitalBites commented 3 years ago

Appreciate the offer. I did figure out the issue and better understand the code. What hung me up was there appears to be some case sensitivity in the hex codes used in erd_codes.py.. It's pretty easy to add new codes. I have FAN and LIGHTs working for my hood. I'll submit a merge request today on it and I'll start focusing on the ha components to get that working.

DigitalBites commented 3 years ago

Testing... So the hood changes appear at first glance to be working ok. I updated my websocket test client to turn on the lights and they come on. The debug output states look correct as well... I will start to check the ha_gehome module and see what changes were made and see how it works.

Applicable debug output below for the hood....

2021-08-24 16:35:42,437 DEBUG    Setting ErdCode.MODEL_NUMBER to UVW9301SL1SS
2021-08-24 16:35:42,437 DEBUG    Setting ErdCode.SERIAL_NUMBER to
2021-08-24 16:35:42,437 DEBUG    Setting ErdCode.APPLIANCE_TYPE to ErdApplianceType.HOOD
2021-08-24 16:35:42,437 DEBUG    Setting ErdCode.UNKNOWN_0099 to b'\x00'
2021-08-24 16:35:42,437 DEBUG    Setting ErdCode.WIFI_MODULE_SW_VERSION to 0.0.5.97
2021-08-24 16:35:42,438 DEBUG    Setting ErdCode.WIFI_MODULE_SW_VERSION_AVAILABLE to 0.0.0.0
2021-08-24 16:35:42,438 DEBUG    Setting ErdCode.ACM_UPDATING to False
2021-08-24 16:35:42,438 DEBUG    Setting ErdCode.APPLIANCE_SW_VERSION to 0.0.0.0
2021-08-24 16:35:42,438 DEBUG    Setting ErdCode.APPLIANCE_SW_VERSION_AVAILABLE to 0.0.0.0
2021-08-24 16:35:42,438 DEBUG    Setting ErdCode.APPLIANCE_UPDATING to False
2021-08-24 16:35:42,438 DEBUG    Setting ErdCode.HOOD_TIMER_AVAILABILITY to ErdOnOff.ON
2021-08-24 16:35:42,438 DEBUG    Setting ErdCode.HOOD_TIMER to 0:00:00
2021-08-24 16:35:42,438 DEBUG    Setting ErdCode.UPPER_OVEN_KITCHEN_TIMER to 0:00:00
2021-08-24 16:35:42,438 DEBUG    Setting ErdCode.HOOD_FAN_SPEED to ErdHoodFanSpeed.OFF
2021-08-24 16:35:42,439 DEBUG    Setting ErdCode.HOOD_FAN_SPEED_AVAILABILITY to ErdHoodFanSpeedAvailability(off_available=True, low_available=True, med_available=True, high_available=True, boost_available=True, raw_value='1F')
2021-08-24 16:35:42,439 DEBUG    Setting ErdCode.HOOD_LIGHT_LEVEL to ErdHoodLightLevel.OFF
2021-08-24 16:35:42,439 DEBUG    Setting ErdCode.HOOD_LIGHT_LEVEL_AVAILABILITY to ErdHoodLightLevelAvailability(off_available=True, dim_available=True, high_available=True, raw_value='07')
2021-08-24 16:35:42,439 DEBUG    Setting ErdCode.HOOD_DELAY_OFF to ErdOnOff.OFF
2021-08-24 16:35:42,439 DEBUG    Got initial appliance type for GeAppliance(D828C92C0F11) (ErdApplianceType.HOOD)