ESP32 and EPEVER 2210AN

Sorry, but didn't have time to do further measurements. But I did some reading. :smiley:
I read in the EPEVER manual :
Examples
Read real-time battery voltage
Device ID:0x01
Function code: 0x04
Register Address: 0x3104
Register count: 0x0001
Send command: 01 04 31 04 00 01 7E F7
Receive command: 01 04 02 04 CE 3A 64
Read Holding Register Value: 0x04CE
0x04CE (hex) = 1230 (dec)
1230 / 100 = 12.3 volt
I've been reading the Modbusmaster.h and modbusmaster.cpp files and I couldn't find the send and receive commands mentionned above. Also in the sketch I can't find this sequence of data to be sent or receive...
Now I'm wondering : whatever I send to the Epever, I always get the "answer" E0. This E0 : does it really come from the Epever ? Or does the sketch + library generates this E0 ?
Probably tomorrow I'll check the responses on the scope...
In the mean time : thanks so much for your help and effort ! :wink:

go back to answer #12 and read it again.

The function codes are defined here:

Sorry, noiasca but I haven't got much time lately to work on this project (because other priorities ... ) Nevertheless, I could see that after the RE/DE goes low again, nothing happens on the "A" line anymore ...
I also swapped all RX/TX lines (before and after the level converter) in every combination, but still the same result. I'm starting to think that there's a flaw in the library... although : who am I....
I also searched on the internet on several places, but I can't find anyone who has a WORKING project...
So, please if you have some more ideas don't hesitate to post 'em. I'm sure that there are more people than just me who have the same problem...
But again : thanks Mega times for your support !
Hopefully I'll have some more time in the near future to work further on this project.

it is very unlikely that the library has flaw in that area. I suspect your wiring or your settings.

If your scope doesn't recognize traffic from the the charger, it is not responding.
You should have an USB-RS485 module in the meantime to be able to test with the PC. If not - order one now.
If you have another microcontroller available, you can set up a test RS485 network to see if your basic settings are correct. If that is working - in my Modbus Server (Slave) Library there is one example which simulates an EP Solar Tracer.

Again thanks, noiasca !
Meanwhile I bought the epever RS485 to USB cable and downloaded and installed the epever software. Not super easy 'cause at first my laptop didn't show any COM ports in the device manager. But after browsing through the internet, I finally got it working. This tells me that there's nothing wrong with the controller, and when you ask the "right questions", it replies with the right answers. Now I know that there is something wrong or in my circuit board OR the software.In the next coming days I'll look further into my ESP32 setup and I'll come back with the results... fingers crossed !
HERE you can find a screenshot of the main window of the epever prog.

thank you - I know that software and that data cable.

As you now have a working data cable, you can watch your bus.
Connect your master, and the oem datacable and the tracer.
Open a terminal program for the oem datacable.
Check what your master is sending and if your tracer is responding.

Hey noiasca !
Yes, I'm still alive :smile:
Sorry for taking so long to get back at you about my "problem" but I had a few more important and urgent projects to start and finish before I could work further on the solar project. (There's not to much sunshine anyhow :rofl: )
BUT... It's finally working !!! Yes yes yes !
I bought another RS485 to RS232 converter namely this one and I followed the "instructions" from here
It worked from the first try !
I'll have to design/make a new pcb because this module does not fit (not physically, nor connection-wise) on my existing board. But that's no biggie :wink:
Also I'll have to modify the sketch to my preferences, but al l(e)ast it's working. The ESP32 communicates flawlessly with the Epever !
Nevertheless I want to thank you again for your great help on this project. If you ever think that I can help you with something : Do not hesitate to contact me !

which sketch is working for you now? I just see a copy of the examples shipped with the modbus master library ...

I used the "no_blynk" sketch.
I'll have to work on it, 'cause I want to see the data on an LCD.
I have a (working) sketch from my previous Epever (RS232) so I "just..." have to copy the no_blynk sketch into my "old" sketch. (wish me luck :wink:)
I'll be back

Good thread guys, thanks, I plan on embarking on reading from an EpEver Tracer 30 Amp controller with ESP8266 in the near future, so this was also helpful to confirm what converter to order..

I now have one of these in my shopping cart!

the "convertor" you mention works for me like a charm.
One remark : do not connect GND from epever to ESP.