Skip to content

Commit

Permalink
Merge pull request #625 from klaasnicolaas/release/v4.2.2
Browse files Browse the repository at this point in the history
* ⬆️ Lock file maintenance

* ⬆️ Update dependency typescript to ~5.6.0 (#591)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* ⬆️ Update esphome/build-action action to v4.0.2

* ⬆️ Update esphome/build-action action to v4.0.3

* ⬆️ Lock file maintenance

* ⬆️ Update actions/setup-node action to v4.0.4

* ⬆️ Lock file maintenance

* ⬆️ Update actions/checkout action to v4.2.0

* ⬆️ Lock file maintenance (#600)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Bump NPM packages

* Add Ko-fi links on docs website (#602)

* Bump NPM packages

* Add Ko-fi links on docs website

* ⬆️ Lock file maintenance (#605)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* ⬆️ Update actions/upload-artifact action to v4.4.1 (#608)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* ⬆️ Update actions/checkout action to v4.2.1 (#607)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* ⬆️ Update actions/upload-artifact action to v4.4.2

* ⬆️ Update dependency @easyops-cn/docusaurus-search-local to v0.44.6

* ⬆️ Update dependency typescript to v5.6.3 (#611)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* ⬆️ Update actions/upload-artifact action to v4.4.3

* ⬆️ Update dependency @easyops-cn/docusaurus-search-local to ^0.45.0 (#614)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* ⬆️ Lock file maintenance

* Replace ESP install component (#618)

* Remove the ESP install component code

* Add esp-web-tools NPM package

* Remove esp-web-tools NPM package

* Add js script to Docusaurus

* Refactor component code

* Small refactor on global declare

* Rename the file and component

* Refactor text (#619)

* Refactor text

* Fix typo

* ⬆️ Update dependency @mdx-js/react to v3.1.0 (#620)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* ⬆️ Lock file maintenance (#621)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add attribution for derived content from Upsy Desky documentation (#623)

* Rename 'Firmware' to 'Firmware Update' in updates.yaml (#624)

* Bump Home Assistant Glow to v4.2.2

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
klaasnicolaas and renovate[bot] authored Oct 21, 2024
2 parents bb75c1a + 29abcbe commit 165e6f5
Show file tree
Hide file tree
Showing 17 changed files with 1,233 additions and 1,253 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-firmware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
matrix: ${{ steps.prepare-matrix.outputs.matrix }}
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.1
- name: ⤵️ Get changed files
if: github.event_name == 'pull_request'
id: changes
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
matrix: ${{fromJson(needs.prepare.outputs.matrix)}}
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.1
- name: 🔍 Determine ref - ESPHome packages
if: ${{ !contains(fromJSON('["release", "workflow_call"]'), github.event_name) }}
run: |
Expand All @@ -100,7 +100,7 @@ jobs:
- name: 🧪 Display changed YAML file
run: cat ${{ matrix.firmware }}/${{ matrix.device }}.yaml
- name: 🔨 Build firmware
uses: esphome/[email protected].1
uses: esphome/[email protected].3
id: esphome-build
with:
yaml-file: ${{ matrix.firmware }}/${{ matrix.device }}.yaml
Expand All @@ -119,7 +119,7 @@ jobs:
sed -i 's/${{ steps.esphome-build.outputs.name }}\(\.[a-z]*\)\.bin/\/${{ matrix.firmware }}\/${{ matrix.device }}\/${{ steps.esphome-build.outputs.name }}\1.bin/' output/${{ matrix.device }}/manifest.json
cat output/${{ matrix.device }}/manifest.json
- name: ⬆️ Upload firmware / device artifact
uses: actions/[email protected].0
uses: actions/[email protected].3
with:
name: build-${{ matrix.firmware}}-${{ matrix.device }}
path: output
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-firmware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: 🧪 Display structure of job
run: ls -R
- name: ⬆️ Upload project artifact
uses: actions/[email protected].0
uses: actions/[email protected].3
with:
name: ${{ matrix.project }}
path: files
Expand All @@ -57,7 +57,7 @@ jobs:
needs: combined-manifests
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.1
- name: ⬇️ Download all artifacts
uses: actions/[email protected]
with:
Expand All @@ -69,7 +69,7 @@ jobs:
run: ls -R

- name: 🏗️ Set up Node.js
uses: actions/[email protected].3
uses: actions/[email protected].4
with:
node-version: 20.x
- name: 🏗️ Install Docusaurus dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
pull-requests: write
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.1
- name: 🚀 Run Label Syncer
uses: micnncim/[email protected]
env:
Expand Down
2 changes: 1 addition & 1 deletion components/updates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ota:
update:
- platform: http_request
id: update_http_request
name: Firmware
name: Firmware Update
source: https://glow-energy.io/home-assistant-glow/manifest.json

http_request:
Expand Down
4 changes: 3 additions & 1 deletion docs/blog/2024-01-11-fresh-new-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ Moving forward, firmware builds will be tested on a weekly basis. This ensures t

---

That's it! If you would like to support the project you can do so through [Github sponsors](https://github.com/sponsors/klaasnicolaas). If you have any questions, you can ask them via the [discussions](https://github.com/klaasnicolaas/home-assistant-glow/discussions) and if you encounter problems with the Home Assistant Glow, you can indicate this in the [issues](https://github.com/klaasnicolaas/home-assistant-glow/issues).
That's it! If you would like to support the project you can do so through [Github sponsors](https://github.com/sponsors/klaasnicolaas) or Ko-fi. If you have any questions, you can ask them via the [discussions](https://github.com/klaasnicolaas/home-assistant-glow/discussions) and if you encounter problems with the Home Assistant Glow, you can indicate this in the [issues](https://github.com/klaasnicolaas/home-assistant-glow/issues).

./Klaas

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/F1F1SW69D)
4 changes: 3 additions & 1 deletion docs/blog/2024-07-03-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ This separation ensures that the firmware files on the website are always the sa

This release contains some nice features / improvements that make the Home Assistant Glow more 🌟

If you would like to support the project, you can do so through [GitHub sponsors](https://github.com/sponsors/klaasnicolaas). If you have any questions, you can ask them via the [discussions](https://github.com/klaasnicolaas/home-assistant-glow/discussions), and if you encounter problems with the Home Assistant Glow, you can indicate this in the [issues](https://github.com/klaasnicolaas/home-assistant-glow/issues).
If you would like to support the project, you can do so through [GitHub sponsors](https://github.com/sponsors/klaasnicolaas) or Ko-fi. If you have any questions, you can ask them via the [discussions](https://github.com/klaasnicolaas/home-assistant-glow/discussions), and if you encounter problems with the Home Assistant Glow, you can indicate this in the [issues](https://github.com/klaasnicolaas/home-assistant-glow/issues).

./Klaas

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/F1F1SW69D)

## Related links

- [ESPHome 2024.6](https://esphome.io/changelog/2024.6.0.html)
Expand Down
4 changes: 3 additions & 1 deletion docs/blog/2024-09-06-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ web_server:
## Wrap up
If you would like to support the project, you can do so through [GitHub sponsors](https://github.com/sponsors/klaasnicolaas). If you have any questions, you can ask them via the [discussions](https://github.com/klaasnicolaas/home-assistant-glow/discussions), and if you encounter problems with the Home Assistant Glow, you can indicate this in the [issues](https://github.com/klaasnicolaas/home-assistant-glow/issues).
If you would like to support the project, you can do so through [GitHub sponsors](https://github.com/sponsors/klaasnicolaas) or Ko-fi. If you have any questions, you can ask them via the [discussions](https://github.com/klaasnicolaas/home-assistant-glow/discussions), and if you encounter problems with the Home Assistant Glow, you can indicate this in the [issues](https://github.com/klaasnicolaas/home-assistant-glow/issues).
./Klaas
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/F1F1SW69D)
## Related links
- [ESPHome 2024.8.x - Changelog][esphome-changelog]
Expand Down
65 changes: 35 additions & 30 deletions docs/docs/advanced/firmware_customization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,68 +4,73 @@ title: Customizing the firmware
description: How to adopt and customize the firmware for your own needs.
---

Since the Home Assistant Glow's firmware is based on [ESPHome](https://esphome.io), making
customizations to the firmware is as easy as editing some YAML. The best way to modify the
firmware config is by installing the [ESPHome Dashboard](https://esphome.io/guides/getting_started_hassio.html).
The Home Assistant Glow's firmware is built on [ESPHome](https://esphome.io), a platform
designed for customization through simple YAML configurations. Whether you need to tweak
the device's functionality or adapt it for different use cases, the process is straightforward.
This guide will walk you through how to adopt the device and customize its firmware using
the [ESPHome Dashboard](https://esphome.io/guides/getting_started_hassio.html).

## Adopting the Device

Once ESPHome Dashboard is running, and your Home Assistant Glow is connected to your network,
it should prompt you to adopt it.
Before making any changes to the firmware, you first need to adopt the device into the ESPHome.
Once your ESPHome Dashboard is up and running, and the Home Assistant Glow is connected to your
local network, you should see an option to adopt it.

<p align="left">
<img src={require('@site/static/img/customization/adopt-esphome.png').default} />
</p>

Go through the adoption flow; it will do these things:
Following the adoption steps will automatically:

1. Create an ESPHome configuration file
2. Set an API encryption key (used by Home Assistant or other native API consumers)
3. Bake the Wi-Fi credentials into the firmware
4. Install the new firmware to the device
1. Create a unique ESPHome configuration file for your device.
2. Set up a secure API encryption key, allowing communication between Home Assistant and your device.
3. Embed your Wi-Fi credentials directly into the firmware, enabling automatic reconnections.
4. Upload the customized firmware onto the Home Assistant Glow.

## Understanding the Configuration

### Components
### Component Structure

To keep things maintainable and to make it easier to build firmware for different board types,
each large part of the configuration is broken up into its own "components". There are currently
three components, all of which are included in the base config:
To make the firmware manageable and adaptable to different hardware setups, it is organized into
distinct "components." Each major function of the device is isolated in its own YAML file. The
base configuration includes several important components:

- `basis.yaml`: package related to the basic functionality of the device
- `pulse_meter.yaml`: package related to the pulse meter
- `status_led.yaml`: package related to the status LED
- `updates.yaml`: package related to the OTA updates
- **`basis.yaml`**: Handles the basic, essential functionality of the device.
- **`pulse_meter.yaml`**: Manages pulse metering, useful for tracking energy usage.
- **`status_led.yaml`**: Controls the status LED, allowing you to customize its behavior or color based on the device's state.
- **`updates.yaml`**: Provides Over-the-Air ([OTA][ota]) update capabilities, making it easy to update firmware without physical access.

All of these components can be found on the [GitHub repository](https://github.com/klaasnicolaas/home-assistant-glow/tree/main/components).
These components can be found in the [GitHub repository](https://github.com/klaasnicolaas/home-assistant-glow/tree/main/components).

## Make customizations
### Making Your First Customization

After adopting the device, you can make customizations to the firmware by editing the YAML
files. You can do this by clicking the **EDIT** button in the ESPHome dashboard. This will open
the YAML editor, where you can make changes to the configuration.
Once your device is adopted, you can start customizing its behavior by editing the configuration
files. In the ESPHome dashboard, click on **EDIT** next to the device to open the YAML editor,
where you can modify the configuration directly.

<p align="left">
<img src={require('@site/static/img/customization/edit-device.png').default} />
</p>

When you open the YAML editor you will see a minimal configuration of your Home Assistant Glow,
if you want to make adjustments to, e.g., the [pulse_meter] component then the best way
is to use an [!extend].
In the YAML editor, you'll see the default configuration for your Home Assistant Glow. You can
make changes here or add new functionality by extending existing components. For instance, to
modify the behavior of the [pulse_meter], you could use the [!extend] feature.

Here's an example of adding an [internal_filter] to the pulse meter configuration:

```yaml title="your_glow_config.yaml"
sensor:
- id: !extend sensor_energy_pulse_meter
internal_filter: 100ms
```
With the above example, you will add an [internal_filter], which can be useful if high power values are measured.
## Related topics
## Related links
- [ESPHome - Pulse Counter][pulse_meter]
- [ESPHome - Extend][!extend]
- [ESPHome - OTA Updates][ota]
[internal_filter]: https://esphome.io/components/sensor/pulse_counter.html?highlight=internal_filter
[pulse_meter]: https://esphome.io/components/sensor/pulse_counter.html
[!extend]: https://esphome.io/components/packages.html#extend
[!extend]: https://esphome.io/components/packages.html#extend
[ota]: https://esphome.io/components/ota/
40 changes: 26 additions & 14 deletions docs/docs/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,42 @@ id: configuration
title: Configuration
---

## Renaming the Device
## Changing the Device Name

By default, the name of your Home Assistant Glow in Home Assistant is `home-assistant-glow-XXXXXX`, where `XXXXXX`
is derived from the MAC address of the device. This is not very descriptive, so you can change it to something more
meaningful.
When you first add your device to Home Assistant, it's assigned a default name like `home-assistant-glow-XXXXXX`,
where `XXXXXX` is a portion of the device's MAC address. While functional, this default name isn't very user-friendly
or descriptive, especially if you have multiple devices. Renaming it to something more meaningful helps with organization
and makes it easier to recognize within your smart home setup.

In the Home Assistant UI, navigate to your Home Assistant Glow by going to [**Settings** > **Devices & Services** > **ESPHome**][esphome-devices],
then select your Home Assistant Glow. You can also click the my badge below to go directly to your ESPHome devices overview page:
### How to Rename Your Device

To change the name of your device, follow these steps:

1. Open the Home Assistant user interface.
2. Navigate to **Settings** > **Devices & Services**.
3. Under the **ESPHome** section, find and select your device. If you have multiple devices, you may need to identify it by its current name (the default format described earlier).

Alternatively, you can click the badge below to be taken directly to the ESPHome devices overview page:

[![Open your Home Assistant instance and show an integration.](https://my.home-assistant.io/badges/integration.svg)][esphome-devices]

On the device's page, press the pencil icon in the top-right to edit the name.
4. Once on the device's page, locate the pencil icon in the top-right corner. Clicking this icon will allow you to edit the device name.
5. Enter your preferred name, something that reflects the purpose or location of the device (e.g., “Home Assistant Glow” or “Glow Energy”). This will help you easily identify it later.
6. Click **Update** to apply the changes and save the new name.

<p align="left">
<img src={require('@site/static/img/configuration/rename-device.png').default} />
</p>

After you've changed the name, click on **Update** to save the changes.
### Renaming Entity IDs (Optional)

After renaming the device, Home Assistant may prompt you to rename the associated entity IDs as well. Entity IDs are used to reference your device in automations, dashboards, and other parts of Home Assistant.

- **If you haven't created any automations or dashboards yet**: It's generally a good idea to rename the entity IDs to match the new device name. This makes them easier to recognize and use in future configurations.
- **If you already have automations or dashboards**: You may want to keep the existing entity IDs if they are already used in various setups. Renaming the entity IDs will require you to update those configurations to reference the new names. In this case, you can opt to change only the device name and leave the entity IDs as they are.

## Related links

:::info
Home Assistant may ask if you want to rename the entity IDs as well. If you don't already have automations,
dashboards, etc. using the entity IDs, it's probably a good idea to do that now so the entity IDs are more
readable. But if you already are using the entity IDs in other places, you can opt not to rename them, and
just change the name of the device.
:::
- [Home Assistant - Terminology](https://home-assistant.io/getting-started/concepts-terminology)

[esphome-devices]: https://my.home-assistant.io/redirect/integration/?domain=esphome
11 changes: 7 additions & 4 deletions docs/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ description: 'Instruction to get started with the Home Assistant Glow'

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import EspInstallButton from '@site/src/components/EspInstallButton';
import ESPHomeButton from '@site/src/components/ESPWebTools';
import { faUsb } from '@fortawesome/free-brands-svg-icons';

# Get started

This page will guide you through setting up your new Home Assistant Glow. It will take you through the steps of setup the hardware, installing the firmware and configure the device. It should take **5-10 minutes**, but probably less.
This guide will walk you through the steps needed to set up your new Home Assistant Glow. You'll go through connecting the hardware, installing the necessary software, and configuring the settings to get everything up and running smoothly.

## Step 1: Hardware

Expand All @@ -35,7 +35,6 @@ If you would like to prototype, I can also recommend the following items:
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.

## Step 2: Install firmware
Expand Down Expand Up @@ -63,7 +62,7 @@ If your device does not appear in the list, make sure you are using a USB data c
- The Home Assistant Glow is now connected to your network.
6. Congratulations 🎉 You have successfully installed the firmware on your Home Assistant Glow.

<EspInstallButton unsupportedMessage="Provisioning via USB only works in browsers which support Web Serial, such as Chrome or Edge." />
<ESPHomeButton />
</TabItem>
</Tabs>

Expand Down Expand Up @@ -130,6 +129,10 @@ Congratulations 🎉 You have gone successfully through everything to get starte

Affiliate links are used on this website 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.

:::note
This page contains content derived from the [Upsy Desky documentation](https://upsy-desky.tjhorner.dev/) by [TJ Horner](https://github.com/tjhorner). The derived content is licensed under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en).
:::

{/* Hardware */}
[esp32-bg-shop]: https://www.banggood.com/bang/?tt=16956_12_417111_&r=https%3A%2F%2Fnl.banggood.com%2FGeekcreit-ESP32-WiFi%2Bbluetooth-Development-Board-Ultra-Low-Power-Consumption-Dual-Cores-Pins-Unsoldered-p-1214159.html
[esp32-ali-shop]: https://tc.tradetracker.net/?c=15640&m=12&a=417111&r=&u=https%3A%2F%2Faliexpress.com%2Fitem%2F1005005970816555.html
Expand Down
18 changes: 17 additions & 1 deletion docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ const config: Config = {
label: 'Getting Started',
to: '/docs/getting-started',
},
{
label: 'FAQ',
to: '/docs/faq',
}
],
},
{
Expand Down Expand Up @@ -136,6 +140,18 @@ const config: Config = {
},
],
},
{
title: 'Donations',
items: [
{
html: `
<a href="https://ko-fi.com/${organizationName}" target="_blank" rel="noreferrer noopener" aria-label="Ko-fi button">
<img src="https://storage.ko-fi.com/cdn/brandasset/kofi_bg_tag_white.png" style="height: 60px;" alt="Ko-fi button" />
</a>
`,
}
]
}
],
copyright: `Copyright © ${new Date().getFullYear()} Klaas Schoute. Built with Docusaurus.`,
},
Expand All @@ -154,7 +170,7 @@ const config: Config = {
indexPages: true,
},
]
]
],
};

export default config;
Loading

0 comments on commit 165e6f5

Please sign in to comment.