Awesome
nodejs-poolController-mqtt
MQTT integration for the nodejs-poolController pool equipment controller written by tagyoureit. This allows communication and control of Pentair (and other supported model) pool equipment via MQTT, allowing for integration with any home automation systems which can interact with MQTT messages.
This allows easy integration with other home automation softwares such as Node-RED and allows the development of a dashboard for use on a mobile phone such as the following:
<img src="https://github.com/crsherman/nodejs-poolController-mqtt/blob/master/images/IMG_0600.PNG" height="400"> <img src="https://github.com/crsherman/nodejs-poolController-mqtt/blob/master/images/IMG_0601.PNG" height="400">Changelog
- Version 1.1: added support for temperature values (Pool, Spa and Air) to be submitted via mqtt.
- Version 1.0: initial release
Requirements
-
A mqtt broker must be available on your network; this has been tested with the Eclipse Mosquitto MQTT broker.
-
An instance of nodejs-poolController running on your system. PLEASE NOTE: THIS INTEGRATION ONLY WORKS FOR VERSION 5.3.1 AND LOWER. IT HAS NOT BEEN UPDATED FOR THE NEWER VERSION 6.0.
Optional
- Node-RED for integrating into a home automation system.
Installation
Manual Instructions
- Add the following to the
package.json
file in thenodejs-poolController
folder
"jsonata": "^1.5.3",
"mqtt": "^2.17.0",
- Add the following to the
config.json
file in thenodejs-poolController
folder (precaution: make a backup copy of yourconfig.json
or customized configuration file.)
"integrations": {
"outputSocketToMQTT": 1
},
"outputSocketToMQTT": {
"level": "debug"
},
- Modify
outputSocketToMQTT.js
(line 46) to specify the IP address of YOUR MQTT server on your network. ALTERNATIVELY, you can set environment variables where you start npm:
export MQTT_BROKER_ADDRESS="http://192.168.1.179:1883"
...and optionally a username and password (if required):
export MQTT_USERNAME=your-mqtt-username
export MQTT_PASSWORD=your-mqtt-password
-
Add the
outputSocketToMQTT.js
file to thenodejs-poolController/src/integrations
folder on your Rapsberry Pi -
Run npm install in the
nodejs-poolController
folder where package.json exists
Home Assistant
See Hass.io Add-on (Docker installation) for easy installation in Home Assistant environments.
See Also
Credits
-
Scargill's Tech Blog. A wealth of information on node-red, iot, home automation and such. I cannot say enough good things about this website. The LCD panel utilized on my node-red flow is directly from his blog (among other things).
-
nodejs-poolController. Tagyoureit's incredible app that provides connection to our Pentair pool controllers.
If I have missed anyone or group that my integration code utilizes I apologize. Please let me know and I will add the appropriate credits.