aboutsummaryrefslogtreecommitdiff
path: root/pellematic-time
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2014-12-05 12:00:59 +0100
committerGuido Günther <agx@sigxcpu.org>2014-12-05 12:02:18 +0100
commitdff5fd586d21aea8aba94fdebb75c9a7fd843ceb (patch)
tree545591d9d253b3e2d44054167d43ea30762e75ce /pellematic-time
parent0ab2d9f8dd6a7c189e8e5b253302d5d990066d18 (diff)
Fixup pellematic-time for newer firmware too
Tested with "Touch V2.03 20140723"
Diffstat (limited to 'pellematic-time')
-rwxr-xr-xpellematic-time9
1 files changed, 5 insertions, 4 deletions
diff --git a/pellematic-time b/pellematic-time
index 03df3d9..3ccdf05 100755
--- a/pellematic-time
+++ b/pellematic-time
@@ -24,6 +24,7 @@ import json
username = os.getenv('username', 'oekofen')
password = os.getenv('password', username)
debug = os.getenv('debug')
+url = os.getenv('url')
# The items we want to fetch:
items = { "off": "CAPPL:FA[0].L_sillstandszeit",
@@ -43,6 +44,8 @@ graph_period hour
coefficient.label runtime coefficient
coefficient.type GAUGE
coefficient.draw LINE1
+coefficient.warning 0.9
+coefficient.critical 0.95
"""
def fetch_raw(url):
@@ -103,11 +106,9 @@ def fetch_values(url):
def main(args):
- target = os.getenv('address')
- if not target:
- print >>sys.stderr, "No ip address configured"
+ if not url:
+ print >>sys.stderr, "No url configured"
return 1
- url = 'http://%s' % target
if len(args) > 1:
if args[1] in [ 'autoconf', 'detect' ]:
try: