Open Treygec opened 6 months ago
Yeah, the byte settings are tough to decipher, and I unfortunately don't have any access to documentation. The single byte values are generally easier once you figure out how to map them. I'd suggest starting with those and then we can add more over time as they are figured out.
First step is to get all this into the SDK, then we can create additional logic for this new coffee maker. Looks like it presents itself as a CAFE_COFFEE_MAKER (like the existing devices), so we'll probably need some if logic to get these new entities in here.
Bytestring values by position in string.
#1 = Gold toggle
#2 = bloom toggle
#3 = always x00 ???
#4 = single toggle
#5 = Brew Strength: light=x00, medium = x01, bold =x02, gold =x03
#6 = Temperate: 185=xb9,190=xbe,195=xc3,200=xc8,205=xcd
# 7 = Ounces: 6=x06,8=x08,10=n,12=x0c,14=x0e,16=x10,18=x12,20=x14,22=x16,24=x18
# 8 = Cups: 4=x04, 5=x05, 6=x06, 7=x07, 8=x08, 9=t, 10=n
# 9 = always x00 ???
# 10 = always x00 ???
# 11 = always x00 ???
# 12 = bloom time: 5=x05, 10=n, 15=x0f,20=x14,25=x19,30=x1e
"bytestring example": b'\x01\x00\x00\x00\x03\xc8\x18\n\x00\x00\x00\x00',
Above is the best I could do to figure out what the brew settings were as bytestring. Honestly, still no idea how they are encoded and there are 4 I can't get to change at all no matter what settings I use. My guess is that those unchanging ones are for things this coffee maker doesn't have, like a pot warmer / standby mode, and things like that.
Below are the ERD codes I was able to decipher. Again, wasn't able to get all of them to come across the sdk log, which might be a result of GE reusing components for coffee makers and this one just not having some of those items.
Features received (this list came from the gehomesdk logs) = 'COFFEE_BREWER_V2_BREW_BASKET_MISSING_OR_NOT_LOCKED', 0x904F changes to b'\x01 when missing / unlocked. 'COFFEE_BREWER_V2_BREW_CANCEL', Pressing and holding to cancel only activated ErdCode.CCM_IS_BREWING right below this. 'COFFEE_BREWER_V2_BREW_STATUS', mapped to ErdCode.CCM_IS_BREWING and True / False 'COFFEE_BREWER_V2_CLEAN_BREW_BASKET', 0x902C (sets to b'\x00 once basket opens and closes, b'\x01 after brew completes) 'COFFEE_BREWER_V2_DESCALE_STATUS', Brand new device and 74 gallons away from triggering a descale notification 'COFFEE_BREWER_V2_DISABLE_GRINDER', 0x9053 = Grinder status: b'\x01 = "Grind Off" b'\x00' = "Grind On" 'COFFEE_BREWER_V2_FILTER_STATUS', Not using the water filter but will put one in and try to monitor for this one too. Might map to existing ErdCode.OIM_FILTER_STATUS but I'm not sure 'COFFEE_BREWER_V2_FOUNDATION', 'COFFEE_BREWER_V2_GRINDER_MISSING_OR_NOT_LOCKED', 0x902B = "b'\x00" when UNLOCKED 'COFFEE_BREWER_V2_GRIND_SETTING': "0x9053 = Grinder status: b'\x01 = "Grind Off" b'\x00' = "Grind On"", 'COFFEE_BREWER_V2_MODEL_CONFIGURATION', 'COFFEE_BREWER_V2_OUT_OF_BEANS', tomorrow 'COFFEE_BREWER_V2_OUT_OF_WATER_DETECTION', mapped to existing ErdCode.CCM_OUT_OF_WATER 'COFFEE_BREWER_V2_POT_PRESENCE', removing / adding the pot doesn't do anything 'COFFEE_BREWER_V2_STANDBY', I set auto shutdown for 30 minutes after brew and no messages or changes were made when that time passed in the gehomesdk 'COFFEE_BREWER_V2_THREE_FAVORITE_BREWS', 0x9054 = Profile 1, 0x9056 = Profile 2, 0x9058 = Profile 3 'COMMON_V1_SOUND_LEVEL', maps to existing ErdCode.SOUND_LEVEL with ErdSoundLevel.OFF / ON
updated keys = ErdCode.MODEL_NUMBER, ErdCode.SERIAL_NUMBER, ErdCode.CLOCK_FORMAT, ErdCode.TEMPERATURE_UNIT, ErdCode.APPLIANCE_TYPE, ErdCode.SOUND_LEVEL, ErdCode.UNIT_TYPE, ErdCode.BRAND, 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.CCM_IS_BREWING, ErdCode.CCM_POT_PRESENT, ErdCode.CCM_OUT_OF_WATER, 0x9024, 0x902B, 'COFFEE_BREWER_V2_GRINDER_MISSING_OR_NOT_LOCKED' 0x902C, 'COFFEE_BREWER_V2_CLEAN_BREW_BASKET' 0x902D, 0x9030, 0x9044, 0x904D, 0x904F, 'COFFEE_BREWER_V2_BREW_BASKET_MISSING_OR_NOT_LOCKED', 0x9051, adhoc brew instructions (could potentially be 'COFFEE_BREWER_V2_MODEL_CONFIGURATION' or 'COFFEE_BREWER_V2_FOUNDATION' just based on their names and the fact I can't get anything else resembling either to come across the sdk monitoring) 0x9053, COFFEE_BREWER_V2_GRIND_SETTING' 0x9054, Profile 1 0x9056, Profile 2 0x9058, Profile 3 0x905A, 0x905B, 0x905C, ErdCode.OIM_FILTER_STATUS
Hoping to get the Cafe Speciality Grind and Brew added. I've installed the gehomesdk and got the output logs and can see the device working there. However, it appears to have ERD codes that other coffee makers don't, as well as missing at least one that others do (CCM_BREW_TEMPERATURE_RANGE). Below are the error logs from Home Assistant noting that there is keyerror for this ERD code.
Additionally, below is the full output from the logs when I run the gehomesdk. I have highlighted all the parts that reference the coffee maker, to make it easier to see what's going on amidst all of it. I just wanted to provide the full log in case parts I'm not aware of are helpful.
Finally, I'm a beginner to moderate level programmer. Would be happy to tackle this myself if a little guidance could be given around how to decode the bytestrings coming back or some opinion on how you'd like to see this device added (modify existing "coffee maker" stuff or create a new device type "grind and brew" and keep it all seperate in there). At the moment though, I am most unsure of how to handle the bytestrings as I can't make sense of them.
ERD codes I have meaning for from gehomesdk (will work to figure out more in the coming days):
0x9058 =Brew Profile 3 0x9054 = Brew Profile 1 0x9051 = Adhoc brew settings / current brew settings 0x902C = Clean basket status (boolean sensor to check if basket has been opened since last brew)
ERROR FROM HOME ASSISTANT
2024-05-04 07:33:33.454 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/config/custom_components/ge_home/update_coordinator.py", line 337, in on_device_initial_update self.maybe_add_appliance_api(appliance) File "/config/custom_components/ge_home/update_coordinator.py", line 150, in maybe_add_appliance_api api = self._get_appliance_api(appliance) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ge_home/update_coordinator.py", line 138, in _get_appliance_api return api_type(self, appliance) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ge_home/devices/coffee_maker.py", line 36, in init self._brew_temperature_entity = GeCcmBrewTemperatureNumber(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ge_home/entities/ccm/ge_ccm_brew_temperature.py", line 8, in init min_temp, maxtemp, = api.appliance.get_erd_value(ErdCode.CCM_BREW_TEMPERATURE_RANGE) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/gehomesdk/ge_appliance.py", line 136, in get_erd_value return self._property_cache[erd_code]