Skip to content

A cheap and easy solution to make your electricity meter smarter

License

Notifications You must be signed in to change notification settings

GiovanniBaccichet/powermonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Smart Power Monitor

A cheap and easy solution to make your electricity meter smarter

Author · Report Bug · Request Feature

About The Project

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.

(back to top)

Getting 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.

Prerequisites

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


Assembly

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.

(back to top)

Home Assistant

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

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the GPLv3 License. See LICENSE for more information.

(back to top)

Contact

Giovanni Baccichet - @Giovanni_Bacci - github [at] surname [dot] org

Project Link: https://github.com/GiovanniBaccichet/powermonitor

(back to top)

Acknowledgments

Some useful resources and documentation I used for the project.

(back to top)