Compare commits

...

19 Commits

Author SHA1 Message Date
GitHub Actions
e8470f56e4 Bump version to 2024.12.16 [skip-versioning] 2024-12-24 11:02:55 +00:00
Edward Firmo
2429c9d616 Merge pull request #70 from edwardtfn/swipe-log-messages
Fix swipe log messages
2024-12-24 12:02:45 +01:00
Edward Firmo
7a5a537847 Fix swipe log messages 2024-12-24 11:57:03 +01:00
GitHub Actions
2aa036dc0e Bump version to 2024.12.15 [skip-versioning] 2024-12-24 10:42:07 +00:00
Edward Firmo
802acdc476 Merge pull request #69 from edwardtfn/esphome-version
Add ESPHome Version sensor
2024-12-24 11:41:57 +01:00
Edward Firmo
37b2e93896 Sensor is diagnostic 2024-12-24 11:17:35 +01:00
Edward Firmo
695cca07a0 Add ESPHome Version sensor
And renames the TX Firmware, which resolves #66
2024-12-24 10:32:31 +01:00
GitHub Actions
f258b8f783 Bump version to 2024.12.14 [skip-versioning] 2024-12-24 09:06:47 +00:00
Edward Firmo
7e055e7737 Merge pull request #68 from edwardtfn/new-led-mapping-us-3gang
New LED mapping for US 3&4-Gang
2024-12-24 10:06:36 +01:00
Edward Firmo
9fec812b66 New LED mapping for 4-Gang US model 2024-12-24 09:59:54 +01:00
Edward Firmo
269ba89bd3 New LED mapping for US 3-Gang
Partially solves #67
2024-12-24 09:49:14 +01:00
GitHub Actions
ae87f025a3 Bump version to 2024.12.13 [skip-versioning] 2024-12-23 23:28:41 +00:00
Edward Firmo
303a3f1267 Merge pull request #64 from edwardtfn/speaker-with-ble-proxy
Add speaker to BLE Proxy add-on
2024-12-24 00:28:31 +01:00
Edward Firmo
a716e8e9cf Change media player fmt to msb 2024-12-24 00:22:52 +01:00
Edward Firmo
d77d761497 Add speaker to BLE Proxy add-on 2024-12-24 00:00:26 +01:00
GitHub Actions
ec528ec128 Bump version to 2024.12.12 [skip-versioning] 2024-12-23 17:52:46 +00:00
Edward Firmo
4ed98e533f Merge pull request #62 from edwardtfn/test-only-on-pull
Run test only on pull request or push to main
2024-12-23 18:52:35 +01:00
Edward Firmo
1ef73d5cd0 Remove paths-ignore 2024-12-23 18:49:50 +01:00
Edward Firmo
420225b6ba Run test only on pull request or push to main 2024-12-23 18:47:41 +01:00
9 changed files with 133 additions and 41 deletions

View File

@@ -1,8 +1,7 @@
--- ---
name: Validate ESPHome name: Validate ESPHome (Latest)
# yamllint disable-line rule:truthy on: # yamllint disable-line rule:truthy
on:
workflow_dispatch: workflow_dispatch:
concurrency: concurrency:
@@ -37,6 +36,7 @@ jobs:
uses: esphome/build-action@main uses: esphome/build-action@main
with: with:
yaml-file: ".test/esphome_ard_basic.yaml" yaml-file: ".test/esphome_ard_basic.yaml"
version: latest
build_bluetooth_proxy_4: build_bluetooth_proxy_4:
name: Bluetooth Proxy (IDF) name: Bluetooth Proxy (IDF)
@@ -47,6 +47,7 @@ jobs:
uses: esphome/build-action@main uses: esphome/build-action@main
with: with:
yaml-file: ".test/esphome_idf_bluetooth_proxy.yaml" yaml-file: ".test/esphome_idf_bluetooth_proxy.yaml"
version: latest
build_bluetooth_proxy_53: build_bluetooth_proxy_53:
name: Bluetooth Proxy (IDF v5.3) name: Bluetooth Proxy (IDF v5.3)
@@ -57,4 +58,5 @@ jobs:
uses: esphome/build-action@main uses: esphome/build-action@main
with: with:
yaml-file: ".test/esphome_idf53_bluetooth_proxy.yaml" yaml-file: ".test/esphome_idf53_bluetooth_proxy.yaml"
version: latest
... ...

View File

@@ -11,6 +11,8 @@ on: # yamllint disable-line rule:truthy
- "*.c" - "*.c"
- "*.cpp" - "*.cpp"
- "*.py" - "*.py"
branches:
- main
pull_request: pull_request:
paths: paths:
- "*.yaml" - "*.yaml"

View File

@@ -11,6 +11,27 @@
##### - For normal system use, modifications to this file are NOT required. ##### ##### - For normal system use, modifications to this file are NOT required. #####
#################################################################################################### ####################################################################################################
--- ---
substitutions:
# RTTTL format: name:d=duration,o=octave,b=tempo:notes
# d=32 (32nd note), o=5 (octave 5), b=100 (tempo 100)
tone_volume_change: "scale_up:d=32,o=5,b=100:c,c#,d#,e,f#,g#,a#,b" # Use "none" to disable sound
api:
actions:
- action: rtttl_play
variables:
# The RTTTL string for the melody to be played.
# It should follow the RTTTL format, including the melody's name,
# default settings, and a sequence of notes.
tone: string
then:
- lambda: |-
rtttl_speaker->stop();
if (rtttl_speaker_gain->state > 0) {
ESP_LOGI("api", "Play tone: '%s'", tone.c_str());
rtttl_speaker->play(tone.c_str());
}
bluetooth_proxy: bluetooth_proxy:
esp32: esp32:
@@ -33,17 +54,54 @@ esphome:
build_flags: build_flags:
- -D TX_ULTIMATE_EASY_ADDON_BLE_PROXY - -D TX_ULTIMATE_EASY_ADDON_BLE_PROXY
i2s_audio: !remove
light: light:
- id: !extend light_full - id: !extend light_full
platform: esp32_rmt_led_strip platform: esp32_rmt_led_strip
rgb_order: GRB rgb_order: GRB
rmt_channel: 0 rmt_channel: 1
chipset: ws2812 chipset: ws2812
type: !remove type: !remove
variant: !remove variant: !remove
max_refresh_rate: 33ms max_refresh_rate: 33ms
use_psram: true
media_player: !remove media_player: !remove
number:
- id: rtttl_speaker_gain
name: Sound - Volume
platform: template
max_value: 100
min_value: 0
step: 1
initial_value: 100
unit_of_measurement: "%"
internal: false
disabled_by_default: true
entity_category: config
device_class: sound_pressure
restore_value: true
optimistic: true
set_action:
then:
- lambda: |-
rtttl_speaker->set_gain((100-(x/10.0f))/100.0f);
std::string tone_volume_change = "${tone_volume_change}";
// Play sound if tone_volume_change is not "none"
if (x > 0 and !tone_volume_change.empty() and tone_volume_change != "none")
rtttl_speaker->play(tone_volume_change);
rtttl_speaker->dump_config();
rtttl:
- id: rtttl_speaker
speaker: mp_speaker
speaker:
- id: mp_speaker
platform: i2s_audio
dac_type: external
i2s_dout_pin: GPIO15
i2s_audio_id: if_i2s_audio
i2s_comm_fmt: stand_msb
channel: mono
... ...

View File

@@ -75,6 +75,17 @@ esphome:
then: then:
- script.execute: boot_done - script.execute: boot_done
globals:
- id: is_us_model
type: bool
restore_value: true
initial_value: 'false'
- id: gang_count
type: uint8_t
restore_value: true
initial_value: '0'
improv_serial: improv_serial:
id: serial_improv id: serial_improv
@@ -85,6 +96,8 @@ ota:
platform: esphome platform: esphome
psram: psram:
mode: octal
speed: 40MHz
script: script:
- id: api_send_ha_event_boot - id: api_send_ha_event_boot
@@ -144,6 +157,11 @@ select:
entity_category: config entity_category: config
disabled_by_default: false disabled_by_default: false
icon: mdi:tablet-cellphone icon: mdi:tablet-cellphone
on_value:
then:
- lambda: |-
id(is_us_model) = (x == "${TX_MODEL_FORMAT_US_TEXT}");
ESP_LOGI("core", "New model selected: %s", id(is_us_model) ? "US" : "EU");
- id: sl_tx_model_gang - id: sl_tx_model_gang
name: Model (Gang) name: Model (Gang)
@@ -162,11 +180,20 @@ select:
icon: mdi:dip-switch icon: mdi:dip-switch
on_value: on_value:
then: then:
- lambda: tx_ultimate->set_gang_count(static_cast<uint8_t>(i)+1); - lambda: |-
id(gang_count) = static_cast<uint8_t>(i) + 1;
ESP_LOGI("core", "New model selected: %" PRIu8 "-%s", id(gang_count), id(gang_count) > 1 ? "Gangs" : "Gang");
tx_ultimate->set_gang_count(id(gang_count));
text_sensor: text_sensor:
- id: esphome_fw_version
name: ESPHome Version
platform: version
entity_category: diagnostic
internal: false
- id: tx_fw_version - id: tx_fw_version
name: Firmware version name: TX Ultimate Easy Firmware Version
platform: template platform: template
entity_category: diagnostic entity_category: diagnostic
icon: mdi:tag-text-outline icon: mdi:tag-text-outline

View File

@@ -644,8 +644,8 @@ light:
<<: *light_partition_relays <<: *light_partition_relays
segments: segments:
- id: light_full - id: light_full
from: 17 from: 16
to: 18 to: 17
- id: light_us_rl_3_3_right - id: light_us_rl_3_3_right
name: Light - Relay 3 of 3 (right) name: Light - Relay 3 of 3 (right)
<<: *light_partition_relays <<: *light_partition_relays
@@ -658,8 +658,8 @@ light:
<<: *light_partition_relays <<: *light_partition_relays
segments: segments:
- id: light_full - id: light_full
from: 12 from: 23
to: 12 to: 24
- id: light_us_rl_1_4_right - id: light_us_rl_1_4_right
name: Light - Relay 1 of 4 (right) name: Light - Relay 1 of 4 (right)
<<: *light_partition_relays <<: *light_partition_relays
@@ -667,48 +667,51 @@ light:
- id: light_full - id: light_full
from: 31 from: 31
to: 31 to: 31
- id: light_full
from: 0
to: 0
- id: light_us_rl_2_4_left - id: light_us_rl_2_4_left
name: Light - Relay 2 of 4 (left) name: Light - Relay 2 of 4 (left)
<<: *light_partition_relays <<: *light_partition_relays
segments: segments:
- id: light_full - id: light_full
from: 24 from: 21
to: 24 to: 22
- id: light_us_rl_2_4_right - id: light_us_rl_2_4_right
name: Light - Relay 2 of 4 (right) name: Light - Relay 2 of 4 (right)
<<: *light_partition_relays <<: *light_partition_relays
segments: segments:
- id: light_full - id: light_full
from: 2 from: 1
to: 2 to: 2
- id: light_us_rl_3_4_left - id: light_us_rl_3_4_left
name: Light - Relay 3 of 4 (left) name: Light - Relay 3 of 4 (left)
<<: *light_partition_relays <<: *light_partition_relays
segments: segments:
- id: light_full - id: light_full
from: 21 from: 17
to: 21 to: 18
- id: light_us_rl_3_4_right - id: light_us_rl_3_4_right
name: Light - Relay 3 of 4 (right) name: Light - Relay 3 of 4 (right)
<<: *light_partition_relays <<: *light_partition_relays
segments: segments:
- id: light_full - id: light_full
from: 4 from: 5
to: 4 to: 6
- id: light_us_rl_4_4_left - id: light_us_rl_4_4_left
name: Light - Relay 4 of 4 (left) name: Light - Relay 4 of 4 (left)
<<: *light_partition_relays <<: *light_partition_relays
segments: segments:
- id: light_full - id: light_full
from: 19 from: 15
to: 19 to: 16
- id: light_us_rl_4_4_right - id: light_us_rl_4_4_right
name: Light - Relay 4 of 4 (right) name: Light - Relay 4 of 4 (right)
<<: *light_partition_relays <<: *light_partition_relays
segments: segments:
- id: light_full - id: light_full
from: 7 from: 7
to: 7 to: 8
script: script:
- id: !extend boot_initialize - id: !extend boot_initialize

View File

@@ -19,11 +19,11 @@ i2s_audio:
media_player: media_player:
- id: mp_speaker - id: mp_speaker
name: Speaker name: Speaker
internal: false
platform: i2s_audio platform: i2s_audio
i2s_dout_pin: GPIO15 i2s_dout_pin: GPIO15
i2s_audio_id: if_i2s_audio i2s_audio_id: if_i2s_audio
i2s_comm_fmt: lsb i2s_comm_fmt: msb # Experimental - It was 'lsb' until v2024.12.12
dac_type: external dac_type: external
mode: mono mode: mono
internal: false
... ...

View File

@@ -358,9 +358,9 @@ tx_ultimate_easy:
- lambda: |- - lambda: |-
const uint8_t touch_position = static_cast<uint8_t>(touch.x); const uint8_t touch_position = static_cast<uint8_t>(touch.x);
if (touch_position > ${TOUCH_POSITION_MAX_VALUE}) { // Check for valid range if (touch_position > ${TOUCH_POSITION_MAX_VALUE}) { // Check for valid range
ESP_LOGE("tx_ultimate_easy", "Invalid long-touch position: %" PRIu8, touch_position); ESP_LOGE("core_hw_touch", "Invalid long-touch position: %" PRIu8, touch_position);
} else { } else {
ESP_LOGI("tx_ultimate_easy", "Long-touch released at position %" PRIu8, touch_position); ESP_LOGI("core_hw_touch", "Long-touch released at position %" PRIu8, touch_position);
} }
on_multi_touch_release: on_multi_touch_release:
@@ -373,21 +373,21 @@ tx_ultimate_easy:
type: multi_touch type: multi_touch
action: release action: release
position: !lambda return touch.x; position: !lambda return touch.x;
- lambda: ESP_LOGI("tx_ultimate_easy", "Multi-touch released"); - lambda: ESP_LOGI("core_hw_touch", "Multi-touch released");
- script.execute: touch_on_multi_touch_release - script.execute: touch_on_multi_touch_release
on_press: on_press:
- lambda: |- - lambda: |-
const uint8_t position = static_cast<uint8_t>(touch.x); const uint8_t position = static_cast<uint8_t>(touch.x);
if (position > ${TOUCH_POSITION_MAX_VALUE}) { // Check for valid range if (position > ${TOUCH_POSITION_MAX_VALUE}) { // Check for valid range
ESP_LOGE("tx_ultimate_easy", "Invalid touch position: %" PRIu8, position); ESP_LOGE("core_hw_touch", "Invalid touch position: %" PRIu8, position);
} else { } else {
ESP_LOGI("tx_ultimate_easy", "Pressed at position %" PRIu8, position); ESP_LOGI("core_hw_touch", "Pressed at position %" PRIu8, position);
touch_on_press->execute(static_cast<uint8_t>(touch.button), position); touch_on_press->execute(static_cast<uint8_t>(touch.button), position);
} }
on_release: on_release:
- lambda: ESP_LOGI("tx_ultimate_easy", "Released"); - lambda: ESP_LOGI("core_hw_touch", "Released");
- script.execute: touch_on_release - script.execute: touch_on_release
on_swipe_left: on_swipe_left:
@@ -399,12 +399,12 @@ tx_ultimate_easy:
domain: touch domain: touch
type: swipe type: swipe
action: !lambda |- action: !lambda |-
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_US_TEXT}" ? "left" : "down"; return sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}" ? "left" : "down";
swipe-direction: !lambda |- swipe-direction: !lambda |-
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_US_TEXT}" ? "left" : "down"; return sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}" ? "left" : "down";
position: !lambda return touch.x; position: !lambda return touch.x;
- lambda: |- - lambda: |-
ESP_LOGI("tx_ultimate_easy", "Swipe %s", sl_tx_model_format->state == "${TX_MODEL_FORMAT_US_TEXT}" ESP_LOGI("core_hw_touch", "Swipe %s", sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}"
? "left" ? "left"
: "down"); : "down");
- script.execute: touch_swipe_left - script.execute: touch_swipe_left
@@ -418,21 +418,21 @@ tx_ultimate_easy:
domain: touch domain: touch
type: swipe type: swipe
action: !lambda |- action: !lambda |-
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_US_TEXT}" ? "right" : "up"; return sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}" ? "right" : "up";
swipe-direction: !lambda |- swipe-direction: !lambda |-
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_US_TEXT}" ? "right" : "up"; return sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}" ? "right" : "up";
position: !lambda return touch.x; position: !lambda return touch.x;
- lambda: |- - lambda: |-
ESP_LOGI("tx_ultimate_easy", "Swipe %s", sl_tx_model_format->state == "${TX_MODEL_FORMAT_US_TEXT}" ESP_LOGI("core_hw_touch", "Swipe %s", sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}"
? "right" ? "right"
: "up"); : "up");
- script.execute: touch_swipe_right - script.execute: touch_swipe_right
on_touch_event: on_touch_event:
- lambda: |- - lambda: |-
ESP_LOGD("tx_ultimate_easy", "Touch event:"); ESP_LOGD("core_hw_touch", "Touch event:");
ESP_LOGD("tx_ultimate_easy", " State: %i (%s)", touch.state, touch.state_str.c_str()); ESP_LOGD("core_hw_touch", " State: %i (%s)", touch.state, touch.state_str.c_str());
ESP_LOGD("tx_ultimate_easy", " Position: %i", touch.x); ESP_LOGD("core_hw_touch", " Position: %i", touch.x);
uart: uart:
- id: uart_touch - id: uart_touch

View File

@@ -1 +1 @@
2024.12.11 2024.12.16

View File

@@ -1 +1 @@
version: 2024.12.11 version: 2024.12.16