Authentication

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
cefn
Posts: 230
Joined: Tue Aug 09, 2016 10:58 am

Re: Authentication

Post by cefn » Mon Feb 12, 2018 12:18 am

Also you could look into serving the web interface from somewhere else - a web UI which might visualise connectivity to the ESP32 node, then use cross-domain AJAX http://www.ajax-cross-origin.com/how.ht ... ide-domain to set and get the config information as and when connectivity is negotiated.

User avatar
BoKKeR
Posts: 16
Joined: Sun Dec 10, 2017 4:10 pm

Re: Authentication

Post by BoKKeR » Mon Feb 12, 2018 10:55 am

WebREPL is not available on the esp32 see https://github.com/micropython/micropyt ... issues/107. I am looking into the cross-domain AJAX solution but it seems to be over my head right now but it seems like a feasible solution. If I understand it right it would spare the esp32 of hosting the website as it would be loaded from another source.

cefn
Posts: 230
Joined: Tue Aug 09, 2016 10:58 am

Re: Authentication

Post by cefn » Mon Feb 12, 2018 11:18 am

WebREPL is not available on the esp32 see https://github.com/micropython/micropyt ... issues/107.
I think you may have missed the point of my last post. The thing you should take away is that the WebREPL is a webpage. The strategy I shared can be used to serve any webpage and in particular I was suggesting you might use it to serve your webpage, given the responsiveness and stability issues you were reporting with other strategies. I'm not saying it will eliminate them, but it's a different way to approach the problem and does almost nothing - just forwards previously gzipped bytes to the browser.
the cross-domain AJAX solution...seems to be over my head right now
Sounds like you are facing a lot of challenges from unfamiliar technologies at once. Is this a project you are hoping to achieve on your own, or as part of a company? Do you have a budget or access to support from people with experience developing web systems? It would be impressive to launch a commercial offering using your first ever development work on web systems and IOT, learning as you go. Perhaps there's a smaller-scale, but real-world proof-of-concept deployment you could tackle first.

User avatar
BoKKeR
Posts: 16
Joined: Sun Dec 10, 2017 4:10 pm

Re: Authentication

Post by BoKKeR » Mon Feb 12, 2018 11:49 am

I am doing the project on my own as far it comes to development and execution. I do have a budget but no experience with bigger web systems (that is why there is no sensitive information in the configs). The project for sure will not end up to be a big commercial success but that is not really the point of it. It is a learning as you go experience just as you mentioned. It included so far many aspects like PCB design, component sourcing, packaging, product design, development and so on. I am hoping to include this project on my CV as a hobby project when or if it flops. It's my way of testing the waters. I am looking into the solutions you provided and thanks for all the help so far :)

cefn
Posts: 230
Joined: Tue Aug 09, 2016 10:58 am

Re: Authentication

Post by cefn » Mon Feb 12, 2018 12:15 pm

If it's genuinely a weather-based project (and this isn't a foil for avoiding discussing the real application) then the work on Medea and OpenWeatherMap might be interesting. See...

https://github.com/ShrimpingIt/medea
https://github.com/ShrimpingIt/medea/bl ... esNamed.py

...although I need to stabilise the HTTP and HTTPS implementation as per https://github.com/micropython/micropython/issues/3595 for use with live Twitter/OpenWeatherMap.

It is currently distributed as Affero GPL...
https://github.com/ShrimpingIt/medea/bl ... er/LICENSE
...but let me know if another license is relevant to you.

Post Reply