Skip to content

Commit 7f81bb3

Browse files
Merge pull request #517 from klaasnicolaas/release/v4.1.0
Release v4.1.0
2 parents e9ce758 + 7b83b5d commit 7f81bb3

17 files changed

Lines changed: 378 additions & 211 deletions

.github/release-drafter.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name-template: "v$RESOLVED_VERSION"
3-
tag-template: "v$RESOLVED_VERSION"
3+
tag-template: "$RESOLVED_VERSION"
44
change-template: "- #$NUMBER $TITLE @$AUTHOR"
55
sort-direction: ascending
66

@@ -58,6 +58,8 @@ version-resolver:
5858
template: |
5959
## What's changed
6060
61+
_To receive a notification on new releases, click on **Watch** > **Custom** > **Releases** on the top._
62+
6163
$CHANGES
6264
63-
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
65+
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$RESOLVED_VERSION
Lines changed: 17 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
---
2-
# Build the ESPHome firmwares for the Home Assistant Glow project.
3-
name: Build & Deploy firmware
2+
# Test building ESPHome firmwares for the Home Assistant Glow project.
3+
name: Build firmware
44

55
on:
66
push:
77
branches:
8-
- main
9-
# release:
10-
# types:
11-
# - published
8+
- develop
9+
- release/**
1210
workflow_dispatch:
11+
workflow_call:
12+
inputs:
13+
release-url:
14+
required: true
15+
type: string
1316
pull_request:
1417
branches-ignore:
1518
- renovate/docusaurus**
@@ -89,13 +92,20 @@ jobs:
8992
steps:
9093
- name: ⤵️ Check out code from GitHub
9194
uses: actions/checkout@v4.1.7
95+
- name: 🔍 Determine ref - ESPHome packages
96+
if: ${{ !contains(fromJSON('["release", "workflow_call"]'), github.event_name) }}
97+
run: |
98+
echo "ref: ${{ github.head_ref || github.ref_name }}"
99+
sed -i "s|ref: .*|ref: \"${{ github.head_ref || github.ref_name }}\"|g" ${{ matrix.firmware }}/${{ matrix.device }}.yaml
100+
- name: 🧪 Display changed YAML file
101+
run: cat ${{ matrix.firmware }}/${{ matrix.device }}.yaml
92102
- name: 🔨 Build firmware
93103
uses: esphome/build-action@v3.1.0
94104
id: esphome-build
95105
with:
96106
yaml_file: ${{ matrix.firmware }}/${{ matrix.device }}.yaml
97107
version: ${{ matrix.version || 'latest' }}
98-
release_url: ${{ github.event.release.html_url || env.RELEASE_URL }}
108+
release_url: ${{ inputs.release-url || env.RELEASE_URL }}
99109
cache: true
100110
- name: 🚚 Move generated files to output
101111
run: |
@@ -111,83 +121,3 @@ jobs:
111121
name: build-${{ matrix.firmware}}-${{ matrix.device }}
112122
path: output
113123
retention-days: 1
114-
115-
combined-manifests:
116-
name: Combine ${{ matrix.project }} manifests
117-
runs-on: ubuntu-latest
118-
needs: build
119-
strategy:
120-
fail-fast: false
121-
matrix:
122-
include:
123-
- project: home-assistant-glow
124-
name: Home Assistant Glow
125-
steps:
126-
- name: ⤵️ Download specific artifacts
127-
uses: actions/download-artifact@v4.1.7
128-
with:
129-
pattern: build-${{ matrix.project }}-*
130-
merge-multiple: true
131-
path: files
132-
- name: 🔨 Generate device manifest.json
133-
run: |
134-
version=$(cat files/*/version | sort -V | tail -n 1)
135-
jq -s --arg version "$version" '{"name": "${{ matrix.name }}", "version": $version, "home_assistant_domain": "esphome", "builds":.}' files/*/manifest.json > files/manifest.json
136-
- name: 🧪 Display structure of job
137-
run: ls -R
138-
- name: ⬆️ Upload project artifact
139-
uses: actions/upload-artifact@v4.3.3
140-
with:
141-
name: ${{ matrix.project }}
142-
path: files
143-
retention-days: 1
144-
145-
build-docs:
146-
name: Build documentation
147-
if: contains(fromJSON('["workflow_dispatch", "push", "schedule"]'), github.event_name) && github.ref == 'refs/heads/main'
148-
runs-on: ubuntu-latest
149-
needs: combined-manifests
150-
steps:
151-
- name: ⤵️ Check out code from GitHub
152-
uses: actions/checkout@v4.1.7
153-
- name: ⬇️ Download all artifacts
154-
uses: actions/download-artifact@v4.1.7
155-
with:
156-
pattern: "!build-*"
157-
path: output
158-
- name: 🗂️ Move firmware folders to static
159-
run: mv output/* docs/static
160-
- name: 🧪 Display structure of job
161-
run: ls -R
162-
163-
- name: 🏗️ Set up Node.js
164-
uses: actions/setup-node@v4.0.2
165-
with:
166-
node-version: 20.x
167-
- name: 🏗️ Install Docusaurus dependencies
168-
run: npm install --frozen-lockfile --non-interactive
169-
working-directory: docs
170-
- name: 🚀 Build Docusaurus
171-
run: npm run build
172-
working-directory: docs
173-
- name: ⬆️ Upload pages artifacts
174-
uses: actions/upload-pages-artifact@v3.0.1
175-
with:
176-
path: docs/build
177-
178-
deploy:
179-
name: Deploy to GitHub Pages
180-
runs-on: ubuntu-latest
181-
needs: build-docs
182-
permissions:
183-
pages: write
184-
id-token: write
185-
environment:
186-
name: github-pages
187-
url: ${{ steps.deployment.outputs.page_url }}
188-
steps:
189-
- name: 🏗️ Setup Github Pages
190-
uses: actions/configure-pages@v5.0.0
191-
- name: 🚀 Deploy to Github Pages
192-
uses: actions/deploy-pages@v4.0.5
193-
id: deployment
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
# Build & Deploy the ESPHome firmwares for the Home Assistant Glow project.
3+
name: Deploy firmware
4+
5+
on:
6+
release:
7+
types:
8+
- published
9+
workflow_dispatch:
10+
inputs:
11+
release-tag:
12+
description: "Release tag"
13+
default: "x.x.x"
14+
required: true
15+
type: string
16+
release-url:
17+
description: "Release URL"
18+
default: "https://github.com"
19+
required: true
20+
type: string
21+
22+
jobs:
23+
build-firmware:
24+
if: ${{ github.event.ref == 'refs/heads/main' }}
25+
uses: klaasnicolaas/home-assistant-glow/.github/workflows/build-firmware.yaml@main
26+
name: Firmware
27+
with:
28+
release-url: ${{ github.event.release.html_url || inputs.release-url }}
29+
30+
combined-manifests:
31+
name: Combine ${{ matrix.project }} manifests
32+
runs-on: ubuntu-latest
33+
needs: build-firmware
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
include:
38+
- project: home-assistant-glow
39+
name: Home Assistant Glow
40+
steps:
41+
- name: ⤵️ Download specific artifacts
42+
uses: actions/download-artifact@v4.1.7
43+
with:
44+
pattern: build-${{ matrix.project }}-*
45+
merge-multiple: true
46+
path: files
47+
- name: 🔨 Generate device manifest.json
48+
run: |
49+
version=${{ github.event.release.tag_name || inputs.release-tag }}
50+
jq -s --arg version "$version" '{"name": "${{ matrix.name }}", "version": $version, "home_assistant_domain": "esphome", "builds":.}' files/*/manifest.json > files/manifest.json
51+
- name: 🧪 Display structure of job
52+
run: ls -R
53+
- name: ⬆️ Upload project artifact
54+
uses: actions/upload-artifact@v4.3.3
55+
with:
56+
name: ${{ matrix.project }}
57+
path: files
58+
retention-days: 1
59+
60+
build-docs:
61+
name: Build documentation
62+
if: contains(fromJSON('["workflow_dispatch", "release"]'), github.event_name) && github.ref == 'refs/heads/main'
63+
runs-on: ubuntu-latest
64+
needs: combined-manifests
65+
steps:
66+
- name: ⤵️ Check out code from GitHub
67+
uses: actions/checkout@v4.1.7
68+
- name: ⬇️ Download all artifacts
69+
uses: actions/download-artifact@v4.1.7
70+
with:
71+
pattern: "!build-*"
72+
path: output
73+
- name: 🗂️ Move firmware folders to static
74+
run: mv output/* docs/static
75+
- name: 🧪 Display structure of job
76+
run: ls -R
77+
78+
- name: 🏗️ Set up Node.js
79+
uses: actions/setup-node@v4.0.2
80+
with:
81+
node-version: 20.x
82+
- name: 🏗️ Install Docusaurus dependencies
83+
run: npm install --frozen-lockfile --non-interactive
84+
working-directory: docs
85+
- name: 🚀 Build Docusaurus
86+
run: npm run build
87+
working-directory: docs
88+
- name: ⬆️ Upload pages artifacts
89+
uses: actions/upload-pages-artifact@v3.0.1
90+
with:
91+
path: docs/build
92+
93+
deploy:
94+
name: Deploy to GitHub Pages
95+
runs-on: ubuntu-latest
96+
needs: build-docs
97+
permissions:
98+
pages: write
99+
id-token: write
100+
environment:
101+
name: github-pages
102+
url: ${{ steps.deployment.outputs.page_url }}
103+
steps:
104+
- name: 🏗️ Setup Github Pages
105+
uses: actions/configure-pages@v5.0.0
106+
- name: 🚀 Deploy to Github Pages
107+
uses: actions/deploy-pages@v4.0.5
108+
id: deployment

.github/workflows/labels.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
push:
66
# The default branch
77
branches:
8-
- main
8+
- develop
99
paths:
1010
- .github/labels.yml
1111
workflow_dispatch:

.github/workflows/pr-labels.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ name: PR Labels
33

44
# yamllint disable-line rule:truthy
55
on:
6-
pull_request_target:
6+
pull_request:
7+
# Don't run on target branch
8+
branches-ignore:
9+
- main
710
types: [opened, labeled, unlabeled, synchronize]
811

912
jobs:
10-
pr_labels:
13+
validate:
1114
name: Verify
1215
runs-on: ubuntu-latest
1316
steps:
1417
- name: 🏷 Verify PR has a valid label
15-
uses: jesusvasquez333/verify-pr-label-action@v1.4.0
18+
uses: klaasnicolaas/action-pr-labels@v2.0.0
1619
with:
17-
github-token: "${{ secrets.GITHUB_TOKEN }}"
18-
pull-request-number: "${{ github.event.pull_request.number }}"
1920
valid-labels: >-
20-
breaking-change, bugfix, documentation, enhancement,
21+
breaking-change, bugfix, documentation, enhancement, sync,
2122
refactor, performance, new-feature, maintenance, ci, dependencies
22-
disable-reviews: true

.github/workflows/release-drafter.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches:
77
- main
8+
- develop
89

910
jobs:
1011
update_release_draft:

Readme.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,26 @@ To make sure your meter will work with the Home Assistant Glow, you have to look
3535
<img width="60%" src="docs/static/img/pulse_rate.png">
3636
</p>
3737

38-
## Get Started
38+
## Getting Started
39+
40+
> [!IMPORTANT]
41+
> Please note, the default branch shows development and may be ahead of the released version. For copying YAML code, use the [release branch](https://github.com/klaasnicolaas/home-assistant-glow/releases/latest). It's best to use the [website](https://glow-energy.io/docs/getting-started#step-2-install-firmware) to install the latest firmware on your ESP.
3942
4043
On the [documentation website](https://glow-energy.io/docs/introduction) you will find a complete walkthrough with which hardware you need, how to install the correct firmware on your ESP (using esp web tools) and how to add it to Home Assistant.
4144

4245
## Hardware
4346

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

46-
- One of the micro controllers
47-
- ESP32 (recommended) - [Banggood][esp32-bg-shop] or [AliExpress][esp32-ali-shop]
48-
- ESP8266 - [Banggood][esp8266-bg-shop] or [AliExpress][esp8266-ali-shop]
49-
- Wemos D1 mini - [Banggood][wemos-d1-bg-shop] or [AliExpress][wemos-d1-ali-shop]
50-
- [Dupont Jumpers][dupont-jumpers-shop]
51-
- 3D printed case (see the [case](https://glow-energy.io/docs/reference/cases) folder)
52-
- LM393 Photodiode: [Banggood][photodiode-bg-shop] or [AliExpress][photodiode-ali-shop] (make sure that you do not accidentally order or receive an LDR)
53-
- LED RGB 5mm 4 pin - kathode: [Banggood][rgbled-bg-shop] or [AliExpress][rgbled-ali-shop]
49+
Choose one of the listed microcontrollers, but keep in mind that the ESP32 is recommended.
50+
51+
- ESP32 (recommended) - [AliExpress](https://s.click.aliexpress.com/e/_DdAe4Fl) or [Banggood][esp32-bg-shop] or [AliExpress][esp32-ali-shop]
52+
- ESP8266 - [AliExpress](https://s.click.aliexpress.com/e/_DCd13n1) or [Banggood][esp8266-bg-shop] or [AliExpress][esp8266-ali-shop]
53+
- Wemos D1 mini - [AliExpress](https://s.click.aliexpress.com/e/_DFkIzM7) or [Banggood][wemos-d1-bg-shop] or [AliExpress][wemos-d1-ali-shop]
54+
- Dupont Jumpers (female to male) - [AliExpress](https://s.click.aliexpress.com/e/_DmbrJsj) or [Banggood][dupont-jumpers-shop]
55+
- 3D-printed case (see the [case](https://glow-energy.io/docs/reference/cases) folder)
56+
- LM393 Photodiode: [AliExpress](https://s.click.aliexpress.com/e/_DDkX3zN) or [Banggood][photodiode-bg-shop] or [AliExpress][photodiode-ali-shop] (please note that you will not receive an LDR)
57+
- LED RGB 5mm 4 pin - kathode: [AliExpress](https://s.click.aliexpress.com/e/_Dn1D0wT) or [Banggood][rgbled-bg-shop] or [AliExpress][rgbled-ali-shop]
5458

5559
## Contributing
5660

@@ -63,7 +67,7 @@ Thank you for being involved! :heart_eyes:
6367

6468
## Disclamer
6569

66-
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 temporarily disable ad-blocker to open these links.
70+
Affiliate links are used on this repository to support the Home Assistant Glow 🌟 project. Some Ad-blockers might block these links and thus they seem to appear broken. You will have to temporarily disable ad-blocker to open these links.
6771

6872
## License
6973

components/updates.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# OTA configuration #
2+
ota:
3+
- platform: esphome
4+
id: ota_esphome
5+
- platform: http_request
6+
id: ota_http_request
7+
8+
update:
9+
- platform: http_request
10+
name: Firmware Update
11+
source: https://glow-energy.io/home-assistant-glow/manifest.json
12+
13+
http_request:
14+
timeout: 10s
15+
verify_ssl: false

0 commit comments

Comments
 (0)