A cheap and easy solution to make your electricity meter smarter
Author
·
Report Bug
·
Request Feature
There are many great README templates available on GitHub; however, I didn't find one that really suited my needs so I created this enhanced one. I want to create a README template so amazing that it'll be the last one you ever need -- I think this is it.
Electricity Meter Interface 2 electronic meters with LED indicating power consumption
Integrating your electricity grid reading the meter via pulse counter
Here's why:
- Your time should be focused on creating something amazing. A project that solves a problem and helps others
- You shouldn't be doing the same tasks over and over like creating a README from scratch
- You should implement DRY principles to the rest of your life 😄
Of course, no one template will serve all projects since your needs may be different. So I'll be adding more in the near future. You may also suggest changes by forking this repo and creating a pull request or opening an issue. Thanks to all the people have contributed to expanding this template!
Use the BLANK_README.md
to get started.
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
This is an example of how to list things you need to use the software and how to install them.
- npm
npm install npm@latest -g
Looking at the BH1750 pinout, and reading its data sheet, we need 4 connections.
On the Raspberry Pi side, the GPIO header is well documented on their website. In particular we are interested in the I2C interface
GPIO | BH1750 |
---|---|
1 | VCC |
3 | SDA |
5 | SCL |
9 | GND |
Please make your own considerations and read data sheets for the hardware you are using. I am not responsible for any damages misconfigurations can cause to your hardware.
In order to pass the data to Home Assistant, we are using an MQTT Sensor, which is well documented on the project website. My configuration in configuration.yaml
is the following.
mqtt:
sensor:
- name: "Power Meter"
device_class: "energy"
state_class: "total_increasing"
state_topic: "homeassistant/sensor/powermonitor/state"
unit_of_measurement: "Wh"
unique_id: "powermonitor"
Please notice that state_topic
must match with the MQTT topic we defined
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GPLv3
License. See LICENSE
for more information.
Giovanni Baccichet - @Giovanni_Bacci - github [at] surname [dot] org
Project Link: https://github.com/GiovanniBaccichet/powermonitor
Some useful resources and documentation I used for the project.