brown-SSW / brown-solar-charger

This program monitors a solar power system and runs a physical and online dashboard.
https://brown-ssw.github.io/brown-solar-charger/
4 stars 1 forks source link

questions for Brown IT #14

Closed joshua-8 closed 3 years ago

joshua-8 commented 3 years ago

Even if the website isn't hosted by the station, I think the station still needs to be set up as a server so it can be asked for the json data. Besides internet connection that we can probably do ourselves following this guide. That would mean making the esp32 publicly accessible and giving it at least a constant address if not a nice url. I think we want to be put in the DDMZ so we can be "accessed from the internet". I don't know how hard it is to get an esp32 to pass their security scans. In theory you can get a url by going to the help desk and requesting a name though Luke's experience says we shouldn't expect this.

Alternatives not requiring anything from Brown IT: Have the station call the website instead of the website contacting the station. (sending a POST request with the data to the server?) This would probably require more of a back end for the website.

Have a second esp32 or a computer or server somewhere to receive data from the station and act as the backend for a static website. I'd rather not have the station relying on bouncing data off an esp32 at my parents' house, but in theory that would work. Another idea I don't really like but could theoretically work would be using google sheets as the backend database.

joshua-8 commented 3 years ago

I'm drafting an email here: To: help@brown.edu cc: s4sw@brown.edu re: questions about wifi network from student club

Hello, I am a member of Brown's Scientists for a Sustainable World club with some wifi networking questions for a solar computer charging station we are starting to plan. No actions are wanted at this time, I just want to get some information about what will be possible to guide our development. If this is not the right place to ask these questions, I apologize, could you tell me who to ask? We would like to make a public website that displays some data from the station. We would like to use an ESP32 microcontroller in the station . Here are our questions: 1- This IT help article https://ithelp.brown.edu/kb/articles/connect-a-browserless-device-to-brown-s-wireless-network-printers-consoles-smart-tvs-etc makes me think the ESP32 could be connected to the Brown-Guest wifi network. Will this be on ok way to connect? I'm less sure about being able to connect to the normal network. 2- My main question is whether the ESP32 can be made publicly accessible on the internet so it can act as a server for its data. Can it be put in the DDMZ with an open port as described in this article https://ithelp.brown.edu/kb/articles/changes-in-brown-s-network-security-zones ? If more information is needed to determine if the ESP32 meets the security requirements, please just let me know how I can help. 3- My last question is will it be possible to get a URL that redirects to the ESP32? We would rather have the website be static and load data from the station, though we're open to other methods for getting data from the station to the website (like finding web hosting with more of a backend). I'd be happy to provide any more information to the best of my knowledge, if needed. I appreciate your time. Thank you, Joshua

joshua-8 commented 3 years ago

Response:

From: Doug Wilkinson    Assigned Team: Network

Hi Joshua,Yes, this is the right place. Maybe we could schedule a time to chat about your project. I have direct experience using the ESP8266/32 as sensors and would enjoy discussing your approach to this.Some quick answers, yes, Brown-Guest would be your only option. You would need to register the MAC address.I would not recommend making this publicly accessible though. The DDMZ is for wired connections only, we do not have a wireless DMZ option and although there are variants of ESP32 with ethernet, I can't speak to how well those work.Even if you could, I will also suggest that serving web pages from an ESP32, although it's possible, is limited in terms of connections and throughput.I would recommend looking at using the ESP as a sensor/relay to something with more horsepower to collect the data in a database and serve web pages (could be a local host or cloud server)Let me know if you want to setup a time to talk,--Doug

joshua-8 commented 3 years ago

notes from meeting 2/12: look at micropython.org - python on esp32s -maybe not for this project, but cool anyway mqtt/mosquito-sensor protocol tasmoda-drop in software for collecting sensor data raspberry pi-usb-solar charger interface? wireless charger?? Avoid too much code that needs to be updated inside the station. HomeAssistant-dumps data into database AWS? Need to figure out how to get data from database into website. (webhosting) mqtt/mosquito-method for getting data from one place to another-lots of tools that can save data into a database node red visualizers for mqqt data? homeassistant has an app and can send alerts If This Then That Google database? best way to contact is through email

joshua-8 commented 3 years ago

Shri would like to continue using github pages for the website-which is a good idea since it makes it easy to change how the webpage looks. Can we find a web hosting service that can receive data over mqqt, store it into a database, and then provide a publicly accessible .json file of a selection of the database data?

joshua-8 commented 3 years ago

List of new questions for Doug: If we used a raspberry pi as the database server, could the pi be wired into the DMZ and could the esp32 communicate with it with MQTT?

joshua-8 commented 3 years ago

from Doug: Glad I could help! I'm always looking to improve my coding, so thank you for sharing yours. In terms of hosting, I would say the main concern would be support over the life of the project. Physically housing a raspberry pi somewhere on campus can be challenging and is becoming less favorable for even department hosted servers. Keeping it updated would probably be a manual process and I would suggest having 2 if you go this route (one for production and one to test new updates/code on) Where would this live physically?

Using Docker/containers is my favorite to make "rollback" easy without having to worry about package compatibility, etc. A cloud service could be pennies if you can keep usage low and would be more robust. If you can get a faculty member to sponsor your group, a VM instance might be possible on our campus datacenter. I can find out more about that, but I would also look at AWS or Google Cloud to see if they have an already made "image" that might have a database and web capabilities prebuilt. I hope this helps, and let me know your thoughts,