homebridge-controme-thermostat-v3 v3.6.0
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
Step 1. Install cURL
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install curl
Step 2. 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_12.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ sudo apt-get install libavahi-compat-libdnssd-dev
$ sudo npm install -g npm
Step 3. Install Homebridge and Homebridge Config UI X
Install Homebridge and Homebridge Config UI X 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 homebridge
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.
Step 4. Login to Homebridge Config UI X
The Homebridge Config UI X web interface will allow you to install, remove and update plugins, and modify the Homebridge config.json and manage other aspects of your Homebridge service.
Login to the web interface by going to http://<ip address of your server>:8581
.
The default user is admin
with password admin
.
To find the IP address of your server you can run:
$ hostname -I
Plugin Installation
Step 1. Install Controme thermostat plugin
$ sudo npm install -g --unsafe-perm homebridge-controme-thermostat-v3
Run the python script named fetch.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
.
Step 2. Set auto-running feature
Now we need to tell the operating system to run the script for the Pi user. In the command prompt or in a terminal window type:
$ sudo nano /etc/profile
Scroll to the bottom and add the following line :
sudo python3 /usr/lib/node_modules/homebridge-controme-thermostat-v3/fetch.py
Type "Ctrl+X" to exit, then "Y" to save followed by "Enter" twice. To test if this has worked, reboot your Pi using:
$ sudo reboot
When it starts up your script will run.
Configuration
For example:
"accessories": [
{
"accessory": "Thermostat",
"id": 5,
"name": "Arbeitszimmer",
"server": "http://controme.goip.de",
"serial": "b3-e2-27-14-a3-2b"
}
]