merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
396 stars 63 forks source link

Add support for Lomediqi Fresh air system #601

Open DaddyTommy69 opened 5 months ago

DaddyTommy69 commented 5 months ago

Device model bjdm.airfresh.test01

Device name Lomediqi Intelligent Fresh air purifier

Does the device require a MiCloud connection? Do not know (released in 2019 I think according to this page https://home.miot-spec.com/s/bjdm.airfresh.test01)

Anything special about the device?

merdok commented 5 months ago

Hi, what is not working with the device currently? Did you already try to add it to the plugin?

DaddyTommy69 commented 5 months ago

My apologies I recently press discover devices in the plugin and it's been found and working in homekit. However I do wish for a fresh air level option alongside the fan speed option, as the device has 2 fans that operate independently (the top one is for room air intake and bottom one for fresh air intake). I will post the pic of the Xiaomi Home controls below

DaddyTommy69 commented 5 months ago

Controls for the top fan (room air intake) Screenshot_20240610_140706_Mi Home

Controls for the bottom fan (fresh air intake) Screenshot_20240610_140700_Mi Home

merdok commented 5 months ago

Hi, you would need to use propertyControl to expose the missing functionality.

DaddyTommy69 commented 5 months ago

I managed to find what I want to control but not sure how to input them. Please point me in the right direction Untitled

merdok commented 5 months ago

You just have to enter the property name in the required field.

DaddyTommy69 commented 5 months ago

It is showing up as individual switches for 0-1-2-3-4-5 level. Is it possible to turn it into the blue slider for fans

20240610_154448

merdok commented 5 months ago

Not in a generic way because the property is marked as a value list with a couple possible values, currently you can only show things like this with multiple switches.

DaddyTommy69 commented 5 months ago

It would be greatly appreciated if you could find the time to implement such function. It is one of the main selling point of the unit as opposed to much pricier alternatives. Thank you

merdok commented 5 months ago

It requires a special property handling currently for this particular device which would require some work. Maybe it could be emulated using a fan or lightbulb but that would still require some code adjustments. The main problem here is that HomeKit does not support such ui control which allows to select between multiply options hence we need to do some tricks in order to make it work...

merdok commented 5 months ago

You can also limit the values only to those switches which you use the most, so if you just use two values then you can create two propertyControl for the same property and you can specify the value it should set, that way only two switches will appear.