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 4018) - 28 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

User avatar
HansR
Posts: 5871
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: MQTT Export - Added Build 3071

Post by HansR »

@kocher: :D
laulau wrote: Fri 15 May 2020 8:36 am Hi,
I'm using Domoticz, could someone help me to in the configurations to catch CMX data ?
Thanks
@laulau: Do you know this article. Did you get any progress?
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
laulau
Posts: 678
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: MQTT Export - Added Build 3071

Post by laulau »

HansR wrote: Wed 27 May 2020 3:12 pm @kocher: :D
laulau wrote: Fri 15 May 2020 8:36 am Hi,
I'm using Domoticz, could someone help me to in the configurations to catch CMX data ?
Thanks
@laulau: Do you know this article. Did you get any progress?
Thanks
Will read that.
Laurent

Image
Smithee
Posts: 74
Joined: Sun 02 Oct 2011 9:15 am
Weather Station: VP2
Operating System: Mac/win7
Location: United Kingdom

Re: MQTT Export - Added Build 3071

Post by Smithee »

Afternoon - the MQTT function is great - I was wondering if its possible to configure separate topics - rather than a single update - ie

weather/raindday
weather/temp
weather/tempmax

I can see how to configure a single topic but not to add any more (?)

Any thoughts would be great,

Andy
GSV3MiaC
Posts: 21
Joined: Fri 15 Feb 2013 5:24 pm
Weather Station: Fine Offset (ex Maplin)
Operating System: Win 7, Vista, XP, Android, etc.
Location: Shropshire

Re: MQTT Export - Added Build 3071

Post by GSV3MiaC »

Better late than never.. I just updated cumulusmx to get the mqtt function, to feed home assistant, much thanks, but does anyone have the yaml files which tell home assistant what entities it is going to get? Seems like a lot of thinking and typing to recreate?

OK, Nobody replied so I kludged something up .. stick this in your configuration.yaml file and you should get the appropriate set of sensors show up in Home Assistant, assuming you have changed the mqtt template file to output them (I am using
{"time":"<#timehhmmss>","temp":<#temp>,"humidity":<#hum>,"windspeed":<#wspeed>,"rainrate":<#rrate>,"press":<#press>}
)

sensor:
- platform: mqtt
name: "Cumulus_Temp"
unique_id: Cumulus.temp
state_topic: "CumulusMX/Interval"
unit_of_measurement: "degC"
value_template: "{{ value_json.temp }}"
- platform: mqtt
name: "Cumulus_Humidity"
unique_id: Cumulus.Humidity
state_topic: "CumulusMX/Interval"
unit_of_measurement: "%"
value_template: "{{ value_json.humidity }}"
- platform: mqtt
name: "Cumulus_rainrate"
unique_id: Cumulus.Rainrate
state_topic: "CumulusMX/Interval"
unit_of_measurement: "mm/hr"
value_template: "{{ value_json.rainrate }}"
- platform: mqtt
name: "Cumulus_Windspeed"
unique_id: Cumulus.Windspeed
state_topic: "CumulusMX/Interval"
unit_of_measurement: "m/s"
value_template: "{{ value_json.windspeed }}"
- platform: mqtt
name: "Cumulus_Pressure"
unique_id: Cumulus.Pressure
state_topic: "CumulusMX/Interval"
unit_of_measurement: "mbar"
value_template: "{{ value_json.press }}"

Note that build 3072 outputs blanks MQTT messages, you need a later version than that.
Last edited by GSV3MiaC on Mon 17 May 2021 5:41 pm, edited 2 times in total.
User avatar
mcrossley
Posts: 12694
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 »

Smithee wrote: Sat 25 Jul 2020 2:51 pm Afternoon - the MQTT function is great - I was wondering if its possible to configure separate topics - rather than a single update - ie

weather/raindday
weather/temp
weather/tempmax

I can see how to configure a single topic but not to add any more (?)

Any thoughts would be great,

Andy
Not at present, the MQTT implementation is very much a first stab at it. I have the feeling that the uptake/interest is low, so no refinement has been done so far.
GSV3MiaC
Posts: 21
Joined: Fri 15 Feb 2013 5:24 pm
Weather Station: Fine Offset (ex Maplin)
Operating System: Win 7, Vista, XP, Android, etc.
Location: Shropshire

Re: MQTT Export - Added Build 3071

Post by GSV3MiaC »

Well here is another interested customer!! Need to get the data into Home Assistant and this looks like the sanest way.

I only updated to build 3072 so far. When I tried to alter the MQTT details (having mistyped the server IP the first time) I got a slew of errors in the log of the type:

2021-05-17 10:17:23.926 Error: MQTT disconnected from the server
2021-05-17 10:17:23.926 MQTT Error: failed to connect to the host
2021-05-17 10:17:23.927 Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.

However restarting CumulusMX seems to have cleared that (am I supposed to restart after making config changes? I really can't remember, being old and forgetful!).
Appreciate the ongoing development and support anyway .. where do we send the cheques these days?
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 »

mcrossley wrote: Sun 16 May 2021 10:31 pm
Smithee wrote: Sat 25 Jul 2020 2:51 pm Afternoon - the MQTT function is great - I was wondering if its possible to configure separate topics - rather than a single update - ie

weather/raindday
weather/temp
weather/tempmax

I can see how to configure a single topic but not to add any more (?)

Any thoughts would be great,

Andy
Not at present, the MQTT implementation is very much a first stab at it. I have the feeling that the uptake/interest is low, so no refinement has been done so far.
Would be very helpfull to have separate topics!
How many sensors can I add for MQTT? Seems like I only get the first 12? Will be solved with the separate topics.
update: after a few minutes all configured sensors did appear.
Peter
User avatar
mcrossley
Posts: 12694
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 »

peterpc58 wrote: Sun 23 May 2021 11:26 am Would be very helpfull to have separate topics!
How many sensors can I add for MQTT? Seems like I only get the first 12? Will be solved with the separate topics.
update: after a few minutes all configured sensors did appear.
I'm not sure I understand the question. You can add as much data as you like, in whatever format you like, it doesn't have to be JSON, it could CSV, or XML or...

I'm also not a MQTT user, but putting each sensor on a separate topic seems overly complex?
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 »

mcrossley wrote: Tue 25 May 2021 1:00 pm
peterpc58 wrote: Sun 23 May 2021 11:26 am Would be very helpfull to have separate topics!
How many sensors can I add for MQTT? Seems like I only get the first 12? Will be solved with the separate topics.
update: after a few minutes all configured sensors did appear.
I'm not sure I understand the question. You can add as much data as you like, in whatever format you like, it doesn't have to be JSON, it could CSV, or XML or...

I'm also not a MQTT user, but putting each sensor on a separate topic seems overly complex?
Not a separate topic for each sensor, but like this:
System
Miscellaneous
Date & Time
Current Conditions
- Temperature
- Humidity
- Rainfall
- Pressure
- Wind
- Miscellaneous
Extra Sensors Davis
Extra Sensors Ecowitt
Recent History
- Temperature & Humidity
- Wind
- Pressure
- Rainfall
- Solar & UV
Today
- Temperature & Humidity
- Precipitation
- Pressure
- Wind
- Miscellaneous
Yesterday
- Temperature & Humidity
- Precipitation
- Pressure
- Wind
- Miscellaneous
Monthly
- Temperature & Humidity
- Pressure
- Wind
- Miscellaneous
Yearly
- Temperature & Humidity
- Pressure
- Wind
- Rainfall
All Time
- Temperature & Humidity
- Pressure
- Wind
- Rainfall
Monthly All Time Records
- Temperature & Humidity
- Pressure
- Wind
- Rainfall
Day/Night/Sun/Moon
Alarms
Extreme Records
Davis
Davis WLL
Davis AirLink
- Particulate Matter
- AQI Values
- Stats Values
- Sensor Info
Peter
User avatar
mcrossley
Posts: 12694
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 »

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. ;)
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 »

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. ;)
Where can I find "CumulusMX/DataUpdate" to change?
This is what I receive with MQTT:
Message 155 received on CumulusMX/DataUpdate at 12:23 PM:

{"time":"11:53:34","Windspeed":3.1,"Winddir":265,"Outdoor Temperature":9.9,"New build available":0,"Indoor Humidity":35,"Indoor Temperature":25.4,"Outdoor Humidity":79,"Temperature Trend":0.0,"Temperature High":13.9,"Temperature Low":8.1,"Apparent temperature":6.6,"Heat Index":9.9,"Dewpoint":6.5,"Windchill":8.1,"Pressure Now":1008.0,"Pressure High":1008.0,"Pressure Low":1001.8,"Pressure trend":0.0,"Wind Direction":265,"Average wind direction":283,"Wind Speed Average":3.6,"High wind speed today":F3}
Peter
GSV3MiaC
Posts: 21
Joined: Fri 15 Feb 2013 5:24 pm
Weather Station: Fine Offset (ex Maplin)
Operating System: Win 7, Vista, XP, Android, etc.
Location: Shropshire

Re: MQTT Export - Added Build 3071

Post by GSV3MiaC »

Under settings, internet, mqtt, you will find two options - send messages on dataupdate, and send message at fixed intervals. You can enable or disable both of those, and each has a
'template file' which tells Cumulus what to send. The default on is formatted for .json, but you can send what you like, even 'happy birthday', just so long as the mqtt listener knows what to do with it when it arrives.
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 »

But can I make multiple MQTT messages, like separate for temperature and wind?
Now everything is within one { }
And make different topics, change CumulusMX/DataUpdate in CumulusMX/temperature or CumulusMX/wind?
And only topic CumulusMX/temperature is send when one of the temp sensors change?
Peter
GSV3MiaC
Posts: 21
Joined: Fri 15 Feb 2013 5:24 pm
Weather Station: Fine Offset (ex Maplin)
Operating System: Win 7, Vista, XP, Android, etc.
Location: Shropshire

Re: MQTT Export - Added Build 3071

Post by GSV3MiaC »

Currently not, no.
Just use 'datachanged', send everything, and let the receiver sort out what changed. OK, you get too many messages that way, but not a big deal if the receiver is smart.
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 »

peterpc58 wrote: Sun 23 May 2021 11:26 am
mcrossley wrote: Sun 16 May 2021 10:31 pm
Not at present, the MQTT implementation is very much a first stab at it. I have the feeling that the uptake/interest is low, so no refinement has been done so far.
Would be very helpfull to have separate topics!
How many sensors can I add for MQTT? Seems like I only get the first 12? Will be solved with the separate topics.
update: after a few minutes all configured sensors did appear.
Peter! I have been struggling with the same issue in Home Assistant. My guess is that when adding more than 12 sensors they disappears and end up in HA as "entity is non numeric". Can anyone confirm the max no of sensors, anybody tried more than 12?
Post Reply