Closed KipK closed 1 year ago
[@jeremypoulter] what are the requirements for the Wifi Portal Version ?
I'm thinking about doing a step by step configuration process.
Also I'd like to display firmware udates to the UI and use http ota ( I see you've alreadty implemented it on firmware), but we can't use github api directly as it requires https and fails with multiple redirects for what I've tested. Could you setup a wrapper on openevse.com ?
Would be nice to have a sort of wizard that takes you through setting up the (hardware/install) max current, connects to the WiFi (or reports that ethernet is connected) and finally allows the firmware to be updated. Yes ideally this would be from GitHub, HTTPS shouldn't be a problem, it is just the redirects, need to ideally just handle these, either generically in ArduinoMongose or specifically for the update.
Yes that's what I want to do there. Only a simple wizard and no charge feature . So we set max_current_hard and mx_current_soft using the same value, then Wifi/Ethernet ( Remind me , I have not done the Ethernet configuration parts for fixed IP ), then firmware update. I can catch the latest release on GitHub, but can't download it yet using the http download ota actually implemented. There's probably some change to do on the ArduinoMongoose lib first . It was working fine with http direct links hosted somewhere else. I have not tried with asyncTCP lib For now we can display the download link .
max_current_hard
may not actually be implemented yet, but this is a write once value that sets the absolute maximum value, you can then adjust max_current_soft
up to that value. This is mainly for the American market where the EVSE can handle up to 80A but will be installed with different wiring, etc and will likely not be able to supply the full 80A. For now we just set the soft value.
For wired it is just a case of detecting that the connection is wired and displaying that a message instead of the WiFi config.
I did do some testing of GitHub OTA and it works if you manually do the redirect, so just need to implement something to do that.
I did do some testing of GitHub OTA and it works if you manually do the redirect, so just need to implement something to do that.
Do you still have a bunch of code somewhere on how you did that?
There are some examples in https://github.com/OpenEVSE/ESP32_WiFi_V4.x/blob/master/test/update.http, all I did to make it work was use cURL to get the actual URL
and for the ethernet module, what would be the condition to display the wizard ? I see you use AP mode only for wifi modules.
There are some examples in https://github.com/OpenEVSE/ESP32_WiFi_V4.x/blob/master/test/update.http, all I did to make it work was use cURL to get the actual URL Ho, I did that alrezdy, but I have no idea how to bypass that on esp side ( but using a node.js wrapper )
edit: stupid me , i can do that on js side .. edit2: not sure it can work, I'm fighting CORS problem when requesting the fileurl to get the redirect response. If I use no-cors, I can't then have the response of the fetch api but I can get the blob. Edit3: I think I'll bypass that by downloading the binary blob on client side in an object and submitting it to the ota form. All client side but should works edit4: failed. using no-cors seems javascript has no access to the blob so it's useless. Can't do that on client side.
I think max_currznt_hard is implemented , I remember I've fucked up my openevse by setting it to 6A while testing, and then had to reflash to Atmega firmware then. :)
Le ven. 16 déc. 2022, 19:55, Jeremy Poulter @.***> a écrit :
max_current_hard may not actually be implemented yet, but this is a write once value that sets the absolute maximum value, you can then adjust max_current_soft up to that value. This is mainly for the American market where the EVSE can handle up to 80A but will be installed with different wiring, etc and will likely not be able to supply the full 80A. For now we just set the soft value.
For wired it is just a case of detecting that the connection is wired and displaying that a message instead of the WiFi config.
I did do some testing of GitHub OTA and it works if you manually do the redirect, so just need to implement something to do that.
— Reply to this email directly, view it on GitHub https://github.com/KipK/openevse-gui-v2/issues/17#issuecomment-1355424253, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADXKVNFYVAGLHKLOZL5NU3WNS3LNANCNFSM6AAAAAAS4CZJKM . You are receiving this because you authored the thread.Message ID: @.***>
@jeremypoulter , finally, there's no way I can do that on client side because of CORS issues with fetching binary from github. ( edited comments above )
I see in http_update.cpp line 30, the response code is catched here.
Can we catch the 302 redirect there and then get back to the
if(response->respCode() == 200)
?
I'm not used to this moongoose library, if you see the quickest way to handle that
It is something I need to sit down and think about. Will try and take a look, would be great to get it done.
Everything is ready on client side so if you have something to test, please share :)
So It now displays if there's an udpate available:
and then propose to download the file or direct upgrade from github release using http_update
@jeremypoulter It works already ( until openevse response ), you can use it for testing if you works on it
Wizard is ok. It's handled on client side, and will redirect to wizard mode if mode is "AP" or "STA+AP" with SSID not configured like current implementation.
After Wifi connection, it will redirect the window to the wizard network page using new {hostname}.local url and displays the connection states. Next step is firmware update.
@jeremypoulter ? I have not found a correct condition to show the wizard for ethernet connection
Nows the wizard is handled in client side, there's no need of the
path = String(net_wifi_mode_is_ap_only() ? WIFI_PAGE : HOME_PAGE);
for the v2 UI, and we points now to index.html
I have pushed rc2 https://github.com/KipK/openevse-gui-v2/releases/tag/1.0.0-rc2 I think we can try this one on the firmware now.
EDIT: rc2 https://github.com/KipK/openevse-gui-v2/releases/tag/1.0.0-rc2
I know have a stable ( I hope ) polished version for latest UI as https://github.com/KipK/openevse-gui-v2/releases/tag/1.0-rc1
please [@fhteagle ] [@jeremypoulter] can you give a test and reports back ?
Hope you'll like it.
To do for rc2;
Wizard Setupdone: https://github.com/KipK/openevse-gui-v2/commit/1371a23b0c7cbbb7caa04a5cb440d297f7b74126RAPI developper pagedone: https://github.com/KipK/openevse-gui-v2/commit/2a0b5012bfaf35083a8d9a8de9c700e10f34d364check that passwords/keys are not sent on various forms when filled by "DUMMY_PASSWORD"add About section with OpenEVSE links + docdone: https://github.com/KipK/openevse-gui-v2/commit/5eef75469d3fe0ac3e071a04683d40ab607856d0Add Max Current Soft setting ( forgot this one ^^ )done: https://github.com/KipK/openevse-gui-v2/commit/01b03dfd11b993cfaab9cf6c8da3cc3971753451clean-up the messrewrite Monitoring page with tabsdone: https://github.com/KipK/openevse-gui-v2/commit/b0773b84d02080fab68ec4e459bbe191597efb90host Fonts & Icons locallyhttps://github.com/KipK/openevse-gui-v2/commit/72fd12006b30acb779d310f9546201faa372cd80 & https://github.com/KipK/openevse-gui-v2/commit/bf3acca91101b41087126579befc83f369a8a2a9Time & Charge Limits are disabled for now until proper API integration on EVSE firmware