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
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)
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 :
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.
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’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.
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
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.
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) :