Composite docker application with 3 containers (Node-RED, Nginx, MQTT broker) deployed on Raspberry Pi through Balena for controlling an eqiva eQ-3 radiator thermostat
The objective is to control an eqiva eQ-3 radiator thermostat (see image below) using a Raspberry Pi 3 Model B+.
The Raspberry Pi directly communicates with the eQ3 radiator thermostat over BLE (bluetooth low energy) using the node-red-contrib-eq3-bluetooth node. This node is based on the reverse engineered BLE protocol : see eQ-3 radiator thermostat API
Via the intranet: MQTT messages can be sent to the Raspberry Pi to open/close the eQ3 thermostat, to request its status (including battery status), to set the target temperature of the thermostat, to switch to automatic/manual mode, ...
Moreover a simple UI is included that shows the current status of the thermostat (see screenshot below).
This composite docker application exists of the following 3 containers:
- Node-RED container - has all the control logic + simple UI
- Nginx Container - reverse proxy for accessing Node-RED via public device URL.
- MQTT Container - MQTT message server
It is very easy to install this application using the BalenaCloud services through following steps:
- Balena Setup: you need a BalenaCloud account and your Raspberry Pi must be running the BalenaOs. You also need to create an application in your balena dashboard and associate your Rasperry Pi to it (see balena documentation).
- Within Balena dashboard you must set the user name and hashed password for the Node-RED editor as is specified in section 4.2 Setting Node-RED user name and password
- clone this github repository (this can be done on any device where git is installed) through the following command
git clone https://github.com/janvda/balena-node-red-eq3.git
(instead of directly cloning the repository it might be better to fork the github repository and then clone this forked repository). - Move into this repository by command
cd balena-node-red-eq3
- Add balena git remote endpoint by running a command like
git remote add balena gh_janvda@git.balena-cloud.com:gh_janvda/pi3three.git
(the actual command for your setup can also be found in your balena dashboard under the application you have just created in the upper right corner) - push the repository to balena by the command
git push balena master
(maybe you need to add the option--force
the first time you are deploying) this will make that your application is build on the balena build servers and after this build Balena will automatically deploy the built docker application on your raspberry pi. - Then you need to Set Bluetooth Device Address of your eq3 thermostat in your Node-RED flow
- (Re)deploy your Node-RED flows
TODO
The Node-RED editor is protected by a user name and a hashed password that must be set through the environment variables USERNAME
and PASSWORD
. The Node-RED security page describes how a password hash can be generated. You can set these environment variables using your Balena dashboard under
Service Variables (S(X))
TODO
TODO
TODO
Any issues or feature requests can be found or reported here: https://github.com/janvda/balena-node-red-eq3/issues