delhatch / ESP32_to_SMA

ESP32 connects to SMA Sunny Boy inverter over Bluetooth
19 stars 13 forks source link

Can't get any byte after connection & connection only last 16 seconds #1

Open serniko97 opened 2 years ago

serniko97 commented 2 years ago

Hi @delhatch, I was trying out this awesome project but unfortunately I can't get it to work. I always get this error message: *** FATAL ERROR *** About to do a soft restart of the ESP32 now!

I tried to understand the root cause and found the following:

The biggest issue is that I never get any byte from the SMA as after calling initialiseSMAConnection() it waits for SerialBT.available() to become true until the connection drops because of the 16 seconds limit and the fatal error above is returned.

The model of my SMA inverter is SMC 6000A-IT (Sunny Mini Central) and the bluetooth board inside is an SMA Bluetooth Piggy-Back. I also have an SMA Sunny Beam and that is working fine without any issue, it's NetID is 2. The software version of the inverter is 12.09.121.R.

Lupo135 commented 2 years ago

Hi @delhatch, I can confirm the problem above. I solved the problem with the pin with a zero after the four pin numbers. "const char pinbuf[] = {'0','0','0','0',0};" Otherwise the pinbuf was extended with the "SMAInverterPasscode". The problem with the sporadic connection and disconnection after 16 seconds still exists. I have an SMC6000TL SMA inverter with a plugin bluetooth board. Please help!

serniko97 commented 2 years ago

Hi @Lupo135, do you know what is the software version of your inverter and it's Bluetooth board? Is your BT board a Piggy-Back?

While looking at issues for SBFspot (which uses the same logic) I found this comment where it's mentioned that in June 2013 it was released an update for the Piggy-Back board that can be installed via Sunny Explorer (however it will erase all stored data).

I'm sure I haven't installed this update since my system was installed in 2010 and has never been touched ever since. I'm very curious to know if this actually solves the issues we are having but I can only try during the weekend. Let me know if you do it before me and if this solves the problem.

Lupo135 commented 2 years ago

Hi @serniko97, today I updated the protocol-converter software from 02.00.6.8 to 02.00.10.8. But this did not change anything on the behavior described above. I could not find any update file for the bluetooth component. I still have software revision 01.01.12R and 03.03.20.R on the communication board.

serniko97 commented 2 years ago

Hi @Lupo135, I'm not sure what the "protocol-converter", "bluetooth component" and "communication board" are.

However on the Italian SMA website I found the firmware update (version 2.00.10.R) for the Piggy-Back and here there is also a readme.

Lupo135 commented 2 years ago

Hi @serniko97, this is exactly the file I loaded into the SMC6000TL. Attaced is a screen shot of the Sunny Explorer after the firmware update. BT_ModuleNew