2023-03-05

carlfoxmarten: (Default)
2023-03-05 08:10 pm

Remote Temperature Sensors: The Concept

The general concept for this project is having a collection of wireless temperature (and more, hopefully) sensors I can place in various locations (outside front and back, garage, etc) that we can monitor from multiple locations, via a web server somewhere in the house.

Currently, I have two cheap wireless temperature sensor systems from the same company, and it turns out both use the same remote sensors, with no way to prevent their base stations from listening to the other sensor. And technically, the same brand does sell a "double" base station with two sensors, but the price jumps a lot from any of their one-sensor models, and I couldn't afford it. Conversely, I already have a bunch of pieces that could, theoretically, be turned into a small network of wirelessly-connected temperature sensors.

I even have a pretty solid idea of how to handle the hardware of the remote sensors. The inexpensive microcontrollers by Espressif are both inexpensive, and all include WiFi capabilities. Then there's a massive list of easily connected tempearture, humidity, and pressure sensors for very little money.

On the positive side, the actual sensor modules are both cheap, and quite easy to connect in hardware, and talk with in software. I've chosen which module I want to use, but if I need to change to another one, it won't be that difficult to swap out software libraries to make sure it still works.

The more interesting part is the microcontroller. While I have a variety of them (I've been buying samples in a wide variety for quite while now, mostly out of curiosity), I'm leaning towards the ESP32 series. They also have BlueTooth capabilities, not that I think I'll be using that, but also are all dual-core, with at least one real-time clock, and that's about perfect for what I want to accomplish with it.

The other half of the system is actually a lot trickier than I'd anticipated. A single-board computer (shortened to SBC, apparently) that can run "normal" software (as opposed to embedded software) is my aim, for many reasons. These include compact size, quiet operation, built-in WiFi and wired network capabilities, and hard storage of some sort. The Raspberry Pi is a very attractive option to me for all of these reasons, but I didn't realize I'd wanted to experiment with something like this until very recently, and not only do I not have the funds for it, but the supply has actually been drying up due to many reasons. There may be "compatible" alternatives, but I'm not comfortable with them right now due to not knowing how well-documented they are.

Unfortunately, because it's essentially a system in two parts, I can't really build one half at a time, as the other half would need to be in place for testing. And I work so much better sort of building the whole thing up at the same time.

One thing that's holding me back right now is due to not understanding Linux's Network Manager system. Technically, if I was writing the central server code on my laptop (for eample), I could write the remote sensor module code to talk to the laptop's server code. But I'm not comfortable putting the password to our home WiFi network directly into my source code, even for testing.

Instead, I want to have a separate WiFi card that hosts its own WiFi network, without linking it to any other networks connected to the computer. Hopefully that improves additional security measures. I have a secondary USB WiFi adapter, and it works, but I don't remember how to make it start working again. Unfortunately, Linux WiFi drivers are in a terrible state of affairs, and nobody seems to have a central repository for USB WiFi device drivers.
(from recent experience, I'm not even convinced that Windows can easily do what I'm trying to do, either)