Open mouth4war opened 4 years ago
params are power for power mode, temps for target temperature, watts for power load setting (1 is 900w, 2 is 1300W , 3 is 2200w, 4 is auto), delay and sleep, sound (boolean for buzzer), lock (boolean for child lock/physical controls lock).
the three params i'm not sure about are max tempi and tempp (0, 22 and 34/35).
{"id":9835,"method":"get_prop","params":["power","temps","watts","delay","sleep","sound","lock","max","tempi","tempp"]} {"code":0,"id":9835,"otlocalts":1580127392867239,"result":[1,19,1,0,1,0,0,0,22,35]}
If I had to guess, I'd say tempi is environment temperature and tempp is heater temperature.
{
"type":"urn:miot-spec-v2:device:heater:0000A01A:leshow-bs1:1",
"description":"Heater",
"services":[
{
"iid":1,
"type":"urn:miot-spec-v2:service:device-information:00007801:leshow-bs1:1",
"description":"Device Information",
"properties":[
{
"iid":1,
"type":"urn:miot-spec-v2:property:manufacturer:00000001:leshow-bs1:1",
"description":"Device Manufacturer",
"format":"string",
"access":[
"read"
]
},
{
"iid":2,
"type":"urn:miot-spec-v2:property:model:00000002:leshow-bs1:1",
"description":"Device Model",
"format":"string",
"access":[
"read"
]
},
{
"iid":3,
"type":"urn:miot-spec-v2:property:serial-number:00000003:leshow-bs1:1",
"description":"Device Serial Number",
"format":"string",
"access":[
"read"
]
},
{
"iid":4,
"type":"urn:miot-spec-v2:property:firmware-revision:00000005:leshow-bs1:1",
"description":"Current Firmware Version",
"format":"string",
"access":[
"read"
]
}
]
},
{
"iid":2,
"type":"urn:miot-spec-v2:service:heater:0000782E:leshow-bs1:1",
"description":"Heater",
"properties":[
{
"iid":1,
"type":"urn:miot-spec-v2:property:on:00000006:leshow-bs1:1",
"description":"Switch Status",
"format":"bool",
"access":[
"read",
"write",
"notify"
]
},
{
"iid":2,
"type":"urn:miot-spec-v2:property:mode:00000008:leshow-bs1:1",
"description":"Mode",
"format":"uint8",
"access":[
"read",
"write",
"notify"
],
"unit":"none",
"value-list":[
{
"value":0,
"description":"Normal"
},
{
"value":1,
"description":"Sleep"
}
]
},
{
"iid":3,
"type":"urn:miot-spec-v2:property:target-temperature:00000021:leshow-bs1:1",
"description":"Target Temperature",
"format":"uint8",
"access":[
"read",
"write",
"notify"
],
"unit":"celsius",
"value-range":[
18,
28,
1
]
},
{
"iid":4,
"type":"urn:miot-spec-v2:property:temperature:00000020:leshow-bs1:1",
"description":"Temperature",
"format":"int16",
"access":[
"read",
"notify"
],
"unit":"celsius",
"value-range":[
-100,
200,
1
]
},
{
"iid":5,
"type":"urn:miot-spec-v2:property:heat-level:00000047:leshow-bs1:1",
"description":"Heat Level",
"format":"uint8",
"access":[
"read",
"write",
"notify"
],
"unit":"none",
"value-list":[
{
"value":1,
"description":"Low"
},
{
"value":2,
"description":"Middle"
},
{
"value":3,
"description":"High"
},
{
"value":4,
"description":"Auto"
}
]
}
]
},
{
"iid":3,
"type":"urn:miot-spec-v2:service:countdown:0000782D:leshow-bs1:1",
"description":"Countdown",
"properties":[
{
"iid":1,
"type":"urn:miot-spec-v2:property:countdown-time:00000055:leshow-bs1:1",
"description":"Countdown Time",
"format":"uint8",
"access":[
"read",
"write",
"notify"
],
"unit":"hours",
"value-range":[
0,
12,
1
]
}
]
},
{
"iid":4,
"type":"urn:miot-spec-v2:service:environment:0000780A:leshow-bs1:1",
"description":"Environment",
"properties":[
{
"iid":7,
"type":"urn:miot-spec-v2:property:temperature:00000020:leshow-bs1:1",
"description":"Temperature",
"format":"int16",
"access":[
"read",
"notify"
],
"unit":"celsius",
"value-range":[
-100,
200,
1
]
}
]
},
{
"iid":5,
"type":"urn:miot-spec-v2:service:physical-controls-locked:00007807:leshow-bs1:1",
"description":"Physical Control Locked",
"properties":[
{
"iid":1,
"type":"urn:miot-spec-v2:property:physical-controls-locked:0000001D:leshow-bs1:1",
"description":"Physical Control Locked",
"format":"bool",
"access":[
"read",
"write",
"notify"
]
}
]
},
{
"iid":6,
"type":"urn:miot-spec-v2:service:alarm:00007804:leshow-bs1:1",
"description":"Alarm",
"properties":[
{
"iid":1,
"type":"urn:miot-spec-v2:property:alarm:00000012:leshow-bs1:1",
"description":"Alarm",
"format":"bool",
"access":[
"read",
"write",
"notify"
]
}
]
}
]
}
I have a locally tested version that works! It sets temperature and turns on/off the heater.
Still haven't mapped power modes (low, med, high, auto). Thinking of mapping to either preset modes (eco, comfort, boost, home) or to fan modes (1:1 mapping).
Any suggestions?
I searched about leshow.heater.bs1 device but I didn't found any information about that device model. Is it based on miot platform? Is this source code work well on miot platform? I think power modes should be mapped to fan modes.
Yeah your code works for this heater with some changes to the parameters. Some bug with the heat/off state reporting that needs fixing but other than that, it works. Does your heater state work fine?
yes. My heater device is zhimi.heater.za1 and it works well. I can set target temperature and power on/off.
Don't know about your heater but mine has a useless room temperature sensor. I'm thinking these heaters are better used in HA as switches that can be combined with external temperature sensor for a generic thermostat. What do you think?
I've fixed the power and HVAC state reporting bug (this uses 0/1 instead of off/on).
Will make a PR if requested. Right now, I'm trying to figure out a way to get accurate room temperature reading.
Wow, this is what I was looking for. I have the same device and would like to know the progress. Thank you, mouth4war!
I found the files and can make a fork. Still haven't added power modes. Do you still need it?
Yes, please!
Try this https://github.com/mouth4war/homeassistant-mi-heater
hi,i trying to use with leshow.heater.bs1s but it get same error
I get an error when trying to use with leshow.heater.bs1.
@gaussian8 would appreciate your help a lot. TIA!