From e88c0856fb15641cc00f20b5510a59797daa99cb Mon Sep 17 00:00:00 2001 From: Martijn Date: Sun, 27 Oct 2024 19:00:26 +0100 Subject: [PATCH 01/10] Create 1bar_1display.yaml --- package/1bar_1display.yaml | 224 +++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 package/1bar_1display.yaml diff --git a/package/1bar_1display.yaml b/package/1bar_1display.yaml new file mode 100644 index 0000000..bac3db8 --- /dev/null +++ b/package/1bar_1display.yaml @@ -0,0 +1,224 @@ +i2c: + - id: temperature_sensor + sda: GPIO1 + scl: GPIO2 + scan: true + - id: buttons + sda: GPIO47 + scl: GPIO48 + scan: true + frequency: 400khz + +spi: + clk_pin: GPIO36 + mosi_pin: GPIO35 + # miso_pin: GPIOXX + +mcp23008: + # - id: 'base_J0' + # address: 0x20 + # - id: 'base_J1' + # address: 0x21 + - id: 'base_J2' + i2c_id: buttons + address: 0x22 + - id: 'base_J3' + i2c_id: buttons + address: 0x23 + +# Define a PWM output on the ESP32 +output: + - platform: ledc + pin: GPIO46 + id: displays_mini_backlight_pwm + inverted: True + - platform: ledc + pin: GPIO3 + id: display_main_backlight_pwm + inverted: True + +binary_sensor: + - platform: gpio + id: 'base_j2_btn_left' + name: "Display button Left" + pin: + mcp23xxx: base_J2 + number: 6 + mode: INPUT_PULLUP + inverted: true + + - platform: gpio + id: 'base_j2_btn_right' + name: "Display button Right" + pin: + mcp23xxx: base_J2 + number: 2 + mode: INPUT_PULLUP + inverted: true + + - platform: gpio + id: 'base_j3_btn_left' + name: "BAR button Left" + pin: + mcp23xxx: base_J3 + number: 6 + mode: INPUT_PULLUP + inverted: true + + - platform: gpio + id: 'base_j3_btn_right' + name: "BAR button Right" + pin: + mcp23xxx: base_J3 + number: 2 + mode: INPUT_PULLUP + inverted: true + +sensor: + - platform: sts3x + id: inside_temperature + i2c_id: temperature_sensor + name: "Temperature" + address: 0x4A + update_interval: 10s + +light: + - platform: monochromatic + output: displays_mini_backlight_pwm + name: "Mini Display Backlight" + id: displays_mini_backlight + restore_mode: ALWAYS_ON + - platform: monochromatic + output: display_main_backlight_pwm + name: "Main Display Backlight" + id: display_main_backlight + restore_mode: ALWAYS_ON + - platform: neopixelbus + id: neopixels + type: RGB + variant: WS2812 + pin: GPIO4 + num_leds: 8 + - platform: partition + name: "BAR J3 Left RGB Front" + id: bar_j3_left_rgb_front + segments: + - id: neopixels + from: 0 + to: 0 + - platform: partition + name: "BAR J3 Left RGB Back" + id: bar_j3_left_rgb_back + segments: + - id: neopixels + from: 1 + to: 1 + - platform: partition + name: "BAR J3 Right RGB Front" + id: bar_j3_right_rgb_front + segments: + - id: neopixels + from: 2 + to: 2 + - platform: partition + name: "BAR J3 Right RGB Back" + id: bar_j3_right_rgb_back + segments: + - id: neopixels + from: 3 + to: 3 + +time: + - platform: homeassistant + id: esptime + +font: + - file: "https://github.com/web-fonts/ttf/raw/refs/heads/master/bpg-ingiri-arial-webfont.ttf" + id: my_font20 + size: 20 + - file: "https://github.com/web-fonts/ttf/raw/refs/heads/master/bpg-ingiri-arial-webfont.ttf" + id: my_font15 + size: 15 + - file: "https://github.com/web-fonts/ttf/raw/refs/heads/master/bpg-ingiri-arial-webfont.ttf" + id: my_font40 + size: 40 + +image: + - file: mdi:lightbulb + id: lightbulb + resize: 80x80 + - file: mdi:alert + id: alert + resize: 80x80 + - file: "https://i.postimg.cc/CMXFmZ5n/henk.png" + id: henk + resize: 120x100 + type: RGBA + use_transparency: true + +color: + - id: red + hex: 0000FF + - id: blue + hex: FF0000 + +display: + - id: display_j2_main + platform: ili9xxx + model: ili9341 + invert_colors: false + dc_pin: + number: GPIO37 + allow_other_uses: true + cs_pin: + mcp23xxx: base_J2 + number: 5 + mode: + output: true + inverted: false + update_interval: 100ms + show_test_card: false + dimensions: + height: 240 + width: 320 + rotation: 180 + - id: display_j3_Left + platform: ili9xxx + model: ST7735 + dc_pin: + number: GPIO37 + allow_other_uses: true + cs_pin: + mcp23xxx: base_J3 + number: 5 + mode: + output: true + inverted: false + invert_colors: false + show_test_card: false + dimensions: + height: 160 + width: 80 + offset_width: 24 + rotation: 270 + update_interval: 1s + - id: display_j3_Right + platform: ili9xxx + model: ST7735 + dc_pin: + number: GPIO37 + allow_other_uses: true + cs_pin: + mcp23xxx: base_J3 + number: 1 + mode: + output: true + inverted: false + invert_colors: false + show_test_card: false + dimensions: + height: 160 + width: 80 + offset_width: 24 + rotation: 90 + update_interval: 1s \ No newline at end of file From cd1defd8540f61747e262be152dd64ba13646d4d Mon Sep 17 00:00:00 2001 From: Martijn Date: Sun, 27 Oct 2024 19:27:24 +0100 Subject: [PATCH 02/10] Update 1bar_1display.yaml --- package/1bar_1display.yaml | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/package/1bar_1display.yaml b/package/1bar_1display.yaml index bac3db8..793855c 100644 --- a/package/1bar_1display.yaml +++ b/package/1bar_1display.yaml @@ -132,36 +132,6 @@ time: - platform: homeassistant id: esptime -font: - - file: "https://github.com/web-fonts/ttf/raw/refs/heads/master/bpg-ingiri-arial-webfont.ttf" - id: my_font20 - size: 20 - - file: "https://github.com/web-fonts/ttf/raw/refs/heads/master/bpg-ingiri-arial-webfont.ttf" - id: my_font15 - size: 15 - - file: "https://github.com/web-fonts/ttf/raw/refs/heads/master/bpg-ingiri-arial-webfont.ttf" - id: my_font40 - size: 40 - -image: - - file: mdi:lightbulb - id: lightbulb - resize: 80x80 - - file: mdi:alert - id: alert - resize: 80x80 - - file: "https://i.postimg.cc/CMXFmZ5n/henk.png" - id: henk - resize: 120x100 - type: RGBA - use_transparency: true - -color: - - id: red - hex: 0000FF - - id: blue - hex: FF0000 - display: - id: display_j2_main platform: ili9xxx @@ -176,7 +146,7 @@ display: mode: output: true inverted: false - update_interval: 100ms + update_interval: 200ms show_test_card: false dimensions: height: 240 From 0cb5d736733861fc7a05d851461473bcfe7fcb56 Mon Sep 17 00:00:00 2001 From: Martijn Date: Sun, 27 Oct 2024 19:56:33 +0100 Subject: [PATCH 03/10] added base.yaml --- package/1bar_1display.yaml | 54 +---------- package/2bar_1display.yaml | 194 +++++++++++++++++++++++++++++++++++++ package/base.yaml | 51 ++++++++++ 3 files changed, 249 insertions(+), 50 deletions(-) create mode 100644 package/2bar_1display.yaml create mode 100644 package/base.yaml diff --git a/package/1bar_1display.yaml b/package/1bar_1display.yaml index 793855c..5cd63c5 100644 --- a/package/1bar_1display.yaml +++ b/package/1bar_1display.yaml @@ -1,18 +1,5 @@ -i2c: - - id: temperature_sensor - sda: GPIO1 - scl: GPIO2 - scan: true - - id: buttons - sda: GPIO47 - scl: GPIO48 - scan: true - frequency: 400khz - -spi: - clk_pin: GPIO36 - mosi_pin: GPIO35 - # miso_pin: GPIOXX +packages: + base: !include base.yaml mcp23008: # - id: 'base_J0' @@ -26,17 +13,6 @@ mcp23008: i2c_id: buttons address: 0x23 -# Define a PWM output on the ESP32 -output: - - platform: ledc - pin: GPIO46 - id: displays_mini_backlight_pwm - inverted: True - - platform: ledc - pin: GPIO3 - id: display_main_backlight_pwm - inverted: True - binary_sensor: - platform: gpio id: 'base_j2_btn_left' @@ -74,31 +50,9 @@ binary_sensor: mode: INPUT_PULLUP inverted: true -sensor: - - platform: sts3x - id: inside_temperature - i2c_id: temperature_sensor - name: "Temperature" - address: 0x4A - update_interval: 10s - light: - - platform: monochromatic - output: displays_mini_backlight_pwm - name: "Mini Display Backlight" - id: displays_mini_backlight - restore_mode: ALWAYS_ON - - platform: monochromatic - output: display_main_backlight_pwm - name: "Main Display Backlight" - id: display_main_backlight - restore_mode: ALWAYS_ON - - platform: neopixelbus - id: neopixels - type: RGB - variant: WS2812 - pin: GPIO4 - num_leds: 8 + - id: !extend neopixels + num_leds: 5 - platform: partition name: "BAR J3 Left RGB Front" id: bar_j3_left_rgb_front diff --git a/package/2bar_1display.yaml b/package/2bar_1display.yaml new file mode 100644 index 0000000..8e3bd15 --- /dev/null +++ b/package/2bar_1display.yaml @@ -0,0 +1,194 @@ +packages: + base: !include base.yaml + +mcp23008: + # - id: 'base_J0' + # address: 0x20 + - id: 'base_J1' + address: 0x21 + - id: 'base_J2' + i2c_id: buttons + address: 0x22 + - id: 'base_J3' + i2c_id: buttons + address: 0x23 + +binary_sensor: + - platform: gpio + id: 'base_j1_btn_left' + name: "Display button Left" + pin: + mcp23xxx: base_J1 + number: 6 + mode: INPUT_PULLUP + inverted: true + + - platform: gpio + id: 'base_j1_btn_right' + name: "Display button Right" + pin: + mcp23xxx: base_J1 + number: 2 + mode: INPUT_PULLUP + inverted: true + + - platform: gpio + id: 'base_j2_btn_left' + name: "BAR 1 button Left" + pin: + mcp23xxx: base_J2 + number: 6 + mode: INPUT_PULLUP + inverted: true + + - platform: gpio + id: 'base_j2_btn_right' + name: "BAR 1 button Right" + pin: + mcp23xxx: base_J2 + number: 2 + mode: INPUT_PULLUP + inverted: true + + - platform: gpio + id: 'base_j3_btn_left' + name: "BAR 2 button Left" + pin: + mcp23xxx: base_J3 + number: 6 + mode: INPUT_PULLUP + inverted: true + + - platform: gpio + id: 'base_j3_btn_right' + name: "BAR 2 button Right" + pin: + mcp23xxx: base_J3 + number: 2 + mode: INPUT_PULLUP + inverted: true + +light: + - id: !extend neopixels + num_leds: 9 + - platform: partition + name: "BAR 1 Left RGB Front" + id: bar_1_left_rgb_front + segments: + - id: neopixels + from: 0 + to: 0 + - platform: partition + name: "BAR 1 Left RGB Back" + id: bar_1_left_rgb_back + segments: + - id: neopixels + from: 1 + to: 1 + - platform: partition + name: "BAR 1 Right RGB Front" + id: bar_1_right_rgb_front + segments: + - id: neopixels + from: 2 + to: 2 + - platform: partition + name: "BAR 1 Right RGB Back" + id: bar_1_right_rgb_back + segments: + - id: neopixels + from: 3 + to: 3 + - platform: partition + name: "BAR 2 Left RGB Front" + id: bar_2_left_rgb_front + segments: + - id: neopixels + from: 4 + to: 4 + - platform: partition + name: "BAR 2 Left RGB Back" + id: bar_2_left_rgb_back + segments: + - id: neopixels + from: 5 + to: 5 + - platform: partition + name: "BAR 2 Right RGB Front" + id: bar_2_right_rgb_front + segments: + - id: neopixels + from: 6 + to: 6 + - platform: partition + name: "BAR 2 Right RGB Back" + id: bar_2_right_rgb_back + segments: + - id: neopixels + from: 7 + to: 7 + +time: + - platform: homeassistant + id: esptime + +display: + - id: display_j2_main + platform: ili9xxx + model: ili9341 + invert_colors: false + dc_pin: + number: GPIO37 + allow_other_uses: true + cs_pin: + mcp23xxx: base_J2 + number: 5 + mode: + output: true + inverted: false + update_interval: 200ms + show_test_card: false + dimensions: + height: 240 + width: 320 + rotation: 180 + - id: display_j3_Left + platform: ili9xxx + model: ST7735 + dc_pin: + number: GPIO37 + allow_other_uses: true + cs_pin: + mcp23xxx: base_J3 + number: 5 + mode: + output: true + inverted: false + invert_colors: false + show_test_card: false + dimensions: + height: 160 + width: 80 + offset_width: 24 + rotation: 270 + update_interval: 1s + - id: display_j3_Right + platform: ili9xxx + model: ST7735 + dc_pin: + number: GPIO37 + allow_other_uses: true + cs_pin: + mcp23xxx: base_J3 + number: 1 + mode: + output: true + inverted: false + invert_colors: false + show_test_card: false + dimensions: + height: 160 + width: 80 + offset_width: 24 + rotation: 90 + update_interval: 1s \ No newline at end of file diff --git a/package/base.yaml b/package/base.yaml new file mode 100644 index 0000000..5969c4d --- /dev/null +++ b/package/base.yaml @@ -0,0 +1,51 @@ +i2c: + - id: temperature_sensor + sda: GPIO1 + scl: GPIO2 + scan: true + - id: buttons + sda: GPIO47 + scl: GPIO48 + scan: true + frequency: 400khz + +spi: + clk_pin: GPIO36 + mosi_pin: GPIO35 + # miso_pin: GPIOXX + +output: + - platform: ledc + pin: GPIO46 + id: displays_mini_backlight_pwm + inverted: True + - platform: ledc + pin: GPIO3 + id: display_main_backlight_pwm + inverted: True + +sensor: + - platform: sts3x + id: inside_temperature + i2c_id: temperature_sensor + name: "Temperature" + address: 0x4A + update_interval: 10s + +light: + - platform: neopixelbus + id: neopixels + type: RGB + variant: WS2812 + pin: GPIO4 + num_leds: 20 + - platform: monochromatic + output: displays_mini_backlight_pwm + name: "Mini Display Backlight" + id: displays_mini_backlight + restore_mode: ALWAYS_ON + - platform: monochromatic + output: display_main_backlight_pwm + name: "Main Display Backlight" + id: display_main_backlight + restore_mode: ALWAYS_ON \ No newline at end of file From 03f8912c8599aede2db704dab13e0b226474054f Mon Sep 17 00:00:00 2001 From: Martijn Date: Sun, 27 Oct 2024 20:48:49 +0100 Subject: [PATCH 04/10] added comment and 3b1d setup --- package/1bar_1display.yaml | 35 ++-- package/2bar_1display.yaml | 88 +++++++-- package/3bar_1display.yaml | 354 +++++++++++++++++++++++++++++++++++++ package/base.yaml | 18 +- 4 files changed, 469 insertions(+), 26 deletions(-) create mode 100644 package/3bar_1display.yaml diff --git a/package/1bar_1display.yaml b/package/1bar_1display.yaml index 5cd63c5..07e56ff 100644 --- a/package/1bar_1display.yaml +++ b/package/1bar_1display.yaml @@ -1,11 +1,15 @@ +########################################### +## ## +## filename: 1bar_1display.yaml ## +## description: Specific configuration ## +## for the 1 BAR 1 Display setup ## +## ## +########################################### + packages: base: !include base.yaml mcp23008: - # - id: 'base_J0' - # address: 0x20 - # - id: 'base_J1' - # address: 0x21 - id: 'base_J2' i2c_id: buttons address: 0x22 @@ -14,6 +18,9 @@ mcp23008: address: 0x23 binary_sensor: + ############################ + ### Buttons Main Display ### + ############################ - platform: gpio id: 'base_j2_btn_left' name: "Display button Left" @@ -22,7 +29,6 @@ binary_sensor: number: 6 mode: INPUT_PULLUP inverted: true - - platform: gpio id: 'base_j2_btn_right' name: "Display button Right" @@ -32,6 +38,9 @@ binary_sensor: mode: INPUT_PULLUP inverted: true + ############################ + ### Buttons BAR module 1 ### + ############################ - platform: gpio id: 'base_j3_btn_left' name: "BAR button Left" @@ -40,7 +49,6 @@ binary_sensor: number: 6 mode: INPUT_PULLUP inverted: true - - platform: gpio id: 'base_j3_btn_right' name: "BAR button Right" @@ -53,6 +61,9 @@ binary_sensor: light: - id: !extend neopixels num_leds: 5 + ############################ + ### RGB LED's BAR module ### + ############################ - platform: partition name: "BAR J3 Left RGB Front" id: bar_j3_left_rgb_front @@ -82,11 +93,10 @@ light: from: 3 to: 3 -time: - - platform: homeassistant - id: esptime - display: + #################### + ### Main Display ### + #################### - id: display_j2_main platform: ili9xxx model: ili9341 @@ -106,6 +116,9 @@ display: height: 240 width: 320 rotation: 180 + ################## + ### BAR module ### + ################## - id: display_j3_Left platform: ili9xxx model: ST7735 @@ -145,4 +158,4 @@ display: width: 80 offset_width: 24 rotation: 90 - update_interval: 1s \ No newline at end of file + update_interval: 1s diff --git a/package/2bar_1display.yaml b/package/2bar_1display.yaml index 8e3bd15..2de438e 100644 --- a/package/2bar_1display.yaml +++ b/package/2bar_1display.yaml @@ -1,9 +1,16 @@ +########################################### +## ## +## filename: base.yaml ## +## description: contains configuration ## +## that will be the same for all the ## +## possible setups ## +## ## +########################################### + packages: base: !include base.yaml mcp23008: - # - id: 'base_J0' - # address: 0x20 - id: 'base_J1' address: 0x21 - id: 'base_J2' @@ -14,6 +21,9 @@ mcp23008: address: 0x23 binary_sensor: + ############################ + ### Buttons Main Display ### + ############################ - platform: gpio id: 'base_j1_btn_left' name: "Display button Left" @@ -22,7 +32,6 @@ binary_sensor: number: 6 mode: INPUT_PULLUP inverted: true - - platform: gpio id: 'base_j1_btn_right' name: "Display button Right" @@ -32,6 +41,9 @@ binary_sensor: mode: INPUT_PULLUP inverted: true + ############################ + ### Buttons BAR module 1 ### + ############################ - platform: gpio id: 'base_j2_btn_left' name: "BAR 1 button Left" @@ -40,7 +52,6 @@ binary_sensor: number: 6 mode: INPUT_PULLUP inverted: true - - platform: gpio id: 'base_j2_btn_right' name: "BAR 1 button Right" @@ -50,6 +61,9 @@ binary_sensor: mode: INPUT_PULLUP inverted: true + ############################ + ### Buttons BAR module 2 ### + ############################ - platform: gpio id: 'base_j3_btn_left' name: "BAR 2 button Left" @@ -58,7 +72,6 @@ binary_sensor: number: 6 mode: INPUT_PULLUP inverted: true - - platform: gpio id: 'base_j3_btn_right' name: "BAR 2 button Right" @@ -69,6 +82,9 @@ binary_sensor: inverted: true light: + ############################## + ### RGB LED's BAR module 1 ### + ############################## - id: !extend neopixels num_leds: 9 - platform: partition @@ -99,6 +115,9 @@ light: - id: neopixels from: 3 to: 3 + ############################## + ### RGB LED's BAR module 2 ### + ############################## - platform: partition name: "BAR 2 Left RGB Front" id: bar_2_left_rgb_front @@ -128,12 +147,11 @@ light: from: 7 to: 7 -time: - - platform: homeassistant - id: esptime - display: - - id: display_j2_main + #################### + ### Main Display ### + #################### + - id: display_j1_main platform: ili9xxx model: ili9341 invert_colors: false @@ -141,7 +159,7 @@ display: number: GPIO37 allow_other_uses: true cs_pin: - mcp23xxx: base_J2 + mcp23xxx: base_J1 number: 5 mode: output: true @@ -152,6 +170,52 @@ display: height: 240 width: 320 rotation: 180 + #################### + ### BAR module 1 ### + #################### + - id: display_j2_Left + platform: ili9xxx + model: ST7735 + dc_pin: + number: GPIO37 + allow_other_uses: true + cs_pin: + mcp23xxx: base_J3 + number: 5 + mode: + output: true + inverted: false + invert_colors: false + show_test_card: false + dimensions: + height: 160 + width: 80 + offset_width: 24 + rotation: 270 + update_interval: 1s + - id: display_j2_Right + platform: ili9xxx + model: ST7735 + dc_pin: + number: GPIO37 + allow_other_uses: true + cs_pin: + mcp23xxx: base_J2 + number: 1 + mode: + output: true + inverted: false + invert_colors: false + show_test_card: false + dimensions: + height: 160 + width: 80 + offset_width: 24 + rotation: 90 + update_interval: 1s + #################### + ### BAR module 2 ### + #################### - id: display_j3_Left platform: ili9xxx model: ST7735 @@ -191,4 +255,4 @@ display: width: 80 offset_width: 24 rotation: 90 - update_interval: 1s \ No newline at end of file + update_interval: 1s diff --git a/package/3bar_1display.yaml b/package/3bar_1display.yaml new file mode 100644 index 0000000..e9528ad --- /dev/null +++ b/package/3bar_1display.yaml @@ -0,0 +1,354 @@ +########################################### +## ## +## filename: base.yaml ## +## description: contains configuration ## +## that will be the same for all the ## +## possible setups ## +## ## +########################################### + +packages: + base: !include base.yaml + +mcp23008: + - id: 'base_J0' + address: 0x20 + - id: 'base_J1' + address: 0x21 + - id: 'base_J2' + i2c_id: buttons + address: 0x22 + - id: 'base_J3' + i2c_id: buttons + address: 0x23 + +binary_sensor: + ############################ + ### Buttons Main Display ### + ############################ + - platform: gpio + id: 'base_j0_btn_left' + name: "Display button Left" + pin: + mcp23xxx: base_J0 + number: 6 + mode: INPUT_PULLUP + inverted: true + - platform: gpio + id: 'base_j0_btn_right' + name: "Display button Right" + pin: + mcp23xxx: base_J0 + number: 2 + mode: INPUT_PULLUP + inverted: true + + ############################ + ### Buttons BAR module 1 ### + ############################ + - platform: gpio + id: 'base_j1_btn_left' + name: "BAR 1 button Left" + pin: + mcp23xxx: base_J1 + number: 6 + mode: INPUT_PULLUP + inverted: true + - platform: gpio + id: 'base_j1_btn_right' + name: "BAR 1 button Right" + pin: + mcp23xxx: base_J1 + number: 2 + mode: INPUT_PULLUP + inverted: true + + ############################ + ### Buttons BAR module 2 ### + ############################ + - platform: gpio + id: 'base_j2_btn_left' + name: "BAR 2 button Left" + pin: + mcp23xxx: base_J2 + number: 6 + mode: INPUT_PULLUP + inverted: true + - platform: gpio + id: 'base_j2_btn_right' + name: "BAR 2 button Right" + pin: + mcp23xxx: base_J2 + number: 2 + mode: INPUT_PULLUP + inverted: true + + ############################ + ### Buttons BAR module 3 ### + ############################ + - platform: gpio + id: 'base_j3_btn_left' + name: "BAR 3 button Left" + pin: + mcp23xxx: base_J3 + number: 6 + mode: INPUT_PULLUP + inverted: true + - platform: gpio + id: 'base_j3_btn_right' + name: "BAR 3 button Right" + pin: + mcp23xxx: base_J3 + number: 2 + mode: INPUT_PULLUP + inverted: true + +light: + ############################## + ### RGB LED's BAR module 1 ### + ############################## + - id: !extend neopixels + num_leds: 9 + - platform: partition + name: "BAR 1 Left RGB Front" + id: bar_1_left_rgb_front + segments: + - id: neopixels + from: 0 + to: 0 + - platform: partition + name: "BAR 1 Left RGB Back" + id: bar_1_left_rgb_back + segments: + - id: neopixels + from: 1 + to: 1 + - platform: partition + name: "BAR 1 Right RGB Front" + id: bar_1_right_rgb_front + segments: + - id: neopixels + from: 2 + to: 2 + - platform: partition + name: "BAR 1 Right RGB Back" + id: bar_1_right_rgb_back + segments: + - id: neopixels + from: 3 + to: 3 + ############################## + ### RGB LED's BAR module 2 ### + ############################## + - platform: partition + name: "BAR 2 Left RGB Front" + id: bar_2_left_rgb_front + segments: + - id: neopixels + from: 4 + to: 4 + - platform: partition + name: "BAR 2 Left RGB Back" + id: bar_2_left_rgb_back + segments: + - id: neopixels + from: 5 + to: 5 + - platform: partition + name: "BAR 2 Right RGB Front" + id: bar_2_right_rgb_front + segments: + - id: neopixels + from: 6 + to: 6 + - platform: partition + name: "BAR 2 Right RGB Back" + id: bar_2_right_rgb_back + segments: + - id: neopixels + from: 7 + to: 7 + ############################## + ### RGB LED's BAR module 3 ### + ############################## + - platform: partition + name: "BAR 3 Left RGB Front" + id: bar_3_left_rgb_front + segments: + - id: neopixels + from: 8 + to: 8 + - platform: partition + name: "BAR 3 Left RGB Back" + id: bar_3_left_rgb_back + segments: + - id: neopixels + from: 9 + to: 9 + - platform: partition + name: "BAR 3 Right RGB Front" + id: bar_3_right_rgb_front + segments: + - id: neopixels + from: 10 + to: 10 + - platform: partition + name: "BAR 3 Right RGB Back" + id: bar_3_right_rgb_back + segments: + - id: neopixels + from: 11 + to: 11 + +display: + #################### + ### Main Display ### + #################### + - id: display_j0_main + platform: ili9xxx + model: ili9341 + invert_colors: false + dc_pin: + number: GPIO37 + allow_other_uses: true + cs_pin: + mcp23xxx: base_J0 + number: 5 + mode: + output: true + inverted: false + update_interval: 200ms + show_test_card: false + dimensions: + height: 240 + width: 320 + rotation: 180 + #################### + ### BAR module 1 ### + #################### + - id: display_j1_Left + platform: ili9xxx + model: ST7735 + dc_pin: + number: GPIO37 + allow_other_uses: true + cs_pin: + mcp23xxx: base_J1 + number: 5 + mode: + output: true + inverted: false + invert_colors: false + show_test_card: false + dimensions: + height: 160 + width: 80 + offset_width: 24 + rotation: 270 + update_interval: 1s + - id: display_j1_Right + platform: ili9xxx + model: ST7735 + dc_pin: + number: GPIO37 + allow_other_uses: true + cs_pin: + mcp23xxx: base_J1 + number: 1 + mode: + output: true + inverted: false + invert_colors: false + show_test_card: false + dimensions: + height: 160 + width: 80 + offset_width: 24 + rotation: 90 + update_interval: 1s + #################### + ### BAR module 2 ### + #################### + - id: display_j2_Left + platform: ili9xxx + model: ST7735 + dc_pin: + number: GPIO37 + allow_other_uses: true + cs_pin: + mcp23xxx: base_J2 + number: 5 + mode: + output: true + inverted: false + invert_colors: false + show_test_card: false + dimensions: + height: 160 + width: 80 + offset_width: 24 + rotation: 270 + update_interval: 1s + - id: display_j2_Right + platform: ili9xxx + model: ST7735 + dc_pin: + number: GPIO37 + allow_other_uses: true + cs_pin: + mcp23xxx: base_J2 + number: 1 + mode: + output: true + inverted: false + invert_colors: false + show_test_card: false + dimensions: + height: 160 + width: 80 + offset_width: 24 + rotation: 90 + update_interval: 1s + #################### + ### BAR module 3 ### + #################### + - id: display_j3_Left + platform: ili9xxx + model: ST7735 + dc_pin: + number: GPIO37 + allow_other_uses: true + cs_pin: + mcp23xxx: base_J3 + number: 5 + mode: + output: true + inverted: false + invert_colors: false + show_test_card: false + dimensions: + height: 160 + width: 80 + offset_width: 24 + rotation: 270 + update_interval: 1s + - id: display_j3_Right + platform: ili9xxx + model: ST7735 + dc_pin: + number: GPIO37 + allow_other_uses: true + cs_pin: + mcp23xxx: base_J3 + number: 1 + mode: + output: true + inverted: false + invert_colors: false + show_test_card: false + dimensions: + height: 160 + width: 80 + offset_width: 24 + rotation: 90 + update_interval: 1s diff --git a/package/base.yaml b/package/base.yaml index 5969c4d..ba8cbd5 100644 --- a/package/base.yaml +++ b/package/base.yaml @@ -1,3 +1,12 @@ +########################################### +## ## +## filename: base.yaml ## +## description: contains configuration ## +## that will be the same for all the ## +## possible configurations ## +## ## +########################################### + i2c: - id: temperature_sensor sda: GPIO1 @@ -12,7 +21,6 @@ i2c: spi: clk_pin: GPIO36 mosi_pin: GPIO35 - # miso_pin: GPIOXX output: - platform: ledc @@ -38,7 +46,7 @@ light: type: RGB variant: WS2812 pin: GPIO4 - num_leds: 20 + num_leds: 17 - platform: monochromatic output: displays_mini_backlight_pwm name: "Mini Display Backlight" @@ -48,4 +56,8 @@ light: output: display_main_backlight_pwm name: "Main Display Backlight" id: display_main_backlight - restore_mode: ALWAYS_ON \ No newline at end of file + restore_mode: ALWAYS_ON + +time: + - platform: homeassistant + id: datetime From e172fad7c24c1706b33738f260a5e2e67bdc989b Mon Sep 17 00:00:00 2001 From: Martijn Date: Sun, 27 Oct 2024 20:54:49 +0100 Subject: [PATCH 05/10] Update base.yaml --- package/base.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/base.yaml b/package/base.yaml index ba8cbd5..e5b45b3 100644 --- a/package/base.yaml +++ b/package/base.yaml @@ -16,7 +16,7 @@ i2c: sda: GPIO47 scl: GPIO48 scan: true - frequency: 400khz + frequency: 800khz spi: clk_pin: GPIO36 From 6b6e4ff9fb6d1051bef4b682109823489d558949 Mon Sep 17 00:00:00 2001 From: Martijn Date: Sun, 27 Oct 2024 20:57:24 +0100 Subject: [PATCH 06/10] Update base.yaml --- package/base.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/base.yaml b/package/base.yaml index e5b45b3..ec37b3b 100644 --- a/package/base.yaml +++ b/package/base.yaml @@ -16,7 +16,7 @@ i2c: sda: GPIO47 scl: GPIO48 scan: true - frequency: 800khz + frequency: 200khz spi: clk_pin: GPIO36 From 5ec8b90d94a28e8700679f5b76a769f54672de0f Mon Sep 17 00:00:00 2001 From: Martijn Date: Sun, 27 Oct 2024 21:17:40 +0100 Subject: [PATCH 07/10] added i2c id --- package/2bar_1display.yaml | 1 + package/3bar_1display.yaml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/package/2bar_1display.yaml b/package/2bar_1display.yaml index 2de438e..d60fa6c 100644 --- a/package/2bar_1display.yaml +++ b/package/2bar_1display.yaml @@ -12,6 +12,7 @@ packages: mcp23008: - id: 'base_J1' + i2c_id: buttons address: 0x21 - id: 'base_J2' i2c_id: buttons diff --git a/package/3bar_1display.yaml b/package/3bar_1display.yaml index e9528ad..5fdac6b 100644 --- a/package/3bar_1display.yaml +++ b/package/3bar_1display.yaml @@ -12,8 +12,10 @@ packages: mcp23008: - id: 'base_J0' + i2c_id: buttons address: 0x20 - id: 'base_J1' + i2c_id: buttons address: 0x21 - id: 'base_J2' i2c_id: buttons From 2b2435429cfe7a6922c8a05b2b1d9d025cc44776 Mon Sep 17 00:00:00 2001 From: Martijn Date: Sun, 27 Oct 2024 21:21:08 +0100 Subject: [PATCH 08/10] whong mcp id --- package/2bar_1display.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/2bar_1display.yaml b/package/2bar_1display.yaml index d60fa6c..0d82e54 100644 --- a/package/2bar_1display.yaml +++ b/package/2bar_1display.yaml @@ -181,7 +181,7 @@ display: number: GPIO37 allow_other_uses: true cs_pin: - mcp23xxx: base_J3 + mcp23xxx: base_J2 number: 5 mode: output: true From 15388e931565d7944092495698ebc2fd97eff089 Mon Sep 17 00:00:00 2001 From: Martijn Date: Sun, 27 Oct 2024 21:28:27 +0100 Subject: [PATCH 09/10] reorganized num_leds section --- package/2bar_1display.yaml | 4 ++-- package/3bar_1display.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package/2bar_1display.yaml b/package/2bar_1display.yaml index 0d82e54..e87ddf5 100644 --- a/package/2bar_1display.yaml +++ b/package/2bar_1display.yaml @@ -83,11 +83,11 @@ binary_sensor: inverted: true light: + - id: !extend neopixels + num_leds: 9 ############################## ### RGB LED's BAR module 1 ### ############################## - - id: !extend neopixels - num_leds: 9 - platform: partition name: "BAR 1 Left RGB Front" id: bar_1_left_rgb_front diff --git a/package/3bar_1display.yaml b/package/3bar_1display.yaml index 5fdac6b..dc3ed85 100644 --- a/package/3bar_1display.yaml +++ b/package/3bar_1display.yaml @@ -106,11 +106,11 @@ binary_sensor: inverted: true light: + - id: !extend neopixels + num_leds: 13 ############################## ### RGB LED's BAR module 1 ### ############################## - - id: !extend neopixels - num_leds: 9 - platform: partition name: "BAR 1 Left RGB Front" id: bar_1_left_rgb_front From e6eef429d49c46e21b0b031f11b2075db62c5f26 Mon Sep 17 00:00:00 2001 From: Martijn Date: Sun, 27 Oct 2024 22:22:08 +0100 Subject: [PATCH 10/10] updated comments --- package/1bar_1display.yaml | 14 +++++++------- package/2bar_1display.yaml | 15 +++++++-------- package/3bar_1display.yaml | 15 +++++++-------- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/package/1bar_1display.yaml b/package/1bar_1display.yaml index 07e56ff..6a21eef 100644 --- a/package/1bar_1display.yaml +++ b/package/1bar_1display.yaml @@ -1,10 +1,10 @@ -########################################### -## ## -## filename: 1bar_1display.yaml ## -## description: Specific configuration ## -## for the 1 BAR 1 Display setup ## -## ## -########################################### +############################################ +## ## +## filename: 1bar_1display.yaml ## +## description: Specific configuration ## +## for the 1 BAR 1 Display setup ## +## ## +############################################ packages: base: !include base.yaml diff --git a/package/2bar_1display.yaml b/package/2bar_1display.yaml index e87ddf5..77474a3 100644 --- a/package/2bar_1display.yaml +++ b/package/2bar_1display.yaml @@ -1,11 +1,10 @@ -########################################### -## ## -## filename: base.yaml ## -## description: contains configuration ## -## that will be the same for all the ## -## possible setups ## -## ## -########################################### +############################################ +## ## +## filename: 2bar_1display.yaml ## +## description: Specific configuration ## +## for the 2 BAR's, 1 Display setup ## +## ## +############################################ packages: base: !include base.yaml diff --git a/package/3bar_1display.yaml b/package/3bar_1display.yaml index dc3ed85..5298b80 100644 --- a/package/3bar_1display.yaml +++ b/package/3bar_1display.yaml @@ -1,11 +1,10 @@ -########################################### -## ## -## filename: base.yaml ## -## description: contains configuration ## -## that will be the same for all the ## -## possible setups ## -## ## -########################################### +############################################ +## ## +## filename: 3bar_1display.yaml ## +## description: Specific configuration ## +## for the 3 BAR's, 1 Display setup ## +## ## +############################################ packages: base: !include base.yaml