I have the following Setup:
openHAB3 on Linux box
MQTT broker on another box
plus other devices.
Both are working well but I cannot get openhab to get topic updates.
The MQTT binding connects (check connections in the MQTT $SYS log and it shows the broker connecting or disconnect as I pause it).
I’ve created a MQTT Generic thing and added a channel but it just remains as NULL.
Any help would be greatly appreciated & lt me know what info you need to diagnose.
Please post your thing configuration, log files and maybe the content of your mqtt message.
There is no generic answer why it stays null without any details
Thi would need a stateTopic setting before any subscription happened; we do need to see your detailed settings.
Thank you for jumping on. Below are settings as requested:
This is reading the total power in watts of the solar array output. The state comes in as a number.
label: MQTT Broker
host: x.x.x.x #(MQTT broker IP here)
MQTT Generic Thing
label: Solar Assistant
location: Power Room
- id: SA_total_PV
label: Total PV output
I haven’t included the full logs but the critical info I found is here:
2022-10-08 16:31:20.437 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Incoming payload '' not supported by type 'NumberValue'
I also tried string but haven’t found anything in the logs. Also the value should never be blank but a numerical value between 0 and 10000.
I get this whenever I stop & start the broker:
2022-10-09 18:20:16.750 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '172.16.0.107' with clientid openHAB
As per your screenshot please change this to
You have got to be kidding me…
Yup. You’ve probably worked out this is my first time setting up / configuring MQTT.
I thought state was the title of the value, not the final level of topic. Something so simple.
Thank you so much @Matze0211 !!