Page 1 of 1

DataUpdateTemplate format question

Posted: Wed 29 Jan 2025 1:24 am
by fgruhlke
The file below works perfect, when ever I try and add a webtag that returns "text", the MQTT topic stops updating.

An example: <#temptrendtext> Temperature change over the last three hours - Rising/Falling/Steady (values can be set in strings.ini)

I am hoping I need to slightly change the format to use this tag in the file below?

Code: Select all

"topics": [
    {
        "topic": "CumulusMX/DataUpdate",
        "data": "{\"time\":\"<#timehhmmss>\",\"windspeed\":<#wlatest rc=y>,\"windgust\":<#wgust>,\"wgustTM\":<#wgustTM>,\"YearGustH\":<#YearGustH>,\"winddir\":<#bearing>,\"press\":<#press>,\"temp\":<#temp>,\"tempTH\":<#tempTH>,\"tempTL\":<#tempTL>,\"dew\":<#dew>,\"heatindex\":<#heatindex>,\"wchill\":<#wchill>,\"feelslike\":<#feelslike>,\"tempH\":<#tempH>,\"tempL\":<#tempL>,\"outhum\":<#hum>,\"raintoday\":<#rfall>,\"rainrate\":<#rrate>,\"rmonth\":<#rmonth>,\"ryear\":<#ryear>,\"IsRaining\":<#IsRaining>,\"intemp\":<#intemp>,\"inhum\":<#inhum>}",
        "retain": false
    }
]}

Re: DataUpdateTemplate format question

Posted: Wed 29 Jan 2025 3:05 am
by fgruhlke
I figured it out... This format change worked to publish "text" to MQTT

\"temptrendtext\":\"<#temptrendtext>\",

Added backslash(s) and quotes around the web tag.

Re: DataUpdateTemplate format question

Posted: Wed 29 Jan 2025 10:29 am
by mcrossley
:thumbsup: