Page 1 of 1

CUMX MQTT to Home Assistance

Posted: Sun 22 Aug 2021 8:58 pm
by CurtisZM
Could use some assistance on the new MQTT. What do I need to add to Home Assistance to make it see CUMX MQTT now? Thank you.

DataUpdateTemplate:

{"topics": [
{
"topic": "CumulusMX/DataUpdate",
"data": "\"time\":\"<#timehhmmss>\",\"windspeed\":<#wlatest rc=y>,\"winddir\":<#bearing>,\"temp\":<#temp rc=y>,\"humidity\":<#hum>,\"wgust\":<#wgust rc=y>,\"dew\":<#dew rc=y>,\"wchill\":<#wchill rc=y>,\"wspeed\":<#wspeed rc=y>,\"press\":<#press rc=y>,\"UV\":<#UV>,\"SolarRad\":<#SolarRad>,\"rfall\":<#rfall>,\"rrate\":<#rrate>,\"heatindex\":<#heatindex>,\"bearing\":<#bearing>,\"wchill\":<#wchill>,\"forecast\":<#forecastenc>,
"retain": false
}
]}

Home Assistance configuration.yaml

- platform: mqtt
state_topic: "CumulusMX/DataUpdate"
name: "Davis Windspeed"
unit_of_measurement: 'mph'
icon: mdi:weather-windy
value_template: '{{ value_json.wspeed }}'

Re: CUMX MQTT to Home Assistance

Posted: Tue 24 Aug 2021 2:11 pm
by mcrossley
I have no idea what "home assistance" is expecting.

What did you previous version template that presumably worked look like? I can then convert that to the new format for you.

Re: CUMX MQTT to Home Assistance

Posted: Thu 26 Aug 2021 12:53 am
by CurtisZM
{"time":"<#timehhmmss>","temp":<#temp rc=y>,"humidity":<#hum>,"wgust":<#wgust rc=y>,"dew":"<#dew rc=y>","wchill":"<#wchill rc=y>","wspeed":"<#wspeed rc=y>","press":"<#press rc=y>","UV":"<#UV>","SolarRad":"<#SolarRad>","rfall":"<#rfall>","rrate":"<#rrate>","heatindex":"<#heatindex>","bearing":"<#bearing>","wchill":"<#wchill>","forecast":"<#forecastenc>"}

Re: CUMX MQTT to Home Assistance

Posted: Thu 26 Aug 2021 8:53 am
by mcrossley
It looks like you almost had it right - you were missing the closing " marks after <#forecastenc>, and the curly brackets to make it be interpreted as JSON by your home assistance system.

I think this should do it?...

Code: Select all

{"topics": [
    {
        "topic": "CumulusMX/DataUpdate",
        "data": "{\"time\":\"<#timehhmmss>\",\"temp\":<#temp rc=y>,\"humidity\":<#hum>,\"wgust\":<#wgust rc=y>,\"dew\":\"<#dew rc=y>\",\"wchill\":\"<#wchill rc=y>\",\"wspeed\":\"<#wspeed rc=y>\",\"press\":\"<#press rc=y>\",\"UV\":\"<#UV>\",\"SolarRad\":\"<#SolarRad>\",\"rfall\":\"<#rfall>\",\"rrate\":\"<#rrate>\",\"heatindex\":\"<#heatindex>\",\"bearing\":\"<#bearing>\",\"wchill\":\"<#wchill>\",\"forecast\":\"<#forecastenc>\"}",
        "retain": false
    }
]}

Re: CUMX MQTT to Home Assistance

Posted: Thu 26 Aug 2021 11:49 pm
by CurtisZM
Working. Thank you very much..