@laulau: Do you know this article. Did you get any progress?
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 4019) - 03 April 2024
Legacy Cumulus 1 release 1.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
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.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
Moderator: mcrossley
- HansR
- Posts: 5957
- Joined: Sat 20 Oct 2012 6:53 am
- Weather Station: GW1100 (WS80/WH40)
- Operating System: Raspberry OS/Bookworm
- Location: Wagenborgen (NL)
- Contact:
Re: MQTT Export - Added Build 3071
Hans
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
- 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
ThanksHansR wrote: ↑Wed 27 May 2020 3:12 pm @kocher:
@laulau: Do you know this article. Did you get any progress?
Will read that.
-
- 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
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
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
-
- 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
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.
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.
- mcrossley
- Posts: 12756
- 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
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.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
-
- 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
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?
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?
- 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
Would be very helpfull to have separate topics!mcrossley wrote: ↑Sun 16 May 2021 10:31 pmNot 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.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
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
- mcrossley
- Posts: 12756
- 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
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?
- 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
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
- mcrossley
- Posts: 12756
- 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
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.
BTW, MQTT will get a bit of loving for the next full release.
- 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
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
-
- 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
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.
'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.
- 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
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?
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
-
- 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
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.
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.
-
- 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
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?