All Projects → mitchellrj → hue_exporter

mitchellrj / hue_exporter

Licence: other
A Prometheus exporter for Philips Hue (written in Go)

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to hue exporter

PiHueEntertainment
An application that can handle the Hue Entertainment Areas on a Raspberry Pi
Stars: ✭ 28 (-74.31%)
Mutual labels:  hue-lights, hue-bridge, hue
hueplusplus
A simple C++ library to control Philips Hue lights on Linux, MacOS, Windows, Espressif ESP32 SDK and Arduino. Full documentation at
Stars: ✭ 48 (-55.96%)
Mutual labels:  hue-lights, hue-bridge, hue
Hue
💡 A Philips Hue library written in Swift, using Combine framework
Stars: ✭ 16 (-85.32%)
Mutual labels:  hue-lights, hue-bridge, hue
magento2-prometheus-exporter
Simple Magento 2 Prometheus Exporter.
Stars: ✭ 40 (-63.3%)
Mutual labels:  prometheus-exporter, prometheus-metrics
hcloud-pricing-exporter
A prometheus exporter for the current pricing and costs of your HCloud account
Stars: ✭ 19 (-82.57%)
Mutual labels:  prometheus-exporter, prometheus-metrics
freeradius exporter
FreeRADIUS Prometheus Exporter
Stars: ✭ 25 (-77.06%)
Mutual labels:  prometheus-exporter, prometheus-metrics
gethexporter
Monitor your Geth Ethereum Server with Prometheus and Grafana
Stars: ✭ 103 (-5.5%)
Mutual labels:  prometheus-exporter, prometheus-metrics
HueControl
Java-based framework for working with the Phillips Hue system
Stars: ✭ 14 (-87.16%)
Mutual labels:  hue-lights, hue
s3 exporter
Exports Prometheus metrics about S3 buckets and objects
Stars: ✭ 65 (-40.37%)
Mutual labels:  prometheus-exporter, prometheus-metrics
homeassistant
Home Assistant Config
Stars: ✭ 50 (-54.13%)
Mutual labels:  hue-lights, hue
hass-hue-icons
Additional vector icons for home assistant to model Philips Hue bulbs and fixtures.
Stars: ✭ 161 (+47.71%)
Mutual labels:  hue-lights, hue
prom-bitbucket-exporter
Prometheus Exporter for Bitbucket
Stars: ✭ 47 (-56.88%)
Mutual labels:  prometheus-exporter, prometheus-metrics
macropower-analytics-panel
It's like Google Analytics, but for Grafana dashboards!
Stars: ✭ 16 (-85.32%)
Mutual labels:  prometheus-exporter, prometheus-metrics
bamboo-prometheus-exporter
Prometheus Exporter For Bamboo
Stars: ✭ 18 (-83.49%)
Mutual labels:  prometheus-exporter, prometheus-metrics
go-hue
Wrapper API and cli examples in golang for interacting with lights via philips hue hub HTTP API.
Stars: ✭ 57 (-47.71%)
Mutual labels:  hue-lights, hue-bridge
jarvis
Jarvis Home Automation
Stars: ✭ 81 (-25.69%)
Mutual labels:  hue-lights, hue
yetanotherhueapi
A Java library for controlling Philips Hue lights. Available from the Maven Central.
Stars: ✭ 54 (-50.46%)
Mutual labels:  hue-lights, hue-bridge
azure-devops-exporter
Prometheus exporter for Azure DevOps (VSTS) including agent pools, builds, releases, deployments, pullrequests and repo stats
Stars: ✭ 102 (-6.42%)
Mutual labels:  prometheus-exporter, prometheus-metrics
pagerduty-exporter
Prometheus exporter for PagerDuty informations
Stars: ✭ 38 (-65.14%)
Mutual labels:  prometheus-exporter, prometheus-metrics
HueLightDJ
Hue Light DJ using Hue Entertainment API
Stars: ✭ 54 (-50.46%)
Mutual labels:  hue-lights, hue

Hue exporter

Travis CI build Go report

This is a Prometheus exporter for the Philips Hue system. It's written in Go.

It exposes metrics about lights, groups and sensors. I hope you like it.

There are other Hue exporter projects. They didn't quite do what I wanted and to make them do what I wanted would have meant some pretty major changes. They might work for you though:

Here's a screenshot of an example Grafana dashboard: Grafana

Light metrics

Each light metric is labelled with the friendly name, the model, the type, the product name, the manufacturer name, and the unique ID.

  • hue_light_brightness
  • hue_light_hue
  • hue_light_saturation
  • hue_light_on: 0 means off, 1 means on
  • hue_light_reachable: 0 or 1 representing false or true

Group metrics

Each group metric is labelled with the name, and the type.

  • hue_group_brightness
  • hue_group_hue
  • hue_group_saturation
  • hue_group_on: 0 means off, 1 means some lights within the group are on, 2 means all lights within the group are on

Sensor metrics

Each sensor metric is labelled with the friendly name, the model, the type, the product name, the manufacturer name, the unique ID and the device ID (for motion sensor components). The device ID is a truncated version of the unique ID, that may be used to group the individual sensors that make up a single physical device.

  • hue_sensor_value: value varies depending on the type of the sensor. For switches, it's the value of the last button pressed; for daylight and presence sensors it's a 0 or 1 representing false or true values; for the temperature sensor it's hundredths of a degree celsius; for the light level sensor it's Lux.
  • hue_sensor_battery: battery level percentage (0 for sensors that have no battery)
  • hue_sensor_last_updated: last updated timestamp (Unix epoch)
  • hue_sensor_on: 0 or 1 representing false or true
  • hue_sensor_reachable: 0 or 1 representing false or true

Some sensor type values you might find useful:

  • Daylight: the Hue Hub's built-in "daylight" sensor, based on sunset / sunrise in your configured location
  • ZGPSwitch: the Hue tap switch
  • ZLLSwitch: the Hue dimmer switch
  • ClipGenericStatus: a generic sensor, usually a pseudo-sensor created through the API for automation purposes
  • ZLLTemperature: the temperature sensor in the Hue motion sensor
  • ZLLPresence: the presence sensor in the Hue motion sensor
  • ZLLLightLevel: the light level sensor in the Hue motion sensor

General metrics

  • hue_group_scrapes_failed, hue_light_scrapes_failed, hue_sensor_scrapes_failed: count of failures when trying to scrape from the Hue API.
  • hue_bridge_restarts: count of times the bridge has restarted (estimated based on sensor data).

Metric structure

Hey, why didn't you combine the metrics for brightness and hue and saturation and on and reachable?

I tried that, but because of the different label combinations, it didn't really work and you ended up with a load of empty labels.

Configuration

There's an example configuration file hue_exporter.example.yml in this repository, but you can also generate one! Run hue_exporter generate to have the app discover to your Hue bridge and create an API user for itself, then write the necessary configuration.

Running

hue_exporter --config.file hue_exporter.yml --listen.address :9366

Those flag values are the defaults, so you could just run hue_exporter on its own if you're happy with those.

Docker

There are a few docker images built, including ones for ARM7 (Raspberry Pi). You can find these on Docker Hub. They expose /etc/hue_exporter as a volume for you to generate or pass in your own configuration.

docker run -p 9366:9366 -v my_config.yml:/etc/hue_exporter/config.yml mitchellrj/hue_exporter:latest

License

MIT / X11 Consortium license. I'd prefer to use Apache 2.0, but the excellent Hue library that this app uses is GPL 2.0 and that isn't compatible with Apache.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].