1. Microsoft Releases in Alpha Version of New Open Translators to Things on GitHub
4/14/2016 9:01:20 AM
Microsoft Releases in Alpha Version of New Open Translators to Things on GitHub
Microsoft,GitHub,Node
https://news-cdn.moonbeam.co/Microsoft-On-GitHub-App-Developer-Magazine_xun1uox4.jpg
App Developer Magazine
IoT

Microsoft Releases in Alpha Version of New Open Translators to Things on GitHub


Thursday, April 14, 2016

Richard Harris Richard Harris

Microsoft has introduced the alpha version of its new open source project Open Translators to Things (OpenT2T) on GitHub which offers an opportunity to translate common IoT schemas to specific hardware devices. The company’s says that its goal is to “enable application developers to write once, in an open and interoperable way, the exact same code to access functionalities that are shared across similar Things.”

The current alpha version uses JavaScript/Node.js, is open source and cross-platforms (with examples for Windows, OS X, Android, Azure, AWS). The basic logic, as Microsoft envisions it, is composed of three parts: the schema, a translator, and the app.

Schemas

Developers access a common schema across similar Things (Thermostat or a Light schema) with specific properties (Temperature” or OnOff). Microsoft will be working with the IoT industry to create common schemas to describe similar Things, across protocols, in both the consumer and industrial space.

Translator

When translating a Thing to a common schema, the job of a translator is accessing the specific protocol calls supported by individual Things and turning them into a small piece of code that takes the input/output of an actual Thing and translates it into a common schema for application developers to access. Developers can pick an existing schema (whatever is most suitable for that hardware) and write cross-platform JavaScript code to translate the hardware to the schema. 

The job of the translator is to hide the implementation details about particular data models and protocols, exposing functionalities directly as programmable APIs. Microsoft uses the example of turning a lightbulb on. Developers don’t need to think about RPC vs. REST, HTTP vs. MQTT, CoAP vs. ZigBee. They use myBulb.turnOn() and the translator will map the API common schema call to the appropriate libraries to perform the operation. 

Translators can run on local devices (PCs/tablets/phones) for proximally connected Things. Translators could also run in the cloud for cloud-connected Things or on gateways for gateway-connected Things and marshalled from the cloud.

Application Experience

Application developers (client or cloud apps) can write the same code to control similar devices from different manufacturers, in an open and interoperable way. Developers achieve this by referencing the single category schema associated to similar Things and use the same function call defined by that schema to control them.

As an alpha project, OpenT2T is not ready for real deployment and Microsoft is requesting help from the IoT developer community develop, test, and file issues. The project is broken down in the following six parts:

- Translators: A repository of translators are grouped by translators written for a specific schema. The translator name is a unique string provided by the manufacturer identifying a Thing specific model. Microsoft is working with the IoT developer community to add new translators to the initial existing sample schemas, in order to help testing additional new Things and additional protocols.

- Console: On PCs/tablets/phones, developers use the console app as a runtime to communicate with and onboard (initially setting up) actual Things. The console app hosts the Node.js process: when a Thing is onboarded, it is recognized by its unique identifier and its translator loaded. The Thing is then exposed on the bus as a device supporting the schema it has been translated to. The goal is to eventually fully support Windows, OS X, finalize Android support, build iOS support, as well as to explore additional ways to host the runtime and to identify/build cross-platform libraries for the different protocol buses used to communicate with Things.

- Cloud: In the cloud, developers use the same schema to communicate to similar Things translated to that schema in a Node.js process. Support for testing new Things and supporting additional protocols (CoAP, MQTT) will be achieved by adding new translators, running on the cloud, for cloud-connected Things or by testing how to run Translators on gateways (e.g. Arduino, home Hubs, others) to gateway-connected Things marshalled from the cloud.

- CLI: The command line interface used by developers to onboard and communicate with actual Things and running the JavaScript translators.

- Sample apps: The OpenT2T alpha version provides samples of UWP apps for Windows (C# example), Android apps (Java example), JavaScript/Node common cloud code (with Azure IoT Hub and AWS Kinesis specific examples). Microsoft plans to encourage developers to add sample apps for other UI frameworks such as Xamarin, Cordova or Swift and for other clouds such as Google Cloud.

- Voice: By adding a voice file that can understand a specific schema, developers can enable an assistant of choice to control virtually all similar Things that are translated to that schema. The alpha release provides samples of voice files provided for Cortana to control lights and thermostats with a future goal of providing samples for other assistants such as Alexa.



Read more: http://www.opentranslatorstothings.org/#/

Subscribe to App Developer Magazine

Become a subscriber of App Developer Magazine for just $5.99 a month and take advantage of all these perks.

MEMBERS GET ACCESS TO

  • - Exclusive content from leaders in the industry
  • - Q&A articles from industry leaders
  • - Tips and tricks from the most successful developers weekly
  • - Monthly issues, including all 90+ back-issues since 2012
  • - Event discounts and early-bird signups
  • - Gain insight from top achievers in the app store
  • - Learn what tools to use, what SDK's to use, and more

    Subscribe here