diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
new file mode 100644
index 00000000..b0319b5e
--- /dev/null
+++ b/.github/workflows/ci.yaml
@@ -0,0 +1,18 @@
+---
+# Can we build firmware check
+name: CI
+
+on:
+ pull_request:
+
+jobs:
+ ci:
+ name: "🛠️ Build check"
+ runs-on: ubuntu-latest
+ steps:
+ - name: ⤵️ Check out files from GitHub
+ uses: actions/checkout@v2
+ - name: Test firmware build
+ uses: esphome/build-action@v1.0.1
+ with:
+ yaml_file: home_assistant_glow.yaml
diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml
new file mode 100644
index 00000000..28259291
--- /dev/null
+++ b/.github/workflows/publish.yaml
@@ -0,0 +1,18 @@
+---
+# Build the ESPHome binary firmware
+# And deploy it to Github Pages.
+name: Build firmware
+
+on:
+ release:
+ types:
+ - published
+
+jobs:
+ build:
+ name: "🛠️ Build ESPHome firmware"
+ uses: esphome/workflows/.github/workflows/build.yml@main
+ with:
+ files: home_assistant_glow.yaml
+ secrets:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/Readme.md b/Readme.md
index f36f8193..7bbb3227 100644
--- a/Readme.md
+++ b/Readme.md
@@ -14,14 +14,14 @@
During my internship at [Nabu Casa][nc] 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][energy] in Home Assistant!
-
+
CLICK HERE! To see the Home Assistant Glow in action.
- 
+ 
@@ -32,7 +32,7 @@ Home Assistant Glow makes a *(not so)* smart meter without a P1 port easily read
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 `.yaml` file.
-
+
## Hardware
@@ -86,7 +86,7 @@ Issue: [#34][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.
@@ -133,5 +133,5 @@ SOFTWARE.
[issues-url]: https://github.com/klaasnicolaas/home-assistant-glow/issues
[license-shield]: https://img.shields.io/github/license/klaasnicolaas/home-assistant-glow.svg
[commits-shield]: https://img.shields.io/github/commit-activity/y/klaasnicolaas/home-assistant-glow.svg
-[commits]: https://github.com/klaasnicolaas/home-assistant-glow/commits/master
+[commits]: https://github.com/klaasnicolaas/home-assistant-glow/commits/main
[last-commit-shield]: https://img.shields.io/github/last-commit/klaasnicolaas/home-assistant-glow.svg
diff --git a/home_assistant_glow.yaml b/home_assistant_glow.yaml
index 1f2a6abc..ff47131c 100644
--- a/home_assistant_glow.yaml
+++ b/home_assistant_glow.yaml
@@ -10,9 +10,14 @@ substitutions:
device_description: "Measure your energy consumption with the pulse LED on your smart meter"
pulse_pin: GPIO12
status_led: GPIO5
+
# imp/kWh rate ⬇ #
pulse_rate: '1000'
-
+
+ # Webserver credentials ⬇ #
+ web_username: 'glow'
+ web_password: 'esphome'
+
dashboard_import:
package_import_url: github://klaasnicolaas/home-assistant-glow/home_assistant_glow.yaml
@@ -25,14 +30,14 @@ esphome:
platform: ESP32
board: nodemcu-32s
+# WiFi credentials #
wifi:
- ssid: !secret wifi_ssid
- password: !secret wifi_password
+ # ssid: 'CHANGEME' # Enter your WiFi SSID here. Example: `ssid: 'your_network_name'`
+ # password: 'CHANGEME' # Enter your wifi password here. Example: `password: 'abcde123456'`
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: '${device_name}'
- password: !secret fallback_password
captive_portal:
@@ -44,7 +49,6 @@ improv_serial:
# Enable Home Assistant API
api:
- password: !secret esphome_api_password
services:
- service: reset_total
then:
@@ -60,8 +64,8 @@ ota:
web_server:
port: 80
auth:
- username: !secret esphome_web_username
- password: !secret esphome_web_password
+ username: '${web_username}'
+ password: '${web_password}'
output:
# - platform: gpio
@@ -91,13 +95,13 @@ status_led:
text_sensor:
- platform: version
hide_timestamp: true
- name: "${friendly_name} - ESPHome Version"
+ name: '${friendly_name} - ESPHome Version'
- platform: wifi_info
ip_address:
- name: "${friendly_name} - IP Address"
+ name: '${friendly_name} - IP Address'
icon: mdi:wifi
ssid:
- name: "${friendly_name} - Connected SSID"
+ name: '${friendly_name} - Connected SSID'
icon: mdi:wifi-strength-2
sensor:
diff --git a/static/_config.yaml b/static/_config.yaml
new file mode 100644
index 00000000..8ed6bd41
--- /dev/null
+++ b/static/_config.yaml
@@ -0,0 +1,4 @@
+# CHANGEME: Set these variable to your liking
+title: Home Assistant Glow 🌟
+description: Powered by ESPHome and ESP Web Tools
+theme: jekyll-theme-cayman
\ No newline at end of file
diff --git a/images/correct_board.png b/static/images/correct_board.png
similarity index 100%
rename from images/correct_board.png
rename to static/images/correct_board.png
diff --git a/images/glow_in_action.gif b/static/images/glow_in_action.gif
similarity index 100%
rename from images/glow_in_action.gif
rename to static/images/glow_in_action.gif
diff --git a/images/glow_sensor_testing.gif b/static/images/glow_sensor_testing.gif
similarity index 100%
rename from images/glow_sensor_testing.gif
rename to static/images/glow_sensor_testing.gif
diff --git a/images/home-assistant-glow.jpg b/static/images/home-assistant-glow.jpg
similarity index 100%
rename from images/home-assistant-glow.jpg
rename to static/images/home-assistant-glow.jpg
diff --git a/images/pulse_rate.png b/static/images/pulse_rate.png
similarity index 100%
rename from images/pulse_rate.png
rename to static/images/pulse_rate.png
diff --git a/static/index.md b/static/index.md
new file mode 100644
index 00000000..d64166e9
--- /dev/null
+++ b/static/index.md
@@ -0,0 +1,32 @@
+[![GitHub Sponsors][sponsor-shield]][sponsor-url]
+
+[![GitHub release][release-shield]][release-url]
+[![Stargazers][stars-shield]][stars-url]
+[![GitHub Last Commit][last-commit-shield]][commits-url]
+
+# Home Assistant Glow
+
+
+
+
+
+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][esphome]! To neatly hide it all in your meter cupboard, a case has been designed that you can 3D print yourself.
+
+## Installation
+
+You can use the button below to install the home assistant glow firmware directly to your device via USB from the browser.
+
+
+
+
+
+[esphome]: https://esphome.io/
+
+[release-shield]: https://img.shields.io/github/release/klaasnicolaas/home-assistant-glow.svg
+[release-url]: https://GitHub.com/klaasnicolaas/home-assistant-glow/releases/
+[stars-shield]: https://img.shields.io/github/stars/klaasnicolaas/home-assistant-glow.svg
+[stars-url]: https://github.com/klaasnicolaas/home-assistant-glow/stargazers
+[last-commit-shield]: https://img.shields.io/github/last-commit/klaasnicolaas/home-assistant-glow.svg
+[commits-url]: https://github.com/klaasnicolaas/home-assistant-glow/commits/main
+[sponsor-shield]: https://img.shields.io/github/sponsors/klaasnicolaas?label=Sponsor%20this%20project&style=for-the-badge
+[sponsor-url]: https://github.com/sponsors/klaasnicolaas
\ No newline at end of file