Changes

Power

251 bytes added, 23:06, 25 April 2018
/* How to display current power consumption? */
== How to display current power consumption? ==
 
conso.sh:
<pre>
#!/bin/bash
TOTAL=0# Q17: lumières# Q21: nord# Q13: le reste
for Q17=$(curl -s "http://62.220.135.196:8080/sensor in /34cde81adabfb1ce819eca8fea6949b6 b7755b5f3ec05fcdc67f449241a9912a e67e0685f747b30d855108ab781abdfc; do?version=1.0&interval=minute&unit=watt" | jq .[-2][1]) WATTQ21=$(curl -s "http://62.220.135.196:8080/sensor/b7755b5f3ec05fcdc67f449241a9912a?version=1.0&interval=minute&unit=watt" | jq .[-2][1])Q13=$(curl -s "http://62.220.135.196:8080/sensor/e67e0685f747b30d855108ab781abdfc?version=1.0&interval=minute&unit=watt" | jq .[-2][1])
TOTAL=$[$TOTALQ13+$WATTQ17+Q21]done
banner echo "$TOTAL W(Q17: $Q17, Q21: $Q21, Q13: $Q13)"
</pre>
512
edits