Anyone using AirDash macOS menu bar widget?

I cloned, compiled, and created a config file for the AirDash macOS menu bar widget per Airdash - AirGradient Information in Mac Status Bar . I enabled AirGradient API access, replaced the API token in the config file, and also replaced the location ID (using an ID from this page). The API token page says my AG API access is “enabled” and displays the token.

When I invoke airdash binary, an “:arrows_counterclockwise: AirDash” task bar entry appears. Every minute after invocation, the binary prints this to stdout:

"level":"ERROR","msg":"Fetching measures","error":"Error unmarshalling JSON"

Initially I thought this was a malformed config file, but the config file is in YAML, not JSON. The only JSON is from the API response. The git repo includes basic test coverage using 4 static JSON API replies (here). go test passes. There doesn’t appear to be a way to set a log level at runtime in Go’s slog library (without slog-env, which isn’t used here), so that output is all I get.

Is anyone successfully using AirDash?

I had it successfully running a few months back but did not try lately.

I just tried AirDash after seeing your post and was able to get everything up and running. I got the same error when I entered my API key incorrectly. Did you by chance remove the dashes from your API key? Make sure you copy it exactly as it is from the AirGradient dashboard. If anything you could also try regenerating an API key.

Thank you for responding and for the ideas! Knowing that it could work inspired me to do more troubleshooting and I found the problem. I had copied the API token exactly as it was, with the hyphens, but I misinterpreted the “Enabled” slider. This is disabled:

Screenshot 2024-01-30 at 6.29.36 AM

… which is completely clear after seeing the actual “Enabled” treatment, but not before:

Screenshot 2024-01-30 at 6.29.43 AM

Since I had just generated an API token, I interpreted the text as describing the current state, not describing the slider-on state. I figured that generating an API token enabled the API.

@Achim_AirGradient I could see either changing sliders to checkboxes (which have zero chance of misinterpretation) or adding text to describe the left position too, so the element reads: Disabled (slider) Enabled.

I will give this to our front end developers to make it more clear.

1 Like