Skip to content

Legacy Config Creation

Mitch Williams edited this page Oct 17, 2026 · 1 revision

Important

Legacy v3 Documentation

This guide applies to the original Cmd4-based Homebridge Advantage Air v3 plugin. It is preserved for existing users and historical reference.

Native v4 does not require Cmd4, shell scripts or the Config Creator. It uses a standalone Homebridge plugin with its own configuration interface.

Related Documentation

Introduction

This guide provides a demonstration of all of the options available for homebridge-cmd4-AdvantageAir and how to build your config.json. You may or may not be aware but homebridge-cmd4-AdvantageAir is not its own independent plugin and requires homebridge-cmd4 to operate. This 'pseudo-plugin' only provides you with the bash script and a delivery method for me to keep your script up to date with the latest features. This will mean that when it comes to creating your config.json; you will actually be editing the config for homebridge-cmd4.

ConfigCreator

The ConfigCreator UI was originally designed for users who have a larger MyPlace system with Lights, Garage Doors, etc.; some of these users can have over 100 accessories and this can be very painful to create a cmd4 config.json for! However, new and existing users can still benefit from using this script also if they do not want to create their config manually. Homebridge users with access to the Homebridge web UI can easily run the ConfigCreator from the homebridge-cdm4-advantageair plug-in settings as described on the README.

For HOOBS users there is no access to the Homebridge web UI, so for HOOBS users and Homebridge users without access to the web UI; these users will need to run the ConfigCreator from their terminal. The script when run, will prompt you for a name for the system (the default is Aircon), it will then prompt you for the IP address of your Advantage Air system, it will ask if you have a second or third IP address (users with more than one control tablet) and finally if you would like to set your fan up as a 'Switch' accessory or a 'Fan' accessory.

From here, it will talk to your Advantage Air system and work out all of the accessories you will require and craft those into a new config.json file. It will then automatically modify your Homebridge config.json for you and ask you to reboot. This will not overwrite any existing cmd4 accessories you may have outside of this project and it will take a backup of your original Homebridge config.json just in case.

HOOBS Terminal Instructions

  1. Open your terminal.
  2. Type the following to go to your home directory:
cd
  1. Copy and paste the following command to locate your ConfigCreator script:
config1=$(find /var/lib/hoobs -name ConfigCreator.sh 2>&1|grep -v find|grep -v System|grep -v cache|grep node_modules|grep cmd4-advantageair|grep ConfigCreator.sh)
  1. Type the following to view the contents of what was found:
echo "$config1"
  1. a) If the response returned from Step 4 looks like the following (file path name at XXXX can differ):
/var/lib/hoobs/XXXX/node_modules/homebridge-cmd4-advantageair/ConfigCreator.sh

Then execute the following command:

$config1

Follow the prompts on your terminal and enjoy!

  1. b) If the response returned from Step 4 contains multiple file paths, copy and paste the following command to select the first file path:
config2=$(echo "${config1}"|sed -n 1p)

If you want to use the second file path instead, then change 1p in the above command to 2p, and so on.

Type the following to view the contents of what was found:

echo "$config2"

If the response returned looks like the following (file path name at XXXX can differ):

/var/lib/hoobs/XXXX/node_modules/homebridge-cmd4-advantageair/ConfigCreator.sh

Then continue with the following command:

$config2

Follow the prompts on your terminal and enjoy!

  1. c) If you experience anything different from the above, please raise an Support Request issue for help.

Homebridge Terminal Instructions

  1. Open your terminal.
  2. Type the following to go to your home directory:
cd
  1. Copy and paste the following command to locate your ConfigCreator script:
config1=$(find /usr/local/lib -name ConfigCreator.sh 2>&1|grep -v find|grep -v System|grep -v cache|grep node_modules|grep cmd4-advantageair|grep ConfigCreator.sh)
  1. Type the following to view the contents of what was found:
echo "$config1"
  1. a) If the response returned from Step 4 looks like the following (file path name at XXXX can differ):
/usr/local/lib/XXXX/node_modules/homebridge-cmd4-advantageair/ConfigCreator.sh

Then execute the following command:

$config1

Follow the prompts on your terminal and enjoy!

  1. b) If the response returned from Step 4 contains multiple file paths, copy and paste the following command to select the first file path:
config2=$(echo "${config1}"|sed -n 1p)

If you want to use the second file path instead, then change 1p in the above command to 2p, and so on.

Type the following to view the contents of what was found:

echo "$config2"

If the response returned looks like the following (file path name at XXXX can differ):

/var/local/lib/XXXX/node_modules/homebridge-cmd4-advantageair/ConfigCreator.sh

Then continue with the following command:

$config2

Follow the prompts on your terminal and enjoy!

  1. c) i) If the response returned from Step 4 contains no result, copy and paste the following command:
config1=$(find /usr/lib -name ConfigCreator.sh 2>&1|grep -v find|grep -v System|grep -v cache|grep node_modules|grep cmd4-advantageair|grep ConfigCreator.sh)

Type the following to view the contents of what was found:

echo "$config1"

If the response returned looks like the following (file path name at XXXX can differ):

/usr/lib/XXXX/node_modules/homebridge-cmd4-advantageair/ConfigCreator.sh

Then continue with the following command:

$config1
  1. c) ii) If the response returned from Step 5 c) i) contains multiple file paths, copy and paste the following command to select the first file path:
config2=$(echo "${config1}"|sed -n 1p)

If you want to use the second file path instead, then change 1p in the above command to 2p, and so on.

Type the following to view the contents of what was found:

echo "$config2"

If the response returned looks like the following (file path name at XXXX can differ):

/usr/lib/XXXX/node_modules/homebridge-cmd4-advantageair/ConfigCreator.sh

Then continue with the following command:

$config2

Follow the prompts on your terminal and enjoy!

  1. c) iii) If you experience anything different from the above, please raise an Support Request issue for help.

CheckConfig

The CheckConfig UI was originally designed to check over your installation and config to make sure you have everything correct and to reduce fault finding efforts. Homebridge users with access to the Homebridge web UI can easily run the CheckConfig from the homebridge-cdm4-advantageair plug-in settings as described on the README.

As discussed above, HOOBS users do not have access to the Homebridge web UI, so for HOOBS users and Homebridge users without access to the web UI; they will need to run the CheckConfig from their terminal. The script when called, will run through all the requirements of the plug-in installation steps and your config. On a success it will say Passed; if something is incorrect, an error message will pop up telling you what it is that you have missed and need to address.

HOOBS Terminal Instructions

  1. Open your terminal.
  2. Type the following to go to your home directory:
cd
  1. Copy and paste the following command to locate your CheckConfig script:
check1=$(find /var/lib/hoobs -name CheckConfig.sh 2>&1|grep -v find|grep -v System|grep -v cache|grep node_modules|grep cmd4-advantageair|grep CheckConfig.sh)
  1. Type the following to view the contents of what was found:
echo "$check1"
  1. a) If the response returned from Step 4 looks like the following (file path name at XXXX can differ):
/var/lib/hoobs/XXXX/node_modules/homebridge-cmd4-advantageair/CheckConfig.sh

Then execute the following command:

$check1

Follow the prompts on your terminal and enjoy!

  1. b) If the response returned from Step 4 contains multiple file paths, copy and paste the following command to select the first file path:
check2=$(echo "${check1}"|sed -n 1p)

If you want to use the second file path instead, then change 1p in the above command to 2p, and so on.

Type the following to view the contents of what was found:

echo "$check2"
  1. c) If you experience anything different from the above, please raise an Support Request issue for help.

Homebridge Terminal Instructions

  1. Open your terminal.
  2. Type the following to go to your home directory:
cd
  1. Copy and paste the following command to locate your CheckConfig script:
check1=$(find /usr/local/lib -name CheckConfig.sh 2>&1|grep -v find|grep -v System|grep -v cache|grep node_modules|grep cmd4-advantageair|grep CheckConfig.sh)

OR

check1=$(find /usr/lib -name CheckConfig.sh 2>&1|grep -v find|grep -v System|grep -v cache|grep node_modules|grep cmd4-advantageair|grep CheckConfig.sh)
  1. Type the following to view the contents of what was found:
echo "$check1"
  1. a) If the response returned from Step 4 looks like the following (file path name at XXXX can differ):
/usr/local/lib/XXXX/node_modules/homebridge-cmd4-advantageair/CheckConfig.sh

OR

/usr/lib/XXXX/node_modules/homebridge-cmd4-advantageair/CheckConfig.sh

Then execute the following command:

$check1

Follow the prompts on your terminal and enjoy!

  1. b) If the response returned from Step 4 contains multiple file paths, copy and paste the following command to select the first file path:
check2=$(echo "${check1}"|sed -n 1p)

If you want to use the second file path instead, then change 1p in the above command to 2p, and so on.

Type the following to view the contents of what was found:

echo "$check2"
  1. c) If you experience anything different from the above, please raise an Support Request issue for help.

Config Options

Platform Directives

We will start start out with the very basics of a Homebridge config.json.

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "123-45-678"
    },
    "accessories": [
        {
        ...
        }
    ],
    "platforms": [
        {
        ...
        }
    ]
}

You may or may not already have other accessories or platforms defined already. From here we would begin to set out the homebridge-cmd4 platform directives.

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "123-45-678"
    },
    "accessories": [
        {
        ...
        }
    ],
    "platforms": [
        {
            "platform": "Cmd4",
            "name": "Cmd4",
            "outputConstants": false,
            "statusMsg": true,
            "timeout": 60000,
            "stateChangeResponseTime": 0,
            "constants": [
                {
                    "key": "${IP}",
                    "value": "192.168.0.173"
                }
            ],
            "queueTypes": [
                {
                    "queue": "A",
                    "queueType": "WoRm2"
                }
            ],
            "accessories": [
                {
                ...
                }
            ]
        }
    ]
}

At this stage we have not yet defined any accessories inside of the homebridge-cmd4 platform. Here is a short description of each of the platform's directives:

  • "platform": Must always be set to "Cmd4".
  • "name": Must always be set to "Cmd4".
  • "outputConstants": Tells homebridge-cmd4 to send strings "TRUE"/"FALSE" instead of 0/1 for all accessories. Must always be set to false.
  • "statusMsg": Tells homebridge-cmd4 to log 'Set Status Message' for all Accessories. Optional, set to true or false.
  • "timeout": Tells homebridge-cmd4 how long to wait before killing the state command of all polled characteristics. Adjustable, set to 60000.
  • "stateChangeResponseTime": Tells homebridge-cmd4 how long to wait between a Set and Get command. Must always be set to 0.
  • "constants": An area to define constants in one place to be used throughout multiple accessories. In this case the IP Address of our Advantage Air system.
    • "key": The key or constant to be used throughout the config. Must always be set to "${IP}".
    • "value": The value set for your key or constant. Must always be set to the IP Address of your Advantage Air System.
  • "queueTypes": Please read more here if you want a full description on Priority Queuing.
    • "queue": Much like "key", this is the name of the particular queue you are setting. I have named mine queue A and have other queues defined for other projects that use homebridge-cmd4.
    • "queueType": Due to the read/write limitations of the Advantage Air control units; we have to use WoRm2 (Write once Read Many) priority queued polling. Must always be set to "WoRm2".

Now that we have defined the platform directives, we are ready to start adding accessories for Advantage Air.

Zone Control

There are two types of zone control available for homebridge-cmd4-AdvantageAir and it depends on if you have temperature sensors in your Advantage Air system or not; you may have a combination of zones with and zones without. For zones that have temperature sensors; you will want to configure Switch accessories. For zones that do not have temperature sensors; you will want to configure Lightbulb accessories.

Switches

Zones that have temperature sensors are automatically controlled via your Advantage Air system. You will not need to designate a % open for the zone as the controller will do that itself to achieve the temperature you set for the zone. For this reason, you only need to open and close the zone; and therefore will only need to configure a Switch accessory. Do this for each zone that has a temperature sensor; I have six sensors, so I have repeated this accessory six times (with a different room name) in my config. The only difference in each instance is the use of z01, z02, etc. in the "state_cmd_suffix".

                {
                    "type": "Switch",
                    "displayName": "Living",
                    "on": "FALSE",
                    "name": "Living",
                    "manufacturer": "Advantage Air Australia",
                    "model": "e-zone",
                    "serialNumber": "Fujitsu e-zone2",
                    "queue": "A",
                    "polling": true,
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "z01 ${IP}"
                },

Here is a short description of each of the Switch accessory's directives:

  • "type": The type of accessory we are defining. Must always be set to "Switch".
  • "displayName": The display name of accessory we are defining. Cannot be the exact same as any other accessory.
  • "on": This defines the "on" characteristic. Must always be set to "FALSE".
  • "name": The name of accessory we are defining; should be set the same as "displayName".
  • "manufacturer": Must always be set to "Advantage Air Australia".
  • "model": This can be what ever you want it to be!
  • "serialNumber": This can be what ever you want it to be!
  • "queue": This defines the queue the accessory is a part of. Must always be set to what you defined in the platform directives.
  • "polling": This will set the accessory to poll for feedback. Must always be set to true.
  • "state_cmd": The file path used to execute the bash script. The Advantage Air Configuration Check Tool will define this for you (Step 9 in the README).
  • "state_cmd_suffix": A string appended to the "state_cmd" to pass on extra parameters.
    • z01: This one parameter defines and differentiates each zone from the next. z01, z02, etc.
    • ${IP}: Must always contain the IP address constant.

Lightbulbs

Zones that do not have temperature sensors have to be manually controlled. You will have to designate a % open for the zone so the controller can achieve the temperature you want in the zone. For this reason, you will need the ability to open and close the zone, and control how much the zone is opened. HomeKit does not have a suitable accessory for this; so therefore you will need to configure a Lightbulb accessory. Do this for each zone that does not have a temperature sensor. If you have six zones without temperature sensors; you will create this accessory six times (with a different room name) in your config. The only difference in each instance is the use of z01, z02, etc. in the "state_cmd_suffix".

                {
                    "type": "Lightbulb",
                    "displayName": "Living",
                    "on": "FALSE",
                    "brightness": 50,
                    "name": "Living",
                    "manufacturer": "Advantage Air Australia",
                    "model": "e-zone",
                    "serialNumber": "Fujitsu e-zone2",
                    "queue": "A",
                    "polling": [
                        {
                            "characteristic": "on"
                        },
                        {
                            "characteristic": "brightness"
                        }
                    ],
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "z01 ${IP}"
                },

Here is a short description of each of the Lightbulb accessory's directives:

  • "type": The type of accessory we are defining. Must always be set to "Lightbulb".
  • "displayName": The display name of accessory we are defining. Cannot be the exact same as any other accessory.
  • "on": This defines the "on" characteristic. Must always be set to "FALSE".
  • "brightness": This defines the "brightness" characteristic. Must always be set to 50.
  • "name": The name of accessory we are defining; should be set the same as "displayName".
  • "manufacturer": Must always be set to "Advantage Air Australia".
  • "model": This can be what ever you want it to be!
  • "serialNumber": This can be what ever you want it to be!
  • "queue": This defines the queue the accessory is a part of. Must always be set to what you defined in the platform directives.
  • "polling":
    • "on": This defines polling for the "on" characteristic. Must always be included.
    • "brightness": This defines polling for the "brightness" characteristic. Must always be included.
  • "state_cmd": The file path used to execute the bash script. The Advantage Air Configuration Check Tool will define this for you (Step 9 in the README).
  • "state_cmd_suffix": A string appended to the "state_cmd" to pass on extra parameters.
    • z01: This one parameter defines and differentiates each zone from the next. z01, z02, etc.
    • ${IP}: Must always contain the IP address constant.

Temperature Sensors

As previously mentioned, your Advantage Air system may come with Temperature sensors for some or all of your zones. You will be able to view the current temperature or view if the battery low status is active for each zone that has a sensor. For zones that have temperature sensors; you will want to configure TemperatureSensor accessories. Do this for each zone that has a temperature sensor; I have six sensors, so I have repeated this accessory six times (with a different room name) in my config. The only difference in each instance is the use of "tempSensor1", "tempSensor2", etc. in the "subType" and the use of z01, z02, etc. in the "state_cmd_suffix".

                {
                    "type": "TemperatureSensor",
                    "subType": "tempSensor1",
                    "displayName": "Living_Room",
                    "currentTemperature": 25,
                    "statusLowBattery": "BATTERY_LEVEL_LOW",
                    "name": "Living_Room",
                    "manufacturer": "Advantage Air Australia",
                    "model": "e-zone",
                    "serialNumber": "Fujitsu e-zone2",
                    "queue": "A",
                    "polling": [
                        {
                            "characteristic": "currentTemperature"
                        },
                        {
                            "characteristic": "statusLowBattery"
                        }
                    ],
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "z01 ${IP}"
                },

Here is a short description of each of the TemperatureSensor accessory's directives:

  • "type": The type of accessory we are defining. Must always be set to "TemperatureSensor".
  • "subType": Used to distinguish between accessories that have same Type and Name. "tempSensor1", "tempSensor2", etc.
  • "displayName": The display name of accessory we are defining. Cannot be the exact same as any other accessory.
  • "currentTemperature": This defines the "currentTemperature" characteristic. Must always be set to 25.
  • "statusLowBattery": This defines the "statusLowBattery: characteristic. Must always be set to "BATTERY_LEVEL_LOW".
  • "name": The name of accessory we are defining; should be set the same as "displayName".
  • "manufacturer": Must always be set to "Advantage Air Australia".
  • "model": This can be what ever you want it to be!
  • "serialNumber": This can be what ever you want it to be!
  • "queue": This defines the queue the accessory is a part of. Must always be set to what you defined in the platform directives.
  • "polling":
    • "currentTemperature": This defines polling for the "currentTemperature" characteristic. Must always be included.
    • "statusLowBattery": This defines polling for the "statusLowBattery" characteristic. Must always be included.
  • "state_cmd": The file path used to execute the bash script. The Advantage Air Configuration Check Tool will define this for you (Step 9 in the README).
  • "state_cmd_suffix": A string appended to the "state_cmd" to pass on extra parameters.
    • z01: This one parameter defines and differentiates each zone from the next. z01, z02, etc.
    • ${IP}: Must always contain the IP address constant.

Fan

Every Advantage Air system should have a fan or vent mode. In previous versions of homebridge-cmd4-AdvantageAir this was represented in HomeKit as a simple Fan accessory that could only turn the mode on or off. In homebridge-cmd4-AdvantageAir v3.1.0 and up, the fan or vent mode is now represented as a full Fan accessory with speed options; that will allow you to set the low, medium, high or auto/ezfan options available in your Advantage Air app. Where 1-33% in HomeKit will set the Advantage Air system to low, 34-67% will set to medium, 68-99% will set to high and 100% will set to auto or ezfan. The homebridge-cmd4-AdvantageAir script is set out in such a way that if you wanted to use the old version of the fan without speed options, then you can with the following config.

                {
                    "type": "Fan",
                    "displayName": "Fan",
                    "on": "FALSE",
                    "name": "Fan",
                    "manufacturer": "Advantage Air Australia",
                    "model": "e-zone",
                    "serialNumber": "Fujitsu e-zone2",
                    "queue": "A",
                    "polling": true,
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "${IP}"
                },

If you would prefer to use the new version of the Fan with speed options, then you would use the following config.

                {
                    "type": "Fan",
                    "displayName": "Fan",
                    "on": "FALSE",
                    "rotationSpeed": 100,
                    "name": "Fan",
                    "manufacturer": "Advantage Air Australia",
                    "model": "e-zone",
                    "serialNumber": "Fujitsu e-zone2",
                    "queue": "A",
                    "polling": [
                        {
                            "characteristic": "on"
                        },
                        {
                            "characteristic": "rotationSpeed"
                        }
                    ],
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "${IP}"
                },

Here is a short description of each of the Fan accessory's directives:

  • "type": The type of accessory we are defining. Must always be set to "Fan".
  • "displayName": The display name of accessory we are defining. Cannot be the exact same as any other accessory.
  • "on": This defines the "on" characteristic. Must always be set to "FALSE".
  • "rotationSpeed": This defines the "rotationSpeed" characteristic. Must always be set to 100.
  • "name": The name of accessory we are defining; should be set the same as "displayName".
  • "manufacturer": Must always be set to "Advantage Air Australia".
  • "model": This can be what ever you want it to be!
  • "serialNumber": This can be what ever you want it to be!
  • "queue": This defines the queue the accessory is a part of. Must always be set to what you defined in the platform directives.
  • "polling":
    • "on": This defines polling for the "on" characteristic. Must always be included.
    • "rotationSpeed": This defines polling for the "rotationSpeed" characteristic. Must always be included.
  • "state_cmd": The file path used to execute the bash script. The Advantage Air Configuration Check Tool will define this for you (Step 9 in the README).
  • "state_cmd_suffix": A string appended to the "state_cmd" to pass on extra parameters.
    • ${IP}: Must always contain the IP address constant.

Thermostat

Every Advantage Air system will have a Cool mode and a Heat mode; these are the two modes we make use of and are coupled together in HomeKit and represented as the Thermostat accessory. It should be noted that HomeKit does not make use of Advantage Air's Dry mode and the HomeKit Thermostat's Auto mode will not be made use of. The Thermostat will also give you the ability to set the temperature you want your house to be (even if you do not own temperature sensors) and it will set the same temperature to all zones as well.

                {
                    "type": "Thermostat",
                    "displayName": "Aircon",
                    "currentHeatingCoolingState": "OFF",
                    "targetHeatingCoolingState": "OFF",
                    "currentTemperature": 25,
                    "targetTemperature": 25,
                    "temperatureDisplayUnits": "CELSIUS",
                    "name": "Aircon",
                    "manufacturer": "Advantage Air Australia",
                    "model": "e-zone",
                    "serialNumber": "Fujitsu e-zone2",
                    "queue": "A",
                    "polling": [
                        {
                            "characteristic": "currentHeatingCoolingState"
                        },
                        {
                            "characteristic": "targetHeatingCoolingState"
                        },
                        {
                            "characteristic": "currentTemperature"
                        },
                        {
                            "characteristic": "targetTemperature"
                        }
                    ],
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "${IP}"
                }                

Here is a short description of each of the Thermostat accessory's directives:

  • "type": The type of accessory we are defining. Must always be set to "Thermostat".
  • "displayName": The display name of accessory we are defining. Cannot be the exact same as any other accessory.
  • "currentHeatingCoolingState": This defines the "currentHeatingCoolingState" characteristic. Must always be set to "OFF".
  • "targetHeatingCoolingState": This defines the "targetHeatingCoolingState" characteristic. Must always be set to "OFF.
  • "currentTemperature": This defines the "currentTemperature" characteristic. Must always be set to 25.
  • "targetTemperature": This defines the "targetTemperature" characteristic. Must always be set to 25.
  • "name": The name of accessory we are defining; should be set the same as "displayName".
  • "manufacturer": Must always be set to "Advantage Air Australia".
  • "model": This can be what ever you want it to be!
  • "serialNumber": This can be what ever you want it to be!
  • "queue": This defines the queue the accessory is a part of. Must always be set to what you defined in the platform directives.
  • "polling":
    • "currentHeatingCoolingState": This defines polling for the "currentHeatingCoolingState" characteristic. Must always be included.
    • "targetHeatingCoolingState": This defines polling for the "targetHeatingCoolingState" characteristic. Must always be included.
    • "currentTemperature": This defines polling for the "currentTemperature" characteristic. Must always be included.
    • "targetTemperature": This defines polling for the "targetTemperature" characteristic. Must always be included.
  • "state_cmd": The file path used to execute the bash script. The Advantage Air Configuration Check Tool will define this for you (Step 9 in the README).
  • "state_cmd_suffix": A string appended to the "state_cmd" to pass on extra parameters.
    • ${IP}: Must always contain the IP address constant.

MyPlace Extras

In homebridge-cmd4-AdvantageAir v3.3.0 and up, there is now the option for users with MyPlace extras to configure Lights and a Garage Door Opener as a part of the larger MyPlace smart home ecosystem. There are many MyPlace extras that we may not have added yet. If you have one you would like to add to this plug-in, please create an issue to get it added as a feature!

Lightbulbs

Unlike the zone control above that utilises the Lightbulb accessory, here we can use the Lightbulb accessory for an actual light! There are two types of lights available for homebridge-cmd4-AdvantageAir and it depends on if you have a simple on/off light or a dimmable light. You may have a combination of these lights throughout your home.

Simple Light

For lights that do not have dimming capability; you will want to configure the following Lightbulb accessory; repeat this for each light of this type that you require (with a different room name). The only difference in each instance is the use 'light:NAME' in the "state_cmd_suffix"; where NAME is the name of the light found in the MyPlace app; see NAME Convention.

                {
                    "type": "Lightbulb",
                    "displayName": "Study DL",
                    "on": "FALSE",
                    "name": "Study DL",
                    "manufacturer": "Advantage Air Australia",
                    "model": "MyPlace",
                    "serialNumber": "Down Lights",
                    "queue": "A",
                    "polling": [
                        {
                            "characteristic": "on"
                        }
                    ],
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "'light:NAME' ${IP}"
                },

Here is a short description of each of the Lightbulb accessory's directives:

  • "type": The type of accessory we are defining. Must always be set to "Lightbulb".
  • "displayName": The display name of accessory we are defining. Cannot be the exact same as any other accessory.
  • "on": This defines the "on" characteristic. Must always be set to "FALSE".
  • "name": The name of accessory we are defining; should be set the same as "displayName".
  • "manufacturer": Must always be set to "Advantage Air Australia".
  • "model": This can be what ever you want it to be!
  • "serialNumber": This can be what ever you want it to be!
  • "queue": This defines the queue the accessory is a part of. Must always be set to what you defined in the platform directives.
  • "polling":
    • "on": This defines polling for the "on" characteristic. Must always be included.
  • "state_cmd": The file path used to execute the bash script. The Advantage Air Configuration Check Tool will define this for you (Step 9 in the README).
  • "state_cmd_suffix": A string appended to the "state_cmd" to pass on extra parameters.
    • 'light:NAME': This one parameter defines and differentiates the Light from the Zones described earlier. Where NAME is the name of the light in the MyPlace app; see NAME Convention.
    • ${IP}: Must always contain the IP address constant.

Dimmable Light

For lights that do have dimming capability; you will want to configure the following Lightbulb accessory; repeat this for each light of this type that you require (with a different room name). The only difference in each instance is the use 'light:NAME' in the "state_cmd_suffix"; where NAME is the name of the light found in the MyPlace app; see NAME Convention.

                {
                    "type": "Lightbulb",
                    "displayName": "Study DL",
                    "on": "FALSE",
                    "brightness": 50,
                    "name": "Study DL",
                    "manufacturer": "Advantage Air Australia",
                    "model": "MyPlace",
                    "serialNumber": "Down Lights",
                    "queue": "A",
                    "polling": [
                        {
                            "characteristic": "on"
                        },
                        {
                            "characteristic": "brightness"
                        }
                    ],
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "'light:NAME' ${IP}"
                },

Here is a short description of each of the Lightbulb accessory's directives:

  • "type": The type of accessory we are defining. Must always be set to "Lightbulb".
  • "displayName": The display name of accessory we are defining. Cannot be the exact same as any other accessory.
  • "on": This defines the "on" characteristic. Must always be set to "FALSE".
  • "brightness": This defines the "brightness" characteristic. Must always be set to 50.
  • "name": The name of accessory we are defining; should be set the same as "displayName".
  • "manufacturer": Must always be set to "Advantage Air Australia".
  • "model": This can be what ever you want it to be!
  • "serialNumber": This can be what ever you want it to be!
  • "queue": This defines the queue the accessory is a part of. Must always be set to what you defined in the platform directives.
  • "polling":
    • "on": This defines polling for the "on" characteristic. Must always be included.
    • "brightness": This defines polling for the "brightness" characteristic. Must always be included.
  • "state_cmd": The file path used to execute the bash script. The Advantage Air Configuration Check Tool will define this for you (Step 9 in the README).
  • "state_cmd_suffix": A string appended to the "state_cmd" to pass on extra parameters.
    • 'light:NAME': This one parameter defines and differentiates the Light from the Zones described earlier. Where NAME is the name of the light in the MyPlace app; see NAME Convention.
    • ${IP}: Must always contain the IP address constant.

Garage Door and Gate

If your Advantage Air system is a MyPlace system with a Garage Door or Gate integrated, you will now be able to add it into HomeKit as a Garage Door Opener and then view it in Apple CarPlay if you have it! You will want to configure the following GarageDoorOpener accessory for both the Garage Door and the Gate.

                {
                    "type": "GarageDoorOpener",
                    "displayName": "Garage Door",
                    "obstructionDetected": "FALSE",
                    "currentDoorState": 1,
                    "targetDoorState": 1,
                    "name": "Garage Door",
                    "manufacturer": "Advantage Air Australia",
                    "model": "MyPlace",
                    "serialNumber": "Brand Name",
                    "queue": "A",
                    "polling": [
                        {
                            "characteristic": "currentDoorState"
                        },
                        {
                            "characteristic": "targetDoorState"
                        }
                    ],
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "'thing:NAME' ${IP}"
                },

Here is a short description of each of the GarageDoorOpener accessory's directives:

  • "type": The type of accessory we are defining. Must always be set to "GarageDoorOpener".
  • "displayName": The display name of accessory we are defining. Cannot be the exact same as any other accessory.
  • "obstructionDetected": This defines the "obstructionDetected" characteristic. Must always be set to "FALSE".
  • "currentDoorState": This defines the "currentDoorState" characteristic. Must always be set to 1.
  • "targetDoorState": This defines the "targetDoorState" characteristic. Must always be set to 1.
  • "name": The name of accessory we are defining; should be set the same as "displayName".
  • "manufacturer": Must always be set to "Advantage Air Australia".
  • "model": This can be what ever you want it to be!
  • "serialNumber": This can be what ever you want it to be!
  • "queue": This defines the queue the accessory is a part of. Must always be set to what you defined in the platform directives.
  • "polling":
    • "currentDoorState": This defines polling for the "currentDoorState" characteristic. Must always be included.
    • "targetDoorState": This defines polling for the "targetDoorState" characteristic. Must always be included.
  • "state_cmd": The file path used to execute the bash script. The Advantage Air Configuration Check Tool will define this for you (Step 9 in the README).
  • "state_cmd_suffix": A string appended to the "state_cmd" to pass on extra parameters.
    • 'thing:NAME': This one parameter defines and differentiates various types of Advantage Air accessories. Where NAME is the name of the garage door in the MyPlace app; see NAME Convention.
    • ${IP}: Must always contain the IP address constant.
    • flip: This one parameter is optional and is only used in the case where Advantage Air has installed your Garage Door or Gate open/close position the wrong way around.

NAME Convention

In MyPlace App, the NAME of a light/thing is allowed to have more than 1 word separated by space(s) as long as it has less than 12 characters including the space(s). The NAME of a light/thing is also not required to be unique. This Homebridge plug-in uses the NAME as identifier. As such the users will have to make sure that the NAME are permutationally unique otherwise the Homekit will get confused and will turn on/off more lights/things than intended.

Two lights with names 'Study DL' and 'DL Study' are permutationally non-unique and Homekit will turn on/off both lights whichever light you want to turn on/off. Two other lights with names 'Bath 2 DL', 'Bath 2 Ex DL' will also have ambiguity issue. While 'Bath 2 Ex DL' is unique, 'Bath 2 DL' is permutationally non-unique because the light 'Bath 2 Ex DL' also has 'Bath', '2' and 'DL' in it and hence will be seen by Homebridge plug-in as a match as well.

The easiest way to resolve this kind of ambiguity is to use underscore _ instead of a space as word separator. Underscore _ will make a multi-words NAME to become a single-word NAME, hence it will always be unique as long as you do not name them exactly the same. However, multi-words NAME with space(s) has its own advantage if you can make them all permutationally unique. For example, if you have 5 lights in your kitchen with names 'Kitchen L1', 'Kitchen L2', 'Kitchen L3', 'Kitchen L4' and 'Kitchen L5', then you can ask Siri to turn on/off 'Kitchen', and all 5 lights will turn on/off without needing to set a Homekit scene to do so.

Advanced Options

In homebridge-cmd4-AdvantageAir v3.1.0 and up, there is now the option to configure a linkedType; which allows two accessories to be connected to each other that usually are not. Here I will provide you with an example of how to achieve this through your config.json that only requires slight modifications. Note: after adding a linkedType, you may need to delete the original accessory's individual cache through the Homebridge UI Settings before it will work.

Thermostat with Fan Speed

This will create a 'Fan Speed' Fan accessory coupled with the existing Thermostat accessory; with the purpose to allow you to set low, medium, high, auto/ezfan whilst running in cool or heat mode. Where 1-33% in HomeKit will set the Advantage Air system to low, 34-67% will set to medium, 68-99% will set to high and 100% will set to auto or ezfan.

                {
                    "type": "Thermostat",
                    "displayName": "Aircon",
                    "currentHeatingCoolingState": "OFF",
                    "targetHeatingCoolingState": "OFF",
                    "currentTemperature": 24,
                    "targetTemperature": 24,
                    "temperatureDisplayUnits": "CELSIUS",
                    "name": "Aircon",
                    "manufacturer": "Advantage Air Australia",
                    "model": "e-zone",
                    "serialNumber": "Fujitsu e-zone2",
                    "queue": "A",
                    "polling": [
                        {
                            "characteristic": "currentHeatingCoolingState"
                        },
                        {
                            "characteristic": "targetHeatingCoolingState"
                        },
                        {
                            "characteristic": "currentTemperature"
                        },
                        {
                            "characteristic": "targetTemperature"
                        }
                    ],
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "${IP}",
                    "linkedTypes": [
                        {
                            "type": "Fan",
                            "displayName": "Fan Speed",
                            "on": "TRUE",
                            "rotationSpeed": 100,
                            "name": "Fan Speed",
                            "manufacturer": "Advantage Air Australia",
                            "model": "e-zone",
                            "serialNumber": "Fujitsu e-zone2",
                            "queue": "A",
                            "polling": [
                                {
                                    "characteristic": "on"
                                },
                                {
                                    "characteristic": "rotationSpeed"
                                }
                            ],
                            "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                            "state_cmd_suffix": "${IP} fanSpeed"
                        }
                    ]
                }

Here is a short description of each of the new Thermostat accessory's directives not discussed above:

  • "linkedTypes": Allows other homebridge-cmd4 accessories to be linked to the current accessory.
    • "on": Unlike the other Fan accessory, this **must always be set to "TRUE".
    • "state_cmd_suffix": The state_cmd_suffix for this particular linkedType requires the parameter fanSpeed or it will not work correctly.

Timer

This to used to integrate the 'timer' from your Advantage Air system into HomeKit; a will feature both functions for 'Countdown to On' and 'Countdown to Off' depending on if the system is running or not. HomeKit does not have a suitable accessory for this; so therefore you will need to configure a Lightbulb accessory. Your Advantage Air system can handle a timer of 720 minutes (12 hours) and the Lightbulb represents 0-100%; to keep it easy for users to convert on the fly, we have made 10% equal 1 hour and therefore means you can only set a maximum timer of 10 hours (100%). Keep this in mind when using your timer. The only difference for this Lightbulb versus the ones described above is the use of the constant timer in the "state_cmd_suffix".

                {
                    "type": "Lightbulb",
                    "displayName": "Aircon Duration",
                    "on": "FALSE",
                    "brightness": 0,
                    "name": "Living",
                    "manufacturer": "Advantage Air Australia",
                    "model": "e-zone",
                    "serialNumber": "Fujitsu e-zone2",
                    "queue": "A",
                    "polling": [
                        {
                            "characteristic": "on"
                        },
                        {
                            "characteristic": "brightness"
                        }
                    ],
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "timer ${IP}"
                },

Here is a short description of each of the Lightbulb accessory's directives:

  • "type": The type of accessory we are defining. Must always be set to "Lightbulb".
  • "displayName": The display name of accessory we are defining. Cannot be the exact same as any other accessory.
  • "on": This defines the "on" characteristic. Must always be set to "FALSE".
  • "brightness": This defines the "brightness" characteristic. Must always be set to 0.
  • "name": The name of accessory we are defining; should be set the same as "displayName".
  • "manufacturer": Must always be set to "Advantage Air Australia".
  • "model": This can be what ever you want it to be!
  • "serialNumber": This can be what ever you want it to be!
  • "queue": This defines the queue the accessory is a part of. Must always be set to what you defined in the platform directives.
  • "polling":
    • "on": This defines polling for the "on" characteristic. Must always be included.
    • "brightness": This defines polling for the "brightness" characteristic. Must always be included.
  • "state_cmd": The file path used to execute the bash script. The Advantage Air Configuration Check Tool will define this for you (Step 9 in the README).
  • "state_cmd_suffix": A string appended to the "state_cmd" to pass on extra parameters.
    • timer: This one parameter defines that the accessory is to be used as the timer.
    • ${IP}: Must always contain the IP address constant.

Multiple Aircons

You may have an Advantage Air system that has more than one Air Conditioner; if the other aircons can be accessed from the same Advantage Air control tablet, then you can add them in your configuration with these extra steps. All it will require is adding the accessories related to that aircon as you have done with the first aircon and add another constant to the "state_cmd_suffix" of each accessory. Your other aircon (you can add up to 5 aircons!) will more than likely also have a fan, zones and maybe temperature sensors; each of these will require the new constant to be added. Aircon 1 will be the default and will not require a constant to be added, but aircon 2 will require constant ac2, aircon 3 will require ac3, and so forth for ac4 and ac5. Here are some small examples of each accessory from aircon 2:

                {
                    "type": "Switch",
                    "displayName": "Living",
                    "on": "FALSE",
                    "name": "Living",
                    "manufacturer": "Advantage Air Australia",
                    "model": "e-zone",
                    "serialNumber": "Fujitsu e-zone2",
                    "queue": "A",
                    "polling": true,
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "ac2 z01 ${IP}"
                },
                {
                    "type": "Lightbulb",
                    "displayName": "Living Zone",
                    "on": "FALSE",
                    "brightness": 50,
                    "name": "Living Zone",
                    "manufacturer": "Advantage Air Australia",
                    "model": "e-zone",
                    "serialNumber": "Fujitsu e-zone2",
                    "queue": "A",
                    "polling": [
                        {
                            "characteristic": "on"
                        },
                        {
                            "characteristic": "brightness"
                        }
                    ],
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "ac2 z01 ${IP}"
                },
                {
                    "type": "TemperatureSensor",
                    "subType": "tempSensor1",
                    "displayName": "Living_Room",
                    "currentTemperature": 25,
                    "statusLowBattery": "BATTERY_LEVEL_LOW",
                    "name": "Living_Room",
                    "manufacturer": "Advantage Air Australia",
                    "model": "e-zone",
                    "serialNumber": "Fujitsu e-zone2",
                    "queue": "A",
                    "polling": [
                        {
                            "characteristic": "currentTemperature"
                        },
                        {
                            "characteristic": "statusLowBattery"
                        }
                    ],
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "ac2 z01 ${IP}"
                },
                {
                    "type": "Fan",
                    "displayName": "Fan",
                    "on": "FALSE",
                    "rotationSpeed": 100,
                    "name": "Fan",
                    "manufacturer": "Advantage Air Australia",
                    "model": "e-zone",
                    "serialNumber": "Fujitsu e-zone2",
                    "queue": "A",
                    "polling": [
                        {
                            "characteristic": "on"
                        },
                        {
                            "characteristic": "rotationSpeed"
                        }
                    ],
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "ac2 ${IP}"
                },
                {
                    "type": "Thermostat",
                    "displayName": "Aircon",
                    "currentHeatingCoolingState": "OFF",
                    "targetHeatingCoolingState": "OFF",
                    "currentTemperature": 24,
                    "targetTemperature": 24,
                    "temperatureDisplayUnits": "CELSIUS",
                    "name": "Aircon",
                    "manufacturer": "Advantage Air Australia",
                    "model": "e-zone",
                    "serialNumber": "Fujitsu e-zone2",
                    "queue": "A",
                    "polling": [
                        {
                            "characteristic": "currentHeatingCoolingState"
                        },
                        {
                            "characteristic": "targetHeatingCoolingState"
                        },
                        {
                            "characteristic": "currentTemperature"
                        },
                        {
                            "characteristic": "targetTemperature"
                        }
                    ],
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "ac2 ${IP}",
                    "linkedTypes": [
                        {
                            "type": "Fan",
                            "displayName": "Fan Speed",
                            "on": "TRUE",
                            "rotationSpeed": 100,
                            "name": "Fan Speed",
                            "manufacturer": "Advantage Air Australia",
                            "model": "e-zone",
                            "serialNumber": "Fujitsu e-zone2",
                            "queue": "A",
                            "polling": [
                                {
                                    "characteristic": "on"
                                },
                                {
                                    "characteristic": "rotationSpeed"
                                }
                            ],
                            "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                            "state_cmd_suffix": "ac2 ${IP} fanSpeed"
                        }
                    ]
                }