merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
364 stars 62 forks source link

The devices seem to be missing features #576

Closed rappc87 closed 4 months ago

rappc87 commented 4 months ago

I have a few devices and some buttons etc. seem to be missing. how can I add them? Some features come automatically, but still many things seem to be missing.

my devices :

yeelink.light.color3 dmaker.fan.p39 roborock.vacuum.a27 zhimi.heater.zb1a zhimi.airp.vb4

for example : https://www.merdok.org/miotspec/

this address shows more features for my devices, while the home app doesn't have as many features and buttons.

merdok commented 4 months ago

You can use the propertyControl and propertyMonitor config properties to expose anything that you want. You can have a look at the examples here: https://github.com/merdok/homebridge-miot?tab=readme-ov-file#configuration

rappc87 commented 4 months ago

Yes, that's exactly what I wanted to ask. how do I know the settings here and how do I adjust them? a lot of people get stuck on this. The explanation in the example is not very clear for beginners, to be honest.

merdok commented 4 months ago

You just go to the mentioned website https://www.merdok.org/miotspec/ type in your device and then you just take the property name or id and put it in the configs as in the example.

rappc87 commented 4 months ago

You just go to the mentioned website https://www.merdok.org/miotspec/ type in your device and then you just take the property name or id and put it in the configs as in the example.

First of all, thank you very much for your answers, but I am very new to these things and it seems really complicated. Actually, as far as I understand, all the features of the device are already specified on https://www.merdok.org/miotspec/. Is there any way to convert them to config automatically? When we export it, it will convert it to config and we can edit the properties related to the device ourselves. Like IP, etc.

merdok commented 4 months ago

No, there is no way to convert them. You simply go to the website pick which properties you would like and put them in your config, and that's it. The example in the README shows pretty clearly how they should be added, there is also a description to the config properties if you need more info.

rappc87 commented 4 months ago

I tried but it's not working.

merdok commented 4 months ago

Then you have to be more specific what is nothing and post your config.

rappc87 commented 4 months ago

Okay, I solved the problem.

But there is a small issue left.for example, I want to add fan:horizontal-angle for my dmaker.fan.p39 device, but it adds it as toggle. I want to add two arrows that trigger a fan. As I press left, the angle decreases and the fan is observed as a decrease in the fan. Likewise, when I press the right arrow, the angle increases and the fan indicator increases. is such a thing possible?

and toggle names are sometimes in English. English is not my first language. I have to change their names all the time. why can it be? sometimes it goes back to English.

merdok commented 4 months ago

Unfortunately that is not possible, HomeKit only allows limited control possibilities, in order to overcome that issues some tricks are necessary. So if you want to change the horizontal angle then you would need to add a button for your favorite angles. Also you can try to use the fan:motor-control property on your device, which might be eventually what you are looking for? The toggle name i fetched from the miot spec, if necessary then you can override it by specifying your own name in the config as per example.

rappc87 commented 4 months ago

Unfortunately that is not possible, HomeKit only allows limited control possibilities, in order to overcome that issues some tricks are necessary. So if you want to change the horizontal angle then you would need to add a button for your favorite angles. Also you can try to use the fan:motor-control property on your device, which might be eventually what you are looking for? The toggle name i fetched from the miot spec, if necessary then you can override it by specifying your own name in the config as per example.

Thanks a lot, fan:motor-control this is what I was looking for, I wish it was like button or smtn not toggle but better than anything. Also I can give Name for my own additions, but I am not sure how to add them in the config since I do not know the ids of the default ones. Actually, when I change it in the accessories section, it would be great if it changes in the homekit.

merdok commented 4 months ago

The default ones you unfortunately cannot change, they are being read out from the spec. You could try to modify the spec file which is cached on your device but that would be something rather complex i would say.

rappc87 commented 4 months ago

The default ones you unfortunately cannot change, they are being read out from the spec. You could try to modify the spec file which is cached on your device but that would be something rather complex i would say.

So I should edit them when its back to original ?

merdok commented 4 months ago

Whenever you restart homebridge you will need to edit them currently, so i guess during your config modifications don't edit them until you are done.

rappc87 commented 4 months ago

Whenever you restart homebridge you will need to edit them currently, so i guess during your config modifications don't edit them until you are done.

Thanks a lot for all your effort and helps