Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.5 (build 3282) - 23 February 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

Hitchhiking with the Airlink interface of CMX

Discussion of the Cumulusutils tool and website generator.

Moderator: HansR

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: Hitchhiking with the Airlink interface of CMX

Post by watsonm »

HAns,
Having another go.
I can get a web server running on the pi but it requires me to specify a port (8500).
In CMX settings the Extra Senosr->Davis Airlink-> Indoor link all it willallow me to enter is the ip address 192.168.1.x

No port specification is allowed so CMX sends it GET to the machine but (i guess ) to port 80 . :groan:

Still investigating....
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
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: Hitchhiking with the Airlink interface of CMX

Post by watsonm »

Managed to get the web server running OK on port 80!
Had to run as superuser otherwise I got permission denied. Other port number worked OK as ordinary user!)

Now seeing the

Code: Select all

"GET /v1/current_conditions HTTP/1.1" 404 -
message from CMX.

I created a dummy current_conditions file so it gives the 200 return code.

Now to master the format of the file.
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
HansR
Posts: 5832
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: Hitchhiking with the Airlink interface of CMX

Post by HansR »

Mike, OK, nice! Out of the back of my head (not at the computer now) : I don't think CMX is asking for a file, it is asking for a response containing the AirLink json reply. That is somewhat different.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
freddie
Posts: 2423
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Hitchhiking with the Airlink interface of CMX

Post by freddie »

watsonm wrote: Mon 08 Aug 2022 4:52 pm Managed to get the web server running OK on port 80!
Had to run as superuser otherwise I got permission denied. Other port number worked OK as ordinary user!)
That's SOP on Linux (and other OSes) as ports <= 1024 are "privileged" ports for which superuser/root access is required. A good web server will bind to the port and do other tasks that require root access, before dropping into ordinary user mode for day-to-day tasks such as serving content.
Freddie
Image
freddie
Posts: 2423
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Hitchhiking with the Airlink interface of CMX

Post by freddie »

HansR wrote: Mon 08 Aug 2022 5:01 pm Mike, OK, nice! Out of the back of my head (not at the computer now) : I don't think CMX is asking for a file, it is asking for a response containing the AirLink json reply. That is somewhat different.
As long as the response is in the appropriate format then it doesn't matter whether it comes from a file or from a more dynamic source. If the file is written by whatever process is making the data available then MX will not know the difference provided the content-type is set appropriately in the response.
Freddie
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: Hitchhiking with the Airlink interface of CMX

Post by watsonm »

Hans,

All working! 8-)
I created the file in the format specified
(well actually one long line!) and started up the web server and it is updating CMX Airlink sensors page :mrgreen:
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
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: Hitchhiking with the Airlink interface of CMX

Post by watsonm »

Thanks Freddie for confirming what I have discovered about the current_conditions file.

The webserver I am using currently is just to run

Code: Select all

 python -m http.server 80
In the web_server directory. Seems to as long as I su first...
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
freddie
Posts: 2423
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Hitchhiking with the Airlink interface of CMX

Post by freddie »

watsonm wrote: Mon 08 Aug 2022 7:12 pm Thanks Freddie for confirming what I have discovered about the current_conditions file.

The webserver I am using currently is just to run

Code: Select all

 python -m http.server 80
In the web_server directory. Seems to as long as I su first...
Ah okay, it's a python-based web server. Yes, you'll have to start that as root to bind to port 80.
Freddie
Image
User avatar
HansR
Posts: 5832
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: Hitchhiking with the Airlink interface of CMX

Post by HansR »

@freddie, @watsonm: haha this took a bit different route than I anticipated but it definitely is hitchhiking the AirLink interface of CMX : another device, a webserver and CMX talking to an AirLink :lol:

If it's working then I like it :D
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
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: Hitchhiking with the Airlink interface of CMX

Post by watsonm »

Hans and Freddie,

Thanks for your help.
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
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: Hitchhiking with the Airlink interface of CMX

Post by watsonm »

Hans,
Now to get my head round the Nowcast calculation. :groan:
Will these be needed if I consider sending the data off to CMX utils?

I have decided on a location to move the sensor to outdoors but that will be a while yet. Have to move my pressure and humidity sensors to
my other pi which is upstairs (and hopefully get them working. Its is a Raspberry pi 3.

Image 3840x2100.jpg
The 24hour numbers will not be correct as I cloned the three hour numbers to save a bit of time. Hopefully tomorrow will show a difference
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
User avatar
HansR
Posts: 5832
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: Hitchhiking with the Airlink interface of CMX

Post by HansR »

watsonm wrote: Tue 09 Aug 2022 9:01 am Now to get my head round the Nowcast calculation. :groan:
Will these be needed if I consider sending the data off to CMX utils?
No, they won't be needed if you set the parameter to ignore (See wiki).
So it is a choice, more or less depending on the country you are in. Outside the US, the Nowcast is not used afaik.

You need to calculate it yourself if you emulate the airlink (just as you have to do the averages yourself)
For this see the Wikipedia article (or the calculation in my CUSensorArray software to be transcribed to Python).
watsonm wrote: Tue 09 Aug 2022 9:01 am I have decided on a location to move the sensor to outdoors but that will be a while yet. Have to move my pressure and humidity sensors to
my other pi which is upstairs (and hopefully get them working. Its is a Raspberry pi 3.

[...]

The 24hour numbers will not be correct as I cloned the three hour numbers to save a bit of time. Hopefully tomorrow will show a difference
Well, indoor/outdoor is just a configuration in CMX. If you change that, just rerun CUtils with AirLink argument and everything will be allright. If you plot using CUtils, you will see the difference pretty quick.

I used the T/H (pressure is not involved in the AirLink) with separate sensors because the device will be in a place where T/H may deviate from what you measure for the weatherstation. The possible corrections you better ignore for the time being. That is a project in itself: not easy and highly debatable. A lot of citizen science projects are bout this. There is even a Polish device which uses a heated air inlet to avoid disturbance of the humidity.

RPi3 is not so very important, it might even work on a Zero, I also have a device based on an ESP32. So many possibilities.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
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: Hitchhiking with the Airlink interface of CMX

Post by watsonm »

Hans,

Thanks for all your help (and coding!!!) .

All up and running -> https://www.poundburyweather.co.uk/cmxutils/
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
HansR
Posts: 5832
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: Hitchhiking with the Airlink interface of CMX

Post by HansR »

Looks great :D :clap:
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
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: Hitchhiking with the Airlink interface of CMX

Post by watsonm »

Hans,
Getting this messgae on the AIrlink page of my utils website

Settings for AQI Normative Country for calculation in both Cumulus and CumulusUtils should match for useful results.

Looking at cumulusmx.ini and cumulusutils.ini I can't see a match.

Code: Select all

[AirLink]
CountrySelected=UK-COMEAP
What is the matching parameter in Cumulusmx.ini. I set UK-COMEAP in cumulusmx and that creates AQIformula=1

Puzzled of Poundbury :?:
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
Post Reply