Interfacing to Domoticz using MQTT
Just thought I'd share how simple it is to interface the GlowCAD data to Domoticz HA server using Node Red and MQTT. If you're running Domoticz on a Pi, you can follow the instructions to install Node Red here https://nodered.org/docs/getting-started/raspberrypi - if you've never seen it, it's a brilliantly simple way to take data from sensors and manipulate it for import into other systems.
In Domoticz, you simply need to add hardware "MQTT Client Gateway with LAN Interface," just use "none" as the publish topic. Then import my Node Red flow into Node Red ( import is on the main menu accessed top right. ) You'll also need to create virtual sensors of type Electric ( Instant + Counter ) for Import and Export, a Gas Meter for Gas, and I also have a user variable which is a signed version of the current grid power ( -ve = export. )
You'll need to double-click on the Hilderbrand SMQTT node and change the Topic, then click on the edit button next to "Hildebrand Encrypted MQTT" and set your username/password under "security." Both of these details will be supplied when you get MQTT access from Hildebrand. Finally, change the "idx" values in the various "Update..." nodes to match your virtual devices/variable ( or just remove them if you don't use them. )
Since the data's updated every 10 seconds or so ( for electricity ) it opens up quite a few possibilities. For example, I have an event script which turns on an air source heat pump in my office if average export for the last 5 minutes is higher than 650W AND the Honeywell EvoHome zone setpoint is above 18 degrees. It also lowers the zone by one degree and sets the heat pump one degree higher ( so I use gas if there's no sun, and the heat pump when there is, but still control either source via the Honeywell wall thermostat.... ) This is all reverted if average export drops below 200W.