mirror of
https://github.com/tjhorner/upsy-desky.git
synced 2026-01-15 02:08:22 -05:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
686bc6258b | ||
|
|
581bb2883e | ||
|
|
41517256bb | ||
|
|
931edac2a5 | ||
|
|
6a5fbfa383 | ||
|
|
e334e7004f | ||
|
|
c36fcb5232 | ||
|
|
a4484761cd | ||
|
|
7bf1275e7d | ||
|
|
b28dcb26ca | ||
|
|
0ae038b8b7 | ||
|
|
543f901d90 | ||
|
|
f3b31ecc61 |
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@@ -1 +1,2 @@
|
||||
github: tjhorner
|
||||
ko_fi: tjhorner
|
||||
|
||||
50
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
50
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
name: Bug Report
|
||||
description: File a bug report or get help with an issue.
|
||||
labels: ["bug"]
|
||||
assignees:
|
||||
- tjhorner
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: troubleshooting-followed
|
||||
attributes:
|
||||
label: Troubleshooting Guide
|
||||
description: Please confirm you have followed the [troubleshooting guide](https://upsy-desky.tjhorner.dev/docs/troubleshooting).
|
||||
options:
|
||||
- label: I have followed the steps in the troubleshooting guide and my issue is either not listed or is not solved.
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Description
|
||||
description: Please describe the bug you encountered, and what you expected to happen instead.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Logs
|
||||
description: Please copy and paste any relevant log output. Learn how to obtain logs [here](https://upsy-desky.tjhorner.dev/docs/troubleshooting/#other-issues).
|
||||
render: plain text
|
||||
- type: input
|
||||
id: config-version
|
||||
attributes:
|
||||
label: Which version of the Upsy Desky firmware config are you running?
|
||||
placeholder: "1.1.1"
|
||||
- type: dropdown
|
||||
id: update-management
|
||||
attributes:
|
||||
label: How do you manage your Upsy Desky's updates?
|
||||
options:
|
||||
- OTA Updates
|
||||
- ESPHome YAML Config
|
||||
- type: input
|
||||
id: esphome-version
|
||||
attributes:
|
||||
label: If you're using an ESPHome YAML config, which version of ESPHome are you running?
|
||||
placeholder: "2023.5.4"
|
||||
- type: textarea
|
||||
id: esphome-config
|
||||
attributes:
|
||||
label: ESPHome Config
|
||||
description: If you have your own ESPHome YAML configuration, please paste it here. Remember to redact any sensitive information like encryption keys or passwords.
|
||||
render: YAML
|
||||
40
.github/workflows/nightly-build.yaml
vendored
Normal file
40
.github/workflows/nightly-build.yaml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Nightly Stock Firmware Build
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Firmware
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.9"
|
||||
|
||||
- name: Install ESPHome
|
||||
run: pip install --pre --user esphome
|
||||
|
||||
- name: Compile Release Firmware
|
||||
working-directory: firmware
|
||||
run: |
|
||||
esphome compile stock.yaml
|
||||
mkdir -p bin
|
||||
cp .esphome/build/upsy-desky/.pioenvs/upsy-desky/firmware-factory.bin bin/firmware-factory.bin
|
||||
cp .esphome/build/upsy-desky/.pioenvs/upsy-desky/firmware.bin bin/firmware.bin
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: firmware-bin
|
||||
path: firmware/bin
|
||||
|
||||
- name: Send Discord failure notification
|
||||
if: failure()
|
||||
uses: appleboy/discord-action@master
|
||||
with:
|
||||
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
||||
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||
color: "#FF6961"
|
||||
message: "The latest nightly build failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
@@ -1,4 +1,7 @@
|
||||
substitutions:
|
||||
bluetooth_proxy_active_connections: "true"
|
||||
|
||||
esp32_ble_tracker:
|
||||
|
||||
bluetooth_proxy:
|
||||
active: true
|
||||
active: ${bluetooth_proxy_active_connections}
|
||||
|
||||
@@ -2,22 +2,28 @@ output:
|
||||
- platform: gpio
|
||||
inverted: true
|
||||
id: button_bit1
|
||||
pin: ${button_bit1_pin}
|
||||
pin:
|
||||
number: ${button_bit1_pin}
|
||||
allow_other_uses: true
|
||||
|
||||
- platform: gpio
|
||||
inverted: true
|
||||
id: button_bit2
|
||||
pin: ${button_bit2_pin}
|
||||
pin:
|
||||
number: ${button_bit2_pin}
|
||||
allow_other_uses: true
|
||||
|
||||
- platform: gpio
|
||||
inverted: true
|
||||
id: button_bit4
|
||||
pin: ${button_bit4_pin}
|
||||
pin:
|
||||
number: ${button_bit4_pin}
|
||||
|
||||
- platform: gpio
|
||||
inverted: true
|
||||
id: button_m
|
||||
pin: ${button_m_pin}
|
||||
pin:
|
||||
number: ${button_m_pin}
|
||||
|
||||
button:
|
||||
# Recall Presets
|
||||
|
||||
@@ -3,7 +3,7 @@ esphome:
|
||||
name: "${name}"
|
||||
friendly_name: "${friendly_name}"
|
||||
name_add_mac_suffix: true
|
||||
min_version: "2023.5.1"
|
||||
min_version: "2023.12.0"
|
||||
on_boot:
|
||||
then:
|
||||
# Wakes up the desk and reports height
|
||||
@@ -12,7 +12,7 @@ esphome:
|
||||
data: [ 0x0 ]
|
||||
project:
|
||||
name: tj_horner.upsy_desky
|
||||
version: "1.1.0"
|
||||
version: "2.0.0"
|
||||
|
||||
uart:
|
||||
id: handset_tx
|
||||
@@ -50,7 +50,6 @@ packages:
|
||||
addon_presets: !include addons/presets.yaml
|
||||
addon_stable_ids: !include addons/stable-ids.yaml
|
||||
addon_runtime_config: !include addons/runtime-config.yaml
|
||||
addon_bluetooth_proxy: !include addons/bluetooth-proxy.yaml
|
||||
|
||||
button:
|
||||
- platform: restart
|
||||
|
||||
1
firmware/components/.gitignore
vendored
1
firmware/components/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
**/__pycache__
|
||||
@@ -1,19 +0,0 @@
|
||||
#include "project_version_text_sensor.h"
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/core/application.h"
|
||||
#include "esphome/core/version.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace project_version {
|
||||
|
||||
static const char *const TAG = "project_version.text_sensor";
|
||||
|
||||
void ProjectVersionTextSensor::setup() {
|
||||
this->publish_state(ESPHOME_PROJECT_VERSION);
|
||||
}
|
||||
float ProjectVersionTextSensor::get_setup_priority() const { return setup_priority::DATA; }
|
||||
std::string ProjectVersionTextSensor::unique_id() { return get_mac_address() + "-project-version"; }
|
||||
void ProjectVersionTextSensor::dump_config() { LOG_TEXT_SENSOR("", "Project Version Text Sensor", this); }
|
||||
|
||||
} // namespace version
|
||||
} // namespace esphome
|
||||
@@ -1,18 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/text_sensor/text_sensor.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace project_version {
|
||||
|
||||
class ProjectVersionTextSensor : public text_sensor::TextSensor, public Component {
|
||||
public:
|
||||
void setup() override;
|
||||
void dump_config() override;
|
||||
float get_setup_priority() const override;
|
||||
std::string unique_id() override;
|
||||
};
|
||||
|
||||
} // namespace version
|
||||
} // namespace esphome
|
||||
@@ -1,31 +0,0 @@
|
||||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome.components import text_sensor
|
||||
from esphome.const import (
|
||||
ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
ICON_NEW_BOX,
|
||||
)
|
||||
|
||||
project_version = cg.esphome_ns.namespace("project_version")
|
||||
ProjectVersionTextSensor = project_version.class_(
|
||||
"ProjectVersionTextSensor", text_sensor.TextSensor, cg.Component
|
||||
)
|
||||
|
||||
CONFIG_SCHEMA = (
|
||||
text_sensor.text_sensor_schema(
|
||||
icon=ICON_NEW_BOX,
|
||||
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
)
|
||||
.extend(
|
||||
{
|
||||
cv.GenerateID(): cv.declare_id(ProjectVersionTextSensor),
|
||||
}
|
||||
)
|
||||
.extend(cv.COMPONENT_SCHEMA)
|
||||
)
|
||||
|
||||
|
||||
async def to_code(config):
|
||||
var = await text_sensor.new_text_sensor(config)
|
||||
await cg.register_component(var, config)
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
packages:
|
||||
base: !include base.yaml
|
||||
addon_bluetooth_proxy: !include addons/bluetooth-proxy.yaml
|
||||
|
||||
substitutions:
|
||||
bluetooth_proxy_active_connections: "false"
|
||||
|
||||
external_components:
|
||||
- source: ./components
|
||||
- source: github://tjhorner/esphome-custom-components
|
||||
components: [ project_version ]
|
||||
|
||||
text_sensor:
|
||||
@@ -21,14 +25,18 @@ captive_portal:
|
||||
|
||||
improv_serial:
|
||||
|
||||
esp32_improv:
|
||||
authorizer: false
|
||||
|
||||
api:
|
||||
reboot_timeout: 0s
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
js_url: "https://upsy-desky.tjhorner.dev/esphome-webserver/www.js"
|
||||
|
||||
ota:
|
||||
password: ""
|
||||
|
||||
dashboard_import:
|
||||
package_import_url: github://tjhorner/upsy-desky/firmware/stock.yaml@v1.1.0
|
||||
package_import_url: github://tjhorner/upsy-desky/firmware/stock.yaml@v2.0.0
|
||||
|
||||
Reference in New Issue
Block a user