Closed uswong closed 2 years ago
Good point Mitch!
I have been running both tablets on one queue (queue A) and they both work fine.
And I just tried to run the 2nd tablet on another queue (queue B) and works fine also.
I like it. I think it has advantages running them in separate queue. I can imagine that when running them in separate queue, one will not interfere with the other adversely especially if you are setting
on one, the other can just carry on without needing to wait for the Set
to complete.
As such, we should recommend users to use separate queue for the 2nd tablet.
I can imagine that when running them in separate queue, one will not interfere with the other adversely especially if you are
setting
on one, the other can just carry on without needing to wait for theSet
to complete.
Exactly what I was thinking and hoping; just had to double check :) I will merge this now!
name: Pull Request about: Resolve an issue and add improvements to homebridge-cmd4-AdvantageAir. title: "New Additional Functionalities and Performance Enhancement to v3.3.0" labels: pull-request assignees: mitch7391
Additional functionalities and performance enhancement to v3.3.0
Is your pull request related to a problem or a new feature? Please describe: This version added new features and improved performance for a big AirCon system.
Describe the solution you'd have implemented:
AdvAir.sh
to handle a big AirCon system:getSystemData
to complete which can range from 1 second to 60 seconds and occasionally beyond 60 seconds.timeout
situation. The CMD4timeout
is set at 60000 (60 seconds).getSystemData
after everySet
command.Set
command usingjq
so that the cache file always reflects the latest state of the system in real time. This is a game-changer performance enhancement for a big AirCon system.AdvAir.sh
. The temporary sub-directory structure has 2 advantages:AdvAir.sh
to handle multiple AdvantageAir control units.Thermostat
auto
mode as a proxy todry
mode in AdvantageAir control unit. This enable users to set thedry
mode usingHomekit
.setLights
,setTemp
,fan
andsetValue
with decimal point.Unit Tests
bats
file to reflect the introduction of temporary sub-directory structure.GetOn.bats
andGetBrightness.bats
to include the tests toGet
the state and brightness of lights.SetOn.bats
andSetBrightness.bats
to include the tests toSet
the state and brightness of lights.SetTargetTemperature.bats
to test the setting ofsetTemp
.BigAirConSystem.bats
to test the logic of handling a wide range of time taken forgetSystemData
to complete and to test the recovery logic in CMD4timeout
situation.Do your changes pass local testing:
shellcheck
, allUnit Tests
and has been running flawlessly for many days on myE-zone
system, JohnW'sMyPlace
system and my simulated big Aircon System as 2nd control unit usingAirConServer
.Additional context: All enhancements are under the hook improvements which require no change to the config file, hence no action required for all existing users.
However, for users who has a second AirCon control unit and would like to add it to the
Homekit
can do so by defining an extra IP key and associated accessories in the config file. An example sample config file for the 2nd control unit is shown below. Please note the additionalconstants
key is defined as${IP2}
and be sure to use${IP2}
instate_cmd_suffix
in all the accessories pertaining to that 2nd control unit.