Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

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

MQTT Export - Added Build 3071

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

tallasen
Posts: 17
Joined: Sat 22 Jun 2013 7:55 am
Weather Station: Davis Vantage Pro2 Plus Wireless
Operating System: Windows 11 on Proxmox PVE
Location: Nora, Sweden

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: 17
Joined: Sat 22 Jun 2013 7:55 am
Weather Station: Davis Vantage Pro2 Plus Wireless
Operating System: Windows 11 on Proxmox PVE
Location: Nora, Sweden

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: 17
Joined: Sat 22 Jun 2013 7:55 am
Weather Station: Davis Vantage Pro2 Plus Wireless
Operating System: Windows 11 on Proxmox PVE
Location: Nora, Sweden

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: 208
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
Raspberry Pi 4 Bullseye
Directly connected : BMP388 pressure sensor. DHT22 For internal Humidity/temp Sensor. PMS5003 Particle Sensor
Wireless connected: 3 (WS2083)Temp TXr's, WH57 Lightning Sensor, FO Solar sensor
User avatar
mcrossley
Posts: 12685
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye 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: 208
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
Raspberry Pi 4 Bullseye
Directly connected : BMP388 pressure sensor. DHT22 For internal Humidity/temp Sensor. PMS5003 Particle Sensor
Wireless connected: 3 (WS2083)Temp TXr's, WH57 Lightning Sensor, FO Solar sensor
tallasen
Posts: 17
Joined: Sat 22 Jun 2013 7:55 am
Weather Station: Davis Vantage Pro2 Plus Wireless
Operating System: Windows 11 on Proxmox PVE
Location: Nora, Sweden

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: 12685
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye 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: 17
Joined: Sat 22 Jun 2013 7:55 am
Weather Station: Davis Vantage Pro2 Plus Wireless
Operating System: Windows 11 on Proxmox PVE
Location: Nora, Sweden

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: 12685
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye 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: 208
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
Raspberry Pi 4 Bullseye
Directly connected : BMP388 pressure sensor. DHT22 For internal Humidity/temp Sensor. PMS5003 Particle Sensor
Wireless connected: 3 (WS2083)Temp TXr's, WH57 Lightning Sensor, FO Solar sensor
uncle_bob
Posts: 505
Joined: Wed 17 Aug 2011 2:58 pm
Weather Station: WeatherDuino Pro2
Operating System: 2008
Location: Canberra

Re: MQTT Export - Added Build 3071

Post by uncle_bob »

My pressure doesn't seem to be published:

Image

My IntervalTemplate.txt looks like this:

Code: Select all

{"topics":[
    {
        "topic": "sensor/cumulusmx/interval",
        "data": "{\"time\":\"<#timehhmmss>\",\"temp\":<#temp rc=y>,\"humidity\":<#hum>,\"wgust\":<#wgust rc=y>}",\"pressure\":<#press>,\"windspeed\":<#wlatest rc=y>,
        "retain": false
    }
]}
Any idea why this might not be showing up?
Thanks Bob
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image
watsonm
Posts: 208
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 »

After wgust you have a closing squiggly bracket. }
And a quote. "
So rest of line is ignored.....
Last edited by watsonm on Sun 23 Oct 2022 8:30 am, edited 1 time in total.
Regards Mike
Image
Raspberry Pi 4 Bullseye
Directly connected : BMP388 pressure sensor. DHT22 For internal Humidity/temp Sensor. PMS5003 Particle Sensor
Wireless connected: 3 (WS2083)Temp TXr's, WH57 Lightning Sensor, FO Solar sensor
uncle_bob
Posts: 505
Joined: Wed 17 Aug 2011 2:58 pm
Weather Station: WeatherDuino Pro2
Operating System: 2008
Location: Canberra

Re: MQTT Export - Added Build 3071

Post by uncle_bob »

Thank's Mike, I can now see it in mqtt explorer. Cheers!
Now just to see why it's not showing in Home Assistant.
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image
Post Reply