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
141 stars 53 forks source link

Add Candy washdryer RPW4966BWMR/1-S #58

Closed KiraPC closed 1 year ago

KiraPC commented 1 year ago

Hi,

I'm using this integration with my candy RPW4966BWMR/1-S.

It works, but some thinks are not correct.

I'm trying to fix something but the coordinator data are pretty different from the ones expected.

This are the data received from hon api:

{
    "dryCottonExtra": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "dryLevel": {
        "parNewVal": "0",
        "lastUpdate": "2023-03-21T06:38:09Z"
    },
    "tIW": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "steamLevel": {
        "parNewVal": "0",
        "lastUpdate": "2023-03-20T20:33:48Z"
    },
    "dirtyLevel": {
        "parNewVal": "0",
        "lastUpdate": "2023-03-18T16:19:22Z"
    },
    "drySynt60": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "temp40": {
        "parNewVal": "10",
        "lastUpdate": "2023-03-20T20:22:36Z"
    },
    "dryCotton120": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "temp": {
        "parNewVal": "0",
        "lastUpdate": "2023-03-20T20:33:48Z"
    },
    "nightWashStatus": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "machMode": {
        "parNewVal": "1",
        "lastUpdate": "2023-03-21T19:34:03Z"
    },
    "dryCotton90": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "checkUpStatus": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "remoteCtrValid": {
        "parNewVal": "1",
        "lastUpdate": "2023-03-06T13:38:40Z"
    },
    "prewash": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "apsOff": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "goodNight": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "extraRinse1": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "remainingTimeMM": {
        "parNewVal": "80",
        "lastUpdate": "2023-03-21T19:34:03Z"
    },
    "hygiene": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "drySyntExtra": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "anticrease": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "acquaplus": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "opt9": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "extraRinse2": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "extraRinse3": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "counterMV": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "drySynt30": {
        "parNewVal": "1",
        "lastUpdate": "2023-03-21T19:20:08Z"
    },
    "program4": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "apsFreq": {
        "parNewVal": "62198",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "program3": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "program6": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "program5": {
        "parNewVal": "1",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "program8": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "program7": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "lang": {
        "parNewVal": "1",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "program9": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "spinSpeed": {
        "parNewVal": "0",
        "lastUpdate": "2023-03-20T20:33:48Z"
    },
    "temp0to30": {
        "parNewVal": "7",
        "lastUpdate": "2023-03-21T19:20:08Z"
    },
    "dryCotton60": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "program2": {
        "parNewVal": "8",
        "lastUpdate": "2023-03-20T20:22:36Z"
    },
    "disTestOn": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "program1": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "unbF": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "prCode": {
        "parNewVal": "12",
        "lastUpdate": "2023-03-21T19:34:03Z"
    },
    "disTestRes": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "unbC": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "numF": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "program19": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "program18": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "drySyntPS": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "program17": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "prPhase": {
        "parNewVal": "0",
        "lastUpdate": "2023-03-21T19:19:58Z"
    },
    "motS": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "program16": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "drySynt120": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "program11": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "ntcD": {
        "parNewVal": "182",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "program10": {
        "parNewVal": "2",
        "lastUpdate": "2023-03-18T16:15:21Z"
    },
    "program15": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "fillR": {
        "parNewVal": "0",
        "lastUpdate": "2023-03-18T16:18:35Z"
    },
    "dryCotton30": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "program14": {
        "parNewVal": "2",
        "lastUpdate": "2023-03-06T18:00:38Z"
    },
    "program13": {
        "parNewVal": "4",
        "lastUpdate": "2023-03-21T19:20:08Z"
    },
    "program12": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "chartL": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "ntcW": {
        "parNewVal": "116",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "delayTime": {
        "parNewVal": "0",
        "lastUpdate": "2023-03-13T05:59:48Z"
    },
    "drySyntPA": {
        "parNewVal": "1",
        "lastUpdate": "2023-02-10T18:06:15Z"
    },
    "error": {
        "parNewVal": "00",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "dryTime": {
        "parNewVal": "1",
        "lastUpdate": "2023-03-21T18:48:26Z"
    },
    "prPosition": {
        "parNewVal": "2",
        "lastUpdate": "2023-03-21T19:34:03Z"
    },
    "temp60to90": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "dryCottonPS": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "program21": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "program20": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:54:06Z"
    },
    "prCodeFav": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "drySynt90": {
        "parNewVal": "3",
        "lastUpdate": "2023-03-21T08:19:48Z"
    },
    "t0R": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "t0W": {
        "parNewVal": "0",
        "lastUpdate": "2023-02-10T08:53:59Z"
    },
    "dryCottonPA": {
        "parNewVal": "2",
        "lastUpdate": "2023-03-06T18:00:38Z"
    },
    "macAddress": "xxxx",
    "category": "DISCONNECTED",
    "instantTime": "2023-03-21T19:34:48Z",
    "timestampEvent": 1679427288892
}

Do you have a table explains all of the keys of this json?

gvigroux commented 1 year ago

Wow everything is different. What did you dump exactly?

KiraPC commented 1 year ago

This is the logs of the content of coordinator.data

gvigroux commented 1 year ago

That's a lot of values :) If you think that one value is essential to see, I will add it. Just tell me

KiraPC commented 1 year ago

I'll try to understand what they means. In case, I can add the sensors classes and push some.

gvigroux commented 1 year ago

of course :) Just take the last version of the master branch, there are a lot of changes

KiraPC commented 1 year ago

Sure, I'm not a noob :D

csaba66 commented 1 year ago

Hi, here's my list for a Candy RP 696BWMRR/1-S:

[custom_components.hon.hon] {"payload":{"resultCode":"0","shadow":{"parameters":{ "dryCottonExtra":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "dryLevel":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "tIW":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "steamLevel":{"parNewVal":"0","lastUpdate":"2023-03-24T10:51:25Z"}, "dirtyLevel":{"parNewVal":"3","lastUpdate":"2023-03-25T10:09:29Z"}, "drySynt60":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "temp40":{"parNewVal":"27","lastUpdate":"2023-03-25T21:14:48Z"}, "dryCotton120":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "temp":{"parNewVal":"40","lastUpdate":"2023-03-25T18:50:55Z"}, "nightWashStatus":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "machMode":{"parNewVal":"7","lastUpdate":"2023-03-25T21:14:38Z"}, "dryCotton90":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"},"checkUpStatus":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "remoteCtrValid":{"parNewVal":"0","lastUpdate":"2023-03-25T18:50:55Z"}, "prewash":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "apsOff":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"},
"goodNight":{"parNewVal":"0","lastUpdate":"2023-03-09T18:18:26Z"}, "extraRinse1":{"parNewVal":"0","lastUpdate":"2023-01-27T18:32:51Z"}, "remainingTimeMM":{"parNewVal":"1","lastUpdate":"2023-03-25T21:14:17Z"}, "hygiene":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"},
"drySyntExtra":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "anticrease":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"},
"acquaplus":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "opt9":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "extraRinse2":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "extraRinse3":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "counterMV":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "drySynt30":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "program4":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"},
"apsFreq":{"parNewVal":"62189","lastUpdate":"2023-01-26T18:20:38Z"}, "program3":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "program6":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "program5":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"},
"program8":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "program7":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "lang":{"parNewVal":"1","lastUpdate":"2023-01-26T18:20:38Z"}, "program9":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"},
"spinSpeed":{"parNewVal":"1200","lastUpdate":"2023-03-24T16:43:03Z"}, "temp0to30":{"parNewVal":"1","lastUpdate":"2023-02-17T13:09:03Z"}, "dryCotton60":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "program2":{"parNewVal":"10","lastUpdate":"2023-03-24T17:45:21Z"},
"disTestOn":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "program1":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "unbF":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "prCode":{"parNewVal":"4","lastUpdate":"2023-03-25T18:50:55Z"},
"disTestRes":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "unbC":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "numF":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "program19":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"},
"program18":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "drySyntPS":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"},
"program17":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"},
"prPhase":{"parNewVal":"0","lastUpdate":"2023-03-25T21:14:32Z"},
"motS":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "program16":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "drySynt120":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "program11":{"parNewVal":"14","lastUpdate":"2023-03-25T21:14:48Z"}, "ntcD":{"parNewVal":"7","lastUpdate":"2023-01-26T18:20:38Z"}, "program10":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "program15":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"},
"fillR":{"parNewVal":"100","lastUpdate":"2023-03-25T19:03:06Z"},
"dryCotton30":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "program14":{"parNewVal":"5","lastUpdate":"2023-03-25T13:15:24Z"},
"program13":{"parNewVal":"1","lastUpdate":"2023-02-17T13:09:03Z"}, "program12":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "chartL":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"},
"ntcW":{"parNewVal":"130","lastUpdate":"2023-01-26T18:20:38Z"}, "delayTime":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "drySyntPA":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "error":{"parNewVal":"00","lastUpdate":"2023-01-26T18:20:38Z"},
"dryTime":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"},
"prPosition":{"parNewVal":"11","lastUpdate":"2023-03-25T18:50:55Z"}, "temp60to90":{"parNewVal":"3","lastUpdate":"2023-03-25T13:15:24Z"}, "dryCottonPS":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "program21":{"parNewVal":"1","lastUpdate":"2023-03-22T19:05:07Z"}, "program20":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "prCodeFav":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "drySynt90":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}, "t0R":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "t0W":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:38Z"}, "dryCottonPA":{"parNewVal":"0","lastUpdate":"2023-01-26T18:20:43Z"}}},

"activity":{},"commandHistory":{"command":{"macAddress":"*****", "commandName":"startProgram","applianceOptions":{"opt7":"extraRinse3","opt8": "acquaplus","opt3":"anticrease","opt4":"goodNight","opt5":"extraRinse1","opt6": "extraRinse2","opt1":"prewash","opt2":"hygiene"},"programName":
"PROGRAMS.WM_WD.IOT_WASH_PERFECT_WHITE","ancillaryParameters":{
"remoteActionable":"1","programType":"W+D+S","steamType":"C", "suggestedLoadW":"7","remoteVisible":"1","programCluster":"stains", "powderDetergentDose":"4","programIntensity":"intensiveWashing", "energyLabel":"3","programFamily":"[download]","tempContribution":"1"}, "applianceType":"WM","attributes":{"prStr":"Perfect White", "channel":"mobileApp","energyLabel":"3","origin":"standardProgram"}, "device":{"appVersion":"1.53.7","deviceModel":"universal7880", "osVersion":"26","mobileId":"a9e3fb250349e003","mobileOs":"android"}, "parameters":{"acquaplus":"0","dirtyLevel":"3","temp":"60","goodNight":"0", "steamLevel":"0","anticrease":"0","prCode":"1","prewash":"0","prPosition":"14", "extraRinse2":"0","extraRinse1":"0","dryLevel":"0","extraRinse3":"0", "spinSpeed":"1200","hygiene":"0","checkUpStatus":"0","delayTime":"0", "lang":"1","onOffStatus":"1"}, "transactionId":"90-38-0c-11-8b-bc_2023-03-25T10:09:13.856Z",
"timestamp":"2023-03-25T10:09:13.856Z"}, "timestampAccepted":"2023-03-25T10:09:17.2Z", "timestampExecuted":"2023-03-25T10:09:17.6Z"}, "lastConnEvent":{"macAddress":"****", "category":"DISCONNECTED","instantTime":"2023-03-25T21:20:18Z", "timestampEvent":1679779218091}},"authInfo":{}}

KiraPC commented 1 year ago

of course :) Just take the last version of the master branch, there are a lot of changes

I've tried the branch Full rework but I always receive error:

Questo errore ha avuto origine da un'integrazione personalizzata.

Logger: homeassistant
Source: custom_components/hon/sensor.py:571
Integration: hOn (documentation)
First occurred: 10:14:57 (2 occurrences)
Last logged: 10:15:27

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 182, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 330, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 135, in async_update_listeners
    update_callback()
  File "/config/custom_components/hon/sensor.py", line 571, in _handle_coordinator_update
    self._on = self._coordinator.data["onOffStatus"]["parNewVal"] == "1"
KeyError: 'onOffStatus'

EDIT: on in master is it fixed :D

gvigroux commented 1 year ago

I've updated it again, I did a full rework of all sensors. We have to delete and reinstall the integration, but the code will be much easier to maintain now

KiraPC commented 1 year ago

@gvigroux Thanks.

I have another questions. With Hayer you can controll the washmaschin from HA? Because with this Candly appliance I cannot.

gvigroux commented 1 year ago

I have a climate device, so I don't know. But someone has added a start washing program (so I guess it works)

KiraPC commented 1 year ago

Ok, i'll try.