Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.6.5 (build 3081) - 28 May 2020 (please see important announcement regarding releases since 3.5.0)
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 the NOAA report and Snow Index drop-down menus to 2030)

See the Wiki to download the software or click on the Downloads link in the Forum Banner.

MQTT Export - Added Build 3071

Please DO NOT use this to publish your entire wish. This Forum is for specific suggestions to enhance the usability of Cumulus MX for all users, NOT your personal requirements. Please check this forum and the rejected forum to make sure you are NOT posting a DUPLICATE suggestion. It will be heavily monitored by Admin and Mark Crossley to determine the feasibility and the difficulty of the suggestion. Those Topics that are deemed inadmissible will moved to the rejected Forum. The remaining Topics will be the Accepted list of future developments, and when our voluntary development group adds it to a build, the build number will be added to the Topic title.
prodata
Posts: 225
Joined: Sat 05 Feb 2011 7:13 pm
Weather Station: VP2
Operating System: Windows - all flavours
Location: Littleport, East Cambs, UK

Re: MQTT Export - Added Build 3071

Post by prodata »

Sadgit wrote:
Fri 01 May 2020 5:13 am
Or there are free online servers, https://www.cloudmqtt.com/ is one.
Sadly the cloudmqtt free option is 'Out of stock' :? at present for new subscribers (luckily I have a free one set up months ago that is still fine). Hopefully they might reactivate the free option at some stage. All the paid-for plans are still there of course, starting with Humble Hedgehog @ $5/month.
Last edited by prodata on Tue 12 May 2020 4:51 pm, edited 1 time in total.
John Dann
Prodata Weather Systems
Littleport, East Cambs, UK
http://www.weatherstations.co.uk

Sadgit
Posts: 176
Joined: Sun 04 Jan 2009 5:56 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Middlesbrough, England

Re: MQTT Export - Added Build 3071

Post by Sadgit »

Just fire up a mqtt docker.. Happy to share my compose file.

User avatar
kocher
Posts: 165
Joined: Sat 19 Apr 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 10
Location: San Sebastian - Spain
Contact:

Re: MQTT Export - Added Build 3071

Post by kocher »

Greetings to all

I also take advantage of Mark for this amazing new functionality provided to cumulusMX.

I must admit that the mqtt theory has seduced me since I met it, but I must also admit that, despite having walked the Internet, it did not achieve results; These have been days of great frustration.
A decisive step was to read Sadgit's comments, which pushed me to continue; for which I am very grateful to you.
Actually, configuring mqtt in cumulusMX is very very simple.
Logically, the next challenge is to get the values ​​of "realtime.txt" using Mqtt.

Another important step to check the results of cumulusMX publications or other publishers, has been the installation of Mqtt-Explorer (accessible from the Microsoft store); It is a free application and easy to configure.
With this application I monitor the activity of cumulusMX and other sources. For example, on a Linux (Debian) machine I have installed the "Belchertown" skin and finally have it update with mqtt every 2 seconds!!!:

http://kocher.es/weewx/

Many thanks to Mark and Sadgit
Image

User avatar
kocher
Posts: 165
Joined: Sat 19 Apr 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 10
Location: San Sebastian - Spain
Contact:

Re: MQTT Export

Post by kocher »

mcrossley wrote:
Tue 31 Mar 2020 12:55 pm
PM'd

Also if anybody else is interested in testing an MQTT feature, let me know.
Greetings Mark

I am very interested for any kind of test with MQTT.

Very grateful for your effort and help
Image

Sadgit
Posts: 176
Joined: Sun 04 Jan 2009 5:56 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Middlesbrough, England

Re: MQTT Export - Added Build 3071

Post by Sadgit »

happy to help.. it isn't often I can help other people :)

MQTT in Cumulus is to me what makes it the perfect product now. On the Home Assistant site people have been screaming out for an easy way to get info from their stations, and Mark made it possible :D

User avatar
laulau
Posts: 631
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 »

Hi,
I'm using Domoticz, could someone help me to in the configurations to catch CMX data ?
Thanks
Laurent

Image

User avatar
kocher
Posts: 165
Joined: Sat 19 Apr 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 10
Location: San Sebastian - Spain
Contact:

Re: MQTT Export - Added Build 3071

Post by kocher »

MQTT works wonders at cumulusMX. I managed to close the results of their publications using "MQTT Explorer":

https://mqtt-explorer.com/

The configuration I have set in cumulus is as follows, in case anyone is interested:

Code: Select all

=MQTT
- Server Name: 197.168..x.x                      (The IP address of the PC where Cumulus is installed).
- Server Port: 1883
- Use TLS:     (disabled)
- Username: xxxxx
- Password: xxxxx

= Send message on data update
- Enabled: (enabled)
- Topic Name: cumulusMX/Interval
- Template File: DataUpdateTemplate.txt

=Send message at fixed intervals
- Interval Time (secs): 10
- Topic Name: cumulusMX/Realtime
- Template File: RealtimeTemplate.txt
It works perfectly; The only detail that has caught my attention is that, regardless of Interval Time, there are always exactly 20 seconds for Realtime and 2 seconds for Interval.

The values ​​published by cumulusMx for realtime are exactly the same as the values ​​for the original "realtime.txt". I have managed to convert the decimal point (,) to point (.). In case anyone is interested, I attach it to the end of this message.

All right; The big question is that now that I have the same values ​​as the "realtime.txt" file, how can I use them to update a web page. I think from what I read that, in that case, port 9001 and the websockets protocol should be used. But I still don't understand how I could use it to update a web page; that is, how to subscribe that page to that Topic: Realtime
You do not have the required permissions to view the files attached to this post.
Image

User avatar
HansR
Posts: 973
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
Location: Wagenborgen (NL)
Contact:

Re: MQTT Export - Added Build 3071

Post by HansR »

@kocher: OK, i started working on the MQTT. It's totally new to me but the configuration seems very easy.
I used your configuration (left the fixed intervals off, so only on updated data).
Then I start the MQTT explorer which I configure for the cumulus machine (my RPi) and it refuses to connect.

I restarted Cumulus, but the MQTT explorer keeps refusing to connect (message: 'Disconnected from server').

What do I miss?
https://meteo-wagenborgen.nl / Cumulus 3.6.5 (build: 3081)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian GNU/Linux 10 (buster) / 4.19.97-v7+ armv7l
Mono JIT compiler version 6.8.0.105 (tarball Tue Feb 4 21:51:48 UTC 2020)

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

Re: MQTT Export - Added Build 3071

Post by mcrossley »

Hi Hans, I think you have misunderstood, Cumulus acts as a client, you need to point your MQTT Explorer at the server to which Cumulus is sending the data.

User avatar
HansR
Posts: 973
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
Location: Wagenborgen (NL)
Contact:

Re: MQTT Export - Added Build 3071

Post by HansR »

mcrossley wrote:
Wed 27 May 2020 9:43 am
Hi Hans, I think you have misunderstood, Cumulus acts as a client, you need to point your MQTT Explorer at the server to which Cumulus is sending the data.
Aha... :D
https://meteo-wagenborgen.nl / Cumulus 3.6.5 (build: 3081)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian GNU/Linux 10 (buster) / 4.19.97-v7+ armv7l
Mono JIT compiler version 6.8.0.105 (tarball Tue Feb 4 21:51:48 UTC 2020)

User avatar
kocher
Posts: 165
Joined: Sat 19 Apr 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 10
Location: San Sebastian - Spain
Contact:

Re: MQTT Export - Added Build 3071

Post by kocher »

Greetings Hans

I recommend the MQTT-Explorer application, which allows you to monitor MQTT activity; It has the advantage that the modifications made are immediately appreciated.

https://mqtt-explorer.com/

I attach 3 images where you can see my own settings.

Everything is set up to see results locally

Once you find the right settings, it works alone and without interruptions

In addition, we must take into account the configuration that we have applied in the cumulusMX itself:

MQTT
Server Name
192.168.1.51
Your MQTT Server network name or IP address (Here the IP of the device where cumulusMX is installed)

Server port
1883
Your MQTT server port (default 1883)

Use TLS
Enable TLS support, currently special certificates are not supported

Username
xxxxxxxx
Enter your MQTT server username - if required

Password
xxxxxxxxx
Enter your MQTT server password - if required

Send message on data update
Enabled
Topic Name
cumulusMX/Interval
Enter the topic name for these messages

Template File
DataUpdateTemplate.txt
Specify the name of the template file in the /mqtt folder to format the content of these messages

Send messages at fixed intervals
Enabled
Interval Time (secs)
10
Enter the time in seconds between sending messages

Topic Name
cumulusMX/Realtime
Enter the topic name for these messages

Template File
RealtimeTemplate.txt
Specify the name of the template file in the /mqtt folder to format the content of these messages
You do not have the required permissions to view the files attached to this post.
Image

User avatar
HansR
Posts: 973
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
Location: Wagenborgen (NL)
Contact:

Re: MQTT Export - Added Build 3071

Post by HansR »

Thanks a lot Javier, it is becoming much clearer now. :D
I am just missing a MQTT server now, thought that could be Domoticz but I have some way to go there :)
https://meteo-wagenborgen.nl / Cumulus 3.6.5 (build: 3081)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian GNU/Linux 10 (buster) / 4.19.97-v7+ armv7l
Mono JIT compiler version 6.8.0.105 (tarball Tue Feb 4 21:51:48 UTC 2020)

User avatar
kocher
Posts: 165
Joined: Sat 19 Apr 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 10
Location: San Sebastian - Spain
Contact:

Re: MQTT Export - Added Build 3071

Post by kocher »

After many many days and many many tests I managed to create my own MQTT server that is responsible for updating the weewx page:

      http://kocher.es/weewx/

The instructions to carry it out are in:

    https://obrienlabs.net/how-to-setup-you ... tt-broker/

You have to read it slowly and carefully, because any error translates into failure.
In addition, we must pay special attention to the ports used.

If we want the server to update a certain page, MQTT must be used with #websockets and the ports are different.

Maybe it would be a nice option to update (every 2.5 seconds) your web template

One thing I am very clear about, if I have made it work (after many trial / error), I am sure that you will get it. ;)
Image

User avatar
HansR
Posts: 973
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
Location: Wagenborgen (NL)
Contact:

Re: MQTT Export - Added Build 3071

Post by HansR »

Thanks Javier, lots to work here :)
kocher wrote:
Wed 27 May 2020 11:06 am
carefully, because any error translates into failure.
You should try to make some software :lol:
https://meteo-wagenborgen.nl / Cumulus 3.6.5 (build: 3081)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian GNU/Linux 10 (buster) / 4.19.97-v7+ armv7l
Mono JIT compiler version 6.8.0.105 (tarball Tue Feb 4 21:51:48 UTC 2020)

User avatar
kocher
Posts: 165
Joined: Sat 19 Apr 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 10
Location: San Sebastian - Spain
Contact:

Re: MQTT Export - Added Build 3071

Post by kocher »

Long live sense of humor! :clap: :clap: :clap: :clap:
Image

Post Reply