Efergy Energy Meter or Energyhive Api

This flow will get power and timestamp from your Efergy meter and publishes it as a value that can be used to do other automation tasks. This happens every 10s.

Just add your own Efergy token in this URL:

https://engage.efergy.com/mobile_proxy/getInstant?token=your_token_here

This flow also visualises the power reading in the UI.

I'm open for suggestions, how to narrow this flow down to less nodes doing the same thing. Enjoy!!!

[{"id":"edd701e0.37922","type":"comment","z":"fb8a4cc0.f6ccd","name":"Efergy - Get Power Consumption","info":"Get and Put Sensor data","x":150,"y":80,"wires":[]},{"id":"ceaa9cf4.0ab4e8","type":"http request","z":"fb8a4cc0.f6ccd","name":"Efergy Data","method":"GET","ret":"txt","url":"https://engage.efergy.com/mobile_proxy/getInstant?token=insert_your_token_here","tls":"","x":260,"y":140,"wires":[["d2ffc2c8.f52098","7aab8152.8d2538","1ea1bbd4.052c2c"]]},{"id":"d2ffc2c8.f52098","type":"json","z":"fb8a4cc0.f6ccd","name":"","x":440,"y":180,"wires":[["901a2241.07a458"]]},{"id":"9e3b3b0c.24d6b8","type":"debug","z":"fb8a4cc0.f6ccd","name":"Time","active":true,"console":"false","complete":"payload.last_reading_time","x":800,"y":140,"wires":[]},{"id":"9f401d7a.63a2d","type":"debug","z":"fb8a4cc0.f6ccd","name":"Age [s]","active":true,"console":"false","complete":"payload.age","x":590,"y":100,"wires":[]},{"id":"7aab8152.8d2538","type":"json","z":"fb8a4cc0.f6ccd","name":"","x":440,"y":140,"wires":[["31853774.f62718"]]},{"id":"1ea1bbd4.052c2c","type":"json","z":"fb8a4cc0.f6ccd","name":"","x":440,"y":100,"wires":[["9f401d7a.63a2d"]]},{"id":"31853774.f62718","type":"function","z":"fb8a4cc0.f6ccd","name":"Time Compiler","func":"var date = new Date(msg.payload.last_reading_time);\nmsg.payload.last_reading_time = date.toString();\nreturn msg;","outputs":1,"noerr":0,"x":610,"y":140,"wires":[["f642038f.0a545","9e3b3b0c.24d6b8"]]},{"id":"c83d5bf9.3f7bf","type":"ui_chart","z":"fb8a4cc0.f6ccd","name":"Efergy - Chart","group":"4b60f798.d4fa","order":1,"width":0,"height":0,"label":"Efergy - Chart","chartType":"line","legend":"false","xformat":"%a %H:%M","interpolate":"linear","nodata":"waiting for inject...","ymin":"0","ymax":"3.2","removeOlder":"1","removeOlderUnit":"86400","x":980,"y":180,"wires":[[],[]]},{"id":"5cab735b.abddf4","type":"ui_gauge","z":"fb8a4cc0.f6ccd","name":"Efergy - Reading","group":"4b60f798.d4fa","order":2,"width":0,"height":0,"gtype":"gage","title":"Efergy - Reading","label":"kW","format":"{{value}} ","min":"0","max":"3.2","colors":["#00ff00","#ffff80","#ca3838"],"x":990,"y":220,"wires":[]},{"id":"901a2241.07a458","type":"function","z":"fb8a4cc0.f6ccd","name":"Extract \"reading\"","func":"var power = { payload: msg.payload.reading };\nreturn power;","outputs":1,"noerr":0,"x":620,"y":180,"wires":[["36f1aa0d.fa96ce"]]},{"id":"a606f91c.cdff78","type":"debug","z":"fb8a4cc0.f6ccd","name":"Power [kW]","active":true,"console":"false","complete":"payload","x":970,"y":260,"wires":[]},{"id":"36f1aa0d.fa96ce","type":"range","z":"fb8a4cc0.f6ccd","minin":"0","maxin":"1000","minout":"0","maxout":"1","action":"scale","round":false,"name":"Scaler","x":800,"y":180,"wires":[["5cab735b.abddf4","c83d5bf9.3f7bf","a606f91c.cdff78"]]},{"id":"f642038f.0a545","type":"ui_text","z":"fb8a4cc0.f6ccd","group":"4b60f798.d4fa","order":3,"width":0,"height":0,"name":"Efergy - Time Stamp","label":"Efergy - Timestamp:","format":"{{msg.payload.last_reading_time}}","layout":"col-center","x":850,"y":100,"wires":[]},{"id":"c23a79a2.257328","type":"inject","z":"fb8a4cc0.f6ccd","name":"10s - Ping","topic":"","payload":"","payloadType":"date","repeat":"10","crontab":"","once":true,"x":90,"y":140,"wires":[["ceaa9cf4.0ab4e8"]]},{"id":"4b60f798.d4fa","type":"ui_group","z":"","name":"Energy","tab":"15ebcf5.c678631","order":null,"disp":true,"width":"6"},{"id":"15ebcf5.c678631","type":"ui_tab","name":"Home","icon":"dashboard","order":"1"}]
Oxynaut

Flow Info

created 6 months ago

Node Types

Core
  • comment (x1)
  • debug (x3)
  • function (x2)
  • http request (x1)
  • inject (x1)
  • json (x3)
  • range (x1)
Other
  • ui_chart (x1)
  • ui_gauge (x1)
  • ui_group (x1)
  • ui_tab (x1)
  • ui_text (x1)

Tags

  • Efergy
  • Energyhive
  • Energy
  • Meter
  • Power
  • Consumption
  • Metering
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option