A Prometheus exporter for SmartThings devices and sensors. This exporter allows you to monitor your SmartThings devices using Prometheus and visualize the data using tools like Grafana.
- Exports SmartThings device metrics in Prometheus format
- Supports OAuth2 authentication with SmartThings API
- Provides device status and sensor readings
- Easy to set up and configure
- Go 1.24.1 or later
- SmartThings OAuth client credentials
- SmartThings-compatible devices
go install github.com/rb1980/smartthings_exporter@latest- First, register your SmartThings OAuth client:
smartthings_exporter register --smartthings.oauth-client=YOUR_CLIENT_ID- Follow the prompts to complete OAuth registration and save the token.
Start the exporter:
smartthings_exporter start \
--smartthings.oauth-client=YOUR_CLIENT_ID \
--smartthings.oauth-token.file=/path/to/token.json \
--web.listen-address=:9499--web.listen-address: The address to listen on for web interface and telemetry (default: ":9499")--web.telemetry-path: Path under which to expose metrics (default: "/metrics")--smartthings.oauth-client: SmartThings OAuth client ID (required)--smartthings.oauth-token.file: File containing the SmartThings OAuth token (required)
The exporter provides various metrics from your SmartThings devices, including:
- Device status
- Sensor readings (temperature, humidity, etc.)
- Battery levels
- Connection status
All metrics are prefixed with smartthings_ and include device ID and name labels.
git clone https://github.com/rb1980/smartthings_exporter.git
cd smartthings_exporter
go buildLicensed under the Apache License, Version 2.0. See LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.