1.4.3 • Published 2 years ago

homebridge-web-thermostat v1.4.3

Weekly downloads
3
License
MIT
Repository
github
Last release
2 years ago

homebridge-web-thermostat

npm npm

Description

This homebridge plugin exposes a web-based thermostat to Apple's HomeKit. Using simple HTTP requests, the plugin allows you to set the thermostat mode and control the target temperature.

Installation

  1. Install homebridge
  2. Install this plugin: npm install -g homebridge-web-thermostat
  3. Update your config.json file

Configuration

"accessories": [
     {
       "accessory": "Thermostat",
       "name": "Thermostat",
       "apiroute": "http://myurl.com"
     }
]

Core

KeyDescriptionDefault
accessoryMust be ThermostatN/A
nameName to appear in the Home appN/A
apirouteRoot URL of your deviceN/A

Optional fields

KeyDescriptionDefault
validStatesWhich states you would like to enable (see key)[0, 1, 2, 3]
temperatureDisplayUnitsWhether you want °C (0) or °F (1) as your units0
currentRelativeHumidityWhether to include currentRelativeHumidity as a field in /statusfalse
maxTempUpper bound for the temperature selector in the Home app30
minTempLower bound for the temperature selector in the Home app15
minStepMinimum increment value for the temperature selector in the Home app0.5
temperatureThresholdsWhether you want the thermostat accessory to have heating and cooling temperature thresholdsfalse

Additional options

KeyDescriptionDefault
listenerWhether to start a listener to get real-time changes from the devicefalse
pollIntervalTime (in seconds) between device polls300
checkupDelayTime (in milliseconds) after setting HeatingCoolingState to update targetHeatingCoolingState and currentHeatingCoolingState2000
timeoutTime (in milliseconds) until the accessory will be marked as Not Responding if it is unreachable3000
portPort for your HTTP listener (if enabled)2000
http_methodHTTP method used to communicate with the deviceGET
usernameUsername if HTTP authentication is enabledN/A
passwordPassword if HTTP authentication is enabledN/A
modelAppears under the Model field for the accessoryplugin
serialAppears under the Serial field for the accessoryapiroute
manufacturerAppears under the Manufacturer field for the accessoryauthor
firmwareAppears under the Firmware field for the accessoryversion

API Interfacing

Your API should be able to:

  1. Return JSON information when it receives /status:
{
    "targetHeatingCoolingState": INT_VALUE,
    "targetTemperature": FLOAT_VALUE,
    "currentHeatingCoolingState": INT_VALUE,
    "currentTemperature": FLOAT_VALUE
}

Note: You must also include the following fields in /status if enabled in the config.json:

  • currentRelativeHumidity
  • coolingThresholdTemperature & heatingThresholdTemperature
  1. Set targetHeatingCoolingState when it receives:
/targetHeatingCoolingState?value=INT_VALUE
  1. Set targetTemperature when it receives:
/targetTemperature?value=FLOAT_VALUE
  1. (if enabled) Set coolingThresholdTemperature when it receives:
/coolingThresholdTemperature?value=FLOAT_VALUE
  1. (if enabled) heatingThresholdTemperature when it receives:
/heatingThresholdTemperature?value=FLOAT_VALUE

Optional (if listener is enabled)

  1. Update targetHeatingCoolingState following a manual override by messaging the listen server:
/targetHeatingCoolingState?value=INT_VALUE
  1. Update targetTemperature following a manual override by messaging the listen server:
/targetTemperature?value=FLOAT_VALUE
  1. (if enabled) Update coolingThresholdTemperature following a manual override by messaging the listen server:
/coolingThresholdTemperature?value=FLOAT_VALUE
  1. (if enabled) Update heatingThresholdTemperature following a manual override by messaging the listen server:
/heatingThresholdTemperature?value=FLOAT_VALUE

HeatingCoolingState Key

NumberName
0Off
1Heat
2Cool
3Auto
1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.9

3 years ago

1.3.8

3 years ago

1.3.7

3 years ago

1.3.6

4 years ago

1.3.5

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

5 years ago

1.2.9

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago