Package: p3exporter-fritzbox-smarthome
p3exporter collector module for FritzBox smarthome dataThis module provides collector for FritzBox smarthome device data. It can be enabled with a default p3exporter installation viap3.yml.The collector is in a very early state and it provides temperature data from connected thermostat devices with temperature sensors.Tested with:Comet DECT thermostatInstallation and RunningYou need to installp3exporterfirst. It is available onpypiso you can usepipto install the exporter and run it locally.pipinstallp3exporterNow you need to installp3exporter-fritzbox-smarthome. Choose one method mentioned below.Install from pypi.orgWe also provide a pypi.org package. You can install the collector with the following command:pipinstallp3exporter-fritzbox-smarthomeInstall from repositoryYou can install it from a local clone of ourgithub repository.$gitclonehttps://github.com/codeaffen/p3exporter-fritzbox-smarthome.git
Cloninginto'p3exporter-fritzbox-smarthome'...
...
$cdp3exporter-fritzbox-smarthome
$pipinstall-e.Activation FritzBox smarthome collectorsTo startp3exporteryou need a validp3.ymlyou can either edit an existing one or take the example from this repository.curl--silenthttps://raw.githubusercontent.com/codeaffen/p3exporter-fritzbox-smarthome/develop/p3.yml.example--output~/tmp/p3.ymlIf you edit an existingp3.ymladd the following content to activate the collector.exporter_name:"PythonprammablePrometheusexporter/wFritzBoxcollector"collectors:-p3eFritzBox.collector.smarthomecollector_opts:smarthome:defaults:hostname:https://fb.example.com# use this hostname as default (if never set hostname defaults to 'https://fritz.box')username:smarthome# use this username as defaultssl_verify:false# disable ssl certificate verification by defaultdevices:-name:FB@homepassword:v3rys3cr3t-name:FB@cottagepassword:4l5ov3rys3cr3thostname:https://myfritzbox.example.comssl_verify:true# enable ssl certificate verification for this device connectionAfter that you can start the p3exporter as usual:$p3exporter-c/tmp/p3.yml
INFO:root:Collector'p3eFritzBox.collector.smarthome'wasloadedandregistredsuccessfully
INFO:root:Startexporter,listenon5876ConfigurationTo configure this collector you need to create a dict with the connection parameters within thedeviceslist.
There are some parameters avaiable to configure the collector. In the following table all parameters are listed.NameDefaultMandatoryDescriptionnamedevice_<NUM>An arbitrary name to identify metrics according the device. If not given it will be generated as seen in default column.<NUM>stands for the list index, starting with 1.username*Username used to authenticate against FritzBoxpassword*Password used to authenticate against FritzBoxhostnamehttps://fritz.boxHostname of FritzBox to connect to. Protocol can behttporhttps. If no protocol is given default will behttps.device_typesList of device type to enable. If List is empty all device types are activated. Possible values are:temperature_sensorssl_verifyTrueSet toTrueto disable ssl certificate verfication. This is useful in case of using self signed certificates.Note: To use this parameterpyfritzhomefrom github is needed as the ssl_verify parameter is not yet available in pypi package. For details userequirements.txt.All parameters from the table above exceptnamecan also be defined indefaultsdict. Parameters defined here will be used as defaults for each device in devices list if the corresponding parameter is not defined there.