Files
esphome/templates/tubeszb-coordinator.yaml
T
artem 4d5f8cf6d7 Bump buffer size, seeing problems with it
2026-07-06T20:18:09.835553+00:00 local0.err   stream_server [E][stream_server:167]: Failed to write to client 10 with error 128!
2026-07-06T20:18:09.836377+00:00 local0.warni stream_server [W][stream_server:190]: Failed to read from client 10 with error 128!

and

2026-07-06T20:18:19.865209+00:00 local0.err   stream_server [E][stream_server:126]: Incoming bytes available, but outgoing buffer is full: stream will be corrupted!
2026-07-06T20:18:19.865762+00:00 local0.warni stream_server [W][stream_server:131]: Dropped 10 pending bytes for client 10
2026-07-06 20:53:19 +00:00

84 lines
2.1 KiB
YAML

# ESP32 PoE board with ZigBee module (cc2652) connected to it via serial.
# The purpose is to expose that serial port via TCP.
#
# cc2652p firmware (launchpad):
# https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/Z-Stack_3.x.0
#
# Binary files can be found at:
# https://github.com/Koenkk/Z-Stack-firmware/releases
# Latest flashed copy can be found in tubeszb/ directory.
#
# Coordinator flashing instructions:
# https://www.zigbee2mqtt.io/guide/adapters/flashing/flashing_via_cc2538-bsl.html
#
# Router flashing instructions:
# https://github.com/tube0013/tube_gateways/tree/8cf2d2998602d0d89ff2cd9ce06dbd98997e223d/models/current/tubeszb-router#flashing-the-router
esphome:
name: "zigbee-coordinator-ch${channel}"
friendly_name: "ZigBee Coordinator CH${channel}"
project:
name: "dasfoo.zigbee-coordinator-ch${channel}"
version: "5.0"
on_boot:
priority: 600 # Default; most sensors set up, no network yet.
then:
- script.execute: cc2652_reset
packages:
device_base: !include esp32-poe.yaml
esp32:
framework:
type: esp-idf
external_components:
- source: github://oxan/esphome-stream-server
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 cc2652 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"
- id: cc2652_reset
then:
- switch.turn_on: zRST_gpio
- delay: 15ms
- switch.turn_off: zRST_gpio
button:
- platform: template
name: "ZigBee Module reset"
disabled_by_default: true
id: zRST
on_press:
- script.execute: cc2652_reset
- platform: template
name: "ZigBee Module enter programming mode"
disabled_by_default: true
on_press:
- script.execute: fw_update_mode
stream_server:
uart_id: uart_bus
id: ss
port: 6638
buffer_size: 4096
binary_sensor:
- platform: stream_server
connected:
name: "ZigBee Module serial stream connected"