Is it possible to had support to zhimi.heater.za2 in the miio platform?
There was a custom integration done before, but it stopped working:
Also there is support for this device in this platform
so I guess most of the work is done
Pleaasssse!
Thanks in advance
sergio_pt
(Sergio_PT)
December 3, 2020, 12:20pm
2
Since we are asking, it would be great to also support MODEL: zhimi.heater.mc2
sergio_pt
(Sergio_PT)
December 3, 2020, 3:12pm
3
Using the miiocli I got the below commands working. If someone could code them into an integration it would be great!!
###READS###
# Get Target Temperature
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command get_properties '[{"piid":5,"siid":2}]'
# Get Switch Status
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command get_properties '[{"piid":1,"siid":2}]'
# Get fault
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command get_properties '[{"piid":2,"siid":2}]'
# Get Mode - ERRO
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command get_properties '[{"piid":6,"siid":2}]'
# Get Environment
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command get_properties '[{"piid":1,"siid":3}]'
# Get Temperature
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command get_properties '[{"piid":7,"siid":4}]'
# Get Physical Control Locked stauts
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command get_properties '[{"piid":1,"siid":5}]'
# Get Alarm stauts
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command get_properties '[{"piid":1,"siid":6}]'
###UPDATES###
# Switch Status
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command set_properties '[{"value":True,"siid":2,"piid":1}]'
# Countdown
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command set_properties '[{"value":36000,"siid":3,"piid":1}]'
# Switch Status
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command set_properties '[{"value":True,"siid":2,"piid":1}]'
# Target Temperature
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command set_properties '[{"value":22,"siid":2,"piid":5}]'
# Mode
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command set_properties '[{"value":1,"siid":2,"piid":6}]'
# Physical Control Locked
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command set_properties '[{"value":True,"siid":5,"piid":1}]'
# Alarm
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command set_properties '[{"value":True,"siid":6,"piid":1}]'
# Indicator Light
miiocli device --ip <<IP>> --token <<TOKEN>> raw_command set_properties '[{"value":0,"siid":7,"piid":3}]'
royen99
(Nico)
December 4, 2020, 7:08pm
4
Likely pretty much the same, also zhimi-heater-zb1 ?
sergio_pt
(Sergio_PT)
December 4, 2020, 7:27pm
5
I opened an “issue” in miio and was able to locally create a crude integration, but I dont know how to try to merge it and do a pull request, not how to integrate in HA
opened 01:43PM - 03 Dec 20 UTC
Describe the bug
zhimi.heater.mc2 is not fully supported.
Info command works correctly providing the below output:
$ miiocli heater --ip 192.168.86.94 --token XXXXXXXXXXXXXX info...
miot
new device
1 Like
DanielGS
(DanielGS)
December 5, 2020, 12:34pm
6
I’ll try the integration as soon as python-miio support the device. Where can I find the docs related to this?
joseant
(Joseant)
December 6, 2020, 5:46pm
7
Hi. I have fork the repo homeassistant-mi-heater to work with the zhimi.heater.za2 as custom component.
sergio_pt
(Sergio_PT)
December 6, 2020, 7:46pm
8
Amazing!
I changed a the raw codes and it’s working for zhimi.heater.mc2.
However, I cannot change the targeT temperature. It stays red with no error:
EDIT
I fixed it
The update temperature on my devices does not need the “[]”, so I updated it to:
self._device.raw_command('set_properties',[{"did":"318921340","value":int(temperature),"siid":2,"piid":5}])
Working flawlessly!
For those who need it for Xiaomi Smart Space Heater S you can use my fork:
1 Like
DanielGS
(DanielGS)
December 7, 2020, 12:25am
9
Hi, could you share your card? how could i get energy values?
sergio_pt
(Sergio_PT)
December 7, 2020, 8:46am
10
Hi,
The card is the Simple Thermostat: Lovelace: Simple thermostat card
I’m getting the power and cost from a smart plug, not from the heater.