Open Alexandros89 opened 1 month ago
This prefix (>>>
) indicates outgoing traffic / requests. Your log doesn't show any responses (<<<
). In other words: Your inverter does respond. Please double check your wiring and RS232 converter.
Do you know anything about the supported protocols of your inverter?
I think that the cable shouldn't have problem.
I have asked the seller if he send me the modbus protocol
Why is a gender changer required if you use the original cable? Could you provide photos of the complete setup (Inverter<->RS232 converter<->ESP).
This is the board
This is the original cable
The board has natively rs232 port
I've checked the description of the k868 a6 board:
Using GPIO16
and GPIO17
looks good but I guess it doesn't work because RX & TX are swapped because of the wrong gender of the connector.
In fact I use this board for this reason. I have checked before to use. I have documented. I have try also to exchange on esphome the gpio but the result is the same. I will check the cable with the multimeter to understand the pin.
Swapping the GPIOs at the YAML won't work because the GPIOs are attached to the MAX3232 which has dedicated input and output pins. Do you remember the 0-modem cable from the 90s? ;-) This adapter did cross the RX/TX lines of a serial cable. Connecting two PCs using a RS232 cable + a gender changer won't work too.
In fact initially I was looking to use a old serial cable but some days ago I wasted all old cable :-( I can change the rj45 cable and crimp newer exchanging the cable 1 and 2?
I can change the rj45 cable and crimp newer exchanging the cable 1 and 2?
Please measure the lines first but I guess this would solve the issue.
I have tried this
But I don't see anything
Could you try the PIP protocol as next step? F.e. using this YAML: https://github.com/syssi/esphome-pipsolar/blob/main/tests/esp8266-test-protocols.yaml
Do you have another ESP + RS232 converter so we could verify the setup is working in general?
Seems that the inverter doesn't respond
Did you try to swap the GPIOs another time?
Could you bridge the TX to the RX pin of the DSUB connector and test using this loopback? Do you see the outgoing traffic as incoming traffic?
Yes, I have tried. Now I tried also to connect the rs485 of the inverter to the board but the result is the same
This is the log with the bridge and the dummy receiver and log both directions
I have done the bridge in this way
There is still no incoming traffic. Something is wrong with your setup. Did you try to swap the GPIOs assigned to the UART another time?
Feel free to ask more questions if something isn't clear yet.
I try to swap this morning without any good result. This evening searching at home I find 3 serial cable. Tomorrow I will try : Check the serial communication from the inverter, I will connect to the pc and open a serial terminal and look if it send any value Check the rs232 of the board with an original cable. I think that the wires inside the db9 pinout doesn't make good contact
I try to make some findings explicit to provide some guidance. Your ESP32+RS232 board doesn't work as expected at the moment. If you bridge TX and RX we should receive an echo (<<<
) of every outgoing frame (>>>
). Some ideas what needs to be checked:
TXD
(p2), RXD
(p3), GND? (p5)) and the MAX3232 (
R1OUT(p12)
T1IN` (p11)).R1IN
(p13), T1OUT
(p14)) and GPIO16
+ GPIO17
.TXD
) and pin5 (GND
). I have check with the multimeter. If on the 3232 chip I bridge 13 and 14 pin I see on the log some code received. If I bridge the 11 an 12, I don't see anything in the log
Could you show your log? Your observation seems not logic.
With this bridge
I have this log
With this bridge
I have this log
Okay. This makes more sense. In other words: If we bridge GPIO16
and GPIO17
directly (at logical level = 3.3V) the loopback works fine. The uart
of your ESP32 works in general. The MAX3232 transforms the signal from logical level 3.3V to the RS232 voltage level of -12/+12V. If we bridge the RS232 TXD/RXD pins the loopback doesn't work.
As next step we have to make sure your MAX3232 is properly powered. Could you measure the voltage between pin 15 and 16? And could you measure the voltage between the RS232 TXD/RXD pins and GND (p13<->GND, p14<->GND)?
These are the voltages
I have found an old rs232 module that I have used when I was very young.
I connect it and this is the log
It works. Then the problem is the rs232 module of the board
Connecting this module ![Uploading IMG_20240922_173210.jpg …]() I have this output
This garbage happens most of the time if GND isn't connected properly.
Ok now I check better
I read this
This looks like garbage only. Please share plaintext logs instead of screenshots!
What are you doing exactly at the moment?
Hi, I want to tell you that I'm talking with kincony to test the rs232 port. Probably is my board with a problem
hi, i'm using a k868 a6 board that have the rs232 port, i have connected to the inverter with his original cable. the firmware that i'm using is esphome with this configuration:
and my output is this:
but on home assistant i don't read anithyng.