Difference between revisions of "Power"

From Fixme.ch
Jump to: navigation, search
Line 24: Line 24:
 
[[1479941621,202],[1479941622,203],[1479941623,201],[1479941624,200],[1479941625,201],[1479941626,202],[1479941627,202],[1479941628,202],[1479941629,202],[1479941630,203],[1479941631,203],[1479941632,203],[1479941633,201],[1479941634,203],[1479941635,201],[1479941636,204],[1479941637,204],[1479941638,204],[1479941639,204],[1479941640,204],[1479941641,204],[1479941642,203],[1479941643,203],[1479941644,203],[1479941645,204],[1479941646,202],[1479941647,202],[1479941648,202],[1479941649,202],[1479941650,203],[1479941651,203],[1479941652,204],[1479941653,205],[1479941654,204],[1479941655,205],[1479941656,204],[1479941657,204],[1479941658,204],[1479941659,204],[1479941660,202],[1479941661,199],[1479941662,201],[1479941663,203],[1479941664,202],[1479941665,204],[1479941666,202],[1479941667,202],[1479941668,201],[1479941669,202],[1479941670,203],[1479941671,204],[1479941672,204],[1479941673,205],[1479941674,204],[1479941675,204],[1479941676,204],[1479941677,203],[1479941678,203],[1479941679,201],[1479941680,"nan"]]
 
[[1479941621,202],[1479941622,203],[1479941623,201],[1479941624,200],[1479941625,201],[1479941626,202],[1479941627,202],[1479941628,202],[1479941629,202],[1479941630,203],[1479941631,203],[1479941632,203],[1479941633,201],[1479941634,203],[1479941635,201],[1479941636,204],[1479941637,204],[1479941638,204],[1479941639,204],[1479941640,204],[1479941641,204],[1479941642,203],[1479941643,203],[1479941644,203],[1479941645,204],[1479941646,202],[1479941647,202],[1479941648,202],[1479941649,202],[1479941650,203],[1479941651,203],[1479941652,204],[1479941653,205],[1479941654,204],[1479941655,205],[1479941656,204],[1479941657,204],[1479941658,204],[1479941659,204],[1479941660,202],[1479941661,199],[1479941662,201],[1479941663,203],[1479941664,202],[1479941665,204],[1479941666,202],[1479941667,202],[1479941668,201],[1479941669,202],[1479941670,203],[1479941671,204],[1479941672,204],[1479941673,205],[1479941674,204],[1479941675,204],[1479941676,204],[1479941677,203],[1479941678,203],[1479941679,201],[1479941680,"nan"]]
 
francois@stup:~$  
 
francois@stup:~$  
 +
</pre>
 +
 +
== How to display current power consumption? ==
 +
 +
<pre>
 +
#!/bin/bash
 +
 +
TOTAL=0
 +
 +
for sensor in 34cde81adabfb1ce819eca8fea6949b6 b7755b5f3ec05fcdc67f449241a9912a e67e0685f747b30d855108ab781abdfc; do
 +
  WATT=$(curl -s "http://62.220.135.196:8080/sensor/$sensor?version=1.0&interval=minute&unit=watt" | jq .[-2][1])
 +
 +
  TOTAL=$[$TOTAL+$WATT]
 +
done
 +
 +
banner "$TOTAL W"
 
</pre>
 
</pre>

Revision as of 23:21, 22 June 2017

FIXME local power consumption monitoring

Flukso Power Meter FLM02A

Doc:

Info

Sensors

  • l1: 34cde81adabfb1ce819eca8fea6949b6
  • l2: b7755b5f3ec05fcdc67f449241a9912a
  • l3: e67e0685f747b30d855108ab781abdfc

Example

francois@stup:~$ curl 'http://62.220.135.196:8080/sensor/e67e0685f747b30d855108ab781abdfc?version=1.0&interval=minute&unit=watt'; echo
[[1479941621,202],[1479941622,203],[1479941623,201],[1479941624,200],[1479941625,201],[1479941626,202],[1479941627,202],[1479941628,202],[1479941629,202],[1479941630,203],[1479941631,203],[1479941632,203],[1479941633,201],[1479941634,203],[1479941635,201],[1479941636,204],[1479941637,204],[1479941638,204],[1479941639,204],[1479941640,204],[1479941641,204],[1479941642,203],[1479941643,203],[1479941644,203],[1479941645,204],[1479941646,202],[1479941647,202],[1479941648,202],[1479941649,202],[1479941650,203],[1479941651,203],[1479941652,204],[1479941653,205],[1479941654,204],[1479941655,205],[1479941656,204],[1479941657,204],[1479941658,204],[1479941659,204],[1479941660,202],[1479941661,199],[1479941662,201],[1479941663,203],[1479941664,202],[1479941665,204],[1479941666,202],[1479941667,202],[1479941668,201],[1479941669,202],[1479941670,203],[1479941671,204],[1479941672,204],[1479941673,205],[1479941674,204],[1479941675,204],[1479941676,204],[1479941677,203],[1479941678,203],[1479941679,201],[1479941680,"nan"]]
francois@stup:~$ 

How to display current power consumption?

#!/bin/bash

TOTAL=0

for sensor in 34cde81adabfb1ce819eca8fea6949b6 b7755b5f3ec05fcdc67f449241a9912a e67e0685f747b30d855108ab781abdfc; do
  WATT=$(curl -s "http://62.220.135.196:8080/sensor/$sensor?version=1.0&interval=minute&unit=watt" | jq .[-2][1])

  TOTAL=$[$TOTAL+$WATT]
done

banner "$TOTAL W"