Over the past month I have been researching and testing a number of open source IOT platforms in an effort to land on one that I can be confident in using for a sensor that I hope to eventually turn into a consumer product. Obviously the market is packed with various options but I am having difficulty finding one that isn’t really geared towards small home projects or, on the flip-side, so complicated that setup require a masters in rocket surgery. As I am very new to IOT but not illiterate in technology, I figured I would try asking for some guidance here. I am not out to reinvent the wheel. While my sensor has a very small online footprint, security is something I intend to take very seriously and feel that trying to develop my own user/device authentication and management implementation is not only unrealistic, but stupid. Sorry for the long post in advance.
As I mentioned, the device I am wanting to communicate with has a very small online presence. The idea, for a typical use case would be for the sensor to only initiate communication with the server if it detects an alarm condition, which would be a parameter set by the user of the device. The device will also connect once a day at minimum to act as sort of a heartbeat, report battery capacity, and check for firmware or setting updates. There will be other ways to manually initiate communication with the server and a setting to have the sensor run in logging mode.
One of the primary needs is a way to alert a user of an alarm condition. Push notifications are my method of choice but and email may be acceptable as well.
A generic user dashboard is something that will be needed to at the very least configure the device settings. Visualizing historic data will be something that will be needed as an option for the users that decide to use the sensor in logging mode. My goal would be to have something that I create once and can deploy to all users.
Device provisioning: I would be happy if, once a user creates an account and enters their credentials into the local device management console (local web ui accessed from a phone probably), the device connects to the server and is then associated with the user account. I am sure the use of REST APIs will be useful here.
What I have tried
To date, I have the device communicating via MQTT to the various platforms I have been evaluating and plan to stick with MQTT unless I come across a compelling reason to use another protocol such as AMQP.
The first platform I took a look at was Thingsboard and at first glance it seemed like it would suit my requirements well. I got my device connected, built a dashboard and felt that it was a solid choice. I have a number of sticking points with Thingsboard though. The first is the Tenant>Customer>User paradigm they have, which to me makes no sense. Second, as far as I am aware, dashboards are less of a template that you can assign to a user and it figures out the right device to show data for, but more of a create a dashboard manually and assign it to a given user. Creating devices also appears to largely be a manual process, even when using APIs. I have not found any sort of device template concept that allows provisioning a copy of the template with a device id. Thingsboard is a platform I really want to like, and I do like quite a bit about it, but as mentioned above, there are a number of pretty big issues with it in my opinion.
WSO2 is another platform I really want to like but it just feels like it has such a massive overhead for what it offers. I suppose their model is that it is an enterprise device management software with various microservices all trying to dance to the same tune. From a device and user management perspective WSO2 blows Thingsboard out of the water. Both tasks are much simpler and are well supported through API calls. My major sticking point with WSO2 however was that I cannot for the life of me figure out how user dashboards fit into the software model. My guess is that the intention is for the administrator of WSO2 is intended to write a webapp that sits on top of the platform. This is purely a guess since I could not find any details regarding this within the documentation of the various services. There are portal endpoints that are accessible but I believe they are intended for administrative use. I could be totally wrong here and missing something simple but I have yet to receive answers from their support community.
Kaa seems like it might check all of the right boxes and I like that it has OTA firmware update capability. I tried out the community edition briefly and admittedly not enough to really say I gave it a fair chance but I was kind of turned off by the fact that in order to use any standard method of communicating with the server you have to buy a professional license. Depending on the feedback I may try to find out more information about a demo.
There are half a dozen other platforms I have installed and left behind for various reasons. They probably aren’t worth mentioning in detail to keep this long post from getting too out of hand.
The last two solutions I have been looking at are AWS IOT and Azure IOT Hub (plus plus plus). Paying for the reliability and robustness of AWS and Azure is something I am not against but my biggest worry is price scaling. I have researched Azure far more than I have AWS and feel like I like it better as a platform but with both of these services I believe I am left little choice but to break the rule laid out at the beginning of this post: don’t re-invent the wheel. Using Azure would certainly require developing a user management system and probably some sort of user dashboard system. I know Azure has analytics and app hosting but just running the calculator has me concerned that the price would inevitably balloon and become unsustainable. That being said, perhaps the app could be hosted somewhere other than Azure to avoid app hosting costs but then the question of data transfer cost comes into play, which I do not have a clear grasp of but I am sure it would be a factor.
How to proceed
The goal of this whole post was for me to attempt to lay out what I am trying to do, what I have tried, and hopefully provide enough detail for someone to nudge me in the right direction. Perhaps I missed something simple in one of the platforms I have tried that could get me back on track. Or maybe one of you knows of another software solution that might be more fitting.
I do not expect for whatever platform to be free, however nice that would be, but would definitely like to be able to evaluate the software before having to make a commitment. Potential Cost is a primary factor for leaving Azure and AWS on the back burner and preferring a self hosted solution.
Again, sorry for the huge wall of text. If you’ve made it this far, I do appreciate any insights you have to offer.