Supports thermostat devices on HomeBridge Platform
- Install homebridge using: npm install -g homebridge
- Install this plugin using: npm install -g homebridge-thermostat
- Update your configuration file. See bellow for a sample.
Configuration sample:
{
"bridge": {
...
},
"description": "...",
"accessories": [
{
"accessory": "Thermostat",
"name": "Thermostat Demo",
"apiroute": "http://myurl.com",
"maxTemp": 25,
"minTemp": 15
//optional
"maxTemp": "26",
"minTemp": "15",
"username": "user",
"password": "pass"
}
],
"platforms":[]
}
The apiroute
is used for two main calls: Get from the thermostat and set the target temperature. Your API should provide
- Get any thermostat info =======
GET /status
{
targetHeatingCoolingState: INT_VALUE_0_TO_3,
targetTemperature: FLOAT_VALUE,
targetRelativeHumidity: FLOAT_VALUE,
currentHeatingCoolingState: INT_VALUE_0_TO_2,
currentTemperature: FLOAT_VALUE, //prev temperature
currentRelativeHumidity: FLOAT_VALUE_AS_PERCENTAGE //prev humidity
}
- Set target HeatingCoolingState =======
GET `/targetHeatingCoolingState/{INT_VALUE_0_TO_3}`
OK (201)
- Set target temperature =======
GET /targetTemperature/{FLOAT_VALUE}
OK (201)
- Set target relative humidity =======
GET /targetRelativeHumidity/{FLOAT_VALUE}
OK (201)