question

nathan-skelly avatar image
nathan-skelly asked

EV Charger Disconnecting - Node Red Implementation?

Hi There,

I've been playing around with Node Red to come up with a control logic for running the EV charger in an off grid situation. What I want to understand is whether there is a best practice in how you manage the messages to the charger?

The reason for my question, is since using the Node Red automation, I seem to have the EV station disconnecting very frequently, requiring me to switch it off at the switch board and back on to reset it.

I get correlation =/= causation, but it seems a touch convenient that it happens now.

Is there a best practice on how to do this? I've never coded before so this is all a learning experience for me, and Chat GPT only gets me so far.

Node-REDModbus TCPev charging stationevcs
3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

nathan-skelly avatar image nathan-skelly commented ·

I've still got this issue, it has happened again this morning. So the charger came on as intended last night, charged as designed, then seemingly when it switched off, as the control logic intends, it has disconnected the system.

You can see the car charger load in the AC Loads part, the nice fat even block that was overnight.


victron-vrm.jpg


I've not reset it yet. but essentially it shows a locked charging rate, but the time and the charged energy don't change. When I unplugged my car this morning, the light ring was off.

0 Likes 0 ·
victron-vrm.jpg (113.4 KiB)
nathan-skelly avatar image nathan-skelly commented ·
I witnessed the behaviour of it this morning, around the time it would automatically turn off.


It was switching on and off repeatedly. So I wonder if it is a case of it trying to write two values at once (charge rate and charge status)

I'm going to modify my code to include some hysteresis for switching, and rate limit the on/off to a message every 5 minutes.

0 Likes 0 ·
nathan-skelly avatar image nathan-skelly nathan-skelly commented ·
I've had this happen again today, it seems to occur around the time the charging would switch off in the morning. I've got the code so that it will only send an on/off command once every 5 minutes, so it shouldn't be saturating it.


I'd appreciate any further guidance @Lucian Popescu (Victron Energy Staff)

0 Likes 0 ·
1 Answer
matt1309 avatar image
matt1309 answered ·

Hi @Nathan Skelly

When you say disconnect do you mean fully crash/is unreachable via wifi? Or do you just mean the node goes offline for a period of time? ie could it be that the unit has always been disconnecting and reconnecting (maybe due to weak wifi) and you're just noticing it now because it's connected to node red and checking the status of the node?

Or by disconnecting do you mean the unit disconnects and never reconnects? Almost like it's crashed (if that's the case I'm not too sure, you could maybe share the automation code and someone might be able to spot something that is causing the EVCS to crash or have an issue.

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

nathan-skelly avatar image nathan-skelly commented ·

Hi @matt1309


Disconnects as in seemingly loses power/shut down and needs a hard reset. It shows as disconnected from the CerboGX, and I can't connect to it via bluetooth using VictronConnect either. The light ring around it is off, and the only way it seems to come back on is to turn it off at the switch board and back on.

My wifi is in the garage with the charger, so definitely not a range problem.

I'm not sure how to share the code, it far exceeds that character limit here.

1000000057.jpg

This is the flow. It has 3 different charging modes running through. Outputting a 1 or 0 to turn the charger on or off, filtered so only sending 1 message (in theory)

Then dynamically adjusting the amps based on 3 different targets depending on the charging mode that is operating. Again sends one message filtered to when it changes.

0 Likes 0 ·
1000000057.jpg (306.5 KiB)
matt1309 avatar image matt1309 nathan-skelly commented ·

I'm not too sure then sorry. I was going to ask are you writing directly to modbus and maybe there was some sort of issue with writing to the wrong register and causing the unit to crash but appears you're using the actual EVCS node so it wont be any rogue modbus postings.

I'm not too sure how the code/firmware works on EVCS side to guess if there's an obvious thing that might crash it, my next guess was going to be maybe sending data too quickly to the unit, but i imagine they'll have coded it such that it wont be impacted by that.

Is there a length of time it tends to last before crashing?

My only suggestion is setting up some sort of logging system. So you can see what node red sends to the EVCS and at what time you're sending it before it crashes.

Maybe adding in a function that comes off the last but one node with something that write's msg and timestamp to file. And another node/flow that detects if evcs node goes offline to record when the crash occurs.

Then see if you can spot a message or something that you send from node red to the unit that triggers it.



0 Likes 0 ·