Skip to content

Latest commit

 

History

History
218 lines (155 loc) · 11.3 KB

Readme.md

File metadata and controls

218 lines (155 loc) · 11.3 KB

Home Assistant Glow 🌟

Project Maintenance License Forks Stargazers Issues

GitHub Activity GitHub Last Commit Contributors

During my internship at Nabu Casa in the first half of 2021, I focused on energy management in homes and how to collect all energy data and display it on a dashboard. From core release 2021.8 you can now also get started with the energy dashboard in Home Assistant!

CLICK HERE! To see the Home Assistant Glow in action.

Glow testingGlow in action

Home Assistant Glow makes a (not so) smart meter without a P1 port easily readable, reading the pulse LED that is always present in most cases and it works with ESPHome! To neatly hide it all in your meter cupboard, a case has been designed that you can 3D print yourself.

How do I know if my meter is supported?

To make sure your meter will work with the Home Assistant Glow, you have to look for the imp/kWh rate (see picture). Note the value, because it will be of importance at a later stage to configure the home_assistant_glow.yaml file.

Hardware

First, fill your 🛒 or see if you already have the components below.

Visual schema

Below you will find a visual schema of how everything is connected, depending on the type of board you use, the GPIO pins may be in a different place.

Diagrams

In the tables below you will find more information, about how to connect the photodiode PCB and the status LED.

Photodiode

How the photodiode is connected to the ESP board of your choice.

PHOTODIODE ESP32 Wemos D1 / ESP8266
A0 NOT USING NOT USING
DO D13 (GPIO13) D7 (GPIO13)
VCC 3V3 3V3
GND GND GND

For problems with the measurements, see the FAQ part further down.

Status LED

How the status LED is connected to the ESP board of your choice. For each measured pulse, the LED will briefly flash red and in case of no WiFi connection, the LED will continue to flash blue.

LED ESP32 D1 mini / ESP8266
RED D2 (GPIO2) D4 (GPIO2)
GREEN D4 (GPIO4) D2 (GPIO4)
BLUE D5 (GPIO5) D1 (GPIO5)
GND GND GND

3D printed case

You can use the 3D printed case to neatly hide everything, but it is specifically made for the ESP32S. If you use another board, you could adjust the design with the .step file. If you've made some changes, I'd appreciate it if you add the new case design to the repository for everyone to benefit 😉

Get started

Once you are done connecting all the hardware, we'll get started with the configuration for ESPHome. In this repository you will find the file home_assistant_glow.yaml, which you can copy into the esphome folder of your Home Assistant config.

Configuration

After you go through the installation wizard of ESPHome and flash your ESP32/8266, you need to change the pulse rate to match with your meter (how do I find my imp/kWh rate?). You can do this in 2 ways:

  • Open the webserver of the Glow and change the value under Pulse rate - imp/kWh.
  • Navigate to the device in Home Assistant and edit the number entity: Pulse rate - imp/kWh.

The default is 1000 and you can change it with steps of 100, between 100 and 10.000 (if your pulse rate falls outside the steps or value range, open an issue).

FAQ

Anwers to some of the most frequently asked questions:

Wrong soldered diode

Issue: #34

A number of users have reported receiving the recommended diode board from various sources, only to find the diode has been soldered to the board the wrong way round. This can cause that your pulse LED is not measured regardless of the sensitivity you set for the diode.

The large triangular part of the diode, should be soldered to the positive side of the board not the negative. If yours is orientated as above, you should desolder the photodiode invert it and resolder so the larger triangular part of the diode is connected to positive.

My Daily Energy won't reset

Issue: #140

By default, the Home Assistant Glow uses the homeassistant time platform, which synchronizes the current time via the native API from your home assistant config. If this doesn't work, you could consider using the sntp time platform, as in the example below:

time:
  - platform: sntp
    id: sntp_time

Error 4 / Out of memory

Issue: #240

With this error there is a chance that the instance your ESPHome is running on may be out of memory (possibly on a Raspberry Pi with less RAM), you can solve this by limiting the number of processes at compiling time using compile_process_limit.

esphome:
  compile_process_limit: 1

Contributing

This is an active open-source project. We are always open to people who want to use the code or contribute to it.

We've set up a separate document for our contribution guidelines.

Thank you for being involved! 😍

Disclamer

We use aliexpress / banggood affiliate links for the components and the tools. Some Ad-blockers might block these links an thus they seem to appear broken. You will have to temporarely disable ad-blocker to open these links.

License

MIT License

Copyright (c) 2021-2022 Klaas Schoute

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.