Thermostat MQTT sensor Setup help -- Afterburner Thermostat for Chinese Diesel Heater

Hi All, hoping someone can give me some quick guidance here. I’m quite new to the HA world, but things have been progressing well. So please consider me a newbie here.

Running HA on a raspberry pi 4. I have purchased a new thermostat that has MQTT messaging and I’m trying to consolidate everything into 1 sensor that I can pick up. Maybe I’m taking the wrong approach here too, so please do let me know if so!

I’ve created some sensors that work using individual sensors.

  • platform: mqtt
    name: “Garage Thermostat Status”
    state_topic: “AfterburnerFF4E0C/status”
    availability:

    • topic: “AfterburnerFF4E0C/status”
  • platform: mqtt
    name: “Garage Temperature”
    state_topic: “AfterburnerFF4E0C/JSONout”
    unit_of_measurement: ‘°C’
    value_template: “{{ value_json.TempCurrent }}”

  • platform: mqtt
    name: “Garage Voltage”
    state_topic: “AfterburnerFF4E0C/JSONout”
    unit_of_measurement: ‘V’
    value_template: “{{ value_json.InputVoltage }}”

Trying to consolidate everything into one called monitoring? It does seem that the AfterburnerFF4E0C/JSONout topic sometimes pushes out a message with everything in one shot, other times it sends out just updates of individual details.

  • platform: mqtt
    name: “Garage Monitoring”
    state_topic: “AfterburnerFF4E0C/JSONout”
    value_template: “{{ value_json }}”
    json_attributes_template: >
    { “Current Temp”: {{value_json.TempCurrent}},
    “Desired Temp”: {{value_json.TempDesired}},
    “System Voltage”: {{value_json.SystemVoltage}},
    “Input Voltage”: {{value_json.InputVoltage}},
    “Body Temperature”: “{{value_json.TempBody}}”,
    “Stopped/Ready”: “{{value_json.RunString}}” }

here is the documentation for the thermostat to gather this info - http://www.mrjones.id.au/afterburner/assets/files/UserManual-V3.2.pdf,

image

Pretty sure I have not done this right… Ideally I’m trying to configure something like the generic thermostat, with the additional details.
image

Any help would be greatly appreciated! Please let me know if there is other details that I need to provide to help out too.

Thanks again!
Chad

1 Like

Any development on this?

How difficult it is to integrate the « Afterburner « heater

Yep, actually got it working. Its not too hard to get going. There is probably an easier way, but this is how I got it working.

Here is my config,

**configuration.yaml**
  - platform: generic_thermostat
    name: Garage Thermostat
    heater: switch.garage_thermostat_on_off
    target_sensor: sensor.garage_current_temperature
    min_cycle_duration:
      minutes: 6
    ac_mode: false
    initial_hvac_mode: "off"

**sensors.yaml**
- platform: mqtt
  name: "Garage Thermostat Status"
  state_topic: "AfterburnerXXXXXX/status"
  availability:
    - topic: "AfterburnerXXXXXX/status"
  icon: mdi:thermostat

- platform: mqtt
  name: "Garage Thermostat Run 01"
  state_topic: "AfterburnerXXXXXX/sts/Run"
  value_template: "{{ value }}"
  icon: mdi:state-machine

- platform: mqtt
  name: "Garage Thermostat Run State"
  state_topic: "AfterburnerXXXXXX/sts/RunString"
  value_template: "{{ value }}"
  icon: mdi:state-machine

- platform: mqtt
  name: "Garage Current Temperature"
  state_topic: "AfterburnerXXXXXX/sts/TempCurrent"
  unit_of_measurement: '°C'
  value_template: "{{ value }}"
  

- platform: mqtt
  name: "Garage Desired Temperature"
  state_topic: "AfterburnerXXXXXX/sts/TempDesired"
  unit_of_measurement: '°C'
  value_template: "{{ value }}"
  
- platform: mqtt
  name: "Garage Input Voltage"
  state_topic: "AfterburnerXXXXXX/sts/InputVoltage"
  unit_of_measurement: 'v'
  value_template: "{{ value }}"
  icon: mdi:lightning-bolt

- platform: mqtt
  name: "Garage GlowPlug Voltage"
  state_topic: "AfterburnerXXXXXX/sts/GlowVoltage"
  unit_of_measurement: 'v'
  value_template: "{{ value }}"  
  icon: mdi:lightning-bolt
  
- platform: mqtt
  name: "Garage GlowPlug Current"
  state_topic: "AfterburnerXXXXXX/sts/GlowCurrent"
  unit_of_measurement: 'Amps'
  value_template: "{{ value }}"  

- platform: mqtt
  name: "Garage Fuel Usage"
  state_topic: "AfterburnerXXXXXX/sts/FuelUsage"
  unit_of_measurement: 'mL'
  value_template: "{{ value }}"
  icon: mdi:fuel

- platform: mqtt
  name: "Garage Fuel Rate"
  state_topic: "AfterburnerXXXXXX/sts/FuelRate"
  unit_of_measurement: 'mL/hr'
  value_template: "{{ value }}"
  icon: mdi:fuel

- platform: mqtt
  name: "Garage Fan Speed"
  state_topic: "AfterburnerXXXXXX/sts/FanRPM"
  unit_of_measurement: 'RPM'
  value_template: "{{ value }}"
  icon: mdi:fan

**switch.yaml**
- platform: mqtt
  name: Garage Thermostat On / Off
  state_topic: "AfterburnerXXXXXX/sts/Run"
  command_topic: "AfterburnerXXXXXX/JSONin"
  value_template: '{{ value }}'  
  payload_on: '{"Run":1}'
  payload_off: '{"Run":0}'
  state_on: "1"
  state_off: "0"
  optimistic: false
  retain: false
  qos: 0
  icon: mdi:power

image

Cheers,

3 Likes

Hi… what MQTT are you using? i try the add-on Mosquitto broker but i was able to make it work…websocket issue… Any cookbook are print screen will help…

Any idea as to why it wasn’t working? There really wasn’t much to set it up. Using the one with HA, mosquitto broker.

Check this out, it may help - https://github.com/home-assistant/addons/blob/4707be688c419caf5d3f583788d9de23d30d1b01/mosquitto/DOCS.md

is there a way to push a command / reset button from Home Assistant to reset he fuel used

According to Ray the field to reset is ““PumpCount””

Hello,

I’ve also managed to include integrate the unit subscribing to the topics under Afterburnerxxxxx/sts/ and controlling using Afterburnerxxxxx/cmd/

However I’m struggeling making sensor based on the values that are beeing published under topic Afterburnerxxxx/JSONout/.

In example:

#   Humidity
  - platform: mqtt
    state_topic: "AfterburnerD006DC/JSONout"
    name: 'hytta_afterburner_Humidity'
    unit_of_measurement: '%'
    value_template: "{{ value_json.Humidity }}"
    icon: mdi:humidity
    unique_id: 'ab018'

The problem seems to be that the json string beeing published under this topic varies each time:

1: {"Humidity":30}
2: {"IP_STARSSI":-51}
3: {"Altitude":21}

With the result that the value for the sensors is only “true” until another value not containing the “Humidity” string is published, resulting in no value at all.

I dont understand why this happens, anyone know how to solve this?

Thanks!

Hello,

Figured out a way, basically use a template which reuse the last sensor value if no new value is received in the new json string, probably not the “correct way” but it works.

#   Humidity
  - platform: mqtt
    state_topic: "AfterburnerD006DC/JSONout"
    name: 'hytta_afterburner_Humidity'
    unit_of_measurement: '%'
    value_template: "{% if (value_json.Humidity) %}{{value_json.Humidity}}{% else %}{{states.sensor.hytta_afterburner_humidity.state}}{% endif %}"
    icon: mdi:humidity
    unique_id: 'ab018'

I created a button in Lovelace to accomplish this:

type: button
tap_action:
  action: call-service
  service: mqtt.publish
  service_data:
    topic: AfterburnerXXXXXX/cmd/PumpCount
    payload: '0'
  target: {}
icon: mdi:fuel
name: Reset Diesel Fuel

2 Likes

I am sure you have figured this out already but for the benefit of the new kids, here it is.
If you look at the Mosquitto documentation it says that the websocket port is 1884 (instead of 1883)

So your “Web server/Browser MQTT settings” config (lower section) under the Comms settings menu in Afterburner should look like this:

Broker (must be websocket) - 192.168.x.x (your HA IP) 1884 (the Websocket port)
Username / Password - auth for Mosquitto (I create a user just for this purpose in HA)
Topic Prefix - Afterburnerxxxxxx (x the last 6 digits of your STA MAC address)
Friendly Name - same

1 Like

Hi,
Sort of related to this, does anyone know how to set the #/sts/# topic flag to retained? All of my cards go wonkey if I restart home assistant until the next time I use the heater. I presume that this is a setting in the controller but there is nothing about how to set this in the manual as far as I can see.
thanks

Sorry to jump on a old thread but I’m trying to get some help please I’m completely new to all this and trying to learn
I have the Victron equipment and a afterburner along with the cerbo gx
I’m actually wanting to turn the diesel heater on but with commands from the echo show with Alexa is this achievable?

What model diesel heater was used for this?