Replies: 2 comments
-
I think it should be possible with HAA to change the state of the CP wire and read the state of the relays. I am not good at scripting for HAA so not sure what that would look like but leaving a comment here as I am also interested in this solution. |
Beta Was this translation helpful? Give feedback.
-
HAA knows the state of the relay (open/close) already at any time. As the CP circuit is directly controlled by the relay, i.e. opened or closed, both status are equal. The trick here would be for HAA to know if the T2 connector has been plugged in the vehicle or not, which is an event that is detectable (once the relay is closed) by a change in the 12V voltage carried by the CP wire itself. With a timer involved. This, I am not so sure HAA can do it. If you want to test the original solution above using the Sonoff SV + the Arduino (retaining the automatic deactivation of the ability to charge after time up) with HAA instead of eWeLink; or the Sonoff SV only with HAA and without the Arduino (hence without the automatic disabling feature) then flash the Sonoff SV with HAA and use this MEPLHAA script:
The integrated button on the Sonoff SV board (GPIO 0) can be hold over 8 seconds to access Setup Mode, and is also a momentary switch to enable or disable charging on the EVSE physically. |
Beta Was this translation helpful? Give feedback.
-
Purpose of this open-source hack
Enabling control access over Wi-Fi of any basic EVSE (electric vehicle supply equipment, commonly called an "EV charger" or "wallbox") that has no connected smart feature in the first place.
How
In all EV charging cables, there is a thin wire called the "Control Pilot" (CP). This wire carries a 1kHz square form signal at 12V constant voltage.
If the control pilot signal is absent (i.e. drops to 0V) then charging the EV is impossible (not acknowledged by the wallbox). Therefore, being able to interrupt the CP voltage at a distance over Wi-Fi allows access control (preventing unauthorised people to charge their EV). If integrated with a smart environment like HomeKit, the owner can also schedule the charging to take place at off-peak times using Automations. He can also properly interrupt charging at a distance, at any time and from anywhere.
This is the correct way to interrupt an EV's charge. Sure, alternately a Wi-Fi DIN circuit breaker in the electric panel can de-energize the entire EVSE and cut off the charge, but this is akin to a sudden power failure that neither the charging station nor the vehicle's electronics and software appreciate. Dropping the CP signal to 0V instead is a proper request to the wallbox to stop charging.
Enhanced solution
The tutorial https://ev-olution.yolasite.com/Sonoff-EVSE.php shows how the output terminal of a Sonoff SV in isolated mode can be controlled over Wi-Fi as a potential-free (dry contact) switch to achieve such a goal.
Moreover:
An Arduino Pro Mini is used to monitor the control pilot signal and Sonoff relay to disable charging by opening the relay again if the T2 plug is not connected to the EV within 20 seconds after activation of the relay, or 1 second after the plug has been disconnected from the vehicle. This ensures that the ability to charge an EV will not remain active if the user inadvertently activates the switch or forgets to switch it off after charging is complete. It also prevents unauthorized use of the charging station without the owner's knowledge or consent.
Arduino pins:
2 - relay deactivation signal
7 - EVSE control pilot signal state detection
8 - relay state detection
Arduino code:
Question
Can the logic implemented in the Arduino in the example above be coded directly in HAA? So that only the Sonoff SV is mandatory, and no Arduino is needed.
Beta Was this translation helpful? Give feedback.
All reactions