This python script is designed to communicate with Candy/Hoover washer dryers to produce a JSON readable by Home Assistant.
Tested and working on:
- Hoover WDWOA596H WIFI Washer Dryer
- Hoover H3DS4965TACBE-80 Washer Dryer
- In a terminal run the command:
curl -s http://CANDY_IP/http-read.json?encrypted=1 | xxd -r -p > ./coded.txt
This gets the raw hex data from the machines API and converts to plaintext. - Feed the coded.txt into xorknown.py using:
./xorknown.py ./coded.txt '{"statusLavatric' 16
- the output should now contain a key of length 16 and a JSON. An example decoded JSON:
Plaintext: { "statusLavatrice":{ "WiFiStatus":"0", "Err":"255", "MachMd":"1", "Pr":"4", "PrPh":"0", "SLevel":"255", "Temp":"60", "SpinSp":"10", "Opt1":"0", "Opt2":"0", "Opt3":"0", "Opt4":"0", "Opt5":"0", "Opt6":"0", "Opt7":"0", "Opt8":"0", "Steam":"0", "DryT":"0", "DelVal":"255", "RemTime":"59", "RecipeId":"0", "CheckUpState":"0" } }
- If you do not have a full key at this stage repeat step 3 using another JSON key value like 'WiFiStatus' until each character of the key is known.
- Add your KEY and DEVICE_IP to candy.py and place in your Home Assistant config/pyscripts.
candy.py gets the data, decodes it and strips down the JSON to meet Home Assistants 255 character limit on sensors.
To set up in Home Assistant you can use the sensor:
command_line:
- sensor:
name: 'Candy Washer Dryer'
scan_interval: 60
command_timeout: 30
command: python3 ./pyscript/candy.py
value_template: '{{ value_json }}'
json_attributes:
- WiFiStatus
- Err
- MachMd
- Pr
- PrPh
- Temp
- SpinSp
- RemTime
- DryT
- DelVal
- TotalTime
- example templates including translations of machine program codes can be found in configuration.yaml.
- example cards can be found in lovelace.yaml. These use custom:card-mod, custom:fold-entity-row and custom:config-template-card integrations.