How MBaaS Connects Omnichannel Applications to my Connected Home


It's Consumer Electronics Show week, and the connected home is a big part of CES. Both Amazon and Sonos are pioneering connected home with the Amazon Echo and Sonos's speaker system. There is a lot of buzz about when and if Amazon will support control of Sonos speakers with the Amazon Echo, otherwise known as Alexa. I love the idea of controlling my Sonos speakers with Alexa sending music to different rooms using simple voice commands. If you’ve read my other post on Alexa, you will quickly realize that Amazon provides end users with a lot of power to create new services for their Echo. I’m already streaming movies across my televisions in each room of my house, and now I’ve found a great project that allows you to control your Sonos with Echo. Ryan Graciano’s application leverages a REST based server that sends commands from a Lambda function to the Sonos. I wanted to extend his application beyond Alexa to my phone to add a few features that I constantly get a request for. This opens up a few questions. The first, is how do I secure my services that I am exposing to Lambda? Second, how do I create contextual services using my phone that interact with these services? There is a ton of synergy between the services I’m using for my phone and tablet apps as well as Amazon Echo. Finally, are there contextual services that I can leverage a MBaaS for to provide increased value with little effort to my Sonos controller?

Figure 1

The picture above shows my initial deployment of the Sonos Services. Ryan’s Lambda service communicated directly to my REST services on an internal server exposed directly to the Internet. The default project did not implement any form of identity management between the services exposed by the server in my house and Lambda. If my only client were my Lambda service, I could setup a some simple security mechanism, such as a VPN tunnel shown above, but opening the services up on the Internet for my mobile devices requires authentication and authorization, and I need to treat each device as untrusted, so a VPN alone doesn't solve my security problem.  This is where a MBaaS, like Kony MobileFabric, can provide immediate value by creating an authentication layer for your mobile devices as well as Lambda services.   The MobileFabric SDKs provided an easy to use JavaScript framework that allowed me to connect my Node.js based Lambda functions to my authentication and authorization services. Securing services are pretty simple, but the real power of mobile devices in an IoT World is providing context such as where I am and what I am doing on the device. Figure 2. shows the change in architecture I made to secure my services for both Lambda and my mobile devices.

Figure 2

MobileFabric also provided engagement services to enable push notifications as well as iBeacon event support allowing me to leverage my mobile device to provide additional context to my Sonos services as shown in figure 2. A friend of mine, Matt Stutz, mentioned to me that it would be great if his Sonos would mute if he was on a phone call with a client and unmute when the call was over.   This was a great idea that had two problems to be solved. The first problem was determining the state of the phone. Was the phone idle? Was there an incoming call? The second problem was determining my location. If I’m in my living room, I didn’t want to mute the speakers in my basement. I contacted my friend Drew Norvell, who through together a quick Android app that reads the phone state and calls a web service based on the state changing to the user receiving the call. It then calls another service when the call is complete. Determining my location was a little trickier since I was in the office of my house. I needed a higher level of granularity than a traditional location service on my phone provided since I wanted to target a specific location in my house that may not have GPS access. MobileFabric let me leverage context events such as geofences and iBeacons that allow me to trigger events based on my location.

Figure 3

In my muting scenario, MobileFabric’s engagement services allowed me to register an iBeacon for a location. When I move from room to room, my app triggered an event within MobileFabric’s engagement services that returns the Sonos zone I’m associated with. When the phone receives a call, it sends the zone name as part of the service call to my Sonos services. This allows me to control the muting of a specific zone in my house when my mobile phone rings with an incoming call. When the call is over, I can unmet the same speakers using a simple call back to the zone I muted.

At the moment mobile devices are a gateway to getting key context about the user and aligning your human interactive channels is important. The key to a MBaaS is promoting reuse of my services across all my devices, including Alexa and leveraging services that the MBaaS already offers to enable contextually aware services that improve home automation. As the IoT world evolves, people are still going to communicate to their devices and REST based services exposed by a MBaaS are a great way to enable user interactions from mobile devices to voice driven devices, such as the Amazon Echo.

Read more: