merdok / homebridge-miot

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

Smartmi Air Purifier TVOC #44

Closed terrorhai closed 3 years ago

terrorhai commented 3 years ago

I use two Smartmi Air Purifier which work nice with miot. But the don't only have PM2.5, they also monitor TVOC (gas concentration). Is it possible to give this value to Homekit?

merdok commented 3 years ago

You probably mean the Air Quality property http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:air-purifier:0000A007:zhimi-za1:1, since there is no TVOC property. The property is already retrieved from the device, the issue is that with the limited Home app Ui there is no meaningful way to display it since the Home app does not support TVOC. Probably i could use a Illumination sensor to display the TVOC value, at least that way it would be visible in the UI...

terrorhai commented 3 years ago

Hey merdok, thx for the answer. Is it possible to switch between Lux sensor for native home app and probably a better displaying for the EVE app?

merdok commented 3 years ago

Automatically it would not be possible, just manually. But i do not think that it would be a good idea to differentiate between various apps...

terrorhai commented 3 years ago

Afaik the official Weather Plus plugin does this too, because many people use the EVE app with thing like fakegato. I attached a screenshot from Weather Plus.

65DEED2A-4439-4747-A32E-46018E4E64EC

merdok commented 3 years ago

For now I have no plans to do something similar, mostly because there are other more important things which needs to be done.

terrorhai commented 3 years ago

Okay, understood! Is it easy todo with only the Lux sensor thing?

merdok commented 3 years ago

Yes, with the lux sensor it would be straightforward.

terrorhai commented 3 years ago

Yeah, then this should be enough for the start :-)

merdok commented 3 years ago

Ok, i will add the TVOC value as a lux sensor in the next update! Will let you know when it is ready!

terrorhai commented 3 years ago

Thanks!!

merdok commented 3 years ago

As of version 0.9.7 TVOC should be displayed as part of the air quality sensor!

terrorhai commented 3 years ago

Hey merdok, nice update and way better than a lux sensor πŸ™ƒ

I'm just thinking about a probably missing 0 in front of the VOC value because 8mg/m3 in my case would be a really hardcore high value while the Mi app says very good.

Hit me if I'm wrong πŸ˜ƒ image image

merdok commented 3 years ago

The value 8 should be the raw value that the device is reporting. I mean you can enable debug log and you will see in the terminal what raw values are synced from the device to make sure that it is correct.

But also like I already said, your device does not report the TVOC value but an Air quality value, so I am not sure if this air quality value is actually the TVOC value...

terrorhai commented 3 years ago

Okay, ignore what I've said. The unit is in micrograms, not milligrams πŸ˜…

So it's working better than expected and is exactly how it should work!

merdok commented 3 years ago

Good to hearπŸ‘