Change dev to support Input board v0.5

This commit is contained in:
Paweł Szafer
2022-11-07 18:59:03 +01:00
parent 4b140aebfc
commit 672c1ba946
13 changed files with 462 additions and 126 deletions

View File

@@ -5,11 +5,14 @@
time:
- platform: ds1307
id: ds1307_time
address: 0x68
i2c_id: bus_a
sensor:
# Module power consmption
- platform: ina219
address: 0x40
i2c_id: bus_a
shunt_resistance: 0.1 ohm
current:
id: ina_current
@@ -27,11 +30,26 @@ sensor:
max_current: 3.2A
update_interval: 30s
switch:
- platform: gpio
id: buzzer
name: "Buzzer"
pin:
number: GPIO2
mode:
output: true
inverted: false
pcf8574:
- id: 'mcp_inputs_1to16'
address: 0x26
- id: 'pcf_inputs_1to14'
i2c_id: bus_a
address: 0x20
pcf8575: true
- id: 'mcp_inputs_17to32'
address: 0x27
- id: 'pcf_inputs_15to28'
i2c_id: bus_a
address: 0x21
pcf8575: true
- id: 'pcf_inputs_28to35_menu'
i2c_id: bus_a
address: 0x22
pcf8575: false

View File

@@ -1,34 +0,0 @@
#i2c address: 0x26 input mcp io
#i2c address: 0x27 input mcp io
#i2c address: 0x40 input ina219 power
#i2c address: 0x68 input rtc ds1307
time:
- platform: ds1307
id: ds1307_time
sensor:
# Module power consmption
- platform: ina219
address: 0x40
shunt_resistance: 0.1 ohm
current:
id: ina_current
name: "${node_name} INA219 Current"
power:
id: ina_power
name: "${node_name} INA219 Power"
bus_voltage:
id: ina_bus_voltage
name: "${node_name} INA219 Bus Voltage"
shunt_voltage:
id: ina_shunt_voltage
name: "${node_name} INA219 Shunt Voltage"
max_voltage: 32.0V
max_current: 3.2A
update_interval: 30s
mcp23017:
- id: 'mcp_inputs_1to16'
address: 0x26
- id: 'mcp_inputs_17to32'
address: 0x27

View File

@@ -53,10 +53,10 @@ binary_sensor:
entity_category: config
id: boneIO_button
pin:
number: GPIO4
pcf8574: pcf_inputs_28to35_menu
number: 7
mode:
input: true
pullup: true
inverted: true
on_press:
then:
@@ -91,6 +91,7 @@ display:
id: oled_display
model: "SH1106 128x64"
address: 0x3C
i2c_id: bus_b
contrast: 0.5
pages:
- id: logo_page

View File

@@ -10,3 +10,4 @@ sensor:
id: boneIO_temp
name: "${node_name} LM75B Temperature"
update_interval: 30s
i2c_id: bus_b

View File

@@ -1,5 +1,5 @@
dallas:
- pin: GPIO32
- pin: GPIO4
# sensor:
# - platform: dallas

View File

@@ -4,10 +4,16 @@ esphome:
board: nodemcu-32s
i2c:
sda: GPIO14
scl: GPIO15
scan: True
frequency: 100kHz
- id: bus_a
sda: GPIO14
scl: GPIO15
scan: True
frequency: 100kHz
- id: bus_b
sda: GPIO17
scl: GPIO33
scan: True
frequency: 100kHz
ethernet:
id: eth