Advertisement
Kosygor

Z906read

Jan 29th, 2023
907
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.45 KB | None | 0 0
  1. esphome:
  2.   name: z906read
  3.  
  4. esp32:
  5. #board type according to PlatformIO
  6.   board: esp32dev
  7.  
  8.  
  9.  
  10. external_components:
  11. #If You copy Custom component to local dir
  12.   - source:
  13.       type: local
  14.       path: my_components
  15.     components: [ uart_mitm ]
  16.  
  17. # If You want to use pure git version
  18.   - source:
  19.       type: git
  20.       url: https://github.com/ssieb/custom_components/tree/master/components
  21.     components: [ uart_mitm ]
  22.  
  23. #Disable logging to use first HW UART
  24. logger:
  25.   baud_rate: 0
  26.  
  27. # Enable fallback hotspot (captive portal) in case wifi connection fails
  28.   ap:
  29.     ssid: "Z906Read Fallback Hotspot"
  30.     password: "6SIYB60XEDVc"
  31.  
  32. # in case You do not have HA To see logs and play with one switch that i made
  33. web_server:
  34.   port: 80
  35.   version: 2
  36.   include_internal: true
  37.   ota: false
  38.  
  39. uart:
  40.   - id: uartsp
  41.     rx_pin: GPIO16 #RX2
  42.     tx_pin: GPIO17 #TX2
  43.     baud_rate: 57600
  44.     parity: ODD
  45. # below enables throwing UART data to ESPHome logs
  46.     debug:
  47.       dummy_receiver: false
  48.       direction: BOTH
  49.   - id: uartcon
  50.     rx_pin: GPIO3 #RX0
  51.     tx_pin: GPIO1 #TX0
  52.     baud_rate: 57600
  53.     parity: ODD
  54. # below enables throwing UART data to ESPHome logs
  55.     debug:
  56.       dummy_receiver: false
  57.       direction: BOTH
  58.  
  59. uart_mitm:
  60.   uart1: uartsp
  61.   uart2: uartcon
  62.  
  63. switch:
  64.   - platform: uart
  65.     uart_id: uartsp
  66.     name: "VOL+"
  67.     data: [0x08]
  68.   - platform: uart
  69.     uart_id: uartsp
  70.     name: "Status"
  71.     data: [0x34]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement