Closed uswong closed 6 months ago
I’ve just uninstalled the homebridge-cmd4-AdvantageAir plugin, twice, because it did not work, at all. The plugin is however, still visible in the plugins view.
I’m not going to try to uninstall it again.
I have no idea how you guys have this thing working, but it’s a massive fail for me.
On Tue, 26 Dec 2023 at 8:55 pm, Ung Sing Wong @.***> wrote:
name: Pull Request about: Resolve an issue or add an improvement to homebridge-cmd4-AdvantageAir. title: "Allow single quotes on accessory names and performance enhancement to lights/things devices" labels: pull-request assignees: mitch7391
With the recent release of Cmd4 v7.0.2, it resolved the issue of mutilated accessory names. AdvAir.sh can now take advantage of that improvement to also allow lights and things devices to have their accessory names with single quotes. The performance for lights and things devices can be further improved by using their ID directly rather than needing to parse for their ID using their accessory names on the fly. Improvement is also done to myZone switch for systems with temperature sensors.
Is your pull request related to a problem or a new feature? Please describe:
- Bug A lights or things accessory names with single-quotes currently passed to the script via State_cmd_suffix will be mutilated.
- Enhancements (a) The lights or things devices require their IDs to operate and they are currently parsed on the fly from their names thus slow down the operation. (b) Since IOS 17, the SwingMode characteristic has disappeared from Homekit primary page but hidden deep inside the Homekit Setting where users find it very cumbersome to locate.
Describe the solution you'd have implemented:
The displayName's single-quotes bug was corrected with the release of Cmd4 v7.0.2. Within AdvAir.sh, the accessory name for lights and things can now be taken directly from the dispayName, hence resolving the issue of mutilated name parsed from the state_cmd_suffix parameters.
Use the ID rather than the name of the lights and things as a parameter in stae_cmd_suffix during the ConfigCreator process, hence parsing of the ID on the fly using the accessory name within AdvAir.sh is no longer required. This will improve the performance of the plugin.
Use RotationDirection characteristic rather than SwingMode as a proxy for myZone switch. RotationDirection characteristic has a button switch on the primary page.
Added unit tests to test for lights and things ID as a parameter in state_cmd_suffix and also added unit tests to test for RotationDirection characteristics.
Updated README to reflect the changes on point 3.
Do your changes pass local testing:
- Yes
- No
Additional context:
This update is backward compatible. If you update to this latest version but do not update the config, the plugin will work just fine but you will not benefit from improvement done on this update.
To benefit from this update, install Cmd4 v7.0.2 and rerun the updated ConfigCreator, delete the homebridge cache and restart Homebridge. It is important that you have to delete the homebridge cache before restarting homebridge.
You can view, comment on, or merge this pull request online at:
https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90 Commit Summary
- a433b81 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/a433b814fd304095fbc700dc0332f7c38370c517 Minor bug fix
- 90a46dd https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/90a46dd639817a490f8709db55e656328777ddc5 Minor bug fix
- 3944a35 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/3944a3544d6c027ed0c80dea873e27fe27e30e6e Allow names with single apostrophe.
- 04685da https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/04685da02d72088b85a78aec1bf16c11504898d0 Allow names with single apostrophe.
- 8b4cd18 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/8b4cd18c8e32644ec6f35623ec39f581fc5952c7 bug fix
- 0ff9083 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/0ff9083e8b0ca8af8096db842aeee52607628556 use the displayName for light/thing name
- 3c3b170 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/3c3b170627ca76f40bd2ff196f642dd25bd4662c use light or thing ID
- 476dcfe https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/476dcfeaf0ed9e0c5b27201e0c7a29f9e5d0a777 Added check on light or thing ID
- b8bedd1 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/b8bedd153dad864db3ab3bd3fd33bb501bb10b95 Added unit tests for using light/thing ID
- 7638ad5 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/7638ad5d9468637d63c82696770ddb4e229b288d Allow single quote in displayName
- 66662bc https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/66662bc7949263cbda00cf64cfdc2c10a70ed379 Added unit tests for light/thing ID
- 0969c34 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/0969c34c4b375f843b5aed8f819476257b9184b9 Add files via upload
- e02cee6 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/e02cee69075945115f7f691a5510067347fe23c8 Add files via upload
- 235fd16 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/235fd16b3de6cdb5aec1973de79374f94b46239c bug fix
- 59e68c0 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/59e68c04d7caf48ab733ed8545ebbcee04f56527 Add files via upload
- 9f1b078 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/9f1b078dd94f0ba35e56f9b9565ed141bb947bdb Allow names with single quotes
- fcc45e6 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/fcc45e603f6f90728c8c79d01be9e9b699e4ba26 Update README.md
- b50b21b https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/b50b21babab699cc4b821a03923015d993928571 Add files via upload
- b24b40b https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/b24b40b001ad1ab1af02e0fbbd38bb26e04a16dd Delete Screenshots/Fanv2_as_integrated_zoneControl.png
- 33b1c13 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/33b1c132897a03a2037fdb114d4eaea77c3237c5 Add files via upload
- a3948ef https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/a3948efb1a9d4cfafa5b262324f55de66cef61ed Add files via upload
- 6f7966e https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/6f7966ebfd5ba2b11c90d55c4800f595ae99152e Add files via upload
- d8f0fa6 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/d8f0fa66d67a2f4cfc7a1c608f6d36bf81f7399e Add files via upload
- cf1984d https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/cf1984dae64a0d2a7c7217b669c0784b5d7f1050 Update README.md
- 0a083dc https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/0a083dcc1df6f57bf12efb9abfc1c83d4cfcf0b1 Allow single quotes for accessory name
- 6f858fb https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/6f858fb1e238284e660fa8fdc729f84c26cb6952 Use RotationDirection as myZone switch
- cd35d1a https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/cd35d1ae4e68ace11f4c0f7cd1402af1ad5ce885 Use RotationDirection as myZone switch
- 121efd9 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/121efd9cb7fbe9ff88370ed3dab2b5c016b9a9c0 Use RotationDirection as myZone switch
- e69b55e https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/e69b55e33fff0b193fa801964741ccdf5c330454 Delete Fanv2_as_integrated_zoneControl.png
- f052dbb https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/f052dbb65a806a7d4fecc7543ced18f46c47818c Delete Screenshots/Fanv2_as_integrated_zoneControl.png
- 8a9f73e https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/8a9f73ef2b833ae304755080aea801c93e449f75 Delete test/GetSwingMode.bats
- b53a4e9 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/b53a4e9316160a426316defbe00fba1aa464c1cf Delete test/SetSwingMode.bats
- f59b5f4 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/f59b5f41c36111dd7d4913a7365afff3ca97769c Add unit tests for RotationDirection
- e60e7ba https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/e60e7ba167ea1a928187da13560d680298d6053b Add unit tests for RotationDirection
- d65d99c https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/d65d99c9443625ec37591927eda6d14fb59bd0c8 Add unit tests for RotationDirection
- f6dd7a5 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/f6dd7a59f654a08b13fd1c0ed5b4c0fb7a65560e Update README.md
- 9b1fc28 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/9b1fc284d8a3cefa482709fc09c0cc3548c69a2f Update README.md
- 3e59ec4 https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/commits/3e59ec454d9eec4f0595e696f7112658ebd5c9f5 Update myPlaceFull.txt
File Changes
(19 files https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files)
- M AdvAir.sh https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-573bdf7722be3241b74222b96704f0eb187adca833d5cadcd49d01b0cc77bd42 (96)
- M CheckConfig.js https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-67097b8a1e7277b5b5dff3d95aa13d84ab86e814ecd79cceca9a8fe9bf317410 (10)
- M Cmd4PriorityPollingQueue.txt https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-8af3fed730524ffb2aceeedf4891fcc892257223a40a7d6ed1a8ab2b0c506049 (11)
- M ConfigCreator.sh https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-13e5254df0ac6c828ac842a00b9cb4b105459e18f430b5621a4e743cac12328f (130)
- M README.md https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5 (26)
- D Screenshots/Fanv2_as_integrated_zoneControl.png https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-fb123bb505e27686fc42062ec64c2e6cb91374d506423e0d47054cadbf9879e4 (0)
- A Screenshots/Fanv2_as_integrated_zoneControl2.png https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-8bbc4b90960be39068298fa8bdfb33ead7c11c4aba5d653e8155ecb533abd980 (0)
- M homebridge-ui/server.js https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-0fb0f1811874d8818a1efa99c067cffcdc4f869e11ccd21293d2d6545d7e351d (46)
- M test/GetBrightness.bats https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-b42ae6cdb3db02021d5a7e208cab3bfd20e93c72d7d73b03a060368883ed8070 (2)
- M test/GetCurrentDoorState.bats https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-a78d78f51eccc9c28897511c71b429f475cf33615ed0b33671ccd6756be2a448 (31)
- R test/GetMyZone.bats https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-d0e02b0e06642cb9667b800026dfa681f61a254ead52986ae4da4eacf668f068 (20)
- M test/GetOn.bats https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-21a8dbad2765cec3b67d9988b3a7e1a958667e52cbc9f54eae5e4e985d607921 (20)
- M test/GetTargetDoorState.bats https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-efe9200bc0b7777cef20a0d32d05fa48bbf80c659b751973535f30bf030bb4b3 (4)
- M test/SetBrightness.bats https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-4e8d6690cc362adaf2f750c4ef17b1c4d593194a03234a680e4b1a55816c2d91 (2)
- R test/SetMyZone.bats https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-02ff94a8a13ce5dda89be8b79200073a160fb767525180d8beda4db78d54e5fd (28)
- M test/SetOn.bats https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-89ac6ccf8020f5268a4182a35a89cdc1d1922d86e819fbcfcb0606a8eb4dcd57 (26)
- M test/SetTargetDoorState.bats https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-28a24ce648b6a00d29052ae97ea7d23b3b36cfe571df39b32fc64f76deb9cd15 (34)
- M test/sampleTest.bats https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-d5e83812640954244478024aabc0521f28c03f319d2589acb96b037f2fa38c45 (2)
- M test/testData/myPlaceFull.txt https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90/files#diff-fdf3eb36311907f73bcd6e32af506b99dfd58f09e260c434274e884d1f819adb (2)
Patch Links:
- https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90.patch
https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90.diff
— Reply to this email directly, view it on GitHub https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIM5SLLFIYK34NQYSM55733YLKNK3AVCNFSM6AAAAABBDDTPJGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA2TMMRUG44TMNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
@8lackIce I believe the changes you have attempted require an update of homebridge-cmd4
to utilise the new functionality of using the ’
characteristic in this plug-in’s config; please make sure you have updated that plugin to take advantage of the changes if you have not already.
If it is in regards to using it in accessory names for MyPlace ‘Lights’ and ‘Things’ as mentioned in this pull request, this is the submission of a proposed change I have not yet had a chance to examine or roll out to users yet.
If you are ever getting yourself to the point of frustration please feel free to reach me on mitchwilliams7391@hotmail.com
before you get to that point and I am sure I can help you find a solution; we have very very rarely ever rolled out a version that has broken the experience for users.
Whoops didn’t mean to close that, stupid mobile UI…
@uswong please correct me if I wrong about the use of ’
prior to the roll out of this pull request.
Hey Mitch, depending on what system user has, if the system only has aircon system (e.g. E-zone) and with '
in some of accessory names, then all they have to do is to install Cmd4 v7.0.2 to get them working without needing this PR update.
If users have myPlace system which includes lights
or things
devices and have '
in the lights
or things
accessories' names, then they need this pull request to get it all working for them. If they want to get them working now, then they will have to remove the '
in their accessory names.
Hi guys,
If you create an update to AdvAir that has a requirement in your package.json to Cmd4 v7.0.2, your users will get everything fixed at once.
Ttyl, John
On Wed, Dec 27, 2023 at 9:33 AM Ung Sing Wong @.***> wrote:
Hey Mitch, depending on what system user has, if the system only has aircon system (e.g. E-zone) and with ' in some of accessory names, then all they have to do is to install Cmd4 v7.0.2 to get them working without needing this PR update.
If users have myPlace system which includes lights or things devices and have ' in the lights or things accessories' names, then they need this pull request to get it all working for them. If they want to get them working now, then they will have to remove the ' in their accessory names.
— Reply to this email directly, view it on GitHub https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/pull/90#issuecomment-1870360468, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCXYH46H2UF43S2S5F3LYLQWTBAVCNFSM6AAAAABBDDTPJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQGM3DANBWHA . You are receiving this because you are subscribed to this thread.Message ID: @.*** com>
Thanks for confirming this @uswong, sounds like I had the right of it :)
If you create an update to AdvAir that has a requirement in your package.json to Cmd4 v7.0.2, your users will get everything fixed at once.
@ztalbot2000 my understanding of doing this is that when the user installs our plug-in, it also installs the latest version of homebridge-cmd4
at the same time?
I think @8lackIce has a completely different issue than the '
thing. This is because even if there are accessory names with '
, the whole cmd4-advantageair
plugin should run just fine (without needing to instal Cmd4 v7.0.2 and this PR update) but with those accessories which has '
as part of their names showing unresponsive on Homekit.
I suspect @8lackIce has fundamental installation issue.
name: Pull Request about: Resolve an issue or add an improvement to homebridge-cmd4-AdvantageAir. title: "Allow single quotes on accessory names and performance enhancement to lights/things devices" labels: pull-request assignees: mitch7391
With the recent release of Cmd4 v7.0.2, it resolved the issue of mutilated accessory names. AdvAir.sh can now take advantage of that enhancement to also allow
lights
andthings
devices to have their accessory names with single quotes. Moreover, the performance forlights
andthings
devices can be further improved by using their ID directly rather than needing to parse for their IDs using their accessory names on the fly. Additionally, some improvement is also done to the "myZone switch" for systems with temperature sensors.Is your pull request related to a problem or a new feature? Please describe:
1) Bug A
lights
orthings
accessory names with single quotes passed to the ADVAir.sh script viaState_cmd_suffix
are mutilated. 2) Enhancements (a) Thelights
orthings
devices require their IDs to operate and they are parsed on the fly from their names thus slow down the operation. (b) Since IOS 17, theSwingMode
characteristic, which was repurposed to bemyZone
switch, has disappeared from Homekit primary page but hidden deep inside the Homekit Setting. It has become very cumbersome to locate making it not very useful.Describe the solution you'd have implemented:
1) The
displayName
's single-quotes bug was resolved with the release of Cmd4 v7.0.2. Within AdvAir.sh, the accessory name forlights
andthings
can now be taken directly from thedispayName
, hence resolving the issue of mutilated name parsed from thestate_cmd_suffix
parameters. 2) Use the ID rather than the name of thelights
andthings
as a parameter instae_cmd_suffix
during the ConfigCreator process, hence parsing of the ID on the fly using the accessory name within AdvAir.sh is no longer required. This will improve the performance of the plugin. 3) UseRotationDirection
characteristic rather thanSwingMode
as a proxy formyZone
switch.RotationDirection
characteristic will show as a round button switch on the Homekit primary page. 4) Added unit tests to test forlights
andthings
ID as a parameter instate_cmd_suffix
and also added unit tests to test forRotationDirection
characteristics.Do your changes pass local testing:
Additional context:
This update is backward compatible. If you update to this latest version but do not update the config, the plugin will work just fine but you will not benefit from improvement done on this update.
To benefit from this update, install Cmd4 v7.0.2 and rerun the updated ConfigCreator, delete the homebridge cache and restart Homebridge. It is important that you have to delete the homebridge cache before restarting homebridge.