San Francisco is abuzz this week as Oracle's OpenWorld takes over the Moscone Center. With the conference attracting attendees from all over the globe, Neustar hosted another Women in IoT event to connect our local community to that abroad. On 22 September, Kai Kreuzer, founder of OpenHAB and Project Lead for Eclipse SmartHome, presented on these two open-source projects. OpenHAB and Eclipse SmartHome address the consumer need to have a single platform for home automation.  

This need is one Kreuzer experienced himself when he and his wife were building their home in Frankfurt, Germany. They built their home from the foundation up, so they could put in the necessary cables for a truly connected home. The only problem was there was no reliable IoT management software for devices manufactured by different companies. Today their home has over 125 IoT devices automating everything from their shutters to speakers. Though the devices are made by different manufacturers and have different APIs, all are managed by Eclipse SmartHome and OpenHAB. Tonight, Kreuzer demonstrated the product capabilities available to developers and consumers.

OpenHAB makes smart home control easy

Managing a smart home from the consumer-side can be difficult because devices have different standards and rely on cloud-hosted services.  The industrial solution for IoT management is to connect each device to the internet, send the data up to the cloud, and use an app to manage the device. Different protocols and standards prevent devices from communicating directly. Sending device data to a gateway in the cloud lets devices communicate via more standardized APIs. People can then manage their devices through a smartphone app, which connects to devices through the same cloud servers. Nest and If This Then That (IFTTT) are two industry companies solving disjointed standards this way.

Depending on a reliable internet connection can be frustrating in practice. If the internet goes down, the app and device cannot communicate with one another. The lights you have in your kitchen could remain off until the internet goes back up! Furthermore, cloud services are simply storage and processing power on others' computers. If the startup hosting your service were to go out of business, you too would be left in the dark. OpenHAB manages devices stably and locally in offline mode. Connected devices communicate with one another through the local home gateway. In this way, IoT for Kreuzer “does not mean Internet of Things but the Intranet of Things.”

Eclipse SmartHome: a simple framework for complex devices

While OpenHAB connects incommunicable devices across a local intranet connection, Eclipse SmartHome provides the framework to build home gateways. Eclipse SmartHome is independent, open-source and modular: community members add new drivers to support each device's protocol as needed. Numerous manufacturers' devices are already integrated. Eclipse SmartHome is developed using Java and OSGi and runs on any platform, including Raspberry Pi and PineBot.

The four main services Eclipse SmartHome provides are device discovery, automation rules, data handling, and user interaction. At the core are the 70+ bindings for device drivers and discovery. Bonjour, UPNP and MDNS just a few of the protocols supported for device discovery. This binding layer controls devices, managing remote configuration and firmware upgrades from within the framework.

Atop the binding layer are the rules. A rule has three parts: triggers, conditions, and actions. Triggers are time or event queues to signal an event should happen. Conditions limit the trigger to specific states or times, checking to see if any exceptions or qualifiers are needed before executing an action. Finally, the device carries out some action. The rules are modular, so it is easy to add custom triggers, conditions and actions. In this way, "When it is 6:00a on Tuesday" is the trigger; "and the humidity is below 20%" is the condition; and "turn on the sprinklers for 20 minutes" is the action.

The framework also handles data persistence and user interactions. It can write and read data locally or send it to cloud services as needed. Moreover, icon sets, widgets and charts extend the UI for a customizable interface.  Voice enabling is one of the latest features that lets you communicate with devices or deliver spoken output from devices. It currently supports text to speech and preliminary speech to text commands.

The commercial case for Eclipse SmartHome

Eclipse SmartHome is highly compatible with 3rd party emulators and apt for developing commercial systems. Third party emulators detect and expose devices, allow for custom interfaces, and extend Eclipse SmartHome features. Integrating with 3rd party emulators allows you to manage devices remotely. For example, you could bundle the Philips Hue gateway and use the Amazon Echo framework to discover devices. Echo can then find devices and manage them. HomeKit, OneM2M and IFTTT are other supported 3rd party emulators. Additionally, commercial systems are using the Eclipse SmartHome framework to power their products. T-Mobile's Magenta SmartHome and Jung use it to package smart home management solutions for consumers.

Designing a smart home

As the evening concluded, Kreuzer demonstrated some of the capabilities in Eclipse SmartHome Designer and OpenHAB. Using a router to connect devices and his computer to a local network, he showed how both are powerful tools to manage a smart home without internet. Onboarding devices was very easy. OpenHAB updates newly discovered devices every ten seconds. Once discovered, the device is added to a list of available devices. Adding a device lets you access its properties, set rules, and connect it to other devices within your home network. The framework is highly extensible. Community members have added device controls that aren't available from the manufacturer. With OpenHAB, Notification Sound Volume is an available control for the Sonos speaker, so you can control the notification volume independent of music volume. Sonos typically has one volume for all sounds.

In addition to extending functionality, Eclipse SmartHome Designer and OpenHAB enable actions to occur across devices. Kreuzer showed how to set different behaviors when you are home and when you are away. When you are home and the doorbell rings, a chime plays through the Sonos speaker and turn on the Philips Hue light. When away, the doorbell triggers a dog barking sound through the Sonos speaker and the Philips Hue light stays off. The cleverness was reminiscent of the classic 1986 Hughes' film Ferris Bueller's Day Off. Ferris uses a tape deck and his home's intercom doorbell to deter anyone who rings the doorbell looking for him. Today, OpenHAB and Sonos can do that simply by setting rules. Designing intelligent rules still relies on one's own inventiveness and sensibility. For now, the smartest thing in your house is still yourself.

The complete presentation and demo are available through the Women in IoT channel. To hear more about open source IoT projects at Eclipse, please join us for Benjamin Cabe's talk on 19 October 2016.