Power
From Fixme.ch
Contents
FIXME local power consumption monitoring
Flukso Power Meter FLM02A
Doc:
Info
- Hostname: flukso-f78db1
- API: http://62.220.135.196:8080/
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?
conso.sh:
#!/bin/bash # Q17: lumières # Q21: nord # Q13: le reste Q17=$(curl -s "http://62.220.135.196:8080/sensor/34cde81adabfb1ce819eca8fea6949b6?version=1.0&interval=minute&unit=watt" | jq .[-2][1]) Q21=$(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=$[$Q13+$Q17+Q21] echo "$TOTAL W (Q17: $Q17, Q21: $Q21, Q13: $Q13)"
Logging
See https://git.fixme.ch/francois/power.git for implementation, running on Kubernetes on MetaFoo.