added comment and 3b1d setup

This commit is contained in:
Martijn
2024-10-27 20:48:49 +01:00
parent 0cb5d73673
commit 03f8912c85
4 changed files with 469 additions and 26 deletions
+24 -11
View File
@@ -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
update_interval: 1s
+76 -12
View File
@@ -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
update_interval: 1s
+354
View File
@@ -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
+15 -3
View File
@@ -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
restore_mode: ALWAYS_ON
time:
- platform: homeassistant
id: datetime