Update cover_32x10A_board.yaml

nowy config dla rolet
This commit is contained in:
Kamil_B
2022-09-07 21:22:30 +02:00
parent 1dc0e5a517
commit ef59911856

View File

@@ -35,7 +35,7 @@ web_server:
time: time:
- platform: ds1307 - platform: ds1307
id: ds1307_tim id: ds1307_time
- platform: homeassistant - platform: homeassistant
# instead try to synchronize via network repeatedly ... # instead try to synchronize via network repeatedly ...
@@ -43,7 +43,6 @@ time:
then: then:
# ... and update the RTC when the synchronization was successful # ... and update the RTC when the synchronization was successful
ds1307.write_time: ds1307.write_time:
mcp23017: mcp23017:
@@ -56,24 +55,28 @@ mcp23017:
- id: 'mcp_4' - id: 'mcp_4'
address: 0x20 address: 0x20
uart: uart:
id: modbus_serial
rx_pin: GPIO3 rx_pin: GPIO3
tx_pin: GPIO1 tx_pin: GPIO1
baud_rate: 9600 baud_rate: 9600
stop_bits: 1 stop_bits: 1
#modbus:
#flow_control_pin: 5
#id: modbus1
#uart_id: modbus_serial
#modbus_controller:
# - id: edpbox
# update_interval: 31s
# address: 0x1
# command_throttle: 150ms
# setup_priority: -10
# modbus:
# id: modbus1
# modbus_controller:
# - id: epever
# ## the Modbus device addr
# address: 0x33
# modbus_id: modbus1
# setup_priority: -10
switch: switch:
- platform: gpio - platform: gpio
pin: pin:
@@ -485,10 +488,10 @@ cover:
assumed_state: false assumed_state: false
open_action: open_action:
- switch.turn_on: relay23 - switch.turn_on: relay23
open_duration: 30s open_duration: 35s
close_action: close_action:
- switch.turn_on: relay24 - switch.turn_on: relay24
close_duration: 30s close_duration: 29s
stop_action: stop_action:
- switch.turn_off: relay23 - switch.turn_off: relay23
- switch.turn_off: relay24 - switch.turn_off: relay24
@@ -498,10 +501,10 @@ cover:
assumed_state: false assumed_state: false
open_action: open_action:
- switch.turn_on: relay25 - switch.turn_on: relay25
open_duration: 30s open_duration: 35s
close_action: close_action:
- switch.turn_on: relay26 - switch.turn_on: relay26
close_duration: 30s close_duration: 29s
stop_action: stop_action:
- switch.turn_off: relay25 - switch.turn_off: relay25
- switch.turn_off: relay26 - switch.turn_off: relay26
@@ -511,10 +514,10 @@ cover:
assumed_state: false assumed_state: false
open_action: open_action:
- switch.turn_on: relay27 - switch.turn_on: relay27
open_duration: 30s open_duration: 35s
close_action: close_action:
- switch.turn_on: relay28 - switch.turn_on: relay28
close_duration: 30s close_duration: 29s
stop_action: stop_action:
- switch.turn_off: relay27 - switch.turn_off: relay27
- switch.turn_off: relay28 - switch.turn_off: relay28
@@ -524,10 +527,10 @@ cover:
assumed_state: false assumed_state: false
open_action: open_action:
- switch.turn_on: relay29 - switch.turn_on: relay29
open_duration: 30s open_duration: 35s
close_action: close_action:
- switch.turn_on: relay30 - switch.turn_on: relay30
close_duration: 30s close_duration: 29s
stop_action: stop_action:
- switch.turn_off: relay29 - switch.turn_off: relay29
- switch.turn_off: relay30 - switch.turn_off: relay30
@@ -537,10 +540,10 @@ cover:
assumed_state: false assumed_state: false
open_action: open_action:
- switch.turn_on: relay31 - switch.turn_on: relay31
open_duration: 30s open_duration: 17s
close_action: close_action:
- switch.turn_on: relay32 - switch.turn_on: relay32
close_duration: 30s close_duration: 14s
stop_action: stop_action:
- switch.turn_off: relay31 - switch.turn_off: relay31
- switch.turn_off: relay32 - switch.turn_off: relay32
@@ -897,9 +900,22 @@ binary_sensor:
inverted: true inverted: true
on_press: on_press:
then: then:
cover.open: cover_13 # logic for cycling through movements: open->stop->close->stop->...
on_release: - lambda: |
cover.stop: cover_13 if (id(cover_13).current_operation == COVER_OPERATION_IDLE) {
// Cover is idle, check current state and either open or close cover.
if (id(cover_13).is_fully_closed()) {
id(cover_13).open();
} else {
id(cover_13).open();
}
} else {
// Cover is opening/closing. Stop it.
id(cover_13).stop();
}
# cover.open: cover_13
# on_release:
# cover.stop: cover_13
- platform: gpio - platform: gpio
name: "IN_26" name: "IN_26"
pin: pin:
@@ -911,9 +927,22 @@ binary_sensor:
inverted: true inverted: true
on_press: on_press:
then: then:
cover.close: cover_13 # logic for cycling through movements: open->stop->close->stop->...
on_release: - lambda: |
cover.stop: cover_13 if (id(cover_13).current_operation == COVER_OPERATION_IDLE) {
// Cover is idle, check current state and either open or close cover.
if (id(cover_13).is_fully_closed()) {
id(cover_13).open();
} else {
id(cover_13).close();
}
} else {
// Cover is opening/closing. Stop it.
id(cover_13).stop();
}
# cover.close: cover_13
# on_release:
# cover.stop: cover_13
- platform: gpio - platform: gpio
name: "IN_27" name: "IN_27"
pin: pin:
@@ -925,9 +954,22 @@ binary_sensor:
inverted: true inverted: true
on_press: on_press:
then: then:
cover.open: cover_14 # logic for cycling through movements: open->stop->close->stop->...
on_release: - lambda: |
cover.stop: cover_14 if (id(cover_14).current_operation == COVER_OPERATION_IDLE) {
// Cover is idle, check current state and either open or close cover.
if (id(cover_14).is_fully_closed()) {
id(cover_14).open();
} else {
id(cover_14).open();
}
} else {
// Cover is opening/closing. Stop it.
id(cover_14).stop();
}
# cover.open: cover_14
# on_release:
# cover.stop: cover_14
- platform: gpio - platform: gpio
name: "IN_28" name: "IN_28"
pin: pin:
@@ -939,9 +981,22 @@ binary_sensor:
inverted: true inverted: true
on_press: on_press:
then: then:
cover.close: cover_14 # logic for cycling through movements: open->stop->close->stop->...
on_release: - lambda: |
cover.stop: cover_14 if (id(cover_14).current_operation == COVER_OPERATION_IDLE) {
// Cover is idle, check current state and either open or close cover.
if (id(cover_14).is_fully_closed()) {
id(cover_14).open();
} else {
id(cover_14).close();
}
} else {
// Cover is opening/closing. Stop it.
id(cover_14).stop();
}
# cover.close: cover_14
# on_release:
# cover.stop: cover_14
- platform: gpio - platform: gpio
name: "IN_29" name: "IN_29"
pin: pin:
@@ -953,9 +1008,22 @@ binary_sensor:
inverted: true inverted: true
on_press: on_press:
then: then:
cover.open: cover_15 # logic for cycling through movements: open->stop->close->stop->...
on_release: - lambda: |
cover.stop: cover_15 if (id(cover_15).current_operation == COVER_OPERATION_IDLE) {
// Cover is idle, check current state and either open or close cover.
if (id(cover_15).is_fully_closed()) {
id(cover_15).open();
} else {
id(cover_15).open();
}
} else {
// Cover is opening/closing. Stop it.
id(cover_15).stop();
}
# cover.open: cover_15
# on_release:
# cover.stop: cover_15
- platform: gpio - platform: gpio
name: "IN_30" name: "IN_30"
pin: pin:
@@ -967,9 +1035,22 @@ binary_sensor:
inverted: true inverted: true
on_press: on_press:
then: then:
cover.close: cover_15 # logic for cycling through movements: open->stop->close->stop->...
on_release: - lambda: |
cover.stop: cover_15 if (id(cover_15).current_operation == COVER_OPERATION_IDLE) {
// Cover is idle, check current state and either open or close cover.
if (id(cover_15).is_fully_closed()) {
id(cover_15).open();
} else {
id(cover_15).close();
}
} else {
// Cover is opening/closing. Stop it.
id(cover_15).stop();
}
# cover.close: cover_15
# on_release:
# cover.stop: cover_15
- platform: gpio - platform: gpio
name: "IN_31" name: "IN_31"
pin: pin:
@@ -981,9 +1062,23 @@ binary_sensor:
inverted: true inverted: true
on_press: on_press:
then: then:
cover.open: cover_16 # logic for cycling through movements: open->stop->close->stop->...
on_release: - lambda: |
cover.stop: cover_16 if (id(cover_16).current_operation == COVER_OPERATION_IDLE) {
// Cover is idle, check current state and either open or close cover.
if (id(cover_16).is_fully_closed()) {
id(cover_16).open();
} else {
id(cover_16).open();
}
} else {
// Cover is opening/closing. Stop it.
id(cover_16).stop();
}
# - cover.toggle: cover_16
# else:
# - cover.stop: cover_16
- platform: gpio - platform: gpio
name: "IN_32" name: "IN_32"
pin: pin:
@@ -995,10 +1090,22 @@ binary_sensor:
inverted: true inverted: true
on_press: on_press:
then: then:
cover.close: cover_16 # logic for cycling through movements: open->stop->close->stop->...
on_release: - lambda: |
cover.stop: cover_16 if (id(cover_16).current_operation == COVER_OPERATION_IDLE) {
// Cover is idle, check current state and either open or close cover.
if (id(cover_16).is_fully_closed()) {
id(cover_16).open();
} else {
id(cover_16).close();
}
} else {
// Cover is opening/closing. Stop it.
id(cover_16).stop();
}
# - cover.toggle: cover_16
# - cover.stop: cover_16
- platform: gpio - platform: gpio
name: "IN_33" name: "IN_33"
@@ -1039,71 +1146,100 @@ binary_sensor:
then: then:
- display.page.show_next: oled_display - display.page.show_next: oled_display
- component.update: oled_display - component.update: oled_display
text_sensor: text_sensor:
- platform: template - platform: template
name: "IP" name: ${node_name} Uptime
id: IP id: wt32_uptime
entity_category: diagnostic
icon: mdi:clock-start
- platform: template
name: "${node_name} IP"
id: ip_address
entity_category: diagnostic entity_category: diagnostic
icon: "mdi:ip-network" icon: "mdi:ip-network"
lambda: return { id(eth).get_ip_address().str() }; lambda: return { id(eth).get_ip_address().str() };
update_interval: 30s update_interval: 60s
#dallas:
dallas: # - pin: GPIO32
- pin: GPIO32
sensor: sensor:
- platform: pct2075 - platform: pct2075
temperature: temperature:
name: "PCT2075 Temperature" id: led_temp
name: "${node_name} LM75B Temperature"
update_interval: 30s update_interval: 30s
- platform: uptime
name: ${node_name} uptime text
id: wt32_uptime_sensor
update_interval: 60s
on_raw_value:
then:
- text_sensor.template.publish:
id: wt32_uptime
state: !lambda |-
int seconds = round(id(wt32_uptime_sensor).raw_state);
int days = seconds / (24 * 3600);
seconds = seconds % (24 * 3600);
int hours = seconds / 3600;
seconds = seconds % 3600;
int minutes = seconds / 60;
return (
(days ? to_string(days) + "d " : "") +
(hours ? to_string(hours) + "h " : "") +
(to_string(minutes) + "m")
).c_str();
# - platform: mcp9808 # - platform: mcp9808
# name: "MCP9808 temp" # name: "MCP9808 temp"
# update_interval: 60s # update_interval: 60s
- platform: dallas # - platform: dallas
address: 0x283c01d607d4df28 # address: 0x283c01d607d4df28
name: "Dallas Sensor 1" # name: "Dallas Sensor 1"
- platform: dallas # - platform: dallas
address: 0xdfe67a061e64ff28 # address: 0xdfe67a061e64ff28
name: "Dallas Sensor 2" # name: "Dallas Sensor 2"
- platform: dallas # - platform: dallas
address: 0xa7a89f071e64ff28 # address: 0xa7a89f071e64ff28
name: "Dallas Sensor 3" # name: "Dallas Sensor 3"
- platform: ina219 - platform: ina219
address: 0x40 address: 0x40
shunt_resistance: 0.1 ohm shunt_resistance: 0.1 ohm
current: current:
name: "INA219 Current" id: ina_current
name: "${node_name} INA219 Current"
power: power:
name: "INA219 Power" id: ina_power
name: "${node_name} INA219 Power"
bus_voltage: bus_voltage:
name: "INA219 Bus Voltage" id: ina_bus_voltage
name: "${node_name} INA219 Bus Voltage"
shunt_voltage: shunt_voltage:
name: "INA219 Shunt Voltage" id: ina_shunt_voltage
name: "${node_name} INA219 Shunt Voltage"
max_voltage: 32.0V max_voltage: 32.0V
max_current: 3.2A max_current: 3.2A
update_interval: 30s update_interval: 30s
- platform: adc # pin: GPIO36
pin: GPIO36 # name: "ADC_1"
name: "ADC_1" # update_interval: 5s
update_interval: 5s
- platform: adc # - platform: adc
pin: GPIO39 # pin: GPIO39
name: "ADC_2" # name: "ADC_2"
update_interval: 5s # update_interval: 5s
display: display:
@@ -1112,107 +1248,43 @@ display:
model: "SH1106 128x64" model: "SH1106 128x64"
address: 0x3C address: 0x3C
contrast: 0.5 contrast: 0.5
pages: pages:
- id: page1 - id: page1
lambda: |- lambda: |-
it.rectangle(0, 0, 126, 15); it.printf(64,25, id(danube), TextAlign::BASELINE_CENTER, "boneIO");
it.printf(64,12, id(font1), TextAlign::BASELINE_CENTER, "BoneiO ESP"); it.printf(64,40, id(fontSmall), TextAlign::BASELINE_CENTER, "take control");
# it.printf(1, 27, id(font1), TextAlign::BASELINE_LEFT, "IP:"); it.printf(64,50, id(fontSmall), TextAlign::BASELINE_CENTER, "of your home");
# it.printf(125, 27, id(font1), TextAlign::BASELINE_RIGHT, "%.2s", id(IP).state);
- id: page2 - id: page2
lambda: |- lambda: |-
it.rectangle(0, 0, 126, 15); it.rectangle(0, 0, 126, 15);
it.printf(64,12, id(font1), TextAlign::BASELINE_CENTER, "My Friend"); it.printf(64,12, id(danube1), TextAlign::BASELINE_CENTER, "BoneIO");
it.strftime(64, 26, id(fontSmall), TextAlign::BASELINE_CENTER ,"%c", id(ds1307_time).now());
it.printf(4, 38, id(fontSmall), TextAlign::BASELINE_LEFT ,"IP addr:");
it.printf(124, 38, id(fontSmall), TextAlign::BASELINE_RIGHT ,"%s", id(ip_address).state.c_str());
it.printf(4, 50, id(fontSmall), TextAlign::BASELINE_LEFT ,"Uptime:");
it.printf(124, 50, id(fontSmall), TextAlign::BASELINE_RIGHT ,"%s", id(wt32_uptime).state.c_str());
it.printf(4, 62, id(fontSmall), TextAlign::BASELINE_LEFT ,"Temperature:");
it.printf(124, 62, id(fontSmall), TextAlign::BASELINE_RIGHT ,"%.2f°C", id(led_temp).state);
- id: page3
lambda: |-
it.rectangle(0, 0, 126, 15);
it.printf(64,12, id(danube1), TextAlign::BASELINE_CENTER, "BoneIO");
it.printf(4, 26, id(fontSmall), TextAlign::BASELINE_LEFT ,"Current:");
it.printf(124, 26, id(fontSmall), TextAlign::BASELINE_RIGHT ,"%.3fA", id(ina_current).state);
it.printf(4, 38, id(fontSmall), TextAlign::BASELINE_LEFT ,"Power:");
it.printf(124, 38, id(fontSmall), TextAlign::BASELINE_RIGHT ,"%.2fW", id(ina_power).state);
it.printf(4, 50, id(fontSmall), TextAlign::BASELINE_LEFT ,"Bus Volt:");
it.printf(124, 50, id(fontSmall), TextAlign::BASELINE_RIGHT ,"%.2fV", id(ina_bus_voltage).state);
it.printf(4, 62, id(fontSmall), TextAlign::BASELINE_LEFT ,"Shunt Volt:");
it.printf(124, 62, id(fontSmall), TextAlign::BASELINE_RIGHT ,"%.2fV", id(ina_shunt_voltage).state);
# interval:
# - interval: 5s
# then:
# - display.page.show_next: oled_display
# - component.update: oled_display
font: font:
- file: 'arial.ttf' - file: "fonts/DejaVuSans.ttf"
id: font1 id: fontSmall
size: 11 size: 9
glyphs: - file: "fonts/danube__.ttf"
- ' ' id: danube
- '/' size: 20
- '!' - file: "fonts/danube__.ttf"
- '"' id: danube1
- '%' size: 9
- (
- )
- +
- ','
- '-'
- .
- '0'
- '1'
- '2'
- '3'
- '4'
- '5'
- '6'
- '7'
- '8'
- '9'
- ':'
- A
- B
- C
- D
- E
- F
- G
- H
- I
- J
- K
- L
- M
- N
- O
- P
- Q
- R
- S
- T
- U
- V
- W
- X
- Y
- Z
- _
- a
- b
- c
- d
- e
- f
- g
- h
- i
- j
- k
- l
- m
- n
- o
- p
- q
- r
- s
- t
- u
- v
- w
- x
- y
- z
- °