Homebridge Plugin for Controme
Description
This plugin exposes a thermostat to HomeKit and makes it controllable via HTTP requests. The plugin will poll your thermostat at regular intervals and present you with this information when requested. The plugin also allows you so control a number thermostat variables via HomeKit such as the target temperature. This thermostat plugin works on the same RPI where the heating system software works.
Prerequisites
First all, make sure the Pi is up-to-date.
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install curl
Install Node.js
Install the LTS version of Node.js from the official repository, as well as additional dependencies:
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
$ sudo apt install -y nodejs gcc g++ make net-tools
Install Homebridge and Homebridge UI
Install Homebridge and the Homebridge UI using the following command:
$ sudo npm install -g --unsafe-perm homebridge homebridge-config-ui-x
To setup Homebridge as a service that will start on boot you can use the provided hb-service
command.
$ sudo hb-service install --user homebridge
This command will do everything that is required to setup Homebridge and the Homebridge UI as a service on your system, it will create the user if it does not already exist, and create the default Homebridge config.json
under /var/lib/homebridge
if it does not already exist.
When setting up Homebridge as a service using this command, the UI will stay online even if Homebridge is crashing due to a bad plugin or configuration error.
Plugin Installation
$ sudo npm install -g --unsafe-perm homebridge-controme-thermostat
Run the python script named config_builder.py. You can change the necessary information here. This will generate the config file to the specific path. This file is saved in the specific path /home/pi/.homebridge/config.json
Configuration
The following parameters are mandatory:
"accessories": [
{
"accessory": "ContromeThermostat",
"id": 1,
"name": "Arbeitszimmer",
"homeId": 1,
"server": "https://test.fwd.controme.com",
"serial": "b3-e2-27-14-a3-2b",
"email": "testaccount@controme.com",
"password": "test"
}
]
The optional parameters are as follows:
"accessories": [
{
"maxTemp": 35,
"minTemp": 10,
"pollInterval": 20
}
]