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
File for pressure calibration settings?
Moderator: mcrossley
-
- Posts: 13
- Joined: Mon 21 Feb 2022 11:30 am
- Weather Station: FineOffset
- Operating System: Ubuntu 20.04
File for pressure calibration settings?
I'm running a Fineoffset WS3085. When the base station crashes as it does periodically, I've set up a serial relay and a Python script which briefly interrupts the power to the base station to reset it automatically. After each reset, I need to recalibrate the pressure sensor and I can get an accurate enough value from an API. It would be nice to add a couple of lines to the Python script and just have it recalibrate the pressure automatically using the API value. However, I'm having difficulty finding where the calibration settings are stored IN MX - can someone help me out and tell me which file I need to write to? Thanks.
- 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: File for pressure calibration settings?
The offset is stored in cumulus.ini
You should only alter value that with Cumulus stopped.
Code: Select all
[Station]
EWpressureoffset=
-
- Posts: 13
- Joined: Mon 21 Feb 2022 11:30 am
- Weather Station: FineOffset
- Operating System: Ubuntu 20.04
Re: File for pressure calibration settings?
Thank you! I will stop the service, edit and then restart it!
-
- Posts: 13
- Joined: Mon 21 Feb 2022 11:30 am
- Weather Station: FineOffset
- Operating System: Ubuntu 20.04
Re: File for pressure calibration settings?
I'm using Python to read the .ini file and then write new values into it and save it but when Cumulus starts, it appears to delete the file and replace it with a blank one. Could that be because the line endings are wrong? Im on Ubuntu 22.04. I'm just not sure what it is about the file that Cumulus doesn't like but I'm assuming it runs some sort of validity check at startup and replaces anything it doesn't think is a valid ini?
- 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: File for pressure calibration settings?
The log file will tell you if it is recreating Cumulus.ini The only time it does that is to remove old, deprecated entries, and all the remaining entries will be the same.
It sounds in your case though as though it cannot parse the file at all, so creates all new default entries and writes that back to the file.
It sounds in your case though as though it cannot parse the file at all, so creates all new default entries and writes that back to the file.
- ConligWX
- Posts: 1634
- Joined: Mon 19 May 2014 10:45 pm
- Weather Station: Davis vPro2+ w/DFARS + AirLink
- Operating System: Ubuntu 24.04 LTS
- Location: Bangor, NI
- Contact:
Re: File for pressure calibration settings?
have you tried using sed perhaps? just a thought.
something like:
something like:
Code: Select all
sed -i '/^EWpressureoffset=/!b;n;c\EWpressureoffset=new_value' cumulus.ini
Regards Simon
https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir • CumulusMX v4.0.0
https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir • CumulusMX v4.0.0
-
- Posts: 13
- Joined: Mon 21 Feb 2022 11:30 am
- Weather Station: FineOffset
- Operating System: Ubuntu 20.04
Re: File for pressure calibration settings?
I think it can't parse the file at all so it must be something to do with the way the Python library I used (configparser) writes the file.
Thank you, ConligWX for the sed suggestion. I will now try a sequence where I read the values I need for my calculation, stop MX, make a copy of the config file, sed the change into it and then if no errors are encountered cp the file back into place before starting MX again.
Thank you, ConligWX for the sed suggestion. I will now try a sequence where I read the values I need for my calculation, stop MX, make a copy of the config file, sed the change into it and then if no errors are encountered cp the file back into place before starting MX again.
- 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: File for pressure calibration settings?
Ah! I didn't release you were using an INI file parser, which is a bad idea. The MX INI file parser is customised to deal with types unique to CMX.
-
- Posts: 13
- Joined: Mon 21 Feb 2022 11:30 am
- Weather Station: FineOffset
- Operating System: Ubuntu 20.04
Re: File for pressure calibration settings?
It's OK, sed works a treat