diff options
author | Ebus-at-dockstar <ebus@dockstar> | 2014-09-18 00:01:49 +0200 |
---|---|---|
committer | Ebus-at-dockstar <ebus@dockstar> | 2014-09-18 00:01:49 +0200 |
commit | 84b33f3efbe4678ddf2acb54aee0aeaaa43240d9 (patch) | |
tree | 5859e4b53047ac832f9816de7c781a226586e792 /datasources | |
parent | cba5a60f2e99016a3e18e62d123ff50b08ad09fc (diff) | |
download | ebus-alt-84b33f3efbe4678ddf2acb54aee0aeaaa43240d9.tar.gz ebus-alt-84b33f3efbe4678ddf2acb54aee0aeaaa43240d9.zip |
update one datasource
Diffstat (limited to 'datasources')
-rwxr-xr-x | datasources/yves_laserjet_tonerstatus.sh | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/datasources/yves_laserjet_tonerstatus.sh b/datasources/yves_laserjet_tonerstatus.sh index 6b7628a..a57253a 100755 --- a/datasources/yves_laserjet_tonerstatus.sh +++ b/datasources/yves_laserjet_tonerstatus.sh @@ -1,14 +1,11 @@ #!/bin/sh +. "`dirname \"$0\"`"/datastore-functions.sh name=yves.laserjet.tonerstatus -type=int curl -s "http://10.1.0.10/hp/device/info_suppliesStatus.html" | sed -ne 's/.*>\([0-9]*\)%<.*/\1/p' | ( read value - curl -s -i -H "Accept: application/json" \ - -X PUT "http://localhost:8000/sensor/${name}" \ - -d "value=${value}&type=${type}" | - grep '"error": null' >/dev/null + put_value_sensor_now "$name" "$value" ) |