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

MQTT

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

Vossenberg
Posts: 72
Joined: Sun 30 Dec 2012 8:23 am
Weather Station: Davis Vantage Pro2
Operating System: Raspbian Bullseye
Location: Hoef en Haag, Netherlands

Re: MQTT

Post by Vossenberg »

mcrossley wrote: Tue 14 Apr 2020 12:19 pm CMX version 3.5.2 is now available which should fix the MQTT issues.
Yes it is working, and I get messages through the broker! :-) Great! This was resolved very quickly!
This is a great feature which will make home automation even nicer!

Now I realise that Home Assistant is configured with another locale. So 18.9 degrees instead of 18,9 degrees.
A conversion option would be very very interesting, as I might expect that this will happen both ways.

(Meanwhile I'll try to find a solution in Home Assistant as well)
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

Post by laulau »

Does someone use Domoticz ?
I would like to interface using MQTT but i'm a newbe with that :oops:
Laurent

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

Re: MQTT

Post by HansR »

laulau wrote: Wed 22 Apr 2020 8:19 am Does someone use Domoticz ?
I would like to interface using MQTT but i'm a newbe with that :oops:
I do, but I use it only rudimentary for reading my electricity meter.
Now you set me on a track... :)
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
mcrossley
Posts: 12778
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

Post by mcrossley »

Vossenberg wrote: Wed 22 Apr 2020 6:57 am Now I realise that Home Assistant is configured with another locale. So 18.9 degrees instead of 18,9 degrees.
A conversion option would be very very interesting, as I might expect that this will happen both ways.
You probably should be using the <#RCxxx> versions of the tags in JSON. I'll have a version of CMX soon that accepts the dot decimal parameter (rc=y) on all decimal number tags.
Vossenberg
Posts: 72
Joined: Sun 30 Dec 2012 8:23 am
Weather Station: Davis Vantage Pro2
Operating System: Raspbian Bullseye
Location: Hoef en Haag, Netherlands

Re: MQTT

Post by Vossenberg »

mcrossley wrote: Wed 22 Apr 2020 9:18 am
Vossenberg wrote: Wed 22 Apr 2020 6:57 am Now I realise that Home Assistant is configured with another locale. So 18.9 degrees instead of 18,9 degrees.
A conversion option would be very very interesting, as I might expect that this will happen both ways.
You probably should be using the <#RCxxx> versions of the tags in JSON. I'll have a version of CMX soon that accepts the dot decimal parameter (rc=y) on all decimal number tags.
Great i'll check that out after work... :-D I'll post back here with updates!
Vossenberg
Posts: 72
Joined: Sun 30 Dec 2012 8:23 am
Weather Station: Davis Vantage Pro2
Operating System: Raspbian Bullseye
Location: Hoef en Haag, Netherlands

Re: MQTT

Post by Vossenberg »

Vossenberg wrote: Wed 22 Apr 2020 11:01 am
mcrossley wrote: Wed 22 Apr 2020 9:18 am
Vossenberg wrote: Wed 22 Apr 2020 6:57 am Now I realise that Home Assistant is configured with another locale. So 18.9 degrees instead of 18,9 degrees.
A conversion option would be very very interesting, as I might expect that this will happen both ways.
You probably should be using the <#RCxxx> versions of the tags in JSON. I'll have a version of CMX soon that accepts the dot decimal parameter (rc=y) on all decimal number tags.
Great i'll check that out after work... :-D I'll post back here with updates!
Indeed it works like a charm now, could not wait until after work :lol:
uncle_bob
Posts: 505
Joined: Wed 17 Aug 2011 2:58 pm
Weather Station: WeatherDuino Pro2
Operating System: 2008
Location: Canberra

Re: MQTT

Post by uncle_bob »

Can someone feeding Home Assistant please help me out?
I've been trying to get my MQTT messages to turn up as entities in HA but they fail to appear. I can see the messages in HA if I use the # to listen to all messages in the HA MQTT settings page. What's the secret to make this happen? Thanks

Here's the received message in the MQTT settings page:

Message 5 received on homeassistant/cumulus at 11:50 AM:

{
"time": "11:50:42",
"temp": 13.4,
"humidity": 47,
"wgust": 13
}

QoS: 0 - Retain: false

It's got me stumped :/
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image
Sadgit
Posts: 192
Joined: Sun 04 Jan 2009 5:56 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Middlesbrough, England

Re: MQTT

Post by Sadgit »

You need to create a sensor. This is a snippet of my sensors file

Code: Select all

    
  - platform: mqtt
    name: "Weather Station Rain"
    state_topic: "tele/cumulusmx/interval"
    value_template: '{{ value_json["rain"] }}' 
    unit_of_measurement: "mm"     
  - platform: mqtt
    name: "Weather Station Pressure"
    state_topic: "tele/cumulusmx/interval"
    value_template: '{{ value_json["pressure"] }}'
    unit_of_measurement: "hPa"
  - platform: mqtt
    name: "Weather Station Wind Speed"
    state_topic: "tele/cumulusmx/interval"
    value_template: '{{ value_json["windspeed"] }}'
    unit_of_measurement: "mph"
  - platform: mqtt
    name: "Weather Station Wind Gust"
    state_topic: "tele/cumulusmx/interval"
    value_template: '{{ value_json["windgust"] }}'
    unit_of_measurement: "mph"
  - platform: mqtt
    name: "Weather Station Humidity"
    state_topic: "tele/cumulusmx/interval"
    value_template: '{{ value_json["humidity"] }}'
    unit_of_measurement: "%"
uncle_bob
Posts: 505
Joined: Wed 17 Aug 2011 2:58 pm
Weather Station: WeatherDuino Pro2
Operating System: 2008
Location: Canberra

Re: MQTT

Post by uncle_bob »

Thanks Sadgit
Does that go in the configuration.yaml?
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image
Sadgit
Posts: 192
Joined: Sun 04 Jan 2009 5:56 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Middlesbrough, England

Re: MQTT

Post by Sadgit »

It does, but I split out all my sensors into a separate file. So this goes at the bottom of the configuration.yaml

sensor: !include sensor.yaml

Then in the same folder create a
sensor.yaml

The code I posted then goes directly into the sensor.yaml

If you know what I mean?
uncle_bob
Posts: 505
Joined: Wed 17 Aug 2011 2:58 pm
Weather Station: WeatherDuino Pro2
Operating System: 2008
Location: Canberra

Re: MQTT

Post by uncle_bob »

Sadgit wrote: Mon 18 Jul 2022 6:13 am If you know what I mean?
Yip, I think I got what you mean.
I'm trying to get my weather station outside temp on my esp3266 esphome powered spa controller which is working but trying improvements.
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image
uncle_bob
Posts: 505
Joined: Wed 17 Aug 2011 2:58 pm
Weather Station: WeatherDuino Pro2
Operating System: 2008
Location: Canberra

Re: MQTT

Post by uncle_bob »

Thanks Sadgit.
You were on the money and it's now working. You also taught me yaml nesting. 2 for the price of 1 :-) Thanks again.

So in a nutshell, and for those following along at home, it appears that the MQTT discovery setting does not automagically add MQTT feeds into HomeAsistant like I thought it should. It's needs sensors manually added to a yaml file (configuation.yaml or broken out like Sadgit suggested above).
Not once did I see this in any documentation (but I may have missed this)!

Now to figure the rest of the #tags :D
Interested in building your own Weather Station? Maybe check out the WeatherDuino Pro Project Here
Conder, Canberra Weather
Image
Sadgit
Posts: 192
Joined: Sun 04 Jan 2009 5:56 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Middlesbrough, England

Re: MQTT

Post by Sadgit »

happy to help. You can use MQTT explorer (if using windows) to see what is being sent by your mqtt server.

Cheers
Mark
Post Reply