Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.16.1 (build 3183) - 06 May 2022

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are interested in supporting Cumulus then maybe you would like to contribute to the maintenance of the Wiki? This need not take hours of your time - just a half hour here and there can make a big difference, particularly if many people are doing this. Any contributions are very welcome, whether they involve new content or editing of existing content. It will be very helpful to current and future users of Cumulus software if the Wiki is kept well-maintained and current. If you are interested then please contact forum user saratogaWX and ask for a Wiki account.

MQTT Export - Added Build 3071

A Forum to archive Cumulus MX development suggestions that have been rejected or solved by other means.
tallasen
Posts: 12
Joined: Sat 22 Jun 2013 7:55 am
Weather Station: Davis Vantage Pro2 Plus Wireless
Operating System: Windows 10
Location: Nora, Sweden
Contact:

Re: MQTT Export - Added Build 3071

Post by tallasen »

mcrossley wrote: Tue 25 May 2021 7:02 pm What is stopping you doing that now? Just define the template and it will work.

BTW, MQTT will get a bit of loving for the next full release. ;)
Great news, looking forward to that!!

Mqtt runing on MX is essential for me implementing sensors in Home Assistant via Mosquitto broker. :P
User avatar
peterpc58
Posts: 5
Joined: Sat 22 May 2021 10:28 am
Weather Station: Davis Vantage pro 2
Operating System: Rpi

Re: MQTT Export - Added Build 3071

Post by peterpc58 »

I think max characters in mqtt for ha is 255....
Peter
tallasen
Posts: 12
Joined: Sat 22 Jun 2013 7:55 am
Weather Station: Davis Vantage Pro2 Plus Wireless
Operating System: Windows 10
Location: Nora, Sweden
Contact:

Re: MQTT Export - Added Build 3071

Post by tallasen »

Ok, it might be so. But I still got the error "Entity is non-numeric: sensor.vp2_temp_out"

sensor looks like this:

Code: Select all

sensor:
  - platform: mqtt
    state_topic: "CumulusMX/Interval"
    name: "VP2 temp out"
    unique_id: "VP2 temp out"
    unit_of_measurement: "°C"
    icon: mdi:temperature-celsius
    value_template: "{{ value_json.tempOut }}"
Cumulus Interval tEmplate:
{"time":"<#timehhmmss>","tempOut":<#temp rc=y>,"tempIn":<#intemp rc=y>,"tempTA":<#avgtemp rc=y>,"humidity":<#hum>,"wgust10":<#wgust10 rc=y>}
tallasen
Posts: 12
Joined: Sat 22 Jun 2013 7:55 am
Weather Station: Davis Vantage Pro2 Plus Wireless
Operating System: Windows 10
Location: Nora, Sweden
Contact:

Re: MQTT Export - Added Build 3071

Post by tallasen »

Now I've been running mqtt overnight without any problems. I have a guess what could trigger the error.
Cumulus sends data to Mosquitto via a readable .txt file. It looks like this right now:

Code: Select all

{"time":"<#timehhmmss>","temp":<#temp rc=y>,"tempin":<#intemp rc=y>,
"humidity":<#hum>,"wgust":<#wgust rc=y>}
I have added sensors that match the inputs above, just to start over.

Before this I've done edits and added data fields with notepad++ and saved as a .txt file in a long single line, then after some time I got this annoying "entity is non numeric" error.

Yesterday I edited the "stock" file from Cumulus MX with Sublime text, making some minor adjustments to meet my needs, and inputs were automatically shifted to a new line (a 2:nd line, see above), not a single line with all inputs. So far no errors.
watsonm
Posts: 71
Joined: Sun 03 Jan 2016 3:39 pm
Weather Station: N96GY -but like Triggers Broom!!
Operating System: Raspberry Pi4 Vers:11 Bullseye
Location: Poundbury, Dorset

Re: MQTT Export - Added Build 3071

Post by watsonm »

Just another vote for defining multiple topics pretty please..... :?
Regards Mike

Image
User avatar
mcrossley
Posts: 9987
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Buster Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: MQTT Export - Added Build 3071

Post by mcrossley »

??? You can define as many topics as you like.
watsonm
Posts: 71
Joined: Sun 03 Jan 2016 3:39 pm
Weather Station: N96GY -but like Triggers Broom!!
Operating System: Raspberry Pi4 Vers:11 Bullseye
Location: Poundbury, Dorset

Re: MQTT Export - Added Build 3071

Post by watsonm »

Got it thanks, (missing a comma separator! ) :bash: :bash:
Regards Mike

Image
tallasen
Posts: 12
Joined: Sat 22 Jun 2013 7:55 am
Weather Station: Davis Vantage Pro2 Plus Wireless
Operating System: Windows 10
Location: Nora, Sweden
Contact:

Re: MQTT Export - Added Build 3071

Post by tallasen »

Skärmbild 2022-01-31 154816.jpg
As soon as I add more fields to my interval.txt file from Cumulus MX , it starts to look like this. I edit the file in Sublime Text 3 with “json” as encoding.
Am I doing something wrong, why is this long line appering?

Thanks for any help or suggestions!

Code like this:

Code: Select all

{"topics":[
    {
        "topic": "CumulusMX/Interval",
        "data": "{\"time\":\"<#timehhmmss>\",\"press\":<#press rc=y>,\"temp\":<#temp rc=y>,\"tempin\":<#intemp rc=y>,\"tempavg24\":<#avgtemp rc=y>,\"apptemp\":<#apptemp rc=y>,\"tempchangeh\":<#TempChangeLastHour rc=y>,\"raintoday\":<#rfall rc=y>,\"rainmonth\":<#rmonth rc=y>,\"rainratetoday\":<#rrate rc=y>,\"humidity\":<#hum>,\"humidityin\":<#inhum>,\"avgbearing\":<#avgbearing>,\"windavg10m\":<#wspeed rc=y>,\"wgust10\":<#wgust rc=y>}",
        "retain": true
    }
]}
You do not have the required permissions to view the files attached to this post.
User avatar
mcrossley
Posts: 9987
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Buster Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: MQTT Export - Added Build 3071

Post by mcrossley »

I'm not sure what you think is wrong? It looks like the message is being received and parsed correctly.
tallasen
Posts: 12
Joined: Sat 22 Jun 2013 7:55 am
Weather Station: Davis Vantage Pro2 Plus Wireless
Operating System: Windows 10
Location: Nora, Sweden
Contact:

Re: MQTT Export - Added Build 3071

Post by tallasen »

Hi Mark,

yes, everything works just fine.

But can you please explain why the message suddenly appears in a long, single line? It is just for convenience to have the message line by line so to say.
User avatar
mcrossley
Posts: 9987
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Buster Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: MQTT Export - Added Build 3071

Post by mcrossley »

It appears as one line because that is how the template is formatted, it is also the most compact format - no point to transmitting more data than you need to. You could change that however you like and put new lines and spaces between the entries so it looks like the "pretty format" in your screen shot. But computers that will be reading the data don't care about prettifying.
watsonm
Posts: 71
Joined: Sun 03 Jan 2016 3:39 pm
Weather Station: N96GY -but like Triggers Broom!!
Operating System: Raspberry Pi4 Vers:11 Bullseye
Location: Poundbury, Dorset

Re: MQTT Export - Added Build 3071

Post by watsonm »

tallasen,
As an example my DataUpdateTemplate.txt now looks like this :

{"topics": [
{
"topic": "CumulusMX-Ghost/Time",
"data":<#timehhmmss>
"retain": false
}
,
{
"topic": "CumulusMX-Ghost/Pressure",
"data":<#press>
"retain": false
}
,
**************************** LInes removed to limit output
{
"topic": "CumulusMX-Ghost/Wind_Max",
"data":<#wgust>
"retain": false
}
,
{
"topic": "CumulusMX-Ghost/Rain",
"data":<#rfall>
"retain": false
}

]}

and the output comes out like this, which I find easier to parse in my python script..
You do not have the required permissions to view the files attached to this post.
Regards Mike

Image
Post Reply