pete_c
Guru
Noticed your posts on the Home assistant forums relating to HA-MQTT and CumulusMX.
Here using Cumulus webtags to generate my MQTT stuff and it works fine (work in progress).
Created an MQTT IntervalTemplate text file in CumulusMX that looks like this:
{"topics":[
{
"topic": "CumulusMX/Interval",
"data": "{\"time\":\"<#timehhmmss>\",\"battery\":<#txbattery channel=5>,\"pressure\":<#presstrendenglish rc=y>,\"inside-temp\":<#intemp rc=y>,\"temp\":<#temp rc=y>,\"humidity\":<#hum>,\"inside-humidity\":<#inhum>,\"wgust\":<#wgust rc=y>}",
"retain": true
}
]}
and edited my HA configuration.yaml file so it looks like this:
- platform: mqtt
name: "CumulusMX_Interval"
state_topic: "CumulusMX/Interval"
Using MQTT Explorer and HA I see this:
{"time":"10:12:55","battery"
k,"pressure":Rising,"inside-temp":78.2,"temp":70.7,"humidity":60,"inside-humidity":40,"wgust":2}
This is good. Trying to get individual variables in HA is where I am having issues:
IE: This does not work for me:
- platform: mqtt
state_topic: "CumulusMX/Interval:battery"
name: "Davis ISS Battery"
unit_of_measurement: ''
value_template: value_json.battery
@123
What am I doing wrong here?
Here using Cumulus webtags to generate my MQTT stuff and it works fine (work in progress).
Created an MQTT IntervalTemplate text file in CumulusMX that looks like this:
{"topics":[
{
"topic": "CumulusMX/Interval",
"data": "{\"time\":\"<#timehhmmss>\",\"battery\":<#txbattery channel=5>,\"pressure\":<#presstrendenglish rc=y>,\"inside-temp\":<#intemp rc=y>,\"temp\":<#temp rc=y>,\"humidity\":<#hum>,\"inside-humidity\":<#inhum>,\"wgust\":<#wgust rc=y>}",
"retain": true
}
]}
and edited my HA configuration.yaml file so it looks like this:
- platform: mqtt
name: "CumulusMX_Interval"
state_topic: "CumulusMX/Interval"
Using MQTT Explorer and HA I see this:
{"time":"10:12:55","battery"

This is good. Trying to get individual variables in HA is where I am having issues:
IE: This does not work for me:
- platform: mqtt
state_topic: "CumulusMX/Interval:battery"
name: "Davis ISS Battery"
unit_of_measurement: ''
value_template: value_json.battery
@123
What am I doing wrong here?