MQTT state unknow,. How can this be configured?

Hello all,

I do have a source system where I would like to get data from.

HA and MQTT is configured.

Using MQTT Explorer I am able to browse:

Within HA I can browse through the Mosquito browser:

But all the values of e.g. sensors are unknown.

20241211_HA_03

Than I tried to configure these sensors in the configuration.yaml e.g.

But browsing through these in the development tools they are also unknown.

What am I doing the wrong? Is this the wrong syntax?

Thanks in advance!

Tom

I don’t see that state topic in the MQTT Explorer screenshot. Are you sure it’s right?

Please post code as formatted text where possible please, such as your sensor config:

mqtt:
  sensor:
    - name: ...
mqtt:
  sensor:
    - name: "SPA Deluxe Wassertemperatur"
      state_topic: "spanet/b48a0a6f29e4/water/temperature/state/"
      unique_id: "spanet_water_temperature_b48a0a6f29e4"
      device_class: "temperature"
      unit_of_measurement: "°C"
      icon: "mdi:thermometer-water"

{
“name”: “Spanet Water Temperature”,
“state_topic”: “spanet/b48a0a6f29e4/water/temperature/state/”,
“state_class”: “measurement”,
“device_class”: “temperature”,
“unit_of_measurement”: “°C”,
“icon”: “mdi:thermometer-water”,
“unique_id”: “spanet_water_temperature_b48a0a6f29e4”,
“device”: {
“identifiers”: [
“spanet_b48a0a6f29e4”
],
“name”: “SmartLink - b48a0a6f29e4”,
“model”: “V3”,
“manufacturer”: “Spanet”
},
“origin”: {
“name”: “Spanet”,
“sw_version”: “1.17”,
“support_url”: “https://spanet.com.au/”
},
“qos”: 0,
“optimistic”: false
}

$SYS/broker/clients
1 Like

Hello,
I have the same problem as you with pwsmqttdispatcher
Unknown !

How do you get the following information:

{
“name”: “Spanet Water Temperature”,
“state_topic”: “spanet/b48a0a6f29e4/water/temperature/state/”,
“state_class”: “measurement”,
“device_class”: “temperature”,
“unit_of_measurement”: “°C”,
“icon”: “mdi:thermometer-water”,
“unique_id”: “spanet_water_temperature_b48a0a6f29e4”,
“device”: {
“identifiers”: [
“spanet_b48a0a6f29e4”
],
“name”: “SmartLink - b48a0a6f29e4”,
“model”: “V3”,
“manufacturer”: “Spanet”
},
“origin”: {
“name”: “Spanet”,
“sw_version”: “1.17”,
“support_url”: “https://spanet.com.au/”
},
Thanks

When I tried this via terminal :
mosquitto_pub -h 192.168.129.187 -u username -P password -t “pwsmqttdispatcher” -m ‘{“temperature”: 23.0}’
result:
image

But with configuration.yaml : unknown
image

mqtt:
  sensor:
    - name: "abc_test_temperature2"
      state_topic: "pwsmqttdispatcher"
      value_template: "{{ value_json['temperature'] | float }}"
      unique_id: "7b259fe2-b64e-11ef-8d03-8f2f5ccfb9ff"
      unit_of_measurement: "°C"

any idea?
:wink:

Hi Thomas1234

It looks like you are trying to find state and control topics in the homeassistant topic, which is used for MQTT discovery MQTT - Home Assistant

Rather have a look for a topic that starts with spanet/[unique_id] for the actual states and control.

If you enable MQTT discovery in Home Assistant, then all the necessary devices are created for you, it should just work.

Cheers