Browse Source

unicode ftw!

master
Norwin 4 months ago
parent
commit
c9c8ee5e39
1 changed files with 7 additions and 6 deletions
  1. 7
    6
      00opensensemap.r.3m.sh

+ 7
- 6
00opensensemap.r.3m.sh View File

@@ -8,17 +8,18 @@ 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'
name=`echo $boxMeta | jq -r '.name'`
temp=`echo $sensors | jq -r '.sensors[0] | .lastMeasurement.value + .unit'`
echo "$name 🌡 $temp"

echo "---"
echo $sensors | jq -r '.sensors[] | .title + ":\t\t" + .lastMeasurement.value + " " + .unit'

echo "---"
echo "last measurement from `date -d $updated +'%d.%m. %H:%M'`"
echo "refresh | refresh=true"
echo "🕗\tdata from `date -d $updated +'%d.%m. %H:%M'`"
echo "⭮\trefresh | refresh=true"

echo "---"
echo "view on openSenseMap.org | href='https://opensensemap.org/explore/$BOX'"
[ ! $weblink == "null" ] && echo "open weblink | href='$weblink'"
echo "🗺view on openSenseMap.org | href='https://opensensemap.org/explore/$BOX'"
[ ! $weblink == "null" ] && echo "🔗\topen weblink | href='$weblink'"


Loading…
Cancel
Save