mirror of
https://github.com/boneIO-eu/esphome.git
synced 2026-04-10 20:50:02 +02:00
test boneio lights
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
pcf8574:
|
pcf8574:
|
||||||
- id: 'pcf_1'
|
- id: 'pcf_1'
|
||||||
address: 0x21
|
address: 0x21
|
||||||
@@ -7,359 +6,292 @@ pcf8574:
|
|||||||
- id: 'pcf_2'
|
- id: 'pcf_2'
|
||||||
address: 0x20
|
address: 0x20
|
||||||
pcf8575: true
|
pcf8575: true
|
||||||
i2c_id: bus_b
|
i2c_id: bus_b
|
||||||
|
|
||||||
switch:
|
output:
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_1
|
id: out_1
|
||||||
name: "Relay_01"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 0
|
|
||||||
number: 15
|
number: 15
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_2
|
id: out_2
|
||||||
name: "Relay_02"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 1
|
|
||||||
number: 14
|
number: 14
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_3
|
id: out_3
|
||||||
name: "Relay_03"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 2
|
|
||||||
number: 13
|
number: 13
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_4
|
id: out_4
|
||||||
name: "Relay_04"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 3
|
|
||||||
number: 12
|
number: 12
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_5
|
id: out_5
|
||||||
name: "Relay_05"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 4
|
|
||||||
number: 11
|
number: 11
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_6
|
id: out_6
|
||||||
name: "Relay_06"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 5
|
|
||||||
number: 10
|
number: 10
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_7
|
id: out_7
|
||||||
name: "Relay_07"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 6
|
|
||||||
number: 9
|
number: 9
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_8
|
id: out_8
|
||||||
name: "Relay_08"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 7
|
|
||||||
number: 8
|
number: 8
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_9
|
id: out_9
|
||||||
name: "Relay_09"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 0
|
|
||||||
number: 15
|
number: 15
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_10
|
id: out_10
|
||||||
name: "Relay_10"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 1
|
|
||||||
number: 14
|
number: 14
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_11
|
id: out_11
|
||||||
name: "Relay_11"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 2
|
|
||||||
number: 13
|
number: 13
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_12
|
id: out_12
|
||||||
name: "Relay_12"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 3
|
|
||||||
number: 12
|
number: 12
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_13
|
id: out_13
|
||||||
name: "Relay_13"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 4
|
|
||||||
number: 11
|
number: 11
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_14
|
id: out_14
|
||||||
name: "Relay_14"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 5
|
|
||||||
number: 10
|
number: 10
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_15
|
id: out_15
|
||||||
name: "Relay_15"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 6
|
|
||||||
number: 9
|
number: 9
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_16
|
id: out_16
|
||||||
name: "Relay_16"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 7
|
|
||||||
number: 8
|
number: 8
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_17
|
id: out_17
|
||||||
name: "Relay_17"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 15
|
|
||||||
number: 0
|
number: 0
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_18
|
id: out_18
|
||||||
name: "Relay_18"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 14
|
|
||||||
number: 1
|
number: 1
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_19
|
id: out_19
|
||||||
name: "Relay_19"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 13
|
|
||||||
number: 2
|
number: 2
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_20
|
id: out_20
|
||||||
name: "Relay_20"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 12
|
|
||||||
number: 3
|
number: 3
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_21
|
id: out_21
|
||||||
name: "Relay_21"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 11
|
|
||||||
number: 4
|
number: 4
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_22
|
id: out_22
|
||||||
name: "Relay_22"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 10
|
|
||||||
number: 5
|
number: 5
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_23
|
id: out_23
|
||||||
name: "Relay_23"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 9
|
|
||||||
number: 6
|
number: 6
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_24
|
id: out_24
|
||||||
name: "Relay_24"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_1
|
pcf8574: pcf_1
|
||||||
# Use pin number 8
|
|
||||||
number: 7
|
number: 7
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_25
|
id: out_25
|
||||||
name: "Relay_25"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 15
|
|
||||||
number: 0
|
number: 0
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_26
|
id: out_26
|
||||||
name: "Relay_26"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 14
|
|
||||||
number: 1
|
number: 1
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_27
|
id: out_27
|
||||||
name: "Relay_27"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 13
|
|
||||||
number: 2
|
number: 2
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_28
|
id: out_28
|
||||||
name: "Relay_28"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 12
|
|
||||||
number: 3
|
number: 3
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_29
|
id: out_29
|
||||||
name: "Relay_29"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 11
|
|
||||||
number: 4
|
number: 4
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_30
|
id: out_30
|
||||||
name: "Relay_30"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 10
|
|
||||||
number: 5
|
number: 5
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_31
|
id: out_31
|
||||||
name: "Relay_31"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 9
|
|
||||||
number: 6
|
number: 6
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: relay_32
|
id: out_32
|
||||||
name: "Relay_32"
|
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_2
|
pcf8574: pcf_2
|
||||||
# Use pin number 8
|
|
||||||
number: 7
|
number: 7
|
||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
|
|
||||||
63
boneio-lights.yaml
Normal file
63
boneio-lights.yaml
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
substitutions:
|
||||||
|
name_add_mac_suffix: 'true'
|
||||||
|
node_name: boneio
|
||||||
|
|
||||||
|
esphome:
|
||||||
|
name: ${node_name}
|
||||||
|
platform: ESP32
|
||||||
|
board: nodemcu-32s
|
||||||
|
# set to false if you already added this device to ESPHOME add-on
|
||||||
|
name_add_mac_suffix: ${name_add_mac_suffix}
|
||||||
|
|
||||||
|
ethernet:
|
||||||
|
id: eth
|
||||||
|
type: LAN8720
|
||||||
|
mdc_pin: GPIO23
|
||||||
|
mdio_pin: GPIO18
|
||||||
|
clk_mode: GPIO0_IN
|
||||||
|
phy_addr: 1
|
||||||
|
power_pin: GPIO16
|
||||||
|
|
||||||
|
dashboard_import:
|
||||||
|
package_import_url: github://boneIO-eu/esphome/boneio-lights.yaml@single_file_test
|
||||||
|
import_full_config: false
|
||||||
|
|
||||||
|
packages:
|
||||||
|
internals_packages:
|
||||||
|
url: https://github.com/boneIO-eu/esphome
|
||||||
|
ref: single_file_test
|
||||||
|
files:
|
||||||
|
[
|
||||||
|
'devices/buzzer.yaml',
|
||||||
|
'devices/display.yaml',
|
||||||
|
'devices/i2c.yaml',
|
||||||
|
'devices/ina219.yaml',
|
||||||
|
'devices/lm75b.yaml',
|
||||||
|
'devices/one_wire.yaml',
|
||||||
|
'devices/pcf_inputs.yaml',
|
||||||
|
'devices/uart.yaml',
|
||||||
|
'boards/32x10_outputs.yaml',
|
||||||
|
]
|
||||||
|
|
||||||
|
logger:
|
||||||
|
baud_rate: 0
|
||||||
|
api:
|
||||||
|
ota:
|
||||||
|
password: boneio
|
||||||
|
|
||||||
|
web_server:
|
||||||
|
port: 80
|
||||||
|
local: true
|
||||||
|
|
||||||
|
time:
|
||||||
|
- platform: homeassistant
|
||||||
|
timezone: Europe/Warsaw
|
||||||
|
id: homeassistant_time
|
||||||
|
|
||||||
|
light:
|
||||||
|
- platform: binary
|
||||||
|
name: 'Light 1'
|
||||||
|
output: out_1
|
||||||
|
- platform: binary
|
||||||
|
name: 'Light 2'
|
||||||
|
output: out_2
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
substitutions:
|
|
||||||
# set to false if you don't want mac suffix in your device name
|
|
||||||
name_add_mac_suffix: 'false'
|
|
||||||
# if you want to change the name of device via OTA you have to set IP first in boneio/devices/wt32_eth01.yaml
|
|
||||||
node_name: boneio
|
|
||||||
dir_name: './'
|
|
||||||
|
|
||||||
packages:
|
|
||||||
# select your input board:
|
|
||||||
# input: !include boards/relay24_inputs_PCF.yaml
|
|
||||||
# input: !include boards/relay32_inputs_PCF.yaml
|
|
||||||
# input: !include boards/relay32_inputs_MCP.yaml
|
|
||||||
# input: !include boards/dimmer_led8x4_inputs.yaml
|
|
||||||
# input: !include boards/cover16_inputs_MCP.yaml
|
|
||||||
# input: !include boards/cover16_inputs_PCF.yaml
|
|
||||||
input: !include boards/coverMix_inputs_PCF.yaml
|
|
||||||
|
|
||||||
# select your output board:
|
|
||||||
# output: !include boards/relay24_outputs_MCP.yaml
|
|
||||||
# output: !include boards/relay32_outputs_PCF.yaml
|
|
||||||
# output: !include boards/relay32_outputs_MCP.yaml
|
|
||||||
# output: !include boards/dimmer_led8x4_outputs.yaml
|
|
||||||
# light: !include boards/monochromatic_lights.yaml
|
|
||||||
# cover: !include boards/cover.yaml
|
|
||||||
cover: !include boards/cover_mix.yaml
|
|
||||||
# output: !include boards/cover16_outputs_PCF.yaml
|
|
||||||
# output: !include boards/cover16_outputs_MCP.yaml
|
|
||||||
# output: !include boards/mosfet48_outputs_PCF.yaml
|
|
||||||
output: !include boards/relay32_outputs_mix_PCF.yaml
|
|
||||||
|
|
||||||
# select your devices:
|
|
||||||
core: !include devices/wt32_eth01.yaml
|
|
||||||
internals: !include devices/boneio_board.yaml
|
|
||||||
temp: !include devices/lm75b.yaml
|
|
||||||
display: !include devices/display.yaml
|
|
||||||
# uart: !include devices/uart.yaml
|
|
||||||
# one_wire: !include devices/one_wire.yaml
|
|
||||||
|
|
||||||
logger:
|
|
||||||
baud_rate: 0
|
|
||||||
api:
|
|
||||||
ota:
|
|
||||||
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:
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
substitutions:
|
|
||||||
# set to false if you don't want mac suffix in your device name
|
|
||||||
name_add_mac_suffix: 'false'
|
|
||||||
# if you want to change the name of device via OTA you have to set IP first in boneio/devices/wt32_eth01.yaml
|
|
||||||
node_name: boneio
|
|
||||||
dir_name: 'boneio/'
|
|
||||||
|
|
||||||
packages:
|
|
||||||
# select your input board:
|
|
||||||
# input: !include boneio/boards/relay24_inputs_PCF.yaml
|
|
||||||
# input: !include boneio/boards/relay32_inputs_PCF.yaml
|
|
||||||
# input: !include boneio/boards/relay32_inputs_MCP.yaml
|
|
||||||
# input: !include boneio/boards/dimmer_led8x4_inputs.yaml
|
|
||||||
# input: !include boneio/boards/cover16_inputs_MCP.yaml
|
|
||||||
# input: !include boneio/boards/cover16_inputs_PCF.yaml
|
|
||||||
# input: !include boneio/boards/coverMix_inputs_PCF.yaml
|
|
||||||
|
|
||||||
# select your output board:
|
|
||||||
# output: !include boneio/boards/relay24_outputs_MCP.yaml
|
|
||||||
output: !include boneio/boards/relay32_outputs_PCF.yaml
|
|
||||||
# output: !include boneio/boards/relay32_outputs_MCP.yaml
|
|
||||||
# output: !include boneio/boards/dimmer_led8x4_outputs.yaml
|
|
||||||
# light: !include boneio/boards/monochromatic_lights.yaml
|
|
||||||
# cover: !include boneio/boards/cover.yaml
|
|
||||||
# cover: !include boneio/boards/cover_mix.yaml
|
|
||||||
# output: !include boneio/boards/cover16_outputs_PCF.yaml
|
|
||||||
# output: !include boneio/boards/cover16_outputs_MCP.yaml
|
|
||||||
# output: !include boneio/mosfet48_outputs_PCF.yaml
|
|
||||||
# output: !include boneio/relay32_outputs_mix_PCF.yaml
|
|
||||||
|
|
||||||
# select your devices:
|
|
||||||
core: !include boneio/devices/wt32_eth01.yaml
|
|
||||||
internals: !include boneio/devices/boneio_board.yaml
|
|
||||||
temp: !include boneio/devices/lm75b.yaml
|
|
||||||
display: !include boneio/devices/display.yaml
|
|
||||||
# uart: !include devices/uart.yaml
|
|
||||||
# one_wire: !include devices/one_wire.yaml
|
|
||||||
|
|
||||||
|
|
||||||
logger:
|
|
||||||
baud_rate: 0
|
|
||||||
api:
|
|
||||||
ota:
|
|
||||||
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:
|
|
||||||
26
devices/buzzer.yaml
Normal file
26
devices/buzzer.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#i2c address: 0x26 input pcf io
|
||||||
|
#i2c address: 0x27 input pcf io
|
||||||
|
#i2c address: 0x40 input ina219 power
|
||||||
|
#i2c address: 0x68 input rtc ds1307
|
||||||
|
switch:
|
||||||
|
- platform: gpio
|
||||||
|
id: buzzer
|
||||||
|
name: 'Buzzer'
|
||||||
|
pin:
|
||||||
|
number: GPIO2
|
||||||
|
mode:
|
||||||
|
output: true
|
||||||
|
inverted: false
|
||||||
|
pcf8574:
|
||||||
|
- id: 'pcf_inputs_1to14'
|
||||||
|
i2c_id: bus_a
|
||||||
|
address: 0x20
|
||||||
|
pcf8575: true
|
||||||
|
- 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
|
||||||
@@ -23,7 +23,7 @@ sensor:
|
|||||||
|
|
||||||
text_sensor:
|
text_sensor:
|
||||||
- platform: template
|
- platform: template
|
||||||
name: ${node_name} Uptime
|
name: Uptime
|
||||||
id: wt32_uptime
|
id: wt32_uptime
|
||||||
entity_category: diagnostic
|
entity_category: diagnostic
|
||||||
icon: mdi:clock-start
|
icon: mdi:clock-start
|
||||||
@@ -74,9 +74,6 @@ binary_sensor:
|
|||||||
# on the screensaver, show the logo for a while and display the first page
|
# on the screensaver, show the logo for a while and display the first page
|
||||||
display.is_displaying_page: screensaver
|
display.is_displaying_page: screensaver
|
||||||
then:
|
then:
|
||||||
- display.page.show: logo_page
|
|
||||||
- component.update: oled_display
|
|
||||||
- delay: 500ms
|
|
||||||
- display.page.show: first_page
|
- display.page.show: first_page
|
||||||
- component.update: oled_display
|
- component.update: oled_display
|
||||||
else:
|
else:
|
||||||
@@ -86,8 +83,8 @@ binary_sensor:
|
|||||||
# restart screensaver script
|
# restart screensaver script
|
||||||
- script.execute: screensaver_script
|
- script.execute: screensaver_script
|
||||||
|
|
||||||
# it.printf(4, 37, id(dejaVuSmall), TextAlign::BASELINE_LEFT ,"IP addr:");
|
# it.printf(4, 37, id(roboto_9), TextAlign::BASELINE_LEFT ,"IP addr:");
|
||||||
# it.printf(124, 37, id(dejaVuSmall), TextAlign::BASELINE_RIGHT ,"%s", id(eth).get_ip_addresses().str().c_str());
|
# it.printf(124, 37, id(roboto_9), TextAlign::BASELINE_RIGHT ,"%s", id(eth).get_ip_addresses().str().c_str());
|
||||||
display:
|
display:
|
||||||
- platform: ssd1306_i2c
|
- platform: ssd1306_i2c
|
||||||
id: oled_display
|
id: oled_display
|
||||||
@@ -96,44 +93,33 @@ display:
|
|||||||
i2c_id: bus_b
|
i2c_id: bus_b
|
||||||
contrast: 0.5
|
contrast: 0.5
|
||||||
pages:
|
pages:
|
||||||
- id: logo_page
|
|
||||||
lambda: |-
|
|
||||||
it.printf(64,25, id(danubeBig), TextAlign::BASELINE_CENTER, "BoneIO");
|
|
||||||
it.printf(64,40, id(dejaVuSmall), TextAlign::BASELINE_CENTER, "take control");
|
|
||||||
it.printf(64,50, id(dejaVuSmall), TextAlign::BASELINE_CENTER, "of your home");
|
|
||||||
- id: first_page
|
- id: first_page
|
||||||
lambda: |-
|
lambda: |-
|
||||||
it.rectangle(0, 0, 126, 15);
|
it.rectangle(0, 0, 126, 15);
|
||||||
it.printf(64,11, id(danubeSmall), TextAlign::BASELINE_CENTER, "BoneIO");
|
it.printf(64,11, id(roboto_9), TextAlign::BASELINE_CENTER, "BoneIO");
|
||||||
it.strftime(64, 25, id(dejaVuSmall), TextAlign::BASELINE_CENTER ,"%c", id(ds1307_time).now());
|
it.strftime(64, 25, id(roboto_9), TextAlign::BASELINE_CENTER ,"%c", id(ds1307_time).now());
|
||||||
it.printf(4, 49, id(dejaVuSmall), TextAlign::BASELINE_LEFT ,"Uptime:");
|
it.printf(4, 49, id(roboto_9), TextAlign::BASELINE_LEFT ,"Uptime:");
|
||||||
it.printf(124, 49, id(dejaVuSmall), TextAlign::BASELINE_RIGHT ,"%s", id(wt32_uptime).state.c_str());
|
it.printf(124, 49, id(roboto_9), TextAlign::BASELINE_RIGHT ,"%s", id(wt32_uptime).state.c_str());
|
||||||
it.printf(4, 61, id(dejaVuSmall), TextAlign::BASELINE_LEFT ,"Temperature:");
|
it.printf(4, 61, id(roboto_9), TextAlign::BASELINE_LEFT ,"Temperature:");
|
||||||
it.printf(124, 61, id(dejaVuSmall), TextAlign::BASELINE_RIGHT ,"%.2f°C", id(boneIO_temp).state);
|
it.printf(124, 61, id(roboto_9), TextAlign::BASELINE_RIGHT ,"%.2f°C", id(boneIO_temp).state);
|
||||||
# additional pages should be defined between the first and last page
|
# additional pages should be defined between the first and last page
|
||||||
- id: last_page
|
- id: last_page
|
||||||
lambda: |-
|
lambda: |-
|
||||||
it.rectangle(0, 0, 126, 15);
|
it.rectangle(0, 0, 126, 15);
|
||||||
it.printf(64,11, id(danubeSmall), TextAlign::BASELINE_CENTER, "BoneIO");
|
it.printf(64,11, id(roboto_9), TextAlign::BASELINE_CENTER, "BoneIO");
|
||||||
it.printf(4, 25, id(dejaVuSmall), TextAlign::BASELINE_LEFT ,"Current:");
|
it.printf(4, 25, id(roboto_9), TextAlign::BASELINE_LEFT ,"Current:");
|
||||||
it.printf(124, 25, id(dejaVuSmall), TextAlign::BASELINE_RIGHT ,"%.3fA", id(ina_current).state);
|
it.printf(124, 25, id(roboto_9), TextAlign::BASELINE_RIGHT ,"%.3fA", id(ina_current).state);
|
||||||
it.printf(4, 37, id(dejaVuSmall), TextAlign::BASELINE_LEFT ,"Power:");
|
it.printf(4, 37, id(roboto_9), TextAlign::BASELINE_LEFT ,"Power:");
|
||||||
it.printf(124, 37, id(dejaVuSmall), TextAlign::BASELINE_RIGHT ,"%.2fW", id(ina_power).state);
|
it.printf(124, 37, id(roboto_9), TextAlign::BASELINE_RIGHT ,"%.2fW", id(ina_power).state);
|
||||||
it.printf(4, 49, id(dejaVuSmall), TextAlign::BASELINE_LEFT ,"Bus Volt:");
|
it.printf(4, 49, id(roboto_9), TextAlign::BASELINE_LEFT ,"Bus Volt:");
|
||||||
it.printf(124, 49, id(dejaVuSmall), TextAlign::BASELINE_RIGHT ,"%.2fV", id(ina_bus_voltage).state);
|
it.printf(124, 49, id(roboto_9), TextAlign::BASELINE_RIGHT ,"%.2fV", id(ina_bus_voltage).state);
|
||||||
it.printf(4, 61, id(dejaVuSmall), TextAlign::BASELINE_LEFT ,"Shunt Volt:");
|
it.printf(4, 61, id(roboto_9), TextAlign::BASELINE_LEFT ,"Shunt Volt:");
|
||||||
it.printf(124, 61, id(dejaVuSmall), TextAlign::BASELINE_RIGHT ,"%.2fV", id(ina_shunt_voltage).state);
|
it.printf(124, 61, id(roboto_9), TextAlign::BASELINE_RIGHT ,"%.2fV", id(ina_shunt_voltage).state);
|
||||||
- id: screensaver
|
- id: screensaver
|
||||||
lambda: |-
|
lambda: |-
|
||||||
it.fill(COLOR_OFF);
|
it.fill(COLOR_OFF);
|
||||||
|
|
||||||
font:
|
font:
|
||||||
- file: '${dir_name}/fonts/DejaVuSans.ttf'
|
- file: 'gfonts://Roboto'
|
||||||
id: dejaVuSmall
|
id: roboto_9
|
||||||
size: 9
|
|
||||||
- file: '${dir_name}/fonts/danube__.ttf'
|
|
||||||
id: danubeBig
|
|
||||||
size: 20
|
|
||||||
- file: '${dir_name}/fonts/danube__.ttf'
|
|
||||||
id: danubeSmall
|
|
||||||
size: 9
|
size: 9
|
||||||
|
|||||||
11
devices/i2c.yaml
Normal file
11
devices/i2c.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
i2c:
|
||||||
|
- id: bus_a
|
||||||
|
sda: GPIO14
|
||||||
|
scl: GPIO15
|
||||||
|
scan: True
|
||||||
|
frequency: 400kHz
|
||||||
|
- id: bus_b
|
||||||
|
sda: GPIO17
|
||||||
|
scl: GPIO33
|
||||||
|
scan: True
|
||||||
|
frequency: 400kHz
|
||||||
@@ -2,30 +2,24 @@
|
|||||||
#i2c address: 0x27 input pcf io
|
#i2c address: 0x27 input pcf io
|
||||||
#i2c address: 0x40 input ina219 power
|
#i2c address: 0x40 input ina219 power
|
||||||
#i2c address: 0x68 input rtc ds1307
|
#i2c address: 0x68 input rtc ds1307
|
||||||
time:
|
|
||||||
- platform: ds1307
|
|
||||||
id: ds1307_time
|
|
||||||
address: 0x68
|
|
||||||
i2c_id: bus_a
|
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
# Module power consmption
|
# Module power consmption
|
||||||
- platform: ina219
|
- platform: ina219
|
||||||
address: 0x40
|
address: 0x40
|
||||||
i2c_id: bus_a
|
i2c_id: bus_a
|
||||||
shunt_resistance: 0.1 ohm
|
shunt_resistance: 0.1 ohm
|
||||||
current:
|
current:
|
||||||
id: ina_current
|
id: ina_current
|
||||||
name: "${node_name} INA219 Current"
|
name: 'INA219 Current'
|
||||||
power:
|
power:
|
||||||
id: ina_power
|
id: ina_power
|
||||||
name: "${node_name} INA219 Power"
|
name: 'INA219 Power'
|
||||||
bus_voltage:
|
bus_voltage:
|
||||||
id: ina_bus_voltage
|
id: ina_bus_voltage
|
||||||
name: "${node_name} INA219 Bus Voltage"
|
name: 'INA219 Bus Voltage'
|
||||||
shunt_voltage:
|
shunt_voltage:
|
||||||
id: ina_shunt_voltage
|
id: ina_shunt_voltage
|
||||||
name: "${node_name} INA219 Shunt Voltage"
|
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
|
||||||
@@ -33,7 +27,7 @@ sensor:
|
|||||||
switch:
|
switch:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: buzzer
|
id: buzzer
|
||||||
name: "Buzzer"
|
name: 'Buzzer'
|
||||||
pin:
|
pin:
|
||||||
number: GPIO2
|
number: GPIO2
|
||||||
mode:
|
mode:
|
||||||
@@ -47,9 +41,8 @@ pcf8574:
|
|||||||
- id: 'pcf_inputs_15to28'
|
- id: 'pcf_inputs_15to28'
|
||||||
i2c_id: bus_a
|
i2c_id: bus_a
|
||||||
address: 0x21
|
address: 0x21
|
||||||
pcf8575: true
|
pcf8575: true
|
||||||
- id: 'pcf_inputs_28to35_menu'
|
- id: 'pcf_inputs_28to35_menu'
|
||||||
i2c_id: bus_a
|
i2c_id: bus_a
|
||||||
address: 0x22
|
address: 0x22
|
||||||
pcf8575: false
|
pcf8575: false
|
||||||
|
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
#i2c address: 0x48 output lm75b temp
|
#i2c address: 0x48 output lm75b temp
|
||||||
#LM75B
|
#LM75B
|
||||||
external_components:
|
external_components:
|
||||||
- source: github://btomala/esphome-LM75@v1.0
|
- source: github://boneIO-eu/esphome-LM75@main #Original source and thank you note for BTomala https://github.com/boneIO-eu/esphome-lm75
|
||||||
components: [ lm75 ]
|
components: [lm75]
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
# Lower board temperature
|
# Lower board temperature
|
||||||
- platform: lm75
|
- platform: lm75
|
||||||
id: boneIO_temp
|
id: boneIO_temp
|
||||||
name: "${node_name} LM75B Temperature"
|
name: 'LM75B Temperature'
|
||||||
update_interval: 30s
|
update_interval: 30s
|
||||||
i2c_id: bus_b
|
i2c_id: bus_b
|
||||||
|
|||||||
13
devices/pcf_inputs.yaml
Normal file
13
devices/pcf_inputs.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
pcf8574:
|
||||||
|
- id: 'pcf_inputs_1to14'
|
||||||
|
i2c_id: bus_a
|
||||||
|
address: 0x20
|
||||||
|
pcf8575: true
|
||||||
|
- 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
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
i2c:
|
|
||||||
- id: bus_a
|
|
||||||
sda: GPIO14
|
|
||||||
scl: GPIO15
|
|
||||||
scan: True
|
|
||||||
frequency: 400kHz
|
|
||||||
- id: bus_b
|
|
||||||
sda: GPIO17
|
|
||||||
scl: GPIO33
|
|
||||||
scan: True
|
|
||||||
frequency: 400kHz
|
|
||||||
|
|
||||||
esphome:
|
|
||||||
name: ${node_name}
|
|
||||||
platform: ESP32
|
|
||||||
board: nodemcu-32s
|
|
||||||
# set to false if you already added this device to ESPHOME add-on
|
|
||||||
name_add_mac_suffix: ${name_add_mac_suffix}
|
|
||||||
|
|
||||||
ethernet:
|
|
||||||
id: eth
|
|
||||||
type: LAN8720
|
|
||||||
mdc_pin: GPIO23
|
|
||||||
mdio_pin: GPIO18
|
|
||||||
clk_mode: GPIO0_IN
|
|
||||||
phy_addr: 1
|
|
||||||
power_pin: GPIO16
|
|
||||||
|
|
||||||
# uncomment this line and set your actual IP address before changing name of device
|
|
||||||
# use_address: xxx.xxx.xxx.xxx
|
|
||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user