Add "Auto mode"
korkhau opened this issue · comments
Hi,
Can we have "auto" mode feature added into homebridge plugin?
For now issue exists: homebrigde plugin will not change settings if "auto" mode is enabled.
Tion has "Auto" mode in mobile application:
Once target level of CO2 is set we can enable this mode.
Main difference between "manual" and "auto" modes is speed switcher.
For "manual" there is only one value but for "auto" we specify range:
If you will check https://api2.magicair.tion.ru/location/
api you can find something like this:
"mode": {
"current": "auto",
"auto_set": {
"co2": 750.0,
"temperature": 0.0,
"humidity": 0.0,
"noise": 0.0,
"pm25": 0.0,
"pm10": 0.0
}
},
These references on how to call tion API for setting "auto" or "manual" modes in this python project can help:
- https://github.com/airens/tion/blob/3487bc39f53d89847132bc388e318f0a5e6a2389/tion/tion.py#L602-L608
- https://github.com/airens/tion/blob/3487bc39f53d89847132bc388e318f0a5e6a2389/tion/tion.py#L757-L758
Not sure but this also can be helpful: - https://dev.iridi.com/Tion/en#Magic_Air
Many thanks for your awesome work on supporting this plugin!
Hi @korkhau
Thank you for sharing your ideas about "auto" mode implementation!
I have some concerns about adding "auto" to Homekit accessories:
- Homekit doesn't have a native characteristic "rotation speed range" (neither it has any sort of a range selector). We could try to simulate this by adding two characteristics, say "min auto speed" and "max auto speed", but unfortunately Homekit only supports one
RotationSpeed
characteristic per air purifier accessory. - the "auto" mode itself contradicts built-in Homekit automation feature. Consider an example: you can setup different automation actions when a CO2-level reaches certain values - CO2 ppm above 801 -> turn on breezer and set speed to 1, CO2 goes below 801 -> turn off breezer, and so on for different CO2-levels and rotation speeds.
Given these facts I'm not sure that support for "auto" mode via controls is useful.
But I think we could implement a workaround - when you control breezer via Homekit we could check it "auto" mode is ON and disable it if it is.
Hi @break-pointer,
Can we try to add just a switch that enables auto-mode with target co2?
Workaround looks good in cases when we change speed to our own level => auto mode should be disabled before it.
For now it is impossible to change speed if breezer is in auto-mode.
Thanks
Fixed in #30
Please see version 1.0.21