summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEbus-at-dockstar <ebus@dockstar>2014-09-18 00:01:49 +0200
committerEbus-at-dockstar <ebus@dockstar>2014-09-18 00:01:49 +0200
commit84b33f3efbe4678ddf2acb54aee0aeaaa43240d9 (patch)
tree5859e4b53047ac832f9816de7c781a226586e792
parentcba5a60f2e99016a3e18e62d123ff50b08ad09fc (diff)
downloadebus-alt-84b33f3efbe4678ddf2acb54aee0aeaaa43240d9.tar.gz
ebus-alt-84b33f3efbe4678ddf2acb54aee0aeaaa43240d9.zip
update one datasource
-rwxr-xr-xdatasources/yves_laserjet_tonerstatus.sh7
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"
)