Merge pull request #42 from boneIO-eu/main

Fix 8x10A yaml link
This commit is contained in:
Pawel
2026-01-26 14:38:58 +01:00
committed by GitHub
35 changed files with 1499 additions and 38 deletions

124
.github/workflows/build-firmware.yml vendored Normal file
View File

@@ -0,0 +1,124 @@
name: Build ESPHome Firmware
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Version tag (e.g., 2026.1.2)'
required: true
default: '2026.1.2'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# Testing with single firmware first
- yaml_file: boneio-dimmer_gen2_8ch-v0_1.yaml
# Uncomment below after testing:
# - yaml_file: boneio-dimmer_gen2_2rgbw-v0_1.yaml
# - yaml_file: boneio-32x10_lights_v0_7.yaml
# - yaml_file: boneio-32x10_switches_v0_7.yaml
# - yaml_file: boneio-24x16_switches_v0_7.yaml
# - yaml_file: boneio-cover_v0_7.yaml
# - yaml_file: boneio-cover_mix_lights_v0_7.yaml
# - yaml_file: boneio-cover_mix_switches_v0_7.yaml
# - yaml_file: boneio-8x10A_gen2_lights-v0_1.yaml
# - yaml_file: boneio-mosfet48_lights_v0_7.yaml
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build firmware
uses: esphome/build-action@v4
id: esphome-build
with:
yaml-file: ${{ matrix.yaml_file }}
version: latest
complete-manifest: true
- name: Upload firmware artifact
uses: actions/upload-artifact@v4
with:
name: firmware-${{ steps.esphome-build.outputs.original-name }}
path: ${{ steps.esphome-build.outputs.name }}
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
steps:
- name: Download firmware artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: firmware-*
merge-multiple: true
- name: Get version
id: version
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
else
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
fi
- name: Prepare GitHub Pages content
run: |
mkdir -p gh-pages/firmware
# esphome/build-action outputs: name/, name/manifest.json, name/*.bin
for dir in artifacts/*/; do
NAME=$(basename "$dir")
# Copy firmware binary
cp "$dir"*.bin gh-pages/firmware/
# Copy manifest and rename to firmware name
cp "$dir"manifest.json gh-pages/${NAME}.json
done
# Create version file
echo "${{ steps.version.outputs.version }}" > gh-pages/version.txt
# Create index with firmware list
cat > gh-pages/index.html << 'EOF'
<!DOCTYPE html>
<html>
<head><title>boneIO Firmware</title></head>
<body>
<h1>boneIO ESPHome Firmware</h1>
<ul>
EOF
for json in gh-pages/*.json; do
NAME=$(basename "$json" .json)
echo "<li><a href=\"${NAME}.json\">${NAME}</a></li>" >> gh-pages/index.html
done
cat >> gh-pages/index.html << 'EOF'
</ul>
</body>
</html>
EOF
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages
force_orphan: true
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.version }}
name: Firmware v${{ steps.version.outputs.version }}
files: gh-pages/firmware/*.bin
generate_release_notes: true

View File

@@ -34,7 +34,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/buzzer.yaml',
'devices/serial_no.yaml',

View File

@@ -34,7 +34,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/buzzer.yaml',
'devices/serial_no.yaml',

View File

@@ -34,7 +34,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/buzzer.yaml',
'devices/serial_no.yaml',

View File

@@ -34,7 +34,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/buzzer.yaml',
'devices/serial_no.yaml',

View File

@@ -35,7 +35,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/serial_no.yaml',
'devices_v0_4/display.yaml',

View File

@@ -34,7 +34,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/buzzer.yaml',
'devices/serial_no.yaml',

View File

@@ -40,7 +40,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/buzzer.yaml',
'devices/serial_no.yaml',

1
boneio-8x10A_gen2-v0_1.yaml Symbolic link
View File

@@ -0,0 +1 @@
boneio-8x10A_gen2_lights-v0_1.yaml

View File

@@ -98,7 +98,7 @@ output:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/serial_no.yaml',
]

View File

@@ -34,7 +34,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/buzzer.yaml',
'devices/serial_no.yaml',

View File

@@ -34,7 +34,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/buzzer.yaml',
'devices/serial_no.yaml',

View File

@@ -34,7 +34,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/buzzer.yaml',
'devices/serial_no.yaml',

View File

@@ -34,7 +34,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/buzzer.yaml',
'devices/serial_no.yaml',

View File

@@ -34,7 +34,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/buzzer.yaml',
'devices/serial_no.yaml',

View File

@@ -34,7 +34,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/buzzer.yaml',
'devices/serial_no.yaml',

View File

@@ -23,7 +23,7 @@ external_components:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files:
[
'devices/serial_no.yaml',

View File

@@ -23,7 +23,7 @@ external_components:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files:
[
'devices/serial_no.yaml',

View File

@@ -23,7 +23,7 @@ external_components:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files:
[
'devices/serial_no.yaml',

View File

@@ -96,7 +96,7 @@ modbus:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/serial_no.yaml',
# 'devices/dimmer_i2c.yaml',

View File

@@ -106,7 +106,7 @@ output:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/serial_no.yaml',
]

View File

@@ -106,7 +106,7 @@ output:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/serial_no.yaml',
]

View File

@@ -110,7 +110,7 @@ modbus:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/serial_no.yaml',
# 'devices/dimmer_i2c.yaml',

View File

@@ -1 +0,0 @@
boneio-dimmer_gen2_8ch-v0_1.yaml

View File

@@ -0,0 +1,314 @@
substitutions:
name: boneio-dr-gen2-8ch-01
friendly_name: 'BoneIO Dimmer Gen2'
serial_prefix: 'dim2' #Don't change it.
firmware_manifest: 'https://boneio.eu/fwesp/boneio-dr-gen2-8ch-01.json'
esphome:
name: '${name}'
friendly_name: '${friendly_name}'
name_add_mac_suffix: true
project:
name: boneio.dimmer-led-gen2
version: '0.1'
on_boot:
priority: -100
then:
- delay: 5s
- if:
condition:
lambda: 'return id(serial_no) != nullptr;'
then:
- component.update: serial_no
- logger.log: "Serial No updated on boot"
else:
- logger.log: "Serial No component not found"
esp32:
board: esp32-s3-devkitc-1
framework:
type: esp-idf
ethernet:
id: eth
type: W5500
clk_pin: GPIO13
mosi_pin: GPIO39
miso_pin: GPIO38
cs_pin: GPIO12
interrupt_pin: GPIO2
reset_pin: GPIO1
clock_speed: 25MHz
i2c:
sda: GPIO10
scl: GPIO11
scan: True
frequency: 400kHz
output:
- platform: ledc
pin: GPIO18
frequency: 1000Hz
inverted: false
id: chl01
- platform: ledc
pin: GPIO17
frequency: 1000Hz
inverted: false
id: chl02
- platform: ledc
pin: GPIO16
frequency: 1000Hz
inverted: false
id: chl03
- platform: ledc
pin: GPIO15
frequency: 1000Hz
inverted: false
id: chl04
- platform: ledc
pin: GPIO7
frequency: 1000Hz
inverted: false
id: chr01
- platform: ledc
pin: GPIO6
frequency: 1000Hz
inverted: false
id: chr02
- platform: ledc
pin: GPIO5
frequency: 1000Hz
inverted: false
id: chr03
- platform: ledc
pin: GPIO4
frequency: 1000Hz
inverted: false
id: chr04
# CAN gpio48 - tx, gpio47 rx, gpio35 stb
# uart:
# id: boneio_uart
# rx_pin: GPIO21
# tx_pin: GPIO14
# baud_rate: 9600
# stop_bits: 1
# modbus:
# send_wait_time: 80ms
# uart_id: boneio_uart
# id: boneio_modbus
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: packages-v1.7.2
files: [
'devices/serial_no.yaml',
]
# boneiopackages:
# url: https://github.com/boneIO-eu/esphome_packages
# ref: main
# refresh: 1min
# files:
# - path: sdm630.yaml
dashboard_import:
package_import_url: github://boneIO-eu/esphome/boneio-dimmer_gen2_8ch-v0_1.yaml@main
import_full_config: true
pcf8574:
- id: 'pcf_inputs'
address: 0x38
logger:
hardware_uart: UART0
api:
reboot_timeout: 0s
ota:
- platform: esphome
- platform: web_server
web_server:
port: 80
version: 3
local: true
light:
- platform: monochromatic
output: chl01
name: 'CHL 01'
id: chl_01
default_transition_length: 2s
gamma_correct: 0
- platform: monochromatic
output: chl02
name: 'CHL 02'
id: chl_02
default_transition_length: 2s
gamma_correct: 0
- platform: monochromatic
output: chl03
name: 'CHL 03'
id: chl_03
default_transition_length: 2s
gamma_correct: 0
- platform: monochromatic
output: chl04
name: 'CHL 04'
id: chl_04
default_transition_length: 2s
gamma_correct: 0
- platform: monochromatic
output: chr01
name: 'CHR 01'
id: chr_01
default_transition_length: 2s
gamma_correct: 0
- platform: monochromatic
output: chr02
name: 'CHR 02'
id: chr_02
default_transition_length: 2s
gamma_correct: 0
- platform: monochromatic
output: chr03
name: 'CHR 03'
id: chr_03
default_transition_length: 2s
gamma_correct: 0
- platform: monochromatic
output: chr04
name: 'CHR 04'
id: chr_04
default_transition_length: 2s
gamma_correct: 0
debug:
update_interval: 15s
sensor:
- platform: debug
free:
name: "Heap Free"
block:
name: "Heap Max Block"
loop_time:
name: "Loop Time"
- platform: lm75b
id: boneIO_temp
name: 'Temperature'
update_interval: 30s
entity_category: diagnostic
on_value_range:
- above: 70.0
then:
- switch.turn_on: buzzer
- below: 70.0
then:
- switch.turn_off: buzzer
switch:
- platform: gpio
id: buzzer
name: 'Buzzer'
pin:
number: GPIO9
mode:
output: true
inverted: false
- platform: gpio
id: can_bus_switch
name: 'CAN Bus Switch'
pin:
number: GPIO35
mode:
output: true
inverted: false
binary_sensor:
- platform: gpio
name: 'IN_01'
id: in_01
pin:
pcf8574: pcf_inputs
number: 0
mode:
input: true
inverted: true
- platform: gpio
name: 'IN_02'
id: in_02
pin:
pcf8574: pcf_inputs
number: 1
mode:
input: true
inverted: true
- platform: gpio
name: 'IN_03'
id: in_03
pin:
pcf8574: pcf_inputs
number: 2
mode:
input: true
inverted: true
- platform: gpio
name: 'IN_04'
id: in_04
pin:
pcf8574: pcf_inputs
number: 3
mode:
input: true
inverted: true
- platform: gpio
name: 'IN_05'
id: in_05
pin:
pcf8574: pcf_inputs
number: 4
mode:
input: true
inverted: true
- platform: gpio
name: 'IN_06'
id: in_06
pin:
pcf8574: pcf_inputs
number: 5
mode:
input: true
inverted: true
- platform: gpio
name: 'IN_07'
id: in_07
pin:
pcf8574: pcf_inputs
number: 6
mode:
input: true
inverted: true
- platform: gpio
name: 'IN_08'
id: in_08
pin:
pcf8574: pcf_inputs
number: 7
mode:
input: true
inverted: true

View File

@@ -106,7 +106,7 @@ output:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/serial_no.yaml',
]

View File

@@ -34,7 +34,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/buzzer.yaml',
'devices/serial_no.yaml',

View File

@@ -34,7 +34,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/buzzer.yaml',
'devices/serial_no.yaml',

View File

@@ -32,15 +32,23 @@ exclude_files = [
]
include_files = [
"boneio-8x10A_gen2_lights-v0_1.yaml",
# "boneio-dimmer_gen2_2rgbw-v0_1.yaml",
# "boneio-8x10A_gen2_lights-v0_1.yaml",
"boneio-dimmer_gen2_2rgbw-v0_1.yaml",
"boneio-dimmer_gen2_8ch-v0_1"
]
GITHUB_PAGES_URL = "https://boneio-eu.github.io/esphome"
FIRMWARE_VERSION = "2026.1.2"
def json_pattern(firmware_name, chip_family="ESP32"):
# GitHub Pages supports CORS - works with ESP Web Tools
firmware_path = f"{GITHUB_PAGES_URL}/firmware/{firmware_name}.bin"
return {
"name": "ESPHome",
"version": "2025.11.2",
"version": FIRMWARE_VERSION,
"home_assistant_domain": "esphome",
"funding_url": "https://esphome.io/guides/supporters.html",
"new_install_prompt_erase": False,
@@ -49,7 +57,7 @@ def json_pattern(firmware_name, chip_family="ESP32"):
"chipFamily": chip_family,
"parts": [
{
"path": f"/fwesp/firmware/{firmware_name}.bin",
"path": firmware_path,
"offset": 0,
}
],
@@ -84,7 +92,7 @@ for file in glob.glob("*.yaml"):
print("No file found.")
break
firmware_path = f"{cwd}/.esphome/build/{filename}/.pioenvs/{filename}/firmware.factory.bin"
cmd = f'docker run --rm -p 6052:6052 -v "{cwd}":/config -it ghcr.io/esphome/esphome compile {file}'
cmd = f'docker run --rm -p 6053:6052 -v "{cwd}":/config -it ghcr.io/esphome/esphome compile {file}'
print(cmd)
result = subprocess.run(
cmd,

View File

@@ -30,7 +30,7 @@ dashboard_import:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/buzzer.yaml',
'devices/serial_no.yaml',

View File

@@ -71,7 +71,7 @@ modbus:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/serial_no.yaml',
]

File diff suppressed because it is too large Load Diff

View File

@@ -71,7 +71,7 @@ ld2412:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/serial_no.yaml',
]

View File

@@ -2,14 +2,14 @@ one_wire:
- platform: gpio
pin: GPIO32
# sensor:
# - platform: dallas
# - platform: dallas_temp
# address: 0x283c01d607d4df28
# name: "Dallas Sensor 1"
#
# - platform: dallas
# - platform: dallas_temp
# address: 0xdfe67a061e64ff28
# name: "Dallas Sensor 2"
#
# - platform: dallas
# - platform: dallas_temp
# address: 0xa7a89f071e64ff28
# name: "Dallas Sensor 3"

View File

@@ -97,7 +97,7 @@ output:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [
'devices/serial_no.yaml',
# 'devices/dimmer_i2c.yaml',

View File

@@ -110,7 +110,7 @@ output:
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.7.1
ref: packages-v1.7.2
files: [devices/serial_no.yaml]
dashboard_import: