20260326
This commit is contained in:
161
esphome/archive/uzg-poe-dr.yaml
Normal file
161
esphome/archive/uzg-poe-dr.yaml
Normal file
@@ -0,0 +1,161 @@
|
||||
esphome:
|
||||
name: tubeszb-dual-radio-kit-cc2652
|
||||
project:
|
||||
name: tubezb.cc2652+zw
|
||||
version: "3.0"
|
||||
on_boot:
|
||||
priority: 600
|
||||
then:
|
||||
- switch.turn_on: zRST_gpio
|
||||
- delay: 15ms
|
||||
- switch.turn_off: zRST_gpio
|
||||
- lambda: |-
|
||||
id(mdns0).add_extra_service({ "_zigbee-coordinator", "_tcp", 6638, {{"radio_type", "znp"}, {"name", "TubesZB"},{"serial_number", get_mac_address()}} });
|
||||
id(mdns0).add_extra_service({ "_zwave", "_tcp", 6639, {{"version", "1.0"}, {"name", "TubesZB"},{"serial_number", get_mac_address()}} });
|
||||
esp32:
|
||||
board: esp32-poe
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
external_components:
|
||||
- source: github://oxan/esphome-stream-server
|
||||
|
||||
|
||||
#Olimex ESP32-PoE Ethernet
|
||||
ethernet:
|
||||
type: LAN8720
|
||||
mdc_pin: GPIO23
|
||||
mdio_pin: GPIO18
|
||||
clk_mode: GPIO17_OUT
|
||||
phy_addr: 0
|
||||
power_pin: GPIO5
|
||||
|
||||
# Optional manual IP
|
||||
# manual_ip:
|
||||
# static_ip: STATIC_IP
|
||||
# gateway: GATEWAY
|
||||
# subnet: SUBNET
|
||||
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
level: DEBUG
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
reboot_timeout: 0s
|
||||
|
||||
ota:
|
||||
platform: esphome
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
local: true
|
||||
|
||||
|
||||
script:
|
||||
- id: fw_update_mode
|
||||
then:
|
||||
- switch.turn_on: zBSL
|
||||
- delay: 1s
|
||||
- switch.turn_on: zRST_gpio
|
||||
- delay: 1s
|
||||
- switch.turn_off: zRST_gpio
|
||||
- logger.log: "Delaying ~10 seconds for cc2652p2 to settle"
|
||||
- delay: 11s
|
||||
- switch.turn_off: zBSL
|
||||
- logger.log: "Please try update with cc2538-bsl tool now"
|
||||
- logger.log: "cc-bsl usage: cc2538-bsl.py -p socket://ip-of-gw:6638 -evw firmware.hex"
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 16
|
||||
id: zRST_gpio
|
||||
inverted: no
|
||||
restore_mode: ALWAYS_OFF
|
||||
|
||||
- platform: gpio
|
||||
pin: 33
|
||||
id: z_mode
|
||||
restore_mode: ALWAYS_OFF
|
||||
name: "zigbee-uart mode"
|
||||
on_turn_on:
|
||||
then:
|
||||
- light.turn_on: usb_led
|
||||
on_turn_off:
|
||||
then:
|
||||
- light.turn_off: usb_led
|
||||
|
||||
- platform: gpio
|
||||
pin: 15
|
||||
name: "Zigbee Module Bootloader Pin"
|
||||
id: zBSL
|
||||
inverted: no
|
||||
restore_mode: ALWAYS_OFF
|
||||
disabled_by_default: false
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: GPIO12
|
||||
id: LED_USB
|
||||
|
||||
button:
|
||||
- platform: restart
|
||||
name: "Restart the ESP32 Device"
|
||||
|
||||
- platform: template
|
||||
name: "Trigger Zigbee Module Reset"
|
||||
disabled_by_default: false
|
||||
id: zRST
|
||||
on_press:
|
||||
- switch.turn_on: zRST_gpio
|
||||
- delay: 15ms
|
||||
- switch.turn_off: zRST_gpio
|
||||
|
||||
- platform: template
|
||||
name: "Trigger Zigbee Module Bootloader"
|
||||
disabled_by_default: false
|
||||
on_press:
|
||||
- script.execute: fw_update_mode
|
||||
|
||||
light:
|
||||
- platform: status_led
|
||||
name: "state"
|
||||
pin: GPIO14
|
||||
- platform: binary
|
||||
name: "usb_led"
|
||||
output: LED_USB
|
||||
id: usb_led
|
||||
|
||||
uart:
|
||||
- id: uart_bus_zb
|
||||
rx_pin: GPIO36
|
||||
tx_pin: GPIO4
|
||||
baud_rate: 115200
|
||||
# rx_buffer_size: 1024
|
||||
- id: uart_bus_zw
|
||||
rx_pin: GPIO13
|
||||
tx_pin: GPIO2
|
||||
baud_rate: 115200
|
||||
|
||||
stream_server:
|
||||
- id: zb
|
||||
uart_id: uart_bus_zb
|
||||
port: 6638 # optional, default is 6638
|
||||
# buffer_size: 1024
|
||||
- id: zw
|
||||
uart_id: uart_bus_zw
|
||||
port: 6639
|
||||
|
||||
binary_sensor:
|
||||
- platform: stream_server
|
||||
stream_server: zb
|
||||
connected:
|
||||
name: "TubesZB Zigbee Serial Connected"
|
||||
- platform: stream_server
|
||||
stream_server: zw
|
||||
connected:
|
||||
name: "TubesZB Z-Wave Serial Connected"
|
||||
|
||||
mdns:
|
||||
id: mdns0
|
||||
Reference in New Issue
Block a user