mirror of
https://github.com/Tafkas/fritzbox-munin.git
synced 2023-10-10 11:36:55 +00:00
support for humidity
This commit is contained in:
parent
4aef522ae8
commit
2d6a97315b
@ -118,6 +118,10 @@ def getSimplifiedDevices(debug=False):
|
|||||||
|
|
||||||
simpleDev["currentTemperatureInDegC"] = skill["currentInCelsius"]
|
simpleDev["currentTemperatureInDegC"] = skill["currentInCelsius"]
|
||||||
|
|
||||||
|
elif (skillType == "SmartHomeHumiditySensor"):
|
||||||
|
|
||||||
|
simpleDev["currentHumidityInPct"] = skill["currentInPercent"]
|
||||||
|
|
||||||
elif (skillType == "SmartHomeBattery"):
|
elif (skillType == "SmartHomeBattery"):
|
||||||
|
|
||||||
simpleDev["batteryChargeLevelInPct"] = skill["chargeLevelInPercent"]
|
simpleDev["batteryChargeLevelInPct"] = skill["chargeLevelInPercent"]
|
||||||
@ -184,6 +188,16 @@ def get_smart_home_temperature(debug=False):
|
|||||||
print ("t{}.value {}" .format(dev["id"], dev["currentTemperatureInDegC"]))
|
print ("t{}.value {}" .format(dev["id"], dev["currentTemperatureInDegC"]))
|
||||||
|
|
||||||
|
|
||||||
|
print("")
|
||||||
|
print("multigraph humidity")
|
||||||
|
for dev in simpleDevices:
|
||||||
|
|
||||||
|
if dev["present"] and "currentHumidityInPct" in dev:
|
||||||
|
print ("humidity{}.value {}".format(dev["id"], dev["currentHumidityInPct"]))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print("\n")
|
print("\n")
|
||||||
print("multigraph temperatures_target")
|
print("multigraph temperatures_target")
|
||||||
|
|
||||||
@ -245,6 +259,7 @@ def get_smart_home_temperature(debug=False):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print("")
|
print("")
|
||||||
print("multigraph batterylow")
|
print("multigraph batterylow")
|
||||||
for dev in simpleDevices:
|
for dev in simpleDevices:
|
||||||
@ -310,6 +325,29 @@ def print_config():
|
|||||||
print ("t{}.info Locally measured temperature [{} - {}]" .format(dev["id"], dev["model"], dev["identifier"]))
|
print ("t{}.info Locally measured temperature [{} - {}]" .format(dev["id"], dev["model"], dev["identifier"]))
|
||||||
|
|
||||||
|
|
||||||
|
print("\n")
|
||||||
|
print("multigraph humidity")
|
||||||
|
print("graph_title AVM Fritz!Box SmartHome Humidity")
|
||||||
|
print("graph_vlabel percent")
|
||||||
|
print("graph_category sensors")
|
||||||
|
print("graph_scale no")
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
|
||||||
|
for dev in simpleDevices:
|
||||||
|
if dev["present"] and "currentHumidityInPct" in dev:
|
||||||
|
print ("humidity{}.label {}" .format(dev["id"], dev["displayName"]))
|
||||||
|
print ("humidity{}.type GAUGE" .format(dev["id"]))
|
||||||
|
print ("humidity{}.graph LINE" .format(dev["id"]))
|
||||||
|
print ("humidity{}.max 100" .format(dev["id"]))
|
||||||
|
print ("humidity{}.min 0" .format(dev["id"]))
|
||||||
|
print ("humidity{}.warning 30:70" .format(dev["id"]))
|
||||||
|
print ("humidity{}.critical 20:75" .format(dev["id"]))
|
||||||
|
print ("humidity{}.info Humidity [{} - {}]" .format(dev["id"], dev["model"], dev["identifier"]))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print("\n")
|
print("\n")
|
||||||
print("multigraph temperatures_target")
|
print("multigraph temperatures_target")
|
||||||
print("graph_title AVM Fritz!Box SmartHome Target Temperatures")
|
print("graph_title AVM Fritz!Box SmartHome Target Temperatures")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user