Glow — Local MQTT

Joshua Cooper
4 min readJun 6, 2022

--

Here at last … free upgrade in version 1.8.12 or greater

MQTT publishing of data on Glow Display

Here at Hildebrand we have been asked by our community many, many times to support MQTT on local devices. We haven’t been ignoring people and we don’t have any particular opposition to the concept — simply put it was somewhat difficult technically to support.

The tech team has been busy and has cracked it — balancing memory and performance on our Glow Display, which is our all-in-one consumer access device (CAD) and display.

So how does it work …

First you need an MQTT broker set up. The Glow Display will connect and publish to your broker and your applications will be able to subscribe and receive the published data. If you use a public broker — beware, this is your data being broadcast potentially to the whole world.

Normally the MQTT broker is something that is local to your home network and works in conjunction with something like Home Assistant.

If you have any questions about MQTT setup there are plenty of good resources out there to answer general questions and help you find the right broker software. And a side note, sorry Andy for not having put MQTT in sooner!

Also go to the forum — the community has been great in supporting each other with technical tips etc. And although we have great customer support folks, they don’t all speak MQTT, so try to post on the forum first and we’ll resolve issues for the whole community.

Configuration

The configuration of the broker is done through the settings menu. Under Settings -> Metering -> MQTT there are text boxes to fill in with your broker IP address (yes, IP address not hostname), topic prefix and credentials if you need them.

Published Data

So what is in the data stream? We’ve adopted a bit of syntax from Tasmota where we have a couple of different topic and message structures. The first is to announce the device (STATE) and the second (SENSOR) is for metering data.

If you are familiar with MQTT do a subscribe to your broker with the verbose flag like this:

mosquitto_sub -h 192.168.22.101 -v -t ‘glow/#’

If you have used a different topic prefix when you set the device up, you will have to change to use that as part of the topic rather than glow.

State

The state message announces the device and reports information.

glow/F1A8D1ED18E7/STATE { 
"software": "v1.8.12",
"timestamp": "2022-06-01T16:07:57Z",
"hardware": "GLOW-IHD-01-1v4-SMETS1",
"ethmac": "F1A8D1ED18E7",
"smetsversion": "SMETS1",
"eui": "71:A6:D5:22:E0:00:4B:F1",
"zigbee": "1.2.5",
"han": {
"rssi": -24,
"status": "joined",
"lqi": 255
}
}

This is a STATE message that comes in on the default topic with the device forming part of the topic structure. If you had multiple Glow devices then your applications can subscribe to one or more of the devices. The device state has the timestamp in UTC (note the Z at the end), hardware type (either SMETS1 or SMETS2), the Zigbee information that is our internal version number and HAN status information.

There can be times when your signal may drop out with the HAN or during a reboot of devices the status may step through various states. The RSSI is a negative number so the closer to zero the better. There are no hard and fast rules with rssi, but you will get a feel for it. LQI is the link quality indicator, where higher is better with 255 being the maximum and 0 being the minimum.

STATE is announced along with the reading data, so you don’t have to catch it exactly on the start up of the device.

Sensor

The sensor topic is where the reading data is published. It is the good stuff! An example of electricity meter is shown where there isn’t any export.

glow/F1A8D1ED18E7/SENSOR/electricitymeter{
"electricitymeter": {
"timestamp": "2022–06–01T16:32:16Z",
"energy": {
"export": {
"cumulative": 0,
"units": "kWh"
},
"import": {
"cumulative": 201.95,
"day": 1.05,
"week": 0,
"month": 0,
"units": "kWh",
"mpan": "9012224001407",
"supplier": "— -",
"price": {
"unitrate": 0.20862,
"standingcharge": 0.28403
}
}
},
"power": {
"value": 0.063,
"units": "kW"
}
}
}

The above is an example from a SMETS1, Secure meter (Go Secure!), but will vary depending on the meter type how you are configured, etc. Also my guess is that we will get a lot of opinions from the community about new things to add and structure. We will attempt to mange the changes so we don’t break your code.

Let us know what you think on the forums and happy app building.

--

--