- Platform information:
- Hardware: Raspberry Pi 3 Model B Rev 1.2
- OS: Raspbian GNU/Linux 10 (buster)
- Java Runtime Environment: OpenJDK Runtime Environment (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 1.8.0_152-b76)
- openHAB version: 2.5.7-1 (as reported by dpkg)
- Issue of the topic:
I have successfully added one device from MQTT to OpenHAB using the Homie convention:
Now I’m trying to add another device the exact same way, and it doesn’t work. I tried rebooting many times the devices and openhab, but I always get two types of errors back:
- either Did not receive mandatory topic value: homie/wifi-kit-8/$name
- or Did not receive mandatory topic value: homie/wifi-kit-8/$state
I’m using mosquitto as a MQTT broker which is installed on the same Raspberry Pi as OpenHAB
pi@openhab:/var/log/mosquitto $ mosquitto_sub -v -t "#"
homie/envirophat/$homie 4.0.0
homie/envirophat/$name MQTT envirophat agent
homie/envirophat/$state sleeping
homie/envirophat/$nodes rpi,bmp280
homie/envirophat/rpi/$name Raspberry PI Zero
homie/envirophat/rpi/$type rpiz
homie/envirophat/rpi/$properties temperature
homie/envirophat/rpi/temperature 31.48
homie/envirophat/rpi/temperature/$name Temperature
homie/envirophat/rpi/temperature/$unit °C
homie/envirophat/rpi/temperature/$datatype float
homie/envirophat/bmp280/$name BMP280 on Envirophat
homie/envirophat/bmp280/$type bmp280
homie/envirophat/bmp280/$properties temperature,pressure
homie/envirophat/bmp280/temperature 19.86
homie/envirophat/bmp280/temperature/$name Temperature
homie/envirophat/bmp280/temperature/$unit °C
homie/envirophat/bmp280/temperature/$datatype float
homie/envirophat/bmp280/pressure 988.44
homie/envirophat/bmp280/pressure/$name Pressure
homie/envirophat/bmp280/pressure/$unit hPa
homie/envirophat/bmp280/pressure/$datatype float
homie/wifi-kit-8/$homie 4.0.0
homie/wifi-kit-8/$name MQTT ESP8266 agent
homie/wifi-kit-8/$nodes bme280
homie/wifi-kit-8/bme280/$name BME280 via ESP8266EX
homie/wifi-kit-8/bme280/$type bme280
homie/wifi-kit-8/bme280/$properties temperature,pressure,humidity
homie/wifi-kit-8/bme280/temperature 21.40
homie/wifi-kit-8/bme280/temperature/$name Temperature
homie/wifi-kit-8/bme280/temperature/$unit °C
homie/wifi-kit-8/bme280/temperature/$datatype float
homie/wifi-kit-8/bme280/pressure 988.04
homie/wifi-kit-8/bme280/pressure/$name Pressure
homie/wifi-kit-8/bme280/pressure/$unit hPa
homie/wifi-kit-8/bme280/pressure/$datatype float
homie/wifi-kit-8/bme280/humidity 52.01
homie/wifi-kit-8/bme280/humidity/$name Humidity
homie/wifi-kit-8/bme280/humidity/$unit %
homie/wifi-kit-8/bme280/humidity/$datatype float
homie/wifi-kit-8/$state sleeping
As you can see both devices are sending the same values to MQTT using the Homie convention.
Here are the latest logs from openhab-cli:
==> /var/log/openhab2/openhab.log <==
2020-08-25 21:47:31.617 [WARN ] [.incoming.MqttIncomingPublishService] - No publish flow registered for MqttStatefulPublish{stateless=MqttPublish{topic=homie/wifi-kit-8/$name, payload=18byte, qos=AT_MOST_ONCE, retain=false}, packetIdentifier=-1, dup=false, topicAlias=0, subscriptionIdentifiers=[]}.
==> /var/log/openhab2/events.log <==
2020-08-25 21:47:32.364 [home.event.InboxAddedEvent] - Discovery Result with UID 'mqtt:homie300:9a1d561c:wifi-kit-8' has been added.
==> /var/log/openhab2/openhab.log <==
2020-08-25 21:47:32.363 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'mqtt:homie300:9a1d561c:wifi-kit-8' to inbox.
==> /var/log/openhab2/events.log <==
2020-08-25 21:47:42.986 [me.event.InboxRemovedEvent] - Discovery Result with UID 'mqtt:homie300:9a1d561c:wifi-kit-8' has been removed.
2020-08-25 21:47:43.000 [hingStatusInfoChangedEvent] - 'mqtt:homie300:9a1d561c:wifi-kit-8' changed from UNINITIALIZED to INITIALIZING
2020-08-25 21:47:43.549 [hingStatusInfoChangedEvent] - 'mqtt:homie300:9a1d561c:wifi-kit-8' changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): java.lang.Exception: Did not receive mandatory topic value: homie/wifi-kit-8/$name
Does it have anything to do with the log entry “No publish flow registered for MqttStatefulPublish”?
Am I doing anything stupid?