Close
0%
0%

Seamless IoT Protocol Translation: Common Ground

The Internet of Things is limited by many incompatible protocols. Common Ground fixes this by translating protocols through a common proxy.

Similar projects worth following
Companies building devices that are designed to be used in the Internet of Things commonly use proprietary protocols in their products. This creates a problem because people become constrained to only using one manufacturer's products in a system since products implementing different protocols cannot communicate with each other. Common Ground solves this problem by translating protocols through a common translation proxy. This gives people the freedom to use their devices regardless of what manufacturer built them.

Problem

In a perfect world, all connected devices would implement one protocol and communicate with each other to do whatever the user desires. This isn't a perfect world. Many manufacturers implement their own proprietary protocols in an effort to create a monopoly, where the user is forced to use only their products because any other product would use a different, incompatible protocol and not work with any of the other devices the user already has. This is especially a problem now since many devices are beginning to ship with connected features.

For example, let's say Bob has purchased many connected light bulbs and outlets to automatically turn on when he is at home and off when he is not using them to save electricity. Bob then decides to buy a new coffee maker that is a connected device so he can automatically turn it on and off just like his other devices. However the company that makes coffee makers is different from the company that makes connected light bulbs and outlets and also implements a different protocol. Now the connected functionality that Bob paid for in his new coffee maker is rendered useless since it cannot communicate with the existing network and must be controlled separately which defeats the purpose of automation.

This can be frustrating to tech savvy users who understand the principles of protocol compatibility and incompatibility. Non techie users are left just as frustrated but also clueless as to why their devices can't work together. This forms a major obstacle in the path to the widespread adoption of the internet of things if users can't use their devices in the way they want to and are hindered by competing companies that have their own interests in mind instead of the people using their products.

Solution

For this problem to be solved, there must be a way to allow devices implementing different protocols to seamlessly communicate with each other. The way I will implement this is through software that acts as a proxy where data reaches the proxy and is translated to other protocols. This way even though devices implement different protocols, they will still be able to communicate. This XKCD comic describes what Common Ground would be like if protocols were different cable connectors.

Fig. 1 XKCD comic 1406: Universal Converter Box

Modularity

While Common Ground could be written as a simple program which translates a few protocols, this would eventually turn into a similar problem where only Common Ground compatible devices can be used together in a system. Instead, Common Ground instead supports different protocols through modules. A module is an independent piece of code that is responsible for both interpreting a protocol and sending translated data back over the protocol. This allows the user to add their own support for new protocols.

Methodology

Common Ground works by translating protocols on a common proxy accessed by all devices that need translations, hence the name common ground. When data from a protocol reaches the proxy, it is first converted to a intermediary "mezzanine" object internal to the proxy. This mezzanine object is then passed to different modules, to be translated into their respective protocols and sent to the devices that need the translated data.

Open Source

Common Ground is open source. This gives users the freedom to make changes and improvements to the software to make it more versatile and usable to themselves and others. This also allows the software to be more secure since its code can be seen and analysed by others to remove vulnerabilities. Remember, all data that needs to be translated must pass through the proxy so security is important to protect people's data and the devices connected to the proxy.

  • March 30 Status Update

    Samuel Bowman03/31/2016 at 02:05 0 comments

    It's been 2 weeks since my last project update so I guess I'll document what I've been up to. Previously I was debating whether to stick to Python or move to C++, Java, or some other language. I have decided to write the core Common Ground application in C++ for the performance boost of a compiled language but implement the modules in Python for a number of reasons.

    • Python does not require a toolchain and compiler to be setup which makes it easier to write and modify modules as only a text editor is needed.
    • If a shared library was used, source code would have to be distributed separately since the shared library is already compiled.
    • Python is platform independent and does not require cross compiling like a shared library.
    • Python is generally easier to read and write to non-programmers.

    With these design choices in mind, I have been developing the core Common Ground application. Evidently, I remember more C than C++ and pretty much had to relearn the object oriented aspects of the language which was a huge time drawback. Because of that and the limited time I have to work on this project, I don't have as much implemented as I would like to yet. I have the core application framework, the mezzanine object, and a simple module for console data (still in C++, not Python yet) implemented. There is no user interface and any translation must be manually coded in and compiled. This leaves a nice to-do list of things to implement.

    • Python module interpreter
    • User interface for translation configurations.
    • Config file for Common Ground configuration.
    • Modules that actually do translation rather than console I/O
    • Logging and debugging frameworks
    • etc.

    Since there is so little usability yet, I am not going to upload the code yet, but will instead give the horrible promise of sometime soon. Keep calm and code on!

  • Early Developments

    Samuel Bowman03/16/2016 at 03:03 0 comments

    I started developing the Common Ground project around November 2015. At the time, I did not have intentions of fully developing what was then just a small piece of code written for a science fair. I then realized that many others had faced the issue of incompatible devices and protocols and that further development of this project could help people overcome the limitations imposed by hardware manufacturers, giving people the freedom to do what they want with their devices.

    That being said, this is at this time VERY much still in a proof-of-concept state. Only Phillips Hue and MQTT are mostly supported and there is half completed support for Belkin WeMo (The WeMo code is not pushed to GitHub if you bother to look). It also does not actually translate directly between protocols but translates everything to MQTT and then into other protocols. Documentation is a joke. I plan to scrap the code and do a complete rewrite, implementing modules and a proper mezzanine object layer API. I also may change programming languages from Python to Java or C++ for performance increases.

    Fig. 1 Flowchart showing data flow in early version of Common Ground

    (I am going to try to run the code and get some screenshots of it running if I have the time and don't forget.)

    However bad this proof-of-concept may be, it works, showing that this concept can actually be put into action and serve its purpose. With the problems evident in this early version in mind, development on v0.2 starts now.

    GitHub Repository: https://github.com/SamuelBowman/SF2015-Common_Ground

    (SF2015 stands for Science Fair 2015 in case you were wondering.)

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates