Hi,
We want to use WiFi-enabled ESP2866 (WeMos D1 R1 board) to control some relays, and in addition, to provide us (re-send) output of VE.Direct via same WiFi connection we control relays. Everything is powered with Victron MPPT 75/15, using lead-acid battery and solar panel, i.e. sort of “off grid” power / device box.
Strangely, I can read VE.Direct output with ESP2866 correctly only if:
- Using EspSoftwareSerial::UART (SoftwareSerial), but only with
invert
parameter set to true. Sadly, software serial does not seem stable enough, that is I lose some bytes (probably due to WiFi cpu usage, etc?). - Using HW SerialPort (D0 as RX), BUT with huge hack by using TWO UART->TTL MAX3232-based converters [see picture below], because otherwise I get garbage bytes into SerialPort.
Strangely, if I use same (single) UART-TTL converter to connect with PC (using random USB<->RS232 cable in addition), and connect VE.Direct with that UART-TTL headers, I can red VE.Direct output just fine.
Do I miss something? Maybe VE.Direct is inverted for a reason and I MUST use special cable? But why then it works with MAX3232 converted connected to PC…? I’m completely lost…
Here’s the hack I can use to avoid garbage bytes when using HW SerialPort of ESP2866:
P.S. I use same 19200 8N1 settings in ESP2866 and PC.