A native macOS menu bar application that displays real-time air quality readings from your Aranet4 device via Bluetooth.
- 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
- macOS 11.0 or later
- Aranet4 air quality sensor
- Bluetooth enabled
- 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
brew tap robjama/aranet4 https://github.com/robjama/Aranet4MenuBar
brew install --cask aranet4git clone https://github.com/robjama/Aranet4MenuBar.git
cd Aranet4MenuBar
./build.sh
cp -R build/Aranet4.app /Applications/- 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!
Run the build script:
cd /Users/rj/Aranet4MenuBar
./build.shThis will attempt to compile the app using swiftc.
- 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
The app reads data from your Aranet4 every 5 minutes when your Mac is awake.
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)
Negligible. The app uses native Swift and Bluetooth LE, resulting in minimal CPU and battery usage.
No. All data stays on your device - the app only communicates with your Aranet4 via Bluetooth.
- 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
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
./build.shThis compiles the Swift files and creates a signed app bundle in build/Aranet4MenuBar.app.
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)
Contributions are welcome! Please feel free to submit a Pull Request.
- 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
- Aranet4 protocol documentation from Aranet4-Python
- Built with Swift, SwiftUI, and CoreBluetooth
MIT License - see LICENSE file for details
