Open glynhudson opened 5 years ago
I had a brief look at this. It is not clear to me how this can interact with other web services, ie, do the webservices have to run on different ports?
Given we already have the UI maybe we just need something like https://github.com/matrix-io/pi-wifi?
I presumed that wifi-connect could run on first boot (on port 80) then once wifi is connected the node web server would then be started on port 80. However, I have no particular preferance for what we used. I just tried out wifi-connect and it seemed to offer the functionality we were looking for. Obviously more work will be require to integrate.
pi-wifi looks like it could also to the same job and possibly easier to implement API? I can't see any docs that mention captive portal for pi-wifi? IMO captive portal functionaly is important, without a captive portal android devices will ignore a wifi connection if no web-connection is detected and mobile data is not siwtched off.
I've just tested out this captive portal based WiFi setup manager: https://github.com/balena-io/wifi-connect
Works really well, to install run:
bash <(curl -L https://github.com/balena-io/wifi-connect/raw/master/scripts/raspbian-install.sh)
Then to start run:
$ sudo wifi-connect --portal-ssid OpenEVSE
The start command could be started by a script that checks for wifi connectivity like this one: https://github.com/balena-io/wifi-connect/blob/master/scripts/start.sh
An example of using WiFi Connect in a docker based Python project can be found here: https://github.com/balena-io-projects/balena-wifi-connect-example