Hw-655 board esphome

I HAVE AN ESP01 RELAY CARD TO BE INTEGRATED IN ESPHOME …
I HAVE ALREADY USED FOR OTHER PROJECTS, BUT IT DOES NOT WORK WITH ESP HOME.

SUBSTANCE HAS A SERIAL CHIP THAT OPENS AND CLOSES THE RELAY WITH SERIAL COMMANDS THROUGH THE TX PIN OF THE ESP01 SO:

EXAMPLE OF COMMANDS COMPILED BY IDE ARDUINO

// RELAY SERIAL OARD HW655 ESP01
byte relON [] = {0xA0, 0x01, 0x01, 0xA2}; // Hexadecimal command to send to serial for open relay
byte relOFF [] = {0xA0, 0x01, 0x00, 0xA1}; // Hexadecimal command to be sent to serial port for closed relay

THIS YAML ESFOME I HAVE TRIED TO WORK BUT NOTHING TO DO

Example of a configuration entry

UART:
baud_rate: 9600
tx_pin: GPIO01

switch:

  • platform: uart
    id: “RE_1_on”
    data: [0xA0, 0x01, 0x01, 0xA2]
  • platform: uart
    id: “RE_1_off”
    data: [0xA0, 0x01, 0x00, 0xA1]
  • platform: model
    name: “Change model”
    turn_on_action:
  • uart.write: RE_1_on
    turn_off_action:
  • uart.write: RE_1_off

CAN SOMEONE HELP ME?

1 Like

Have you managed to get it running? Im stuck on the same setup. Thanks!

I haven’t worked on that card anymore because it’s installed in my PC. I used it with other firmware to turn it on remotely … I didn’t have time to take it apart, but I’ll do it shortly. I will let you know…

when I tried the firmware I had another card like the ones that didn’t actually work at the hardware level and I gave up. but now that I remember the firmware I had written it. soon I’ll turn it to you. try it and let me know

Hi, I know this is an old feed buck i have just got my solution to work. Hope it helps

Paste this after the initial config.

uart:

baud_rate: 9600

tx_pin: GPIO01

switch:

platform: template

name: “relay”

turn_on_action:

- uart.write: [0xA0, 0x01, 0x01, 0xA2]

turn_off_action:

- uart.write: [0xA0, 0x01, 0x00, 0xA1]

optimistic: true

Thanks for sharing. I haven’t tried since. but these days I will try your configuration