Aranet4MenuBar
macOS menu bar app for monitoring Aranet4 air quality sensor and getting notifications
Install / Use
/learn @robjama/Aranet4MenuBarREADME
Aranet4 Menu Bar App
A native macOS menu bar application that displays real-time air quality readings from your Aranet4 device via Bluetooth.

Features
- Live readings - Shows CO2 and temperature directly in the menu bar
- Auto-connect - Automatically finds and connects to your Aranet4
- Auto-refresh - Updates readings every 5 minutes
- Color-coded alerts - Red text when CO2 reaches critical levels (≥1200 ppm)
- System notifications - Get alerted when air quality degrades
- Customizable alert sounds - Choose from gentle beeps, urgent fire alarm, or silence
- Audio alarms - Optional sound alerts when CO2 levels get high
- Complete data - View CO2, temperature, humidity, pressure, and battery level
- Settings window - Easy-to-use native macOS settings interface
- Lightweight - Native Swift app, minimal resource usage
- Privacy-focused - All data stays on your device, no internet required
Requirements
- macOS 11.0 or later
- Aranet4 air quality sensor
- Bluetooth enabled
Installation
Direct Download (Recommended)
- Download the latest release from the Releases page
- Unzip the downloaded file
- Drag Aranet4.app to your Applications folder
- Right-click and select "Open" (first time only, to bypass Gatekeeper)
- Grant Bluetooth and Notification permissions when prompted
Homebrew (via custom tap)
brew tap robjama/aranet4 https://github.com/robjama/Aranet4MenuBar
brew install --cask aranet4
Build from Source
git clone https://github.com/robjama/Aranet4MenuBar.git
cd Aranet4MenuBar
./build.sh
cp -R build/Aranet4.app /Applications/
Setup Instructions
Option 1: Create Xcode Project Manually
- Open Xcode
- Create a new project: File > New > Project
- Select macOS > App
- Configure the project:
- Product Name:
Aranet4MenuBar - Interface:
SwiftUI - Language:
Swift - Save in:
/Users/rj/Aranet4MenuBar
- Product Name:
- In the project navigator, delete the default ContentView.swift and Aranet4MenuBarApp.swift files that Xcode created
- The existing Swift files in the folder will be automatically detected
- If not, drag and drop the following files into your Xcode project:
- Aranet4MenuBarApp.swift
- BluetoothManager.swift
- Aranet4Data.swift
- StatusItemController.swift
- MenuBarView.swift
- Configure the project settings:
- Select your project in the navigator
- Go to Signing & Capabilities tab
- Enable App Sandbox
- Check Bluetooth under App Sandbox
- Click + Capability and add the Bluetooth capability
- In the Info tab:
- Add custom iOS target properties:
- Key:
NSBluetoothAlwaysUsageDescription - Value:
This app needs Bluetooth access to connect to your Aranet4 air quality sensor. - Or replace the Info.plist with the provided one
- Set deployment target to macOS 11.0 or later
- Build and run!
Option 2: Use the Build Script (Experimental)
Run the build script:
cd /Users/rj/Aranet4MenuBar
./build.sh
This will attempt to compile the app using swiftc.
Usage
- Make sure your Aranet4 device is powered on and nearby
- Launch the app
- The app will appear in your menu bar with a "Scanning..." message
- Once connected, it will display your air quality data
- Click the menu bar item to see detailed readings
- Use the Refresh button to manually update readings
- Click the gear icon to access settings and customize alert sounds
FAQ
How often does the app poll my Aranet4?
The app reads data from your Aranet4 every 5 minutes when your Mac is awake.
What's the battery impact on my Aranet4?
Minimal. The app only reads existing measurements that your Aranet4 has already taken. Bluetooth LE read operations are extremely efficient:
- Estimated impact: < 0.1% battery per day
- Your Aranet4's 2-4 year battery life should not be noticeably affected
- The device continues to measure at its own configured interval (independent of this app)
What about my Mac's battery?
Negligible. The app uses native Swift and Bluetooth LE, resulting in minimal CPU and battery usage.
Does the app need internet access?
No. All data stays on your device - the app only communicates with your Aranet4 via Bluetooth.
Troubleshooting
- Bluetooth permission denied: Go to System Preferences > Security & Privacy > Bluetooth and enable access for Aranet4
- Device not found: Make sure your Aranet4 is powered on and within range
- Connection issues: Try turning Bluetooth off and on in System Preferences
Development
Project Structure
Aranet4MenuBar/
├── main.swift # App entry point
├── AppDelegate.swift # Application lifecycle
├── BluetoothManager.swift # CoreBluetooth logic
├── Aranet4Data.swift # Data models and decoder
├── StatusItemController.swift # Menu bar management
├── MenuBarView.swift # SwiftUI interface
├── Info.plist # App configuration
└── Aranet4MenuBar.entitlements # Sandbox permissions
Building
./build.sh
This compiles the Swift files and creates a signed app bundle in build/Aranet4MenuBar.app.
Protocol Details
The app uses the Aranet4 Bluetooth Low Energy GATT protocol:
- Service UUID:
f0cd1400-95da-4f4b-9ac8-aa55d312af0c - Current Readings:
f0cd1503-95da-4f4b-9ac8-aa55d312af0c
Data format: CO2 (u16LE), Temperature (u16LE), Pressure (u16LE), Humidity (u8), Battery (u8)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Ideas for Contributions
- [ ] Historical data graph (24-hour/7-day CO2 trends)
- [ ] Support for multiple Aranet4 devices
- [ ] Export data to CSV
- [ ] Custom CO2 alert thresholds
- [ ] Menu bar icon customization
- [ ] Temperature unit preference (°C/°F)
- [ ] Launch at login option
- [ ] Configurable refresh interval
Acknowledgments
- Aranet4 protocol documentation from Aranet4-Python
- Built with Swift, SwiftUI, and CoreBluetooth
License
MIT License - see LICENSE file for details
Related Skills
tmux
338.0kRemote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
blogwatcher
338.0kMonitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
Unla
2.1k🧩 MCP Gateway - A lightweight gateway service that instantly transforms existing MCP Servers and APIs into MCP servers with zero code changes. Features Docker deployment and management UI, requiring no infrastructure modifications.
github-trending
Multi-agent orchestration system for infrastructure monitoring, incident response, and load testing with autonomous AI agents
