Heya, I’m a full stack developer and will give my 2cents, however I’m extremely new to MagicMirror so I can’t answer many questions regarding it.
Probably the most important information you should know is that web knowledge is very portable. Just learn web basics and you’re golden to work in your language preference. If you already know Python and Java, why not use them?
However, there are other languages you can write in, and it seems like you’re keen, so here are the ones I’ve found to work best for me (easy to learn, can do a lot with them):
Server-side
- NodeJS (easier, loosely typed, strong community)
- PHP (intermediate, but meh.. a little outdated, prefer the others)
- Go (intermediate, strongly typed, strong community)
Client-side
Just learn the basics of HTML/CSS/JavaScript, and use JavaScript to send HTTP requests to which your server will respond.
Research
- HTML
- CSS
- JavaScript
- HTTP/HTTPS (GET, POST, PUT, PATCH, UPDATE, DELETE)
- AJAX
- Choose a server-side language, if it's a new one then practice it by writing some data structures or making something you've already made in Python/Java.
- REST services (maybe GraphQL if you want to be bleeding edge, but definitely not necessary)
- Optional (overkill), look into architectural patterns such as MVC. Very valuable for web app development
- Optional (overkill), look into front-end frameworks such as React, Vue, Django, etc...
If you learn the basics of HTTP protocols, it’ll take you very far with what you want to accomplish with smart-home devices. For example:
- Create an
index.html
page with button named trigger - Make it look pretty with CSS
- Use JavaScript to capture the button click. The click will initiate a
HTTP GET
request to your Go/NodeJS/Java/Python server, specifically to the urllocalhost:8080/capture
- You will (probably) have a REST server. Your server, running on port 8080, will have routing setup to see capture a
GET
request made to the/capture
endpoint (this is a web hook -- you're telling your server to do X when it sees a request has been made from some specific URL route) - You can now do ANYTHING on your server, such as grab data from a database, and spit it back to your client-side JavaScript app in (probably)
JSON
format since it's easy to parse.
Once you get that to work, look into Amazon Alexa or Google Home and how they handle HTTP requests. They use the same approach and you’ll find it very similar. However you seem like a go-getter willing to do machine-learning, so maybe you’ll build your own web-hook system to control request/response actions in your smart home, there are GitHub repositories out there for anything now!
Again, I’m only a full stack developer and you said you want to learn more about web servers. I believe most if not all developers should have web fundamentals down solid, and learning this stuff puts you in the nitty-gritty side of things, which I have a feeling is what you want. I’m not sure why people think this is a time-waster, development experience is development experience and that’s that; the developer just needs to be shown the optimal path.
By the way, a year is PLENTY to learn all of this since you already have programming experience. When you do learn it, then as you stated yourself you’ll have learned all the things you want to learn and will have the experience create whatever you want with MM2 and MANY other platforms (or make your own).