What's great is that signals and fd_sets are supported, so it can really tie the web services and the hardware together nicely. I can easily wire up GPIO, for example.
I haven't dug into Microdot yet - but are there similar mechanisms? I love my Lua projects based on TurboLua, but wouldn't mind seeing some python chops get sharpened, same-wise ...
Edit: I dug in, and I guess the things I want are to be found in the python batteries included anyway .. plus, Microdot is a very small tack-on to microPython, and a pleasure to read ..
These devices have no concept of processes, your application is the only thing that runs. Most devices do not support threads, and those that do have really big limitations. Like for example, a device with two cores would allow you to spawn just one thread, to run on the second core and that's it. This is due to the lack of a proper operating system with a scheduler that can move threads in and out of the CPU.
I will definitely push microPython for some use where it'll fit ..
I'm fascinated by your approach where you used your own temperature and humidity monitors. Apologies if this is in the links in the article, but I wondered how you controlled your heating unit. The reason I ask is that I have a nest device talking to my AC unit, which means I'm locked into the Google ecosystem. It works well, but it doesn't connect to the Home Assistant system for everything else in the house. I would like to remove the Nest dependency, or at least have multiple ways I could start optimizing the power utilization of my AC unit.
As part of the service, this controller gives you the option to send commands through an app, or by sending SMS (the device comes with a SIM card and gets its own mobile number). The commands would allow you to ask if the heating is running or not, to turn the heating on or off, and so on.
I first implemented the SMS interface with Twilio, but then found that the number of texts you can send to the device is capped. I don't remember what was the monthly allowance, but I reached it in a few days after querying the device every 15 minutes or so 24/7.
I then found a project on GitHub with the reverse-engineered API that the phone app used to send commands. So I then reimplemented the command logic using this API to be able to talk to the controller without limitations.
I'm not familiar with the Nest devices, but I'd suggest you do a search on GitHub to see if someone figured how to reverse-engineer its API.
Really appreciate you sharing this work, really fun stuff!
Directly controlling the HVAC with a relay board would also be very doable, but is a more involved project.
The problem is that if I look here I cannot tell the first thing about which device is supported and how well. HA does not have a great filtering system.
Cheers!
1 - https://blog.miguelgrinberg.com/post/benchmarking-micropytho...
The article you are referring to is intended to benchmark microcontrollers running MicroPython. Nothing to do with Microdot.
I'm not really sure what conclusions you expect to reach if you had a Microdot benchmark that gives you a requests per second number. I would not stop using microcontrollers if the number was low, and I wouldn't start more projects if the number was high. I don't really care. It works for the intended purpose.
The point I was trying to make in my reply above was that an abstract RPS number, obtained measuring a general purpose web app on a general purpose microcontroller does not mean anything. What matters is your own performance evaluation.