krauskopf / WifiEnergyMonitorFerraris8266

WiFi Energy Monitor for electromechanical induction watt-hour meters ('Ferraris-Zähler')
MIT License
3 stars 1 forks source link
energy-meter energy-monitor esp8266 nodemcu wifi

WiFi Energy Monitor for electromechanical induction watt-hour meters ('Ferraris-Zähler')

This project contains a firmware and schematic for a WiFi based Energy Monitor which can be connected to a electromechanical induction watt-hour meters ('Ferraris-Zähler') using the ELV Sensor ES-Fer, which is normally intended to be used with the HomeMatic ecosystem. Using the transmission board described here, the sensor data is made available via WiFi and http RESTfull API. This way it can be used in many other scenarios outside HomeMatic (e.g. Node-Red).

An ESP8266 ESP-12E NodeMcu WiFi board is used for connectivity and sensor evaluation.

doc/overview.png

Usage

REST-API

The board has a RESTfull http interface which returns all data as json objects. There is an API description in OpenAPI 2.0 format in the folder api. It is recommended to use the Swagger Editor to open and view the API documentation. The editor also allows you to generate client code to access the API from the runtime/language of your choice.

Here is also a short summary:

PathMethodSummary
/infoGETGets info about board and system status.
/metersGETGets the energy meters.
/meters/{idMeter}GETGets an energy meter.
/meters/{idMeter}/countersGETGets the counters of an energy meter.
/meters/{idMeter}/counters/{idCounter}GETGets a single counter of an energy meter.
/meters/{idMeter}/counters/{idCounter}/kWhGETGets the kilowatt-hour of a counter of an energy meter.
/meters/{idMeter}/counters/{idCounter}/kWhPUTSet the kilowatt-hour counter of an energy meter.
/meters/{idMeter}/counters/{idCounter}/revolutionsGETGets the number of revolutions of the disc of an energy meter.
/meters/{idMeter}/counters/{idCounter}/revolutionsPUTSet the number of revolutions of the disk of an energy meter.
/meters/{idMeter}/revsPerKWhPUTSets the number of revolutions per kilo watt-hour.
/meters/{idMeter}/revsPerKWhGETGets the number of revolutions per kilo watt-hour.
/meters/{idMeter}/thresholdPUTSets the threshold for the sensor of an energy meter.
/meters/{idMeter}/thresholdGETGets the threshold for the sensor of an energy meter.

Build instructions

Hardware

You can find a fritzing schematic in the folder hardware which shows the pin layout.

doc/fzz_schematic.png

doc/fzz_board.png

doc/board_small.jpg

The color layout of the female rj11 connector is shown below:

doc/rj11_female.png

Pin Description
1 not connected
2 GND
3 Power Supply 4,4V (3,3V works too)
4 Sensor LED
5 Sensor Signal
6 Status LED

Firmware

To build the arduino sketch:

History

Credits

License

The MIT License (MIT)

Copyright (c) 2017 sebakrau

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.