Skip to content

Commit

Permalink
Merge pull request #547 from klaasnicolaas/release/v4.1.1
Browse files Browse the repository at this point in the history
Release v4.1.1
  • Loading branch information
klaasnicolaas authored Jul 17, 2024
2 parents 7f81bb3 + e9cd947 commit e998364
Show file tree
Hide file tree
Showing 12 changed files with 361 additions and 414 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-firmware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
- name: 🧪 Display changed YAML file
run: cat ${{ matrix.firmware }}/${{ matrix.device }}.yaml
- name: 🔨 Build firmware
uses: esphome/build-action@v3.1.0
uses: esphome/build-action@v3.2.0
id: esphome-build
with:
yaml_file: ${{ matrix.firmware }}/${{ matrix.device }}.yaml
Expand All @@ -112,11 +112,12 @@ jobs:
mkdir -p output/${{ matrix.device }}
mv ${{ steps.esphome-build.outputs.name }}/* output/${{ matrix.device }}/
echo ${{ steps.esphome-build.outputs.version }} > output/${{ matrix.device }}/version
echo ${{ steps.esphome-build.outputs.project-version }} > output/${{ matrix.device }}/project_version
- name: 🔨 Alter path in manifest.json
run: |
sed -i 's/${{ steps.esphome-build.outputs.name }}\//\/${{ matrix.firmware }}\/${{ matrix.device }}\//g' output/${{ matrix.device }}/manifest.json
- name: ⬆️ Upload firmware / device artifact
uses: actions/[email protected].3
uses: actions/[email protected].4
with:
name: build-${{ matrix.firmware}}-${{ matrix.device }}
path: output
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/deploy-firmware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ on:
- published
workflow_dispatch:
inputs:
release-tag:
description: "Release tag"
default: "x.x.x"
required: true
type: string
release-url:
description: "Release URL"
default: "https://github.com"
Expand All @@ -21,7 +16,6 @@ on:

jobs:
build-firmware:
if: ${{ github.event.ref == 'refs/heads/main' }}
uses: klaasnicolaas/home-assistant-glow/.github/workflows/build-firmware.yaml@main
name: Firmware
with:
Expand All @@ -39,34 +33,34 @@ jobs:
name: Home Assistant Glow
steps:
- name: ⤵️ Download specific artifacts
uses: actions/[email protected].7
uses: actions/[email protected].8
with:
pattern: build-${{ matrix.project }}-*
merge-multiple: true
path: files
- name: 🔨 Generate device manifest.json
run: |
version=${{ github.event.release.tag_name || inputs.release-tag }}
version=cat(project_version)
jq -s --arg version "$version" '{"name": "${{ matrix.name }}", "version": $version, "home_assistant_domain": "esphome", "builds":.}' files/*/manifest.json > files/manifest.json
- name: 🧪 Display structure of job
run: ls -R
- name: ⬆️ Upload project artifact
uses: actions/[email protected].3
uses: actions/[email protected].4
with:
name: ${{ matrix.project }}
path: files
retention-days: 1

build-docs:
name: Build documentation
if: contains(fromJSON('["workflow_dispatch", "release"]'), github.event_name) && github.ref == 'refs/heads/main'
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')
runs-on: ubuntu-latest
needs: combined-manifests
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/[email protected]
- name: ⬇️ Download all artifacts
uses: actions/[email protected].7
uses: actions/[email protected].8
with:
pattern: "!build-*"
path: output
Expand All @@ -76,7 +70,7 @@ jobs:
run: ls -R

- name: 🏗️ Set up Node.js
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version: 20.x
- name: 🏗️ Install Docusaurus dependencies
Expand Down
3 changes: 0 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ Choose one of the listed microcontrollers, but keep in mind that the ESP32 is re

- ESP32 (recommended) - [AliExpress](https://s.click.aliexpress.com/e/_DdAe4Fl) or [Banggood][esp32-bg-shop] or [AliExpress][esp32-ali-shop]
- ESP8266 - [AliExpress](https://s.click.aliexpress.com/e/_DCd13n1) or [Banggood][esp8266-bg-shop] or [AliExpress][esp8266-ali-shop]
- Wemos D1 mini - [AliExpress](https://s.click.aliexpress.com/e/_DFkIzM7) or [Banggood][wemos-d1-bg-shop] or [AliExpress][wemos-d1-ali-shop]
- Dupont Jumpers (female to male) - [AliExpress](https://s.click.aliexpress.com/e/_DmbrJsj) or [Banggood][dupont-jumpers-shop]
- 3D-printed case (see the [case](https://glow-energy.io/docs/reference/cases) folder)
- 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)
Expand Down Expand Up @@ -118,8 +117,6 @@ SOFTWARE.
[esp32-ali-shop]: https://tc.tradetracker.net/?c=15640&m=12&a=417111&r=&u=https%3A%2F%2Faliexpress.com%2Fitem%2F1005005970816555.html
[esp8266-bg-shop]: https://www.banggood.com/bang/?tt=16956_12_417111_&r=%2Fnl%2FGeekcreit-NodeMcu-Lua-ESP8266-ESP-12F-WIFI-Development-Board-p-985891.html
[esp8266-ali-shop]: https://tc.tradetracker.net/?c=15640&m=12&a=417111&r=&u=https%3A%2F%2Faliexpress.com%2Fitem%2F1005005977505151.html
[wemos-d1-bg-shop]: https://www.banggood.com/bang/?tt=16956_12_417111_&r=%2Fnl%2FGeekcreit-D1-Mini-V3_0_0-WIFI-Internet-Of-Things-Development-Board-Based-ESP8266-4MB-MicroPython-Nodemcu-p-1264245.html
[wemos-d1-ali-shop]: https://tc.tradetracker.net/?c=15640&m=12&a=417111&r=&u=https%3A%2F%2Faliexpress.com%2Fitem%2F1005006018009983.html
[dupont-jumpers-shop]: https://www.banggood.com/bang/?tt=16956_12_417111_&r=https%3A%2F%2Fnl.banggood.com%2F120pcs-20cm-Male-To-Female-Female-To-Female-Male-To-Male-Color-Breadboard-Jumper-Cable-Dupont-Wire-p-974006.html
[photodiode-bg-shop]: https://www.banggood.com/bang/?tt=16956_12_417111_&r=https%3A%2F%2Fnl.banggood.com%2F4Pin-Photodiode-Sensor-Controller-Module-Measure-Module-p-1416445.html
[photodiode-ali-shop]: https://tc.tradetracker.net/?c=15640&m=12&a=417111&r=&u=https%3A%2F%2Faliexpress.com%2Fitem%2F1005003302215339.html
Expand Down
3 changes: 2 additions & 1 deletion components/updates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ ota:

update:
- platform: http_request
name: Firmware Update
id: update_http_request
name: Firmware
source: https://glow-energy.io/home-assistant-glow/manifest.json

http_request:
Expand Down
10 changes: 5 additions & 5 deletions docs/docs/faq/faq_nr2.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ sensor:
# Update the sensor with an average every 10th second. See
- throttle_average: 10s
- filter_out: NaN
- id: !extend sensor_total_daily_energy
filters:
# Update the sensor once per 0.1 kWh consumed, or every 5th minute, whichever happens sooner.
- delta: 0.01
- heartbeat: 300s
total:
filters:
# Update the sensor once per 0.1 kWh consumed, or every 5th minute, whichever happens sooner.
- delta: 0.01
- heartbeat: 300s
```
After applying the filters, only 396 state changes will be produced per hour. You can read more about making YAML adjustments on the [customizing the firmware](/docs/advanced/firmware_customization.mdx) page.
Expand Down
5 changes: 3 additions & 2 deletions docs/docs/faq/faq_nr7.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ Try to use the `left` [calculation method][method] instead of the default (`righ

```yaml title="your_glow_config.yaml"
sensor:
- id: !extend sensor_total_daily_energy
method: left
- id: !extend sensor_energy_pulse_meter
total:
method: left
```
## Related topics
Expand Down
18 changes: 12 additions & 6 deletions docs/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,26 @@ This page will guide you through setting up your new Home Assistant Glow. It wil

## Step 1: Hardware

To get started, you need the right hardware first, fill your 🛒 or see if you already have the components in house.
To get started, you need the right hardware first, fill your 🛒 or see if you already have the components in house. Choose between an **ESP32** (recommended) or **ESP8266**.

| Nr. | Item | Shops | | |
|:-----|:---------|:-|:-|:-|
|:-----|:---------|:------|:-|:-|
|**1.**| ESP32 (recommended) | [AliExpress](https://s.click.aliexpress.com/e/_DdAe4Fl) | [AliExpress][esp32-ali-shop] | [Banggood][esp32-bg-shop] |
|**1.**| ESP8266 | [AliExpress](https://s.click.aliexpress.com/e/_DCd13n1) | [AliExpress][esp8266-ali-shop] | [Banggood][esp8266-bg-shop] |
|**1.**| Wemos D1 mini V4.0 | [AliExpress](https://s.click.aliexpress.com/e/_DFkIzM7) | [AliExpress][wemos-d1-ali-shop] | [Banggood][wemos-d1-bg-shop] |
|**2.**| Dupont Jumpers (female to female) | [AliExpress](https://s.click.aliexpress.com/e/_DmbrJsj) | [AliExpress][dupont-jumpers-ali-shop] | [Banggood][dupont-jumpers-bg-shop] |
|**3.**| LM393 Photodiode | [AliExpress](https://s.click.aliexpress.com/e/_DDkX3zN) | [AliExpress][photodiode-ali-shop] | [Banggood][photodiode-bg-shop] |
|**4.**| LED RGB 5mm 4 pin - kathode | [AliExpress](https://s.click.aliexpress.com/e/_Dn1D0wT) | [AliExpress][rgbled-ali-shop] | [Banggood][rgbled-bg-shop] |

Obviously, you do not need all 3 different types of microcontrollers, but you can choose between an **ESP32** (recommended), **ESP8266** or the **Wemos D1 mini**. About the photodiode, keep in mind that there are also boards in circulation with an LDR.
If you would like to prototype, I can also recommend the following items:

| Nr. | Item | Shop |
|:-----|:---------|:-----|
|**1.**| ESP32 Development Expansion Board (optional) | [AliExpress](https://s.click.aliexpress.com/e/_DdWH7ET) |

:::note
Keep in mind that besides the photodiode board there are also boards in circulation with an LDR. The expansion board is optional, but makes it easier to connect and prototype with the components.
:::


How everything should be connected can be found on the [wiring diagram](/docs/reference/diagram). Once this is done, you can proceed to step 2.

Expand Down Expand Up @@ -127,8 +135,6 @@ Affiliate links are used on this website to support the Home Assistant Glow 🌟
[esp32-ali-shop]: https://tc.tradetracker.net/?c=15640&m=12&a=417111&r=&u=https%3A%2F%2Faliexpress.com%2Fitem%2F1005005970816555.html
[esp8266-bg-shop]: https://www.banggood.com/bang/?tt=16956_12_417111_&r=%2Fnl%2FGeekcreit-NodeMcu-Lua-ESP8266-ESP-12F-WIFI-Development-Board-p-985891.html
[esp8266-ali-shop]: https://tc.tradetracker.net/?c=15640&m=12&a=417111&r=&u=https%3A%2F%2Faliexpress.com%2Fitem%2F1005005977505151.html
[wemos-d1-bg-shop]: https://www.banggood.com/bang/?tt=16956_12_417111_&r=%2Fnl%2FGeekcreit-D1-Mini-V3_0_0-WIFI-Internet-Of-Things-Development-Board-Based-ESP8266-4MB-MicroPython-Nodemcu-p-1264245.html
[wemos-d1-ali-shop]: https://tc.tradetracker.net/?c=15640&m=12&a=417111&r=&u=https%3A%2F%2Faliexpress.com%2Fitem%2F1005006018009983.html
[dupont-jumpers-bg-shop]: https://www.banggood.com/bang/?tt=16956_12_417111_&r=https%3A%2F%2Fnl.banggood.com%2F120pcs-20cm-Male-To-Female-Female-To-Female-Male-To-Male-Color-Breadboard-Jumper-Cable-Dupont-Wire-p-974006.html
[dupont-jumpers-ali-shop]: https://tc.tradetracker.net/?c=15640&m=12&a=417111&r=&u=https%3A%2F%2Faliexpress.com%2Fitem%2F1005005945668553.html
[photodiode-bg-shop]: https://www.banggood.com/bang/?tt=16956_12_417111_&r=https%3A%2F%2Fnl.banggood.com%2F4Pin-Photodiode-Sensor-Controller-Module-Measure-Module-p-1416445.html
Expand Down
30 changes: 18 additions & 12 deletions docs/docs/reference/diagram.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ Below you will find a wiring diagram of how everything is connected, depending o
<img width="90%" src={require('@site/static/img/wiring_diagram.png').default} />
</p>

:::important
Please note that there are different boards in circulation and that the GPIO
pins may be on a different location than in the example above. So always double
check and, if necessary, consult the pin layout of your specific board.
:::

## GPIO pins

In the tables below you will find more information, about how to connect the Photodiode PCB and the status LED.
Expand All @@ -24,20 +30,20 @@ In the tables below you will find more information, about how to connect the Pho

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

| PHOTODIODE | ESP32 | Wemos D1 / ESP8266 |
|------------|--------------|--------------------|
| A0 | NOT USING | NOT USING |
| DO | D26 (GPIO26) | D7 (GPIO13) |
| VCC | 3V3 | 3V3 |
| GND | GND | GND |
| PHOTODIODE | ESP32 | ESP8266 |
|------------|--------------|-------------|
| A0 | NOT USING | NOT USING |
| DO | D26 (GPIO26) | D7 (GPIO13) |
| VCC | 3V3 | 3V3 |
| GND | GND | GND |

### Status LED

How the status LED is connected to the ESP board of your choice. For each measured pulse, the LED will briefly flash <span style={{ color: 'red' }}>*red*</span> and in case of no WiFi connection, the LED will continue to flash <span style={{ color: 'blue' }}>*blue*</span>.

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

0 comments on commit e998364

Please sign in to comment.