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 4018) - 28 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

Cumulus MX Customizations for a Touch Bar MacBook Pro

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

Locked
buffaloseven
Posts: 28
Joined: Thu 06 Oct 2016 7:40 am
Weather Station: Davis Vantage Pro
Operating System: macOS 11.1
Location: Winnipeg, Manitoba

Cumulus MX Customizations for a Touch Bar MacBook Pro

Post by buffaloseven »

I've been playing with touch bar customizations using BetterTouchTool on my new MacBook Pro to try and make it more useful for me, and I've come up with a Cumulus MX powered one I really like.

First, I set up a macOS Launch Agent to automatically query the CMX webserver API (e.g. weather-server.local:8998/api/data/currentdata) every minute and write the result to ~/.pws. It first tries via the Bonjour address then falls back to my actual external IP; this should ensure that if I'm on my local network I'm not leaving it just to hit the computer on the other side of the house, but should get the data when I'm out and about on other networks.

Image
The 4 different states of the Touch Bar when using my CMX-powered customizations

Then, I've then set up a bunch of BTT widgets to show current conditions. These widgets utilize simple applescripts to load the locally saved data from the CMX API, then extract the information using JSON Helper which adds straightforward JSON parsing functionality to AppleScript. Each button is set up to open another button group, which I've populated with more detailed information about that parameter. Additionally, for the main 3 condition overview buttons, I've configured RegEx matching to give them highlight appearances whenever the parameter exceeds a threshold value.

It's all a bit frivolous, but as a weather nerd (I'm actually a meteorologist by trade), it's undeniably cool having live-updating weather conditions from my PWS on my keyboard. Either way, I thought that maybe it'd be worth sharing as a "non-standard" application of Cumulus MX's features!
buffaloseven
Posts: 28
Joined: Thu 06 Oct 2016 7:40 am
Weather Station: Davis Vantage Pro
Operating System: macOS 11.1
Location: Winnipeg, Manitoba

Re: Cumulus MX Customizations for a Touch Bar MacBook Pro

Post by buffaloseven »

Image

Plenty of progress over the past few days; I've discovered that BetterTouchTool supports external scripting, so I've migrated all of the update routines into a single external AppleScript file that is run after the LaunchAgent downloads the data. This is substantially more efficient as only one AppleScript needs to be run now (instead of one for each button) and the updates occur only when it attempts to fetch new data.

I've expanded the number of available parameters and implemented custom colouring for stale data (everything becomes a bit more grey and subdued) and expired data (buttons take on a dark red background). I've begun implementing custom colours depending on parameter values. For example, the current wind button will turn a shade of yellow if sustained winds are over 15 km/h (means it's actually fairly windy at my location) or gusts are over 35 km/h. The button will turn red if sustained winds are over 25 km/h or gusts exceed 50 km/h. Other conditional highlighting will be implemented for most parameters.

Some elements are cross-referenced. For example, in the main Touch Bar display where just the temperature is shown, if my PWS is also reporting a rain rate, then a rain cloud emoji is added to the left of the temperature, just to indicate that it's actively raining.

This has been a fun project, and I'm looking forward to seeing if I can extend integration with the web server API to fetch other data that can be utilized to add more information as well as enhance contextual display of parameters!
Locked