break-pointer / homebridge-tion

Homebridge plugin to control Tion breezers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:
Screenshot 2021-05-17 at 18 37 46

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:
Screenshot 2021-05-17 at 18 37 26

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:

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