Help getting me started with MQTT sensors

Hello everyone,
I have an aquacomputer quadro that is able to sent MQTT messages.

I configured the software to sent messages, and they are looking like this:
Hi, can someone get me started with setting up an MQTT sensor: Message 593 received on aquasuite/sensor/pump/state at 16:02:
I get this data from a device, but I can’t get a device via the MQTT

{
    "Id": "61d73fcc-70df-42fd-990c-ad3181393b61",
    "Topic": "aquasuite/sensor/pump/state",
    "Title": "Output",
    "Message": "",
    "Data": [
        {
            "Name": "pumpspeed",
            "Unit": "%",
            "Value": 50
        }
    ]
}

I am struggling to get the sensor showing up in home assistant.
MQTT is configured for auto discovery, but it will not show up, and I don’t know how to set up the sensor via the configuration files (all I tried did not work).

I am fighting with this for the last 3 hours and would appreciate some help.

Hi,

this is what I have configured for my air quality sensor (through MQTT, too):

There is some sort of JSON template (which I have not understood either . but it works for me) which I used:

# IAQ Sensor im Schlafzimmer
 - platform: mqtt
   state_topic: schlafzimmer/iaq
   name: "sz_iaq_temp"
   unit_of_measurement: "°C"
   value_template: '{{ value_json.temperature }}'
 - platform: mqtt
   state_topic: schlafzimmer/iaq
   name: "sz_iaq_rhumid"
   unit_of_measurement: "%"
   value_template: '{{ value_json.relative_humidity }}'

Where the output of the sensor looks like this:

{
  "meta": {
    "sn": 75,
    "ip": "192.168.2.60",
    "name": "Unipi IAQ Sensor RW-THC",
    "desc": "IAQ RW-THC Schlafzimmer",
    "fw_version": "4.2",
    "uptime": 191197,
    "heap_size": 131.876,
    "heap_size_min": 118.804,
    "rst_0": 1,
    "rst_1": 14,
    "http_server_state": 5,
    "http_server_counter": 0,
    "wifi_rssi": -77.36027526855469
  },
  "temperature": 24.44,
  "relative_humidity": 24.87,
  "absolute_humidity": 5.53,
  "dew_point": 3.04,
  "CO2": 431.68,
  "atm_pressure": 1001.61,
  "ambient_light": 0,
  "VOC_index": 32.11,
  "VOC_equiv_CO2": 514.81,
  "VOC_accuracy": 1
}

Do your own pattern matching and you should be able to read your values.

Greetings

/KNEBB

Hey,

my issue was that i was not aware of how to call the values within data and that I was not aware that these are case sensitive.

Here is what worked:

value_jason.Data[0].Value

so my final code looks like this:

- platform: mqtt
  state_topic: aquasuite/sensor/pump/
  name: "pc_pumpe_power"
  unit_of_measurement: "%"
  value_template: "{{ value_json.Data[0].Value }}"


thank you, @knebb, for your input

2 Likes

THANK YOU SO MUCH!!! I messed with this for hours and couldn’t figure out the right damn format to call “Value”. This helped so much, and finally I am able to get all my Aquaero and Aquasuite (And HWinfo) sensors into Home Assistant! TY!!!

For some reason I needed it like this

mqtt:
  sensor:
    - name: "aquastream_backtoheatexchanger"
      state_topic: homeassistant/sensor/aquastream
      unit_of_measurement: "°C"
      state_class: measurement
      device_class: temperature
      value_template: "{{ value_json.Data[0].Value }}"

    - name: "aquastream_fromheatexchanger"
      state_topic: homeassistant/sensor/aquastream
      unit_of_measurement: "°C"
      state_class: measurement
      device_class: temperature
      value_template: "{{ value_json.Data[3].Value }}"

    - name: "aquastream_fan"
      state_topic: homeassistant/sensor/aquastream
      unit_of_measurement: "rpm"
      state_class: measurement
      value_template: "{{ value_json.Data[1].Value }}"

    - name: "aquastream_FanPower"
      state_topic: homeassistant/sensor/aquastream
      unit_of_measurement: "%"
      state_class: measurement
      value_template: "{{ value_json.Data[2].Value }}"

    - name: "aquastream_pumprpm"
      state_topic: homeassistant/sensor/aquastream
      unit_of_measurement: "rpm"
      state_class: measurement
      value_template: "{{ value_json.Data[4].Value }}"