Skip to content

Commit 72aef42

Browse files
Merge pull request #37 from ApolloAutomation/beta
Wifi Fix, CI Fix, BLE Logger Fix
2 parents 13e7c74 + 285c13d commit 72aef42

10 files changed

Lines changed: 183 additions & 91 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!--
2+
From Core.yaml. Should match date YY.MM.DD.# ( Usually # is 1 )
3+
-->
4+
Version:
5+
6+
<!--
7+
You are amazing! Thanks for contributing to our project!
8+
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
9+
-->
10+
## What does this implement/fix?
11+
12+
13+
14+
## Types of changes
15+
<!--
16+
What type of change does your PR introduce?
17+
NOTE: Please, check only 1! box!
18+
If your PR requires multiple boxes to be checked, you'll most likely need to
19+
split it into multiple PRs. This makes things easier and faster to code review.
20+
-->
21+
22+
- [ ] Bugfix (fixed change that fixes an issue)
23+
- [ ] New feature (thanks!)
24+
- [ ] Breaking change (repair/feature that breaks existing functionality)
25+
- [ ] Dependency Update - Does not publish
26+
- [ ] Other - Does not publish
27+
- [ ] Website of github readme file update - Does not publish
28+
- [ ] Github workflows - Does not publish
29+
30+
31+
## Checklist / Checklijst:
32+
<!--
33+
Put an x in the boxes that apply. You can also fill these out after
34+
creating the PR. If you're unsure about any of them, don't hesitate to ask.
35+
We're here to help! This is simply a reminder of what we are going to look
36+
for before merging your code.
37+
-->
38+
39+
- [ ] The code change has been tested and works locally
40+
- [ ] The code change has not yet been tested
41+
42+
If user-visible functionality or configuration variables are added/modified:
43+
- [ ] Added/updated documentation for the web page
44+
45+
<!--
46+
Thank you for contributing <3
47+
-->

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "daily"
12+
commit-message:
13+
prefix: "chore(ci): "
14+
groups:
15+
github-actions:
16+
patterns:
17+
- "*"

.github/release-drafter.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name-template: 'Release v$NEXT_PATCH_VERSION'
2+
tag-template: "$RESOLVED_VERSION"
3+
change-template: "- #$NUMBER $TITLE @$AUTHOR"
4+
sort-direction: ascending
5+
6+
categories:
7+
- title: "🚨 Breaking changes"
8+
labels:
9+
- "breaking-change"
10+
- title: "✨ New features"
11+
labels:
12+
- "new-feature"
13+
- title: "🐛 Bug fixes"
14+
labels:
15+
- "bugfix"
16+
- title: "⬆️ Dependency updates"
17+
collapse-after: 5
18+
labels:
19+
- "dependency-update"
20+
21+
include-labels:
22+
- "bugfix"
23+
- "new-feature"
24+
- "breaking-change"
25+
26+
no-changes-template: '- No changes'
27+
28+
template: |
29+
## What's Changed
30+
31+
$CHANGES
32+
33+
**Full Changelog**: https://github.com/ApolloAutomation/MSR-2/compare/$PREVIOUS_TAG...$RESOLVED_VERSION.1
34+
35+
Be sure to 🌟 this repository for updates!

.github/workflows/autoassign.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
pull-requests: write
1313
steps:
1414
- name: 'Auto-assign issue'
15-
uses: pozil/auto-assign-issue@v1
15+
uses: pozil/auto-assign-issue@v2
1616
with:
1717
repo-token: ${{ secrets.GITHUB_TOKEN }}
1818
assignees: TrevorSchirmer

.github/workflows/build.yml

Lines changed: 25 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,36 @@
1-
name: Publish
1+
name: Build and Publish
2+
23
on:
34
push:
45
branches:
56
- main
67
workflow_dispatch:
78
inputs:
8-
version:
9-
description: 'The version of the firmware to build'
10-
required: true
11-
release:
12-
types: [published]
9+
bypass-yaml-check:
10+
description: 'Bypass YAML change check (force build/publish)'
11+
type: boolean
12+
required: false
13+
default: false
14+
# release:
15+
# types: [published]
1316

1417
jobs:
15-
build-firmware:
16-
name: Build And Release
17-
uses: esphome/workflows/.github/workflows/build.yml@main
18-
with:
19-
files: |
20-
Integrations/ESPHome/MSR-2_Factory.yaml
21-
esphome-version: stable
22-
combined-name: firmware
23-
release-summary: ${{ github.event_name == 'release' && github.event.release.body || '' }}
24-
release-url: ${{ github.event_name == 'release' && github.event.release.html_url || '' }}
25-
release-version: ${{ (github.event_name == 'release' && github.event.release.tag_name) || (github.event_name == 'workflow_dispatch' && inputs.version) || '' }}
26-
27-
build-site:
28-
name: Build Site
29-
runs-on: ubuntu-latest
30-
steps:
31-
- name: Checkout source code
32-
uses: actions/checkout@v4.1.7
33-
- name: Build
34-
uses: actions/jekyll-build-pages@v1.0.13
35-
with:
36-
source: ./static
37-
destination: ./output
38-
- name: Upload
39-
uses: actions/upload-artifact@v4.3.6
40-
with:
41-
name: site
42-
path: output
43-
44-
publish:
45-
name: Publish to GitHub Pages
46-
runs-on: ubuntu-latest
47-
needs:
48-
- build-firmware
49-
- build-site
18+
build-and-publish:
19+
uses: ApolloAutomation/Workflows/.github/workflows/build.yml@main
5020
permissions:
21+
contents: write
5122
pages: write
5223
id-token: write
53-
environment:
54-
name: github-pages
55-
url: ${{ steps.deployment.outputs.page_url }}
56-
steps:
57-
- uses: actions/download-artifact@v4.1.8
58-
with:
59-
name: firmware
60-
path: firmware
61-
62-
- name: Copy firmware and manifest
63-
run: |-
64-
mkdir -p output/firmware
65-
cp -r firmware/${{ needs.build-firmware.outputs.version }}/* output/firmware/
66-
67-
- uses: actions/download-artifact@v4.1.8
68-
with:
69-
name: site
70-
path: output
71-
72-
- uses: actions/upload-pages-artifact@v3.0.1
73-
with:
74-
path: output
75-
retention-days: 1
76-
77-
- name: Setup Pages
78-
uses: actions/configure-pages@v5.0.0
79-
80-
- name: Deploy to GitHub Pages
81-
id: deployment
82-
uses: actions/deploy-pages@v4.0.5
24+
pull-requests: write
25+
with:
26+
device-name: msr-2
27+
yaml-files: |
28+
Integrations/ESPHome/MSR-2_Factory.yaml
29+
firmware-names: "_Factory:firmware"
30+
core-yaml-path: Integrations/ESPHome/Core.yaml
31+
esphome-version: stable
32+
# Bypass check if manually triggered with bypass option
33+
check-yaml-changes: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.bypass-yaml-check == 'true') }}
34+
publish-to-pages: true
35+
has-installer: true
36+
installer-path: static

.github/workflows/ci.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,35 @@ name: CI
33
on:
44
pull_request:
55

6+
permissions:
7+
# Allow GITHUB_TOKEN to add labels to pull requests
8+
pull-requests: write
9+
issues: write
10+
contents: read
11+
id-token: write
12+
613
jobs:
14+
label-check:
15+
name: Label Check
16+
uses: ApolloAutomation/Workflows/.github/workflows/label-check.yml@main
17+
718
ci:
819
name: Building ${{ matrix.file }}
920
runs-on: ubuntu-latest
1021
strategy:
1122
matrix:
1223
file:
24+
- Integrations/ESPHome/MSR-2_Factory.yaml
1325
- Integrations/ESPHome/MSR-2.yaml
1426
- Integrations/ESPHome/MSR-2_BLE.yaml
15-
- Integrations/ESPHome/MSR-2_Factory.yaml
1627
esphome-version:
1728
- stable
1829
- beta
1930
- dev
2031
steps:
2132
- name: Checkout source code
22-
uses: actions/checkout@v4.1.7
33+
uses: actions/checkout@v4.2.2
2334
- name: Build ESPHome firmware to verify configuration
24-
uses: esphome/build-action@v3.1.0
35+
uses: esphome/build-action@v7
2536
with:
26-
yaml_file: ${{ matrix.file }}
37+
yaml-file: ${{ matrix.file }}

.github/workflows/weekly.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Weekly Firmware Build
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 1'
6+
7+
jobs:
8+
build:
9+
name: Building ${{ matrix.file }}
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
file:
14+
- Integrations/ESPHome/MSR-2_Factory.yaml
15+
- Integrations/ESPHome/MSR-2.yaml
16+
- Integrations/ESPHome/MSR-2_BLE.yaml
17+
esphome-version:
18+
- stable
19+
- beta
20+
- dev
21+
steps:
22+
- name: Checkout source code
23+
uses: actions/checkout@v4.2.2
24+
- name: Build ESPHome firmware to verify configuration
25+
uses: esphome/build-action@v7
26+
with:
27+
yaml-file: ${{ matrix.file }}

Integrations/ESPHome/Core.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
substitutions:
22
name: apollo-msr-2
3-
version: "25.2.21.2"
3+
version: "25.7.29.1"
44
device_description: ${name} made by Apollo Automation - version ${version}.
55

66
esp32:
@@ -12,6 +12,7 @@ captive_portal:
1212

1313
web_server:
1414
port: 80
15+
version: 3
1516

1617
globals:
1718
- id: button_press_timestamp
@@ -294,7 +295,7 @@ binary_sensor:
294295
return false;
295296
}
296297
- platform: gpio
297-
pin:
298+
pin:
298299
number: GPIO9
299300
inverted: true
300301
ignore_strapping_warning: true
@@ -306,19 +307,18 @@ binary_sensor:
306307
then:
307308
- lambda: |-
308309
id(button_press_timestamp) = millis();
309-
310+
310311
on_release:
311312
then:
312313
- lambda: |-
313-
if (millis() - id(button_press_timestamp) >= 1000) {
314+
if (millis() - id(button_press_timestamp) >= 8000) {
315+
id(factory_reset_switch).turn_on();
316+
}
317+
else if (millis() - id(button_press_timestamp) >= 1000) {
314318
id(testCycleCount) = 0;
315319
id(runTest) = true;
316320
id(testScript).execute();
317321
}
318-
else if (millis() - id(button_press_timestamp) >= 8000) {
319-
id(factory_reset_switch).turn_on();
320-
321-
}
322322
323323
ld2410:
324324
id: ld2410_radar
@@ -797,4 +797,4 @@ script:
797797
green: 0%
798798
blue: 0%
799799
- light.turn_off:
800-
id: rgb_light
800+
id: rgb_light

Integrations/ESPHome/MSR-2_BLE.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ esphome:
2525

2626
min_version: 2025.2.0
2727

28+
logger:
2829

2930
dashboard_import:
3031
package_import_url: github://ApolloAutomation/MSR-2/Integrations/ESPHome/MSR-2_BLE.yaml
@@ -40,6 +41,9 @@ ota:
4041

4142
bluetooth_proxy:
4243
active: true
44+
esp32_ble_tracker:
45+
scan_parameters:
46+
active: false
4347

4448
packages:
4549
core: !include Core.yaml

static/index.html

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,9 @@
8181
<div class="content">
8282
<h1>Apollo MSR-2 Installer</h1>
8383

84-
<div class="button-row" style="display: flex; justify-content: center; gap: 20px; align-items: center;">
85-
<div>
86-
<p>MSR-2 Firmware</p>
87-
<esp-web-install-button manifest="./firmware/manifest.json"></esp-web-install-button>
88-
</div>
89-
</div>
84+
<p class="button-row" align="center">
85+
<esp-web-install-button manifest="./firmware/manifest.json"></esp-web-install-button>
86+
</p>
9087

9188
<div class="footer">
9289
<a href="https://github.com/ApolloAutomation/MSR-2"

0 commit comments

Comments
 (0)