(click on pic for larger image)
The idea struck me as to how a regular, ordinary database can be a controller like a thermostat, or in essence any other kind of feedback control. Since this is speculative engineering, all of the components do not have to exist at this time. This is presented in the hope that somebody gets a brainstorm from reading this, and makes something like this real. So here goes:
You would have a sensor to start things off. Let's suppose that it is a temperature sensor. It would be a simple thermocouple that is made to measure temperature. You would need an analog to digital converter so that it could be fed into a digital compute system. Notice I didn't say computer, but compute.
Then you would need an interface to make sense of what the sensor is telling you after the Analog-to-Digital Conversion. For that, I propose my handy-dandy XML based Universal Sensor Transfer Protocol, but instead of XML it is STML or Sensor Transfer Markup Language. Here is what it looks like:
<?stml version="1.0" encoding="utf-8"?>
<name>Caliente Temp Sensor</name>
Simple. So the STML package arrives at the server. The server read function reads the STML stream, converts the byte array to an object that coincides with the STML taxonomy. This gets wordified into an NLP (Natural Language Processing) syntax that is deconstructed by a database stored procedure. The database records the reading (temperature in this case) and a function is called to evaluate the temperature reading. A table is read as to what the temperature should be at this time of day. and the delta is also recording. As the delta (ideal temp minus actual temp) is poked into the database, a trigger is fired to create the appropriate response, that is fed back to the server.
The server encodes it into another control markup language that fires say the furnace or air conditioning, depending on the reading. This control markup language is converted to machine language in an digital to analog converter and the appropriate control signal is applied to the device.
So why would have this instead of a $75 thermostat. Firstly, if the components were developed to be off-the-shelf, you could hack an entire house to be run off a laptop with portion of it acting as a server. You wouldn't need custom thermostats or devices, just a bunch of cheap sensors that can talk to anything. The database will automagically record everything, and you will have your own Big Data stack where another program on your laptop/server will mine the data and extract how things should be run autonomously based on that data,
You now can look for inferences in the data between different things. For example, if you manually turn down the heat at night, or turn up the AC at night, after a few cycles, the machine learns the drill and does it for you.
A component based sensory system like this, ending up in a database has unlimited applications in making your life easier, cheaper, greener and hassle-free. I will race you to the patent office.