mirror of
https://github.com/boneIO-eu/esphome.git
synced 2026-04-10 13:00:27 +02:00
redesign of esphome repo
This commit is contained in:
284
development/dimmer_gen2_can.yaml
Normal file
284
development/dimmer_gen2_can.yaml
Normal file
@@ -0,0 +1,284 @@
|
||||
#CAN
|
||||
substitutions:
|
||||
name: boneio-dr-gen2-8ch-dev04-3328f7
|
||||
friendly_name: BoneIO Dimmer dev0.4 3328f7
|
||||
serial_prefix: dim2 #Don't change it.
|
||||
firmware_manifest: https://boneio.eu/esp/boneio-dr-gen2-8ch-dev04.json
|
||||
esphome:
|
||||
name: ${name}
|
||||
friendly_name: ${friendly_name}
|
||||
name_add_mac_suffix: false
|
||||
project:
|
||||
name: boneio.dimmer-led-gen2
|
||||
version: dev0.4
|
||||
on_boot:
|
||||
priority: -100
|
||||
then:
|
||||
- delay: 5s
|
||||
- if:
|
||||
condition:
|
||||
lambda: return id(serial_no) != nullptr;
|
||||
then:
|
||||
- component.update: serial_no
|
||||
- logger.log: Serial No updated on boot
|
||||
else:
|
||||
- logger.log: Serial No component not found
|
||||
|
||||
external_components:
|
||||
- source: github://mrk-its/esphome-canopen
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
|
||||
ethernet:
|
||||
id: eth
|
||||
type: W5500
|
||||
clk_pin: GPIO13
|
||||
mosi_pin: GPIO39
|
||||
miso_pin: GPIO38
|
||||
cs_pin: GPIO12
|
||||
interrupt_pin: GPIO2
|
||||
reset_pin: GPIO1
|
||||
clock_speed: 25MHz
|
||||
# use_address: 192.168.13.107
|
||||
use_address: 192.168.50.173
|
||||
|
||||
|
||||
i2c:
|
||||
sda: GPIO10
|
||||
scl: GPIO11
|
||||
scan: true
|
||||
frequency: 400kHz
|
||||
|
||||
uart:
|
||||
id: boneio_uart
|
||||
rx_pin: GPIO21
|
||||
tx_pin: GPIO14
|
||||
baud_rate: 9600
|
||||
stop_bits: 1
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
pin: GPIO18
|
||||
frequency: 1000Hz
|
||||
inverted: false
|
||||
id: chl01
|
||||
- platform: ledc
|
||||
pin: GPIO17
|
||||
frequency: 1000Hz
|
||||
inverted: false
|
||||
id: chl02
|
||||
- platform: ledc
|
||||
pin: GPIO16
|
||||
frequency: 1000Hz
|
||||
inverted: false
|
||||
id: chl03
|
||||
- platform: ledc
|
||||
pin: GPIO15
|
||||
frequency: 1000Hz
|
||||
inverted: false
|
||||
id: chl04
|
||||
|
||||
- platform: ledc
|
||||
pin: GPIO7
|
||||
frequency: 1000Hz
|
||||
inverted: false
|
||||
id: chr01
|
||||
- platform: ledc
|
||||
pin: GPIO6
|
||||
frequency: 1000Hz
|
||||
inverted: false
|
||||
id: chr02
|
||||
- platform: ledc
|
||||
pin: GPIO5
|
||||
frequency: 1000Hz
|
||||
inverted: false
|
||||
id: chr03
|
||||
- platform: ledc
|
||||
pin: GPIO4
|
||||
frequency: 1000Hz
|
||||
inverted: false
|
||||
id: chr04
|
||||
|
||||
|
||||
##CAN gpio48 - tx, gpio47 rx, gpio35 stb
|
||||
|
||||
|
||||
packages:
|
||||
internals_packages:
|
||||
url: https://github.com/boneIO-eu/esphome
|
||||
ref: packages-v1.7.2
|
||||
files: [devices/serial_no.yaml]
|
||||
|
||||
dashboard_import:
|
||||
package_import_url:
|
||||
github://boneIO-eu/esphome/boneio-dimmer_g2_8ch-dev0_4.yaml@main
|
||||
import_full_config: true
|
||||
|
||||
pcf8574:
|
||||
- id: pcf_inputs
|
||||
address: 0x38
|
||||
|
||||
# http_request:
|
||||
# timeout: 7s
|
||||
# verify_ssl: false
|
||||
logger:
|
||||
hardware_uart: UART0
|
||||
api:
|
||||
reboot_timeout: 0s
|
||||
ota:
|
||||
- platform: esphome
|
||||
- platform: web_server
|
||||
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
version: 3
|
||||
local: true
|
||||
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
id: buzzer
|
||||
name: Buzzer
|
||||
pin:
|
||||
number: GPIO9
|
||||
mode:
|
||||
output: true
|
||||
inverted: false
|
||||
- platform: gpio
|
||||
id: can_bus_switch
|
||||
name: CAN Bus Switch
|
||||
pin:
|
||||
number: GPIO3
|
||||
mode:
|
||||
output: true
|
||||
inverted: false
|
||||
- platform: template
|
||||
id: master
|
||||
name: master
|
||||
optimistic: true
|
||||
on_turn_on:
|
||||
then:
|
||||
- delay: 0ms
|
||||
- lambda: id(can_open).send_entity_cmd(0x2, 1, (uint8_t)1);
|
||||
on_turn_off:
|
||||
then:
|
||||
- delay: 0ms
|
||||
- lambda: id(can_open).send_entity_cmd(0x2, 1, (uint8_t)0);
|
||||
|
||||
binary_sensor:
|
||||
|
||||
- platform: gpio
|
||||
name: IN_01
|
||||
id: in_01
|
||||
pin:
|
||||
pcf8574: pcf_inputs
|
||||
number: 0
|
||||
mode:
|
||||
input: true
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: IN_02
|
||||
id: in_02
|
||||
pin:
|
||||
pcf8574: pcf_inputs
|
||||
number: 1
|
||||
mode:
|
||||
input: true
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: IN_03
|
||||
id: in_03
|
||||
pin:
|
||||
pcf8574: pcf_inputs
|
||||
number: 2
|
||||
mode:
|
||||
input: true
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: IN_04
|
||||
id: in_04
|
||||
pin:
|
||||
pcf8574: pcf_inputs
|
||||
number: 3
|
||||
mode:
|
||||
input: true
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: IN_05
|
||||
id: in_05
|
||||
pin:
|
||||
pcf8574: pcf_inputs
|
||||
number: 4
|
||||
mode:
|
||||
input: true
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: IN_06
|
||||
id: in_06
|
||||
pin:
|
||||
pcf8574: pcf_inputs
|
||||
number: 5
|
||||
mode:
|
||||
input: true
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: IN_07
|
||||
id: in_07
|
||||
pin:
|
||||
pcf8574: pcf_inputs
|
||||
number: 6
|
||||
mode:
|
||||
input: true
|
||||
inverted: true
|
||||
|
||||
- platform: gpio
|
||||
name: IN_08
|
||||
id: in_08
|
||||
pin:
|
||||
pcf8574: pcf_inputs
|
||||
number: 7
|
||||
mode:
|
||||
input: true
|
||||
inverted: true
|
||||
- platform: template
|
||||
name: CAN Bus Button
|
||||
id: can_bus_button
|
||||
|
||||
canbus:
|
||||
- platform: esp32_can
|
||||
id: can_bus
|
||||
tx_pin: GPIO48
|
||||
rx_pin: GPIO47
|
||||
can_id: 1
|
||||
bit_rate: 50kbps
|
||||
|
||||
|
||||
# button:
|
||||
# - platform: template
|
||||
# name: 'CAN Sensor ON'
|
||||
# on_press:
|
||||
# - logger.log: Button Pressed
|
||||
# - canbus.send: [0x11, 0x22, 0x33]
|
||||
# - platform: template
|
||||
# name: 'CAN Sensor OFF'
|
||||
# on_press:
|
||||
# - logger.log: Button Pressed
|
||||
# - canbus.send: [0x12, 0x22, 0x33]
|
||||
|
||||
canopen:
|
||||
id: can_open
|
||||
canbus_id: can_bus
|
||||
entities: []
|
||||
node_id: 1
|
||||
|
||||
Reference in New Issue
Block a user