- Install homebridge
- Install this plugin:
npm install -g homebridge-thermostat
- Update your
config.json
file (See below).
"accessories": [
{
"accessory": "Thermostat",
"name": "Thermostat",
"apiroute": "http://myurl.com"
}
]
Key | Description |
---|---|
accessory |
Must be Thermostat |
name |
Name to appear in the Home app |
apiroute |
Root URL of your Thermostat device (excluding the rest of the requests) |
temperatureDisplayUnits (optional) |
Whether you want °C (0 ) or °F (1 ) as your units (0 is default) |
currentHumidity (optional) |
(true or false ) Whether to include currentRelativeHumidity as a field in /status (false is default) |
targetHumidity (optional) |
(true or false ) Whether to include targetRelativeHumidity as a field in /status and be able to set it via /targetRelativeHumidity (false is default) |
heatOnly (optional) |
(true or false ) Whether the thermostat only supports heating (true ) or heating and cooling (false ) (false is default) |
maxTemp (optional) |
Upper bound for the temperature selector in the Home app (30 is default) |
minTemp (optional) |
Lower bound for the temperature selector in the Home app (15 is default) |
timeout (optional) |
Time (in milliseconds) until the accessory will be marked as "Not Responding" if it is unreachable (5000 is default) |
http_method (optional) |
The HTTP method used to communicate with the thermostat (GET is default) |
username (optional) |
Username if HTTP authentication is enabled |
password (optional) |
Password if HTTP authentication is enabled |
model (optional) |
Appears under "Model" for your accessory in the Home app |
serial (optional) |
Appears under "Serial" for your accessory in the Home app |
manufacturer (optional) |
Appears under "Manufacturer" for your accessory in the Home app |
Your API should be able to:
- Return thermostat info when it recieves
/status
in the JSON format like below:
{
"targetHeatingCoolingState": INT_VALUE_0_TO_3,
"targetTemperature": FLOAT_VALUE,
"currentHeatingCoolingState": INT_VALUE_0_TO_2,
"currentTemperature": FLOAT_VALUE
}
Note: You can also add the currentRelativeHumidity
and targetRelativeHumidity
fields individually or together above if enabled in the config.json
(read Structure)
- Set
targetHeatingCoolingState
when it recieves:
/targetHeatingCoolingState/{INT_VALUE_0_TO_3}
- Set
targetTemperature
when it recieves:
/targetTemperature/{INT_VALUE}
- If enabled in
config.json
(read Structure), settargetRelativeHumidity
when it recieves:
/targetRelativeHumidity/{FLOAT_VALUE}
Number | Name |
---|---|
0 |
Off |
1 |
Heat |
2 |
Cool |
3 |
Auto |
Folder 'heatmiser' contains a contributed example of the API. It supports Heatmiser wireless thermostats, as long as https://github.com/thoukydides/heatmiser-wifi is installed and working.