aschzero / homebridge-airmega

Homebridge plugin for the Coway Airmega air purifier.
35 stars 19 forks source link

Error switching to manual #16

Open GTPatriots opened 3 years ago

GTPatriots commented 3 years ago

When switching from auto to manual if the fan speed was already set to the desired level then the filter changes to sleep mode only, not sleep mode and the desired fan speed.

For example, air quality is excellent so fan speed is 1, send command to switch to manual with fan speed at 1. The end result should be sleep on/fan speed 1, that's what would happen with the iocare app. The actual result is sleep on with no set fan speed. (note that this can be reproduced manually in the home app, but with automatons it is certainly easier to reproduce).

GTPatriots commented 3 years ago

There seems to be other flaky commands. When on manual/sleep/3 and you send a command to go to auto it seems to instead go to manual/whatever the fan speed you have set in the app, then if you send the same command again it actually goes to auto. (note that I do not think this can be done by hand in the home app, this can only be done in automatons).

GTPatriots commented 3 years ago

This issue is solved in my repo and pull request.

Logic flaws that remain:

  1. Inside home app if you select the purifier and then select manual it will go to sleep.
  2. Inside home app if you select auto but the rotation speed is different than when previously selected, say from an automation, 2 commands are sent. One to go to auto followed immediately by another than changes the rotation speed, which changes back to manual.

For the 1st. Suggest using the rotation speed which will also set to manual. For the 2nd I use the controller app instead of the home app. This allows me to send exclusively the auto command. Leaving this issue open in case someone wants to fix these logic flaws.