Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modbus Connection Issue with Heidelbridge - Wallbox Flashing White and Blue #2

Open
darkblum opened this issue Oct 1, 2024 · 14 comments

Comments

@darkblum
Copy link

darkblum commented Oct 1, 2024

Unfortunately, I am unable to establish a connection through the Heidelbridge.

I followed your instructions carefully:

  • Set S4/4 and S6/2 bit 1 as instructed
  • Verified the pin connections
  • Changed the WLAN Settings and flashed as instructed

However, the Wallbox is still flashing white and blue, indicating a Modbus error.

I also added a 120-ohm resistor between Pin A and B, but there has been no change.

Did I overlook something?


Let me know

@BorisBrock
Copy link
Owner

BorisBrock commented Oct 1, 2024

Hi darkblum,
there are several things to check:

  1. Please double check, that the Heidelberg wallbox is configured correctly. See the official manual here or this guide.
  2. Make sure the connection between the wallbox and your rs485 board is correct (wires not crossed? all wires firmly secured? 120 Ohm resistor? Shielding only connected at one end (wallbox)?).
  3. Check your ESP32+RS485 setup: are the modules properly interconnected? Did you use the correct pins?

Please also check the ESP32 serial port outputs. It should print a lot of messages (especially on startup), that might be helpful.

Also: what kind of setup are you using? Breadboard or custom PCB? Which ESP32 board are you using exactly?

@darkblum
Copy link
Author

darkblum commented Oct 2, 2024

Hello BorisBrock,

I've managed to establish the correct connection to the wallbox. Initially, I thought that the A/B connection on the left and right sides of the PCB had the same orientation, but that wasn’t the case. On the left side, it’s B/A, while on the right side, it’s A/B. So now, there's no more blinking.

I’ve also integrated the charger into EVCC and set up the load point, but my EV isn’t registering as "connected." The vehicle status always shows as "disconnected," and I’m getting the information through MQTT. My EV is entering a charging failure state due to no current being supplied and I don't hear the relais clicking from the Heidelberg.

I am using ESP32 WROOM-32D with usb-c connector and no breadboard only jumper cables and WAGO connectors.

What should I check next?

@BorisBrock
Copy link
Owner

BorisBrock commented Oct 2, 2024

Hi darkblum,
good to hear that the Modbus connection is now working 👍

I'm using this project with a VW ID3 and the vehicle connection detection works 100% reliably. This week I also connected a Skoda Enyaq from a neighbor and that also worked very well. Which car are you using?

For solving your issue, I would recommend reading the serial outputs from the ESP32 with a serial monitor. HeidelBridge will read the register containing the connection status cyclically every few seconds, and there should be plenty of messages. This way we can see, if the wallbox is not detecting your vehicle at all, or if reading the register fails.

So:

  • Connect the car
  • Wait a few seconds
  • Start logging the serial outputs for a minute or so
  • Post the results here

PS: Do you see other values from the wallbox in evcc? Did you check the MQTT values (e.g. with MQTT Explorer)? Do you see valid values here?

@darkblum
Copy link
Author

darkblum commented Oct 2, 2024

Hi,the car I’m using is a Tesla Model 3. Ideally, I’d like the wallbox to charge different guest vehicles as well, so it would be best if no specific vehicle was predefined. I’m receiving new inputs via MQTT every few seconds, but all values are showing as 0.

I’m using MQTT Explorer with Home Assistant, and I plan to analyze the logs later using VS Code/serial monitor or do you've a better idea to use serial monitor?

Thanks for the help!

@BorisBrock
Copy link
Owner

Hi, it should not make any difference which car you are using. Only if you want it to show up in evcc in a defined way, you would need to do some additional configuration there.
But regarding HeidelBridge/Home Assistant there is nothing to do here.

The VS Code Serial Monitor should work fine. That's what I'm using as well.

PS: When compiling the code you can choose between two environments: "dummy" and "heidelberg". You could also try using "dummy", which will provide some hard coded values. These should definitely show up in MQTT/Home Assistant.
For communicating with the real wallbox, make sure to compile the "heidelberg" environment though.

@nobsch
Copy link

nobsch commented Oct 30, 2024

Hello, first of all thank you for the great project. Unfortunately my Heidelberg EC is also blinking the Modbus Failure. It starts when configuring the Wallbox for Modbus and never ends. I checked the DIP Switches several timesI tried different rs232-Modbus Converter and also the wiring. No change.
The crazy thing is, that the HeidelBridge can read the Wallbox (Temperature, Power) and write the charge current. So in fact the communication should be OK. But the Wallbox is continously blinking and the connection to the car is not recognized. No charging. When I change the configuration of the Wallbox (S4,S6) all is fine.
Do you have a hint for me?

@BorisBrock
Copy link
Owner

BorisBrock commented Oct 31, 2024

@nobsch First of all you should check what kind of error you are getting EXACTLY. The different blink patterns are described in the Heidelberg EC manual (chapter 1.6).

The installation manual has all the relevant info on setting the dip switches etc. Just in case you want to double/tripple check.

Regarding heidelbridge:

  • Please make sure you have built and flashed using the "heidelberg" environment, not "dummy".
  • Change "LOGGING_LEVEL_ERROR" in the platformio.ini to "LOGGING_LEVEL_DEBUG", and build/flash the firmware. Then check the serial monitor and see what you get (is Modbus working properly?)

Feel free to attach an example log here (don't forget to press reset on the ESP32, so that the log also contains the initialization part).

@nobsch
Copy link

nobsch commented Nov 1, 2024

Thank you Boris. Error Code is the communication failure (6x White, 3xBlue). I have checked the dip Switches several times. Because there are only 2 changes to do, it is not so complex.
The heidelbridge is compiled with heidelberg environment.
Because the heidelbridge is communicating i am not convinced that the log files will help. I will try to get information over the serial interface. But it will last a little bit

@nobsch
Copy link

nobsch commented Nov 11, 2024

Now I have tried it.
This is debug:
--- Terminal on /dev/ttyUSB0 | 115200 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
[DEBUG] Read Heidelberg failsafe current: 6.000000
[DEBUG] Heidelberg wallbox: Read energy meter value: 0.000000 Wh
[DEBUG] Reading currents: 0.000000 0.000000 0.000000 A
[DEBUG] Reading voltages: 233.000000 231.000000 229.000000 V
[DEBUG] Heidelberg wallbox: Read state: 10
[DEBUG] Heidelberg wallbox: Read max. charging current: 0
[DEBUG] Reading power meter value: 0.000000 W
[DEBUG] Read Heidelberg failsafe current: 6.000000
[DEBUG] Heidelberg wallbox: Read energy meter value: 0.000000 Wh
[DEBUG] Reading currents: 0.000000 0.000000 0.000000 A
[DEBUG] Reading voltages: 234.000000 231.000000 229.000000 V
[DEBUG] Heidelberg wallbox: Read state: 10
I can see no Problem. The Heidelberg is still blinking the communication failure.
Do you have any idea?

@alexseuf
Copy link

@nobsch did you conect L and N the right way ( even if you have got a test setup with schuko connector). because if you connect L and N mixed up, the heidelberg box is blinking the same error code (=input voltage error) as with a communicating error...

@nobsch
Copy link

nobsch commented Nov 23, 2024

You mean the Power connection of the wallbox?
This is OK. The blinking code is only when i switch to modbus.
Without modbus configuration the Wallbox works for 7 months without problems

@nobsch
Copy link

nobsch commented Nov 25, 2024

Today I got response from Heidelberg support.
The suggestion was to set register 257 (Watchdog timeout) and 258 (Standby function Control) to 0.
I think I saw in the terminal log something about Watchdog. But I am not sure.
Do you set both register to 0?

@sja
Copy link

sja commented Dec 27, 2024

258 is listed here, and is set to 4 here.
257 is not defined, I think its not set

@BorisBrock
Copy link
Owner

I just published version 1.8.0, which will set both registers on startup:

  • 257 (watchdog timeout) is set to 0 -> Watchdog disabled
  • 258 (standby mode) is set to 4 -> Standby disabled

On startup, the Heidelbridge should print debug messages indicating which defaults are being written. In case the values can not be set, proper error messages will be printed.

Both defaults can be changed in Constants.h, if required.
Why the Heidelberg support suggested setting 258 is not clear to me. Disabling the standby seems more appropriate here... But feel free to try it with both values and see which ones work best.

Thank's for testing 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants