Code Monkey home page Code Monkey logo

fritzbox_smarthome_exporter's Introduction

FRITZ!Box Smarthome exporter for prometheus

Export information about your smarthome devices (switches, powermeters, thermostat, ...) to prometheus.

Build Status Docker Pulls

Usage

Usage of ./fritzbox_smarthome_exporter:
  -cert="": Path to the FRITZ!Box certificate.
  -noverify=false: Omit TLS verification of the FRITZ!Box certificate.
  -password="": FRITZ!Box password.
  -url="https://fritz.box": FRITZ!Box URL.
  -username="": FRITZ!Box username.

Command line arguments or environment variables (the argument as uppercase, like CERT for -cert) may be used.

The exporter will bind to TCP Port 9103 and export the following metrics via /metrics:

# HELP fritzbox_device_info Device information
# TYPE fritzbox_device_info gauge
fritzbox_device_info{device_id="01111 0111111",device_name="Switch 1",device_type="FRITZ!DECT 200",functionbitmask="2944",fw_version="03.87",internal_id="16",manufacturer="AVM"} 1
fritzbox_device_info{device_id="12345 0000000",device_name="HKR 1",device_type="Comet DECT",functionbitmask="320",fw_version="03.68",internal_id="23",manufacturer="AVM"} 1
# HELP fritzbox_device_present Device connected (1) or not (0)
# TYPE fritzbox_device_present gauge
fritzbox_device_present{device_id="01111 0111111",device_name="Switch 1",device_type="FRITZ!DECT 200"} 1
fritzbox_device_present{device_id="12345 0000000",device_name="HKR 1",device_type="Comet DECT"} 1
# HELP fritzbox_energy Absolute energy consumption since the device started operating
# TYPE fritzbox_energy gauge
fritzbox_energy{device_id="01111 0111111",device_name="Switch 1",device_type="FRITZ!DECT 200"} 103023
# HELP fritzbox_power Current power, refreshed approx every 2 minutes
# TYPE fritzbox_power gauge
fritzbox_power{device_id="01111 0111111",device_name="Switch 1",device_type="FRITZ!DECT 200"} 0
# HELP fritzbox_switch_boxlock Switching via FRITZ!Box disabled? 1/0, -1 if not known or error
# TYPE fritzbox_switch_boxlock gauge
fritzbox_switch_boxlock{device_id="01111 0111111",device_name="Switch 1",device_type="FRITZ!DECT 200"} 0
# HELP fritzbox_switch_devicelock Switching via device disabled 1/0, -1 if not known or error
# TYPE fritzbox_switch_devicelock gauge
fritzbox_switch_devicelock{device_id="01111 0111111",device_name="Switch 1",device_type="FRITZ!DECT 200"} 1
# HELP fritzbox_switch_mode Switch mode 1/0 (manual/automatic), -1 if not known or error
# TYPE fritzbox_switch_mode gauge
fritzbox_switch_mode{device_id="01111 0111111",device_name="Switch 1",device_type="FRITZ!DECT 200"} -1
# HELP fritzbox_switch_state Switch state 1/0 (on/off), -1 if not known or error
# TYPE fritzbox_switch_state gauge
fritzbox_switch_state{device_id="01111 0111111",device_name="Switch 1",device_type="FRITZ!DECT 200"} -1
# HELP fritzbox_temperature Temperature measured at the device sensor in units of 0.1 °C
# TYPE fritzbox_temperature gauge
fritzbox_temperature{device_id="01111 0111111",device_name="Switch 1",device_type="FRITZ!DECT 200"} 19
fritzbox_temperature{device_id="12345 0000000",device_name="HKR 1",device_type="Comet DECT"} 22
# HELP fritzbox_temperature_offset Temperature offset (set by the user) in units of 0.1 °C
# TYPE fritzbox_temperature_offset gauge
fritzbox_temperature_offset{device_id="01111 0111111",device_name="Switch 1",device_type="FRITZ!DECT 200"} -1
fritzbox_temperature_offset{device_id="12345 0000000",device_name="HKR 1",device_type="Comet DECT"} -0.5

Docker

Docker images are build for tags jaymedh/fritzbox_smarthome_exporter.

FRITZ!Box certificate may be mountet into the container, configuration can be done via arguments or environment variables (or both):

docker run -d --name fritzbox_smarthome_exporter -p 9103:9103 \
  -v $(pwd)/boxcert.cer:/fritzbox.pem:ro \
  -e PASSWORD=SuperSecret \
  -e USERNAME=SmarthomeUser \
  jaymedh/fritzbox_smarthome_exporter:v0.0.1 -url="https://fritz.box:8443" -cert=/fritzbox.pem

Grafana

Example Grafana dashboard can be found at https://grafana.com/dashboards/7019

fritzbox_smarthome_exporter's People

Contributors

jayme-github avatar juergenhoetzel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.