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

OpenEVSE start a session when there is no ESP connected #154

Closed
DylanVautrin opened this issue Jan 25, 2023 · 7 comments
Closed

OpenEVSE start a session when there is no ESP connected #154

DylanVautrin opened this issue Jan 25, 2023 · 7 comments

Comments

@DylanVautrin
Copy link

Hello, I work on a project using OpenEVSE, my issue is linked to the powerloss behaviour, when the power come back, the Atmega boot quicker than the ESP so it start a session (about 3second) between the boot of the Atmega and the boot of the ESP, it is possible to make the Atmega "Unavailable" when there is no ESP detected ? I don't want to start a session when something is pluged and there is no ESP connected.
Thanks for helping !

@KipK
Copy link
Contributor

KipK commented Jan 31, 2023

I saw the same behavior here, and would like a way to prevent Evse doing anything while Wifi module is not connected.

@lincomatic
Copy link
Owner

lincomatic commented Feb 7, 2023

i added $SB RAPI command. If BOOTLOCK is defined, EVSE will wait at boot until it receives $SB. You need to modify your WiFi firmware to send $SB when it boots. I did not test it, as I don't have a box to test it on at the moment. You can reopen the issue if it doesn't work properly.

00ba307

@KipK
Copy link
Contributor

KipK commented Mar 1, 2023

After testing it and implemented it on Wifi fw, I think we would need a new Evse state when locked in bootlock mode.
As it's the same state as starting now, we don't know when Evse is ready to receive the bootlock ( in the case Evs module restarts while wifi module not )

@lincomatic
Copy link
Owner

EVSE always sends $AT and then $AB messages on boot. So you know when it's been rebooted. Just send $SB after receiving $AB. Also, vflags contains ECVF_BOOT_LOCKED, which can always be tested by querying vflags or from any $AT notification.

@KipK
Copy link
Contributor

KipK commented Mar 2, 2023

Ho, I've missed you've updated the vflags too. I'm going to check that thanks 👍

@jeremypoulter
Copy link
Contributor

@lincomatic do you plan to merge this branch to master ?

@KipK
Copy link
Contributor

KipK commented Mar 3, 2023

@jeremypoulter , could you update the openevse lib with the new vflags?

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

4 participants