|
|
Subscribe / Log in / New account

The Thing System

By Nathan Willis
October 9, 2013

"The Internet of Things" is a tech buzzword that provokes a lot of eye-rolling (right up there with "infotainment"), but the concept that it describes is still an important one: the pervasive connectivity of simple devices like sensors and switches. That connectivity makes it possible to automate the monitoring and control of physical systems like houses, offices, factories, and the like—from any computing device that has access to the internet. Getting to that blissful automated future remains a challenge, however; one that a new project called The Thing System is addressing with free software.

Sensors and devices with built-in connectivity are widespread and affordable: wireless weather stations, remote-controllable light bulbs and switches, web-accessible thermostats, and so on. The hurdle in deploying these products in a "smart home" scenario is that rarely do any two speak the same protocol—much less provide any APIs that would allow them to interact with each other. In many cases, they do not even use the same bits of spectrum for signaling; it is only in recent years that WiFi and Bluetooth Low Energy have become the norm, replacing proprietary protocols over RF.

Due to the difficulty of merging products from a host of different vendors, most whole-home automation packages rely on a central server process that monitors the state of all of the devices, queues and processes events, and provides a way to create macros or scripts (activating one device based on the status of another, for example). But it is often at the scripting interface that such projects begin to inflict pain on the user. MisterHouse and Linux MCE, for example, both support a wide variety of hardware, but they are often criticized for the difficulty of defining home automation "scenes" (which is home automation slang for a collection of lighting or device settings to be switched on as a group).

Control all the things

The complexity problem is an area where the developers of The Thing System believe they can make significant strides. The project's mantra is that "things should work like magic", a notion that it defines in a fairly specific way. Server-side logic should recognize patterns and trigger events to solve a problem without requiring intervention from the user.

The example provided on the wiki is that an environmental sensor would log carbon dioxide levels, and the master process would run the ventilation system's fans until the levels return to normal—without any user intervention whatsoever. Clearly, such logic requires a detailed knowledge of the sensors and devices that are available in the building as well as a semantic understanding of what they can do—e.g., not just that there is (for example) a Nest thermostat, but that the thermostat activating the fan can lower the carbon dioxide level. The project defines a taxonomy of ten device types: climate, lighting, switch, media, presence, generic sensor, motive (that is, devices that implement some sort of physical motion, like raising or lowering blinds), wearable, indicator, and gateway.

Several of these categories are self-explanatory, although it is important to note that they may include both monitoring and control. For instance, the climate category includes weather sensors and thermostat controllers. Others are bit more abstract: gateways are pseudo-devices that implement the Thing System APIs but connect to a remote Internet service in the background, and indicators are defined to be simple status lights.

Still, the device categories are detailed where it is appropriate; lighting devices can implement simple properties like brightness percentage (from zero to 100%), less-common properties like RGB color (a feature found in the Phillips Hue smart-bulb product line), and even minutia like the number of milliseconds it takes to transition from one state to another.

The Thing System's master process is called the steward; it runs on Node.js and is purported to be lightweight enough to function comfortably on a small ARM system like the Raspberry Pi or BeagleBone Black. When it starts up, the steward reads in a JavaScript module for each type of device that is present in the building. There is a sizable list of supported devices at present, although not all implement every API. After loading in the necessary modules, the steward then attempts to discover each device actually present on the network. It does so via Simple Service Discovery Protocol (SSDP), scanning for Bluetooth LE devices, looking at attached USB devices, and scanning for devices offering services over known TCP ports.

The steward's basic interface is a web-based client; it presents a grid of buttons showing each discovered device, and for the well-supported devices there is a usually a simple web control panel that the user can bring up by clicking on the device's button. The project's documentation does consistently refer to these interfaces as "simple clients," however—meaning, for example, that they let the user switch lamps on and off or adjust the light's color, but that they do not implement magic.

The magic house

Sadly, The Thing System's magic seems to still be a ways from making its public debut. However, the project has developed several interesting pieces of the puzzle along the way. First, there is the Simple Thing Protocol, which defines a WebSockets interface for the steward to talk to programmable devices that (out of the box) offer only a vendor-specific API. That makes supporting new hardware a bit easier, and it establishes a generic interface with which it is significantly easier to define scenes and events. In contrast, scripting in other home automation systems like MisterHouse typically requires knowledge of low-level configuration details for each device.

The project also defines the Thing Sensor Report Protocol, which is a simpler, unidirectional protocol for read-only sensors to send data to the steward. Here again, most of the other well-known home-automation projects add direct support for reading data for each sensor type. This is difficult to support in the long run, particularly when one considers that many simple sensors (say, thermometers or ambient light sensors) change configuration every time the manufacturer releases an update. Many home automation enthusiasts simply build such sensors themselves from off-the-shelf electronic components or Arduino-like hardware. Either way, if the scene descriptions and scripts assume details about the sensors, the result is a hard-to-maintain configuration that eventually falls into disuse.

Finally, The Thing System's scripting syntax is abstract enough to be understandable to novices, without being too vague. The key notion is activities, which bind a status reading from one device to an action performed on another device. For example, when a thermometer's temperature property exceeds a pre-set value, the air conditioning device is sent the on command. This temperature event might be defined as:

    { path      : '/api/v1/event/create/0123456789abcdef'
    , requestID : '1'
    , name      : 'gettin too hot'
    , actor     : 'climate/1'
    , observe   : 'comfortthreshold'
    , parameter : 'temperature'
}

It is not quite as simple as If This Then That, but by comparison to the competition, it is straightforward.

The Thing System will probably be more interesting to revisit when more advanced client applications (with lots of magic) become available, but the overall design is good. Being web-based may be a turn-off to some, but it is clearly the most future-proof way to offer support for commercial hardware. Like it or not, most of the devices that manufacturers release in the next few years will be accessible over HTTP or (hopefully) HTTPS. Similarly, whether one loves or hates JavaScript, the fact remains that is it far easier to find JavaScript programmers who might contribute device drivers or clients to the project than it is to find Perl programmers willing to do the same (as MisterHouse requires).

Ultimately, what makes a home automation system viable is its ease of use and its ability to support the hardware that is actually available in stores today. The Thing System looks to be making progress on both of those fronts.


to post comments

The Thing System

Posted Oct 10, 2013 15:59 UTC (Thu) by jhhaller (guest, #56103) [Link] (8 responses)

The scripting seems to be too simple. The beauty of the Internet of Things is the ability to combine multiple sensors in new and unique ways. Having a script which monitors the temperature and turning on the AC when too hot just does what a thermostat does. More interesting would be to combine outdoor temperature, forecast, time of day, solar load, winds, heating/cooling capacity, and indoor temperature to better control the indoor temperature. Even more sophisticated would be to incorporate the GPS tracker in my phone to know how long until I will arrive home, so the house will can remain warmer while I'm gone, but be properly cooled by the time I get home. The further away from home, the warmer it could get. I have 3 heating/cooling zones in my house, and the system would ideally know which zones were occupied, and adjust the setpoints accordingly.

Given all that, basic thermostats aren't subject to software bugs, and I would prefer that my furnace turn on if the temperature is lower than about 60, even if the automation system failed, and to turn off the furnace if it got above 80.

The Thing System

Posted Oct 10, 2013 18:04 UTC (Thu) by rmayr (subscriber, #16880) [Link] (6 responses)

Actually, all heating type examples are mostly outdated with modern houses. With current heat pump type systems and proper insulation, you would no longer lower the temperature during the day - only longer vacations etc. would actually be significant in terms of saving energy.

When talking about lights, which do not have reaction times in the range of hours, the story is different. Here it can really have an impact to turn them on or off (or dim) based on occupation etc. On the other hand, you don't need much forecasting for that.

To summarize my point, I fully agree that the Internet of Things concepts for smart homes are worth it. Only the standard examples around heating typically don't apply to those houses which will benefit most from frameworks like this (i.e. very modern houses with bus systems, sensing, etc.).

modern house heating control

Posted Oct 11, 2013 0:19 UTC (Fri) by giraffedata (guest, #1954) [Link] (5 responses)

What is it about heat pumps and proper insulation that means you don't want the house to be colder when you're at work (or asleep, I suppose)? Are you saying it takes all day to change the temperature a few degrees?

modern house heating control

Posted Oct 11, 2013 0:54 UTC (Fri) by dlang (guest, #313) [Link]

maintaining a temperature difference between the house and the outside when there is no need to do so costs money and power. (nobody is home so comfort isn't an issue, pets and equipment are able to deal with different temperature ranges than we consider comfortable)

Insulation and heat pumps don't change this basic fact.

Insulation changes the rate at which the inside equalizes temps with the outside, and therefor the amount of heating cooling needed to maintain the temp difference. Heat pumps are relatively efficient tools to maintain the temp difference (at least under most conditions), so they reduce the cost.

but by far the most efficient thing to do is to not maintain the temp difference when it's not needed.

modern house heating control

Posted Oct 11, 2013 6:35 UTC (Fri) by rmayr (subscriber, #16880) [Link] (3 responses)

Yes. In my own house as an example, with a temperature difference of roughly 20°C between inside and outside, inside temperature will decrease by about 1°C over the day when heating is turned off -- even less when the blinds are down, or it might actually increase by 2°C when we have autumn/winter sunlight coming in through the windows throughout the day (large areas of glass and proper insulation will do that to you). This is so close to measurement error and on/off hysteresis width that it simply doesn't make any sense to turn off the "normal" mode during the day.

Combine that with the fact that heating pump systems have a (realistic, not placebo) reaction time of >2h between turning on the heating system and actually making a difference in room temperature and you'll see the big difference between "modern" houses and old 1-glass-pane-windows-with-gas-heating scenarios (in which an elaborate control of heating makes sense, but those houses will probably lack the infrastructure to do so).

However, all of this is a complete tangent to the original article, and I am sorry for even bringing it up. I just get bored by the same examples for smart houses that have been used for the last 15 years (yup, I've been to ubiquitous/pervasive computing conferences for a while) and that just don't make that much sense.

modern house heating control

Posted Oct 13, 2013 19:42 UTC (Sun) by jzbiciak (guest, #5246) [Link] (2 responses)

If you had computer-controlled blinds, it might make sense to control those, either to maximize incoming sunlight in the winter, or minimize it in the summer, except in occupied rooms of course. This is an extension of the lighting theme, but applied to natural lighting which also doubles as a source of heat.

modern house heating control

Posted Oct 14, 2013 12:23 UTC (Mon) by mathstuf (subscriber, #69389) [Link] (1 responses)

There's also the question of what does "occupied" mean in a house with pets. For lighting, probably nothing changes, but cats do like to lay in sunlight (even in the middle of summer), so for cats, calling it occupied for blinds could make sense.

modern house heating control

Posted Oct 14, 2013 13:06 UTC (Mon) by jzbiciak (guest, #5246) [Link]

My cats, at least, have no problem climbing directly into the window sill, behind the blinds. ;-)

But yes, pets do throw things off a bit.

Turing

Posted Oct 12, 2013 1:46 UTC (Sat) by ncm (guest, #165) [Link]

If the "then" action can be to turn another recipe on or off, this is all you need. But a higher-level view would be convenient.

The Thing System

Posted Oct 10, 2013 20:14 UTC (Thu) by smurf (subscriber, #17840) [Link] (2 responses)

There's also the open Home Automation Bus: http://code.google.com/p/openhab/ which also has a truly impressive number of adapters and whatnot.

There doesn't seem to be any site out there comparing the two, so I guess I'll have to do it myself. *Sigh*. ;-)

The Thing System

Posted Oct 11, 2013 6:42 UTC (Fri) by rmayr (subscriber, #16880) [Link]

Please do report back if you did. I actively run OpenHAB at the moment and am fairly happy with it, including the scripting capabilities. For that reason, I am unlikely to try The Thing System myself anytime soon, but would still be interested in any potential advantages.

The Thing System

Posted Oct 14, 2013 16:35 UTC (Mon) by Jannes (subscriber, #80396) [Link]

I too would be very interested in your findings.

I'm currently running a ZWave nightmare on MiCasaVerde/Vera box. Terrible and expensive hardware, terrible proprietary protocol, bad software.

I'll have a look at both too.

Thank you.

Rolling eyeballs

Posted Oct 13, 2013 19:40 UTC (Sun) by jzbiciak (guest, #5246) [Link] (4 responses)

I think the reason the phrase causes me to eyeroll so hard is that I hear it spoken with the wrong emphasis far too often. It should be emphasized "the Internet of Things", but I too often here "the Internet of things." The latter intonation is almost as if the speaker is saying "it's the Internet, of all things" as if the "of all things" was just an adjunct clause, similar to "it's the Internet, can you imagine?"

In any case, this does look like an interesting project. I imagine 'magic' will be hampered by inconsistencies among the various Things being controlled, such as inconsistent reporting units or eccentric behavior. I guess we'll see.

Rolling eyeballs

Posted Oct 14, 2013 16:55 UTC (Mon) by Baylink (guest, #755) [Link] (3 responses)

Anyone for "sensor reports temperature in F, system expects it in C"?

Or vice versa?

(NASA fans will know why this isn't even amusing...)

Rolling eyeballs

Posted Oct 14, 2013 18:09 UTC (Mon) by Cyberax (✭ supporter ✭, #52523) [Link] (2 responses)

Can we fix the US instead, pretty please? I really HATE HATE HATE Fahrenheit scale that is pervasive in the US.

Rolling eyeballs

Posted Oct 14, 2013 22:36 UTC (Mon) by anselm (subscriber, #2796) [Link] (1 responses)

And let's have them use reasonable paper sizes, too, while we're at it.

If nation states were like software companies, the USA would be Microsoft.

Rolling eyeballs

Posted Oct 14, 2013 23:03 UTC (Mon) by Cyberax (✭ supporter ✭, #52523) [Link]

Microsoft? No, they are champions of agility compared to the US.

Think IBM with EBCDIC.

The Thing System

Posted Oct 14, 2013 16:53 UTC (Mon) by Baylink (guest, #755) [Link] (1 responses)

You know why The Internet Of Things will never make it?

Cause it's best practice these days to treat *no* attached network as "safe"; you have to put the security right in the attached end device.

And since, as we all know, *no* consumer product pays any attention to security whatsoever...

I'm wrong: it's not that it will never make it. It's that the designed in Total Lack Of Security will burn millions of people. Possibly literally.

The Thing System

Posted Oct 14, 2013 17:21 UTC (Mon) by pizza (subscriber, #46) [Link]

I don't actually this as a big problem with how things are envisioned -- because $the_powers_that_be want to "own" the whole vertical slice, all interactions happen via a central mothership owned by $MyGooTwitBookNSACorp. No direct node-node communications is possible, which greatly cuts down the attack surface.


Copyright © 2013, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds