Esp32 and RS485 HEX

Hi everyone,
I’ll try to explain my problem, sorry if I’m unclear.
as the title suggests I have an esp32 (to be exact wt32-eth01) and then I took two cards (R421B16) these cards communicate in RS485 and I only noticed now that they only communicate in HEX, now I haven’t found anything about it on how to do it, I connected them to esp32 via a MAX485 following some diagrams online and it seems to work,
but until I create the commands in HEX from esphome I can’t know, can you help me?

I also have the complete file with examples of the hex commands to give, only that I’m not at the PC now and I don’t know how much it would be useful!

I had a similar problem decoding the hex values from my Pellet stove rs232 communications between the control panel and the MCU. RS485 will be similar - you just need to get the values. Another very helpful user wrote some basic code for me and I ran with it. Specifically this function:

UARTDebug::log_hex(direction, bytes, ' ');

You can see it in use here on my GitHub…

https://github.com/jazzmonger/wood-pellet-stove-with-TYWE1S-Tuya-chip/blob/56b9f942eb676799d4da2b376caf3c8ca5f4e170/ESP32%20Pellet%20Stove%20wit%20mods.yamlb

Look at lines starting at 46.

Jeff

1 Like