“Connect a Modbus energy meter to an Arduino and monitor power consumption via Home Assistant.
If you really want to make your home smarter, you’ll probably want start from your monthly bills (i.e. energy, gas, etc…). As some say, Good for Planet, The Wallet and The Bottom Line. Open Source Hardware is our way to reach sustainability in the home environment! This idea brought us to build a simple and secure solution, easy to integrate with any home automation software since it exposes data over MQTT (in our case we will show you how to integrate it into Home Assistant).
In order to measure the Electrical Energy Consumption, we chose to use the Finder Energy Meter, since it is designed for DIN rail use and fits perfectly in the main cabinet of our house. The cool thing about this product is that it has an RS485 Modbus interface, an industrial standard communication protocol which makes talking to an Arduino really easy. In fact, Arduino has released an official shield, the MKR485 and two libraries to decode the protocol. As the main board, we chose the Arduino MKR WiFi 1010, since it shares the MKR form factor and has WiFi connectivity.
Warning! Check your country regulations about dealing with your house electrical system and be extremely careful because it can be deadly! If you don’t know how, call an electrician. The first step is to install the meter in your electrical cabinet. To ensure you are working in a safe environment, turn off the power from the electrical terminal ahead of your system and double check with the multimeter that there is no voltage between the terminals.
Then place the energy meter inside your cabinet and connect live and neutral wires from the main breaker to the input of the meter, remember to use the color convention (blue for neutral and brown/black/grey for live in EU). The output has to be connected to the rest of the system.”