master
Norwin 5 years ago
parent 9a4af3a91e
commit 782d5d1807

@ -0,0 +1,24 @@
#!/usr/bin/env bash
# export OSEM_BOX=yourboxid
BOX=${OSEM_BOX:-5b26181b1fef04001b69093c}
API="https://api.opensensemap.org"
boxMeta=`curl "${API}/boxes/${BOX}"`
sensors=`curl "${API}/boxes/${BOX}/sensors"`
updated=`echo $boxMeta | jq -r '.lastMeasurementAt'`
weblink=`echo $boxMeta | jq -r '.weblink'`
echo $boxMeta | jq -r '.name'
echo "---"
echo $sensors | jq -r '.sensors[] | .title + ": " + .lastMeasurement.value + " " + .unit'
echo "---"
echo "last measurement from `date -d $updated +'%d.%m. %H:%M'`"
echo "refresh | refresh=true"
echo "---"
echo "view on openSenseMap.org | href='https://opensensemap.org/explore/$BOX'"
[ ! $weblink == "null" ] && echo "open weblink | href='$weblink'"

@ -1,3 +1,27 @@
# osem_gnome_dash
# opensensemap.org box dashboard for Gnome
openSenseMap dashboard for gnome shell
Small dashboard displaying live sensor readings of senseBoxes on [opensensemap.org][osem] in your Gnome Shell top bar.
![screenshot](screenshot.png)
## installation
1. Install [argos][argos] and [jq][jq]
2. run the following command to install the current version:
```sh
scriptsrc="https://git.nroo.de/opensensemap/osem_gnome_dash/raw/branch/master/00opensensemap.r.3m.sh"
curl $scriptsrc > ~/.config/argos/00opensensemap.r.3m.sh
```
You can change the filename to change the refresh rate and display position
3. Open `~/.config/argos/00opensensemap.r.3m.sh` and insert your favourite box ID.
Alternatively you can export it as `OSEM_BOX` in your bashrc (untested)
[osem]: https://opensensemap.org
[argos]: https://github.com/p-e-w/argos
[jq]: https://stedolan.github.io/jq/
## license
Unlicense / Public Domain.
Still it would be nice if you'd let me know of enhancements you made!

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Loading…
Cancel
Save