From 9441de7db3dcddc3fefa238fae01b42125f136ea Mon Sep 17 00:00:00 2001 From: wedr0wycz <98967693+wedr0wycz@users.noreply.github.com> Date: Sat, 5 Oct 2024 21:11:23 +0200 Subject: [PATCH] corrected input id name --- boneio-32x10_switches_v0_4.yaml | 580 +++++++++++++------------------- 1 file changed, 227 insertions(+), 353 deletions(-) diff --git a/boneio-32x10_switches_v0_4.yaml b/boneio-32x10_switches_v0_4.yaml index a8d98a9..7eba391 100644 --- a/boneio-32x10_switches_v0_4.yaml +++ b/boneio-32x10_switches_v0_4.yaml @@ -2,7 +2,7 @@ substitutions: name: boneio-32-sw-04 friendly_name: 'BoneIO ESP 32x10 Switches' serial_prefix: 'esp' #Don't change it. - + esphome: name: '${name}' friendly_name: '${friendly_name}' @@ -10,7 +10,7 @@ esphome: project: name: boneio.32x10-switches version: '0.4PP' - + esp32: board: nodemcu-32s @@ -22,49 +22,37 @@ ethernet: clk_mode: GPIO0_IN phy_addr: 1 power_pin: GPIO16 - #use_address: + #use_address: 10.10.20.101 dashboard_import: - package_import_url: github://boneIO-eu/esphome/boneio-32x10_switches_v0_4.yaml@latest + package_import_url: github://boneIO-eu/esphome/boneio-24x16_switches_v0_4.yaml@main import_full_config: true packages: internals_packages: - #url: https://github.com/boneIO-eu/esphome - url: https://github.com/wedr0wycz/esphome-fix - ref: v1.1.0 + url: https://github.com/boneIO-eu/esphome + ref: main files: [ - 'devices/serial_no.yaml', - 'devices_v0_4/display.yaml', - 'devices_v0_4/i2c.yaml', - 'devices_v0_4/ina219.yaml', - 'devices_v0_4/lm75b.yaml', - 'devices_v0_4/pcf.yaml', - 'boards/32x10_output.yaml', - # 'devices_v0_7/one_wire.yaml', + 'devices/serial_no.yaml', + 'devices_v0_4/display.yaml', + 'devices_v0_4/i2c.yaml', + 'devices_v0_4/ina219.yaml', + 'devices_v0_4/lm75b.yaml', + 'devices_v0_4/pcf.yaml', + 'boards/32x10_output.yaml', + # devices_v0_7/one_wire.yaml', ] - + logger: api: ota: platform: esphome - password: boneio - -# disable web server - for testing only -web_server: - port: 80 - local: true time: - platform: homeassistant timezone: Europe/Warsaw id: homeassistant_time - # instead try to synchronize via network repeatedly ... - on_time_sync: - then: - # ... and update the RTC when the synchronization was successful - ds1307.write_time: - + switch: - platform: output name: 'Switch 01' @@ -197,10 +185,10 @@ switch: binary_sensor: - platform: gpio - name: 'IN_01' + name: "IN_01" id: in_01 pin: - pcf8574: pcf_inputs_1to14 + pcf8574: pcf_inputs_1to16 number: 0 mode: input: true @@ -210,10 +198,10 @@ binary_sensor: - switch.toggle: switch_01 - platform: gpio - name: 'IN_02' + name: "IN_02" id: in_02 pin: - pcf8574: pcf_inputs_1to14 + pcf8574: pcf_inputs_1to16 number: 1 mode: input: true @@ -223,440 +211,326 @@ binary_sensor: - switch.toggle: switch_02 - platform: gpio - name: 'IN_03' + name: "IN_03" id: in_03 pin: - pcf8574: pcf_inputs_1to14 + pcf8574: pcf_inputs_1to16 number: 2 mode: input: true inverted: true - on_press: - then: - - switch.toggle: switch_03 - platform: gpio - name: 'IN_04' + name: "IN_04" id: in_04 pin: - pcf8574: pcf_inputs_1to14 + pcf8574: pcf_inputs_1to16 number: 3 mode: input: true inverted: true - on_press: - then: - - switch.toggle: switch_04 - platform: gpio - name: 'IN_05' + name: "IN_05" id: in_05 pin: - pcf8574: pcf_inputs_1to14 + pcf8574: pcf_inputs_1to16 number: 4 mode: input: true inverted: true - on_press: - then: - - switch.toggle: switch_05 - platform: gpio - name: 'IN_06' + name: "IN_06" id: in_06 pin: - pcf8574: pcf_inputs_1to14 + pcf8574: pcf_inputs_1to16 number: 5 mode: input: true inverted: true - on_press: - then: - - switch.toggle: switch_06 - platform: gpio - name: 'IN_07' + name: "IN_07" id: in_07 pin: - pcf8574: pcf_inputs_1to14 + pcf8574: pcf_inputs_1to16 number: 6 mode: input: true inverted: true - on_press: - then: - - switch.toggle: switch_07 - platform: gpio - name: 'IN_08' + name: "IN_08" id: in_08 pin: - pcf8574: pcf_inputs_1to14 - number: 8 + pcf8574: pcf_inputs_1to16 + number: 7 mode: input: true inverted: true - on_press: - then: - - switch.toggle: switch_08 - platform: gpio - name: 'IN_09' + name: "IN_09" id: in_09 pin: - pcf8574: pcf_inputs_1to14 - number: 9 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_09 - - - platform: gpio - name: 'IN_10' - id: in_10 - pin: - pcf8574: pcf_inputs_1to14 - number: 10 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_10 - - - platform: gpio - name: 'IN_11' - id: in_11 - pin: - pcf8574: pcf_inputs_1to14 - number: 11 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_11 - - - platform: gpio - name: 'IN_12' - id: in_12 - pin: - pcf8574: pcf_inputs_1to14 - number: 12 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_12 - - - platform: gpio - name: 'IN_13' - id: in_13 - pin: - pcf8574: pcf_inputs_1to14 - number: 13 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_13 - - - platform: gpio - name: 'IN_14' - id: in_14 - pin: - pcf8574: pcf_inputs_1to14 - number: 14 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_14 - - - platform: gpio - name: 'IN_15' - id: in_15 - pin: - pcf8574: pcf_inputs_15to28 - number: 6 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_15 - - - platform: gpio - name: 'IN_16' - id: in_16 - pin: - pcf8574: pcf_inputs_15to28 - number: 5 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_16 - - - platform: gpio - name: 'IN_17' - id: in_17 - pin: - pcf8574: pcf_inputs_15to28 - number: 4 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_17 - - - platform: gpio - name: 'IN_18' - id: in_18 - pin: - pcf8574: pcf_inputs_15to28 - number: 3 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_18 - - - platform: gpio - name: 'IN_19' - id: in_19 - pin: - pcf8574: pcf_inputs_15to28 - number: 2 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_19 - - - platform: gpio - name: 'IN_20' - id: in_20 - pin: - pcf8574: pcf_inputs_15to28 - number: 1 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_20 - - - platform: gpio - name: 'IN_21' - id: in_21 - pin: - pcf8574: pcf_inputs_15to28 - number: 0 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_21 - - - platform: gpio - name: 'IN_22' - id: in_22 - pin: - pcf8574: pcf_inputs_15to28 + pcf8574: pcf_inputs_1to16 number: 8 mode: input: true inverted: true - on_press: - then: - - switch.toggle: switch_22 - platform: gpio - name: 'IN_23' - id: in_23 + name: "IN_10" + id: in_10 pin: - pcf8574: pcf_inputs_15to28 + pcf8574: pcf_inputs_1to16 number: 9 mode: input: true inverted: true - on_press: - then: - - switch.toggle: switch_23 - platform: gpio - name: 'IN_24' - id: in_24 + name: "IN_11" + id: in_11 pin: - pcf8574: pcf_inputs_15to28 + pcf8574: pcf_inputs_1to16 number: 10 mode: input: true inverted: true - on_press: - then: - - switch.toggle: switch_24 - platform: gpio - name: 'IN_25' - id: in_25 + name: "IN_12" + id: in_12 pin: - pcf8574: pcf_inputs_15to28 + pcf8574: pcf_inputs_1to16 number: 11 mode: input: true inverted: true - on_press: - then: - - switch.toggle: switch_25 - platform: gpio - name: 'IN_26' - id: in_26 + name: "IN_13" + id: in_13 pin: - pcf8574: pcf_inputs_15to28 + pcf8574: pcf_inputs_1to16 number: 12 mode: input: true inverted: true - on_press: - then: - - switch.toggle: switch_26 - platform: gpio - name: 'IN_27' - id: in_27 + name: "IN_14" + id: in_14 pin: - pcf8574: pcf_inputs_15to28 + pcf8574: pcf_inputs_1to16 number: 13 mode: input: true inverted: true - on_press: - then: - - switch.toggle: switch_27 - platform: gpio - name: 'IN_28' - id: in_28 + name: "IN_15" + id: in_15 pin: - pcf8574: pcf_inputs_15to28 + pcf8574: pcf_inputs_1to16 number: 14 mode: input: true inverted: true - on_press: - then: - - switch.toggle: switch_28 - platform: gpio - name: 'IN_29' - id: in_29 + name: "IN_16" + id: in_16 pin: - pcf8574: pcf_inputs_28to35_menu - number: 0 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_29 - - - platform: gpio - name: 'IN_30' - id: in_30 - pin: - pcf8574: pcf_inputs_28to35_menu - number: 1 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_30 - - - platform: gpio - name: 'IN_31' - id: in_31 - pin: - pcf8574: pcf_inputs_28to35_menu - number: 2 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_31 - - - platform: gpio - name: 'IN_32' - id: in_32 - pin: - pcf8574: pcf_inputs_28to35_menu - number: 3 - mode: - input: true - inverted: true - on_press: - then: - - switch.toggle: switch_32 - - - platform: gpio - name: 'IN_33' - pin: - pcf8574: pcf_inputs_28to35_menu - number: 4 + pcf8574: pcf_inputs_1to16 + number: 15 mode: input: true inverted: true - platform: gpio - name: 'IN_34' + name: "IN_17" + id: in_17 pin: - pcf8574: pcf_inputs_28to35_menu + pcf8574: pcf_inputs_17to32 + number: 7 + mode: + input: true + inverted: true + + - platform: gpio + name: "IN_18" + id: in_18 + pin: + pcf8574: pcf_inputs_17to32 + number: 6 + mode: + input: true + inverted: true + + - platform: gpio + name: "IN_19" + id: in_19 + pin: + pcf8574: pcf_inputs_17to32 number: 5 mode: input: true inverted: true - platform: gpio - name: 'IN_35' + name: "IN_20 28" + id: in_20 pin: - pcf8574: pcf_inputs_28to35_menu - number: 6 + pcf8574: pcf_inputs_17to32 + number: 4 mode: input: true inverted: true -###################### -### MODBUS SECTION ### -###################### -# UNCOMMENT BELOW TO USE MODBUS -# uart: -# id: uart_pin14_15 -# rx_pin: GPIO14 -# tx_pin: GPIO15 -# baud_rate: 9600 -# stop_bits: 1 -# modbus: -# send_wait_time: 200ms -# uart_id: uart_pin14_15 -# id: boneio_modbus + - platform: gpio + name: "IN_21" + id: in_21 + pin: + pcf8574: pcf_inputs_17to32 + number: 3 + mode: + input: true + inverted: true -# modbus_controller: -# - id: YOURDEVICE ID -# address: 0x09 -# modbus_id: mod_bus -# setup_priority: -10 -# update_interval: 60s + - platform: gpio + name: "IN_22" + id: in_22 + pin: + pcf8574: pcf_inputs_17to32 + number: 2 + mode: + input: true + inverted: true + + - platform: gpio + name: "IN_23" + id: in_23 + pin: + pcf8574: pcf_inputs_17to32 + number: 1 + mode: + input: true + inverted: true + + - platform: gpio + name: "IN_24" + id: in_24 + pin: + pcf8574: pcf_inputs_17to32 + number: 0 + mode: + input: true + inverted: true + + - platform: gpio + name: "IN_25" + id: in_25 + pin: + pcf8574: pcf_inputs_17to32 + number: 8 + mode: + input: true + inverted: true + + - platform: gpio + name: "IN_26" + id: in_26 + pin: + pcf8574: pcf_inputs_17to32 + number: 9 + mode: + input: true + inverted: true + + - platform: gpio + name: "IN_27" + id: in_27 + pin: + pcf8574: pcf_inputs_17to32 + number: 10 + mode: + input: true + inverted: true + + - platform: gpio + name: "IN_28" + id: in_28 + pin: + pcf8574: pcf_inputs_17to32 + number: 11 + mode: + input: true + inverted: true + + - platform: gpio + name: "IN_29" + id: in_29 + pin: + pcf8574: pcf_inputs_17to32 + number: 12 + mode: + input: true + inverted: true + + - platform: gpio + name: "IN_30" + id: in_30 + pin: + pcf8574: pcf_inputs_17to32 + number: 13 + mode: + input: true + inverted: true + + - platform: gpio + name: "IN_31" + id: in_31 + pin: + pcf8574: pcf_inputs_17to32 + number: 14 + mode: + input: true + inverted: true + + - platform: gpio + name: "IN_32" + id: in_32 + pin: + pcf8574: pcf_inputs_17to32 + number: 15 + mode: + input: true + inverted: true + + - platform: gpio + name: "IN_33" + pin: + number: GPIO33 + mode: + input: true + inverted: true + + - platform: gpio + name: "IN_34" + pin: + number: GPIO17 + mode: + input: true + inverted: true + + - platform: gpio + name: "IN_35" + pin: + number: GPIO12 + mode: + input: true + pullup: true + inverted: false