MQTT Homie lights missing properties and settable switch

Hi all,

In my new home I’m trying to create some home automation. I have different parts connecting to my home network. And I want to tie it all together with openHAB. My IKEA Tradfri and Philips HUE work almost out of the box. Now I want to tie in my MQTT light controller (made it myself).

The MQTT light controller consists of a Raspberry Pi on a relay board with 8 relays. And I wrote some code to publish its capabilities on the MQTT broker with the HOMIE convention. Or at least that was my plan. But after a few days trying some parts frustrate me. The light controller is discovered. But most of its features are not. And I am at a loss what I am doing wrong. Hopefully someone can help.

The controller is discovered and shows the following information.

But looking at the MQTT broker (Mosquitto) I would think there would be a lot more. Also non of the, what I would think would be switches, seem to be working. And keep having the Dummy type.

[root@beest ~]# mosquitto_sub -v -t homie/#
homie/GroundFloorControl/$homie 3.0.1
homie/GroundFloorControl/$name GroundFloorControl
homie/GroundFloorControl/$fw/name Raspi Relayboard
homie/GroundFloorControl/$fw/version 0.1
homie/GroundFloorControl/$nodes light1,light2,light3,light4,light5,light6,light7,light8
homie/GroundFloorControl/$implementation RaspberryPi
homie/GroundFloorControl/$stats uptime,signal,cputemp,cpuload,freeheap,supply
homie/GroundFloorControl/$stats/interval 60
homie/GroundFloorControl/$stats/uptime 9583
homie/GroundFloorControl/$stats/signal 0
homie/GroundFloorControl/$stats/cputemp 44.008
homie/GroundFloorControl/$stats/cpuload 0.00 0.00 0.00 1/100 1919

homie/GroundFloorControl/$stats/freeheap 798036
homie/GroundFloorControl/$stats/supply 0
homie/GroundFloorControl/light1/$name Light1
homie/GroundFloorControl/light1/$type light
homie/GroundFloorControl/light1/$properties power
homie/GroundFloorControl/light1/power false
homie/GroundFloorControl/light1/power/$name Power
homie/GroundFloorControl/light1/power/$settable true
homie/GroundFloorControl/light1/power/$retained true
homie/GroundFloorControl/light1/power/$datatype  boolean
homie/GroundFloorControl/light2/$name Light2
homie/GroundFloorControl/light2/$type light
homie/GroundFloorControl/light2/$properties power
homie/GroundFloorControl/light2/power false
homie/GroundFloorControl/light2/power/$name Power
homie/GroundFloorControl/light2/power/$settable true
homie/GroundFloorControl/light2/power/$retained true
homie/GroundFloorControl/light2/power/$datatype  boolean
homie/GroundFloorControl/light3/$name Light3
homie/GroundFloorControl/light3/$type light
homie/GroundFloorControl/light3/$properties power
homie/GroundFloorControl/light3/power false
homie/GroundFloorControl/light3/power/$name Power
homie/GroundFloorControl/light3/power/$settable true
homie/GroundFloorControl/light3/power/$retained true
homie/GroundFloorControl/light3/power/$datatype  boolean
homie/GroundFloorControl/light4/$name Light4
homie/GroundFloorControl/light4/$type light
homie/GroundFloorControl/light4/$properties power
homie/GroundFloorControl/light4/power false
homie/GroundFloorControl/light4/power/$name Power
homie/GroundFloorControl/light4/power/$settable true
homie/GroundFloorControl/light4/power/$retained true
homie/GroundFloorControl/light4/power/$datatype  boolean
homie/GroundFloorControl/light5/$name Light5
homie/GroundFloorControl/light5/$type light
homie/GroundFloorControl/light5/$properties power
homie/GroundFloorControl/light5/power false
homie/GroundFloorControl/light5/power/$name Power
homie/GroundFloorControl/light5/power/$settable true
homie/GroundFloorControl/light5/power/$retained true
homie/GroundFloorControl/light5/power/$datatype  boolean
homie/GroundFloorControl/light6/$name Light6
homie/GroundFloorControl/light6/$type light
homie/GroundFloorControl/light6/$properties power
homie/GroundFloorControl/light6/power false
homie/GroundFloorControl/light6/power/$name Power
homie/GroundFloorControl/light6/power/$settable true
homie/GroundFloorControl/light6/power/$retained true
homie/GroundFloorControl/light6/power/$datatype  boolean
homie/GroundFloorControl/light7/$name Light7
homie/GroundFloorControl/light7/$type light
homie/GroundFloorControl/light7/$properties power
homie/GroundFloorControl/light7/power false
homie/GroundFloorControl/light7/power/$name Power
homie/GroundFloorControl/light7/power/$settable true
homie/GroundFloorControl/light7/power/$retained true
homie/GroundFloorControl/light7/power/$datatype  boolean
homie/GroundFloorControl/light8/$name Light8
homie/GroundFloorControl/light8/$type light
homie/GroundFloorControl/light8/$properties power
homie/GroundFloorControl/light8/power false
homie/GroundFloorControl/light8/power/$name Power
homie/GroundFloorControl/light8/power/$settable true
homie/GroundFloorControl/light8/power/$retained true
homie/GroundFloorControl/light8/power/$datatype  boolean
homie/GroundFloorControl/$state ready

Can someone point me in the direction of a solution? Thanks in advance, Peter

1 Like

You forget to tell us what version you are using. MQTT evolves roughly every 6 weeks with large quantities of bug fixes. OH 2.4 is for example very old in terms of MQTT support and has many homie related bugs.

Hi David,

For my installation I used the ‘standard’ installation source for Fedora 29. As far as I understand this is the openHAB 2.x.x Stable repository. Giving me version:

Installed Packages
Name         : openhab2
Version      : 2.4.0
Release      : 1
Architecture : noarch
Size         : 80 M
Source       : None
Repository   : @System
From repo    : openHAB-Stable
Summary      : openhab2
URL          :
License      :
Description  : Linux installation package for openHAB 2.

Would it help if I try a newer version for instance the Milestone release?

:rage: OMG, it looks like I had a space too much in my Homie datatype attribute.

Will be going over my code line by line, just to check if one of the ‘sensors’ is mispronounced.

The milestone release helps yes. I think switches and dimmers and were fixed for OH 2.5m1 and rollershutters as well as a restart-and-find-again bug are fixed in a future 2.5m2.

Is there a way to see DEBUG messages for the MQTT subsystem? Somehow the setup stopped working when I added my Philips Hue and IKEA Tradfri lights.

It seemed to send MQTT messages before, but at the moment it stops working when I ‘flip a swith’ with a Thing error reading: OFFLINE - COMMUNICATION_ERROR: No connection or readOnly channel!

There is not much to debug log for the binding. The particular error you mentioned is fixed since a while though.

No debug would make it very hard to check where my implementation went wrong. I will once again check my installation (For all I know I’m at 2.5M1)

Do you know of any homie software/ESP8266 sketch/arduino sketch to test the OpenHAD setup? And give me a peek at the MQTT messages. That would give me an idea what might go wrong in the interaction.

I use

Are you using Python on your PI?

1 Like

mqtt-explorer looks promising. Next time I retry to recode, i will try it (busy with other projects at the moment).

And yes I am/was using Python with the paho mqtt client.

If you get back to the project, I have a Homie 3 library that I have started using with OH. Should make that side of things much easier.