OpenEVSE new user interface, testers & translations needed

ah perhaps something, I have not tested yet evse in offline mode. Does you openevse has access to the internet or not ?
Can it fetch content from outside ?

I see some conditions I have not checked on this page.

edit: @greentangerine I’m compiling a new one with something to test. I had forgot some checks on previous page. I hope it’s that

@greentangerine grab openevse_gateway_f_4.1.9-dev-0.2-v2gui.zip from my drive below

Thanks Kip.
I’m using PIO and added these lines to [common] in platformio.ini

-D DISABLE_WIFI_PORTAL
-D WEB_SERVER_ROOT_PAGE_INDEX

How do I tell platformio to use the new GUI to build against (ie set the env variable in platformio.ini).
Sorry for the stupid questions.

I’m on platform too. You also need this env var:
export GUI_NAME=…/openevse-gui-v2
it will be used by the python script when building, you can’t put it inside platformio.ini

ho and you can’t compile on windows, the script doesn’t work yet, but you can on wsl.

Thanks, I don’t know how to get PIO or VSCode to see that env variable that I set in the shell. The export only applies to the current instance of the shell ? (I’m on a mac)

set it in your .bash_profile :
export GUI_NAME=…/openevse-gui-v2
export PLATFORMIO_BUILD_FLAGS=‘-D DISABLE_WIFI_PORTAL -D WEB_SERVER_ROOT_PAGE_INDEX’

When you will open platformio it will then have access to those env variables ( if started from the same user )

You’ll have to logout from your shell after setting the .bash_profile, and login again to get the env var ok

I guess you’re on linux and launching vscode from the prompt, which would take the variable into account.
On mac it launches in it’s own environment.

When I build it, I get ‘Not found’ when going to the root URL :frowning:

I’m on windows, using WSL vscode extention
You can look at how it compiles on github this will give you some hints I think.
check the .github workflow here :

I guess @jeremypoulter will be a better help on this subject.

Thanks Kip, I’m struggling and it seems so basic… I just don’t know the thing to set.
I’d have expected to simply replace the existing gui dir with the new one and everything would work. That didn’t work either… so I’m lost.

try to run the shell from the icon at the bottom :


there set your env variable and run pio command from here to compile your build
the first shell provided is pretty pointless it doesn’t even has pio to run.

ack… you are thinking like I did.
I did that, the build worked, but when I do a PIO upload, it does a clean build and doesn’t take into account the variable setting.

I’ll keep playing…

Use the argument -t upload to build and upload from the command line

Thank you.

I’ve got it working… you can just replace the contents of the existing gui directory with the new repo. The trick is you need to run npm install in the new repo too. I missed that step. After doing that and a correction to the path to timezone.js in vite all seems to be working.

That said running it locally with npm run dev is super slow (access it in the web browser on 5173 is like walking through tar). Going to try to get it onto esp now.

Thanks everyone for the help.

Odd. While I can get it to build, when I upload to esp32, I get ‘Not found.’

Any pointers on where I’m going wrong ?

npm run dev should works quiet fast. I feel no difference than when hosted on the device. It’s even a bit quicker as it serve files faster ( but they are not gzipped )

you can’t just replace the folder, the routes are not the same, that’s why there’s some compile flag to add too.
Also the python extra script is supposed to do it’s magic on packaging files for the firmware, I’m not sure it will work if compile think it’s building a v1 ui :wink:

Yes, I added the compile flags.

Looking at the build script, the only magic it appears to do is change the path before the build happens… Maybe I misunderstood.
The npm run dev works, but browsing experience is terrible Not sure if it’s something to do with Mac on apple silicon… can’t imagine it is.

looks like. It’s not supposed to be like that. svelte / vite env is blazing fast

I talk about the extra_script in script folder. That’s the one packaging the ui before the build

Yes, I looked at the extra_script.py. It does nothing more than change the directory name for the build.

Good news is I’ve got it working. In all my messing around, I simply forgot to rename the directory back to gui. Did that and it all works.
In summary, what I did (not caring about the v1 gui) :

  1. Download the the v2 gui is here : GitHub - KipK/openevse-gui-v2
  2. Rename the old gui directory to gui.bak
  3. Rename the downloaded openevse-gui-v2 directory to gui
  4. cd gui
  5. npm install
  6. add the -D DISABLE_WIFI_PORTAL -D WEB_SERVER_ROOT_PAGE_INDEX’ to the [common] section of platformio.ini
  7. Build & upload !

Thank you Kip and Jeremy for all your help, I’m sure I’ll need more as I try to figure out how to trigger a GPIO for the 3phase L2/L3 contactor…

Anyway, I’ve not got it onto the ESP32_Gateway board and can happily experiment.

1 Like