gvigroux / hon

Support of all Haier, Candy, Hoover appliances integrated in the official hOn mobile app. Direct access to all possible services and parameters
MIT License
118 stars 45 forks source link

Add fridge Candy ? #10

Closed Helloamiral closed 1 year ago

Helloamiral commented 1 year ago

Hello, Please, can you add fridge Candy CCE4T618EW ? Thanks,

gvigroux commented 1 year ago

I've added a first basic version of the fridge support but I'm in the dark (I don't have one). If you can send me your hOn login/password I can do the full integration => of course you will have to change the password before/after

gvigroux commented 1 year ago

Plese try the branch: https://github.com/gvigroux/hon/tree/Full-rework

Therodoxx commented 1 year ago

Hi, you can look at https://github.com/sonyboypatrick/hass-hon, this is good working template that you could use. It is working with my HFW7720EWMP. Greetings

gvigroux commented 1 year ago

Should work now. Can you please test ?

Therodoxx commented 1 year ago

Hi, is working for me. Could you please add the Humidity Sensor as well? When you do it, make sure you rewrite the sensor to %. Greetings fridge

gvigroux commented 1 year ago

Do you have the humidity sensor now ?

Therodoxx commented 1 year ago

No, unfortunately not. So far, only the ambient temperature is available.

gvigroux commented 1 year ago

can you please activate the debug and reboot ? I need to see the log starting by "command"

Therodoxx commented 1 year ago

Do you mean Hass Debug or Debug from the Integration?

gvigroux commented 1 year ago

Capture

I made a screenshot

Therodoxx commented 1 year ago

2023-04-15 18:56:26.646 DEBUG (MainThread) [custom_components.hon.hon] Commands: {'applianceModel': {'id': 569, 'name': 'HFW7720EWMP', 'code': 'XXXXXXXXXX', 'applianceTypeId': 14, 'applianceTypeName': 'REF', 'brand': 'haier', 'connectivity': 'wifi|ble', 'attributes': [{'id': 11659, 'parName': 'lowerBarrierDate', 'parValue': '2101', 'status': 1, 'lastUpdate': '2021-03-09T15:42:26Z'}, {'id': 11660, 'parName': 'series', 'parValue': 'multidoor', 'status': 1, 'lastUpdate': '2021-01-26T12:25:28Z'}, {'id': 11661, 'parName': 'seriesVersion', 'parValue': 'fd70Series7', 'status': 1, 'lastUpdate': '2021-01-26T12:25:28Z'}, {'id': 11662, 'parName': 'installationType', 'parValue': 'fs', 'status': 1, 'lastUpdate': '2021-01-26T12:25:28Z'}, {'id': 11663, 'parName': 'vtZone', 'parValue': '1', 'status': 1, 'lastUpdate': '2021-01-26T12:25:28Z'}, {'id': 11664, 'parName': 'doorNumber', 'parValue': '4', 'status': 1, 'lastUpdate': '2021-01-26T12:25:28Z'}, {'id': 11665, 'parName': 'sensor', 'parValue': 'doorAlarmFridge|doorAlarmFreezer', 'status': 1, 'lastUpdate': '2021-01-26T12:25:28Z'}, {'id': 11666, 'parName': 'option', 'parValue': 'autoSet|superCool|superFreeze|holiday|quickCool|zeroFresh|fruitAndVeg', 'status': 1, 'lastUpdate': '2021-01-26T12:25:28Z'}, {'id': 11667, 'parName': 'interfaceType', 'parValue': 'series|seriesVersion|installationType|doorNumber', 'status': 1, 'lastUpdate': '2021-01-26T12:25:28Z'}, {'id': 16143, 'parName': 'technology', 'parValue': 'st', 'status': 1, 'lastUpdate': '2021-11-25T16:28:34Z'}, {'id': 19268, 'parName': 'enrollmentType', 'parValue': 'app', 'status': 1, 'lastUpdate': '2021-07-28T07:30:37Z'}, {'id': 28035, 'parName': 'zones', 'parValue': 'fridge|freezer|vtRoom1', 'status': 1, 'lastUpdate': '2022-04-06T16:38:39Z'}, {'id': 38225, 'parName': 'serviceability', 'parValue': 'none', 'status': 1, 'lastUpdate': '2022-08-29T16:20:42Z'}, {'id': 61605, 'parName': 'fwLabel', 'parValue': 'iotfw_epp', 'status': 1, 'lastUpdate': '2023-01-20T10:02:44Z'}], 'options': {}}, 'settings': {'setParameters': {'description': 'The message allows to change parameters values to enable/disable specific features ', 'protocolType': 'MQTT', 'parameters': {'tempSelZ1': {'category': 'command', 'typology': 'range', 'mandatory': 0, 'defaultValue': '5', 'minimumValue': '1', 'maximumValue': '9', 'incrementValue': '1'}, 'tempSelZ2': {'category': 'command', 'typology': 'range', 'mandatory': 0, 'defaultValue': '-18', 'minimumValue': '-24', 'maximumValue': '-14', 'incrementValue': '1'}}, 'ancillaryParameters': {'programRules': {'category': 'rule', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': {'tempSelZ1': {'@quickModeZ1': {'1': {'typology': 'fixed', 'fixedValue': '1'}}, '@quickModeZ2': {'1': {'typology': 'fixed', 'fixedValue': '@tempSelZ1'}}, '@intelligenceMode': {'1': {'typology': 'fixed', 'fixedValue': '5'}}, '@holidayMode': {'1': {'typology': 'fixed', 'fixedValue': '17'}}}, 'tempSelZ2': {'@quickModeZ1': {'1': {'typology': 'fixed', 'fixedValue': '@tempSelZ2'}}, '@quickModeZ2': {'1': {'typology': 'fixed', 'fixedValue': '-24'}}, '@intelligenceMode': {'1': {'typology': 'fixed', 'fixedValue': '-18'}}, '@holidayMode': {'1': {'typology': 'fixed', 'fixedValue': '@tempSelZ2'}}}}}}}, 'setConfig': {'description': 'The message allows to set platform parameters', 'protocolType': 'MQTT', 'parameters': {'httpEndpoint': {'category': 'command', 'typology': 'fixed', 'mandatory': 0}, 'mqttEndpoint': {'category': 'command', 'typology': 'fixed', 'mandatory': 0}}}}, 'stopProgram': {'description': 'The message allows to stop the program', 'protocolType': 'MQTT', 'parameters': {'quickModeZ1': {'category': 'command', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '0'}, 'quickModeZ2': {'category': 'command', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '0'}, 'intelligenceMode': {'category': 'command', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '0'}, 'holidayMode': {'category': 'command', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '0'}}}, 'startProgram': {'PROGRAMS.REF.AUTO_SET': {'description': 'The command allows to start a program', 'protocolType': 'MQTT', 'parameters': {'intelligenceMode': {'category': 'command', 'typology': 'fixed', 'mandatory': 1, 'fixedValue': '1'}}, 'ancillaryParameters': {'remoteActionable': {'category': 'general', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '1'}, 'remoteVisible': {'category': 'general', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '1'}, 'programFamily': {'category': 'cluster', 'typology': 'enum', 'mandatory': 1, 'enumValues': ['dashboard'], 'defaultValue': '[dashboard]'}, 'zone': {'category': 'cluster', 'typology': 'enum', 'mandatory': 1, 'enumValues': ['fridge', 'freezer'], 'defaultValue': '[fridge|freezer]'}, 'programRules': {'category': 'rule', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': {'tempSelZ1': {'intelligenceMode': {'1': {'typology': 'fixed', 'fixedValue': '5'}}}, 'tempSelZ2': {'intelligenceMode': {'1': {'typology': 'fixed', 'fixedValue': '-18'}}}}}, 'nameVariants': {'category': 'general', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': 'series'}}}, 'PROGRAMS.REF.SUPER_COOL': {'description': 'The command allows to start a program', 'protocolType': 'MQTT', 'parameters': {'quickModeZ1': {'category': 'command', 'typology': 'fixed', 'mandatory': 1, 'fixedValue': '1'}}, 'ancillaryParameters': {'remoteActionable': {'category': 'general', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '1'}, 'remoteVisible': {'category': 'general', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '1'}, 'programFamily': {'category': 'cluster', 'typology': 'enum', 'mandatory': 1, 'enumValues': ['dashboard'], 'defaultValue': '[dashboard]'}, 'zone': {'category': 'cluster', 'typology': 'enum', 'mandatory': 1, 'enumValues': ['fridge'], 'defaultValue': '[fridge]'}, 'programRules': {'category': 'rule', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': {'tempSelZ1': {'quickModeZ1': {'1': {'typology': 'fixed', 'fixedValue': '1'}}}, 'tempSelZ2': {'quickModeZ1': {'1': {'typology': 'fixed', 'fixedValue': '@tempSelZ2'}}}}}}}, 'PROGRAMS.REF.SUPER_FREEZE': {'description': 'The command allows to start a program', 'protocolType': 'MQTT', 'parameters': {'quickModeZ2': {'category': 'command', 'typology': 'fixed', 'mandatory': 1, 'fixedValue': '1'}}, 'ancillaryParameters': {'remoteActionable': {'category': 'general', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '1'}, 'remoteVisible': {'category': 'general', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '1'}, 'programFamily': {'category': 'cluster', 'typology': 'enum', 'mandatory': 1, 'enumValues': ['dashboard'], 'defaultValue': '[dashboard]'}, 'zone': {'category': 'cluster', 'typology': 'enum', 'mandatory': 1, 'enumValues': ['freezer'], 'defaultValue': '[freezer]'}, 'programRules': {'category': 'rule', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': {'tempSelZ1': {'quickModeZ2': {'1': {'typology': 'fixed', 'fixedValue': '@tempSelZ1'}}}, 'tempSelZ2': {'quickModeZ2': {'1': {'typology': 'fixed', 'fixedValue': '-24'}}}}}}}, 'PROGRAMS.REF.HOLIDAY': {'description': 'The command allows to start a program', 'protocolType': 'MQTT', 'parameters': {'holidayMode': {'category': 'command', 'typology': 'fixed', 'mandatory': 1, 'fixedValue': '1'}}, 'ancillaryParameters': {'remoteActionable': {'category': 'general', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '1'}, 'remoteVisible': {'category': 'general', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '1'}, 'programFamily': {'category': 'cluster', 'typology': 'enum', 'mandatory': 1, 'enumValues': ['dashboard'], 'defaultValue': '[dashboard]'}, 'zone': {'category': 'cluster', 'typology': 'enum', 'mandatory': 1, 'enumValues': ['fridge'], 'defaultValue': '[fridge]'}, 'programRules': {'category': 'rule', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': {'tempSelZ1': {'holidayMode': {'1': {'typology': 'fixed', 'fixedValue': '17'}}}, 'tempSelZ2': {'holidayMode': {'1': {'typology': 'fixed', 'fixedValue': '@tempSelZ2'}}}, 'tempSelZ3': {'holidayMode': {'1': {'typology': 'fixed', 'fixedValue': '17'}}}}}}}, 'PROGRAMS.REF.QUICK_COOL': {'description': 'The command allows to start a program', 'protocolType': 'MQTT', 'parameters': {'tempSelZ3': {'category': 'command', 'typology': 'fixed', 'mandatory': 1, 'fixedValue': '2'}}, 'ancillaryParameters': {'remoteActionable': {'category': 'general', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '1'}, 'remoteVisible': {'category': 'general', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '1'}, 'programFamily': {'category': 'cluster', 'typology': 'enum', 'mandatory': 1, 'enumValues': ['dashboard'], 'defaultValue': '[dashboard]'}, 'zone': {'category': 'cluster', 'typology': 'enum', 'mandatory': 1, 'enumValues': ['vtRoom1'], 'defaultValue': '[vtRoom1]'}}}, 'PROGRAMS.REF.ZERO_FRESH': {'description': 'The command allows to start a program', 'protocolType': 'MQTT', 'parameters': {'tempSelZ3': {'category': 'command', 'typology': 'fixed', 'mandatory': 1, 'fixedValue': '0'}}, 'ancillaryParameters': {'remoteActionable': {'category': 'general', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '1'}, 'remoteVisible': {'category': 'general', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '1'}, 'programFamily': {'category': 'cluster', 'typology': 'enum', 'mandatory': 1, 'enumValues': ['dashboard'], 'defaultValue': '[dashboard]'}, 'zone': {'category': 'cluster', 'typology': 'enum', 'mandatory': 1, 'enumValues': ['vtRoom1'], 'defaultValue': '[vtRoom1]'}}}, 'PROGRAMS.REF.FRUIT_AND_VEG': {'description': 'The command allows to start a program', 'protocolType': 'MQTT', 'parameters': {'tempSelZ3': {'category': 'command', 'typology': 'fixed', 'mandatory': 1, 'fixedValue': '5'}}, 'ancillaryParameters': {'remoteActionable': {'category': 'general', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '1'}, 'remoteVisible': {'category': 'general', 'typology': 'fixed', 'mandatory': 0, 'fixedValue': '1'}, 'programFamily': {'category': 'cluster', 'typology': 'enum', 'mandatory': 1, 'enumValues': ['dashboard'], 'defaultValue': '[dashboard]'}, 'zone': {'category': 'cluster', 'typology': 'enum', 'mandatory': 1, 'enumValues': ['vtRoom1'], 'defaultValue': '[vtRoom1]'}}}}, 'options': {}, 'dictionaryId': 138}

gvigroux commented 1 year ago

Thanks for this, can you also dump the context log? (One every 30sec) I need to see the humidity value

Therodoxx commented 1 year ago

I hope, this is what you mean :) 2023-04-17 08:55:56.735 DEBUG (MainThread) [custom_components.hon.hon] Context for mac[XX] type [REF] {'payload': {'resultCode': '0', 'shadow': {'parameters': {'quickModeZ1': {'parNewVal': '0', 'lastUpdate': '2023-01-03T07:20:21Z'}, 'quickModeZ2': {'parNewVal': '0', 'lastUpdate': '2023-01-03T07:20:21Z'}, 'doorStatusZ1': {'parNewVal': '0', 'lastUpdate': '2023-04-05T18:37:18Z'}, 'door2StatusZ1': {'parNewVal': '0', 'lastUpdate': '2023-04-05T18:37:21Z'}, 'intelligenceMode': {'parNewVal': '0', 'lastUpdate': '2023-01-22T11:48:20Z'}, 'tempSelZ2': {'parNewVal': '-15', 'lastUpdate': '2023-01-22T12:14:20Z'}, 'holidayMode': {'parNewVal': '0', 'lastUpdate': '2023-01-03T07:20:21Z'}, 'tempSelZ1': {'parNewVal': '6', 'lastUpdate': '2023-04-01T13:44:12Z'}, 'tempZ1': {'parNewVal': '6', 'lastUpdate': '2023-04-01T13:50:27Z'}, 'tempZ2': {'parNewVal': '-15', 'lastUpdate': '2023-01-22T12:08:35Z'}, 'errors': {'parNewVal': '00', 'lastUpdate': '2023-01-03T07:20:21Z'}, 'tempSelZ3': {'parNewVal': '5', 'lastUpdate': '2023-01-03T07:20:21Z'}, 'humidityEnv': {'parNewVal': '70', 'lastUpdate': '2023-04-05T18:52:45Z'}, 'tempEnv': {'parNewVal': '17', 'lastUpdate': '2023-04-05T22:36:46Z'}}}, 'activity': {}, 'commandHistory': {'command': {'macAddress': 'XX', 'commandName': 'stopProgram', 'applianceOptions': {}, 'ancillaryParameters': {'programRules': {'fixedValue': {'tempSelZ1': {'@quickModeZ1': {'1': {'fixedValue': '1', 'typology': 'fixed'}}, '@intelligenceMode': {'1': {'fixedValue': '5', 'typology': 'fixed'}}, '@holidayMode': {'1': {'fixedValue': '17', 'typology': 'fixed'}}, '@quickModeZ2': {'1': {'fixedValue': '@tempSelZ1', 'typology': 'fixed'}}}, 'tempSelZ2': {'@quickModeZ1': {'1': {'fixedValue': '@tempSelZ2', 'typology': 'fixed'}}, '@intelligenceMode': {'1': {'fixedValue': '-18', 'typology': 'fixed'}}, '@holidayMode': {'1': {'fixedValue': '@tempSelZ2', 'typology': 'fixed'}}, '@quickModeZ2': {'1': {'fixedValue': '-24', 'typology': 'fixed'}}}}, 'typology': 'fixed', 'category': 'rule', 'mandatory': 0}}, 'applianceType': 'REF', 'attributes': {'prStr': 'PROGRAMS.REF.NO_MODE_SELECTED', 'channel': 'mobileApp', 'origin': 'standardProgram'}, 'device': {'appVersion': '1.49.7', 'deviceModel': 'joyeuse', 'osVersion': '31', 'mobileId': 'c541a6acd5d8eb37', 'mobileOs': 'android'}, 'parameters': {'intelligenceMode': '0'}, 'transactionId': 'XX_2023-01-22T11:48:16.033Z', 'timestamp': '2023-01-22T11:48:16.032Z'}, 'timestampAccepted': '2023-04-01T13:44:07.7Z', 'timestampExecuted': '2023-04-01T13:44:08.7Z'}, 'lastConnEvent': {'macAddress': 'XX', 'category': 'DISCONNECTED', 'instantTime': '2023-04-05T22:37:31Z', 'timestampEvent': 1680734251691}}, 'authInfo': {}} 2023-04-17 08:55:56.735 DEBUG (MainThread) [custom_components.hon.base] Finished fetching hOn Device data in 0.516 seconds (success: True)

gvigroux commented 1 year ago

Perfect :) I will do an update soon

Therodoxx commented 1 year ago

Thanks for your effort! It is a great integration, if you need more information, feel free to write me. :)

gvigroux commented 1 year ago

There is now 1 service to launch any program. If you prefer a different way to integrate, you can propose by opening a new issue :)