03/31/2016 at 02:05 •
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
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!
03/16/2016 at 03:03 •
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.)