This is a subject I have been thinking of for a while, especially because the "IoT" concept has been floating around a lot lately.
I will start with what I mean when I say "IoT". I know that the term IoT could mean different things and that sometimes it's misused. It could be a term that is not clearly defined and can lead to big discussions around what does it exactly mean, I myself don't know the proper and widely accepted definition of the term. So for me IoT is a concept, a concept that defines the ability to connect to an embedded device remotely through the internet either from another embedded device or from a cell phone. As simple as that.
On this context, the purpose of the connection doesn't matter, if you can connect one device in your office with another one at home, or if you can connect to one device at home from your cell phone, all this through the internet, then we are talking about IoT devices (the embedded devices, not the phone).
So, having agreed on what I mean by IoT I will now describe what I'm trying to achieve.
What I'm trying to achieve is precisely that what I describe on my definition of IoT.
I want to have one or several embedded devices at home connected to my internet router, either by ethernet or wifi and be able to connect to them remotely with another embedded devices in a remote location (and by remote I mean not on the same network) and maybe also to be able to connect to them with a monitoring app on my phone
For example, I may have a simple embedded device acting as an on/off switch hooked op to my garage door opener and another embedded device acting as a big red button on my desk at work so that I can push the red button in my desk and the garage door opens.
Another example would be to have an embedded device with ADC capabilities that can monitor the temperature of my house and send me an alert when it reaches a threshold. The notification could be received either by a simple android app or by another embedded device with a little screen sitting on my desk at work.
These examples may be silly but are just to illustrate the possible scenarios and use cases for what I'm trying to achieve. At the end, the idea is the same, connect one embedded device with another through the internet.
Another thing to clarify is that the data exchange between these devices will be very lightweight, just a couple of bytes every time, it is not that hundreds of kilobytes are needed to be interchanged between devices.
Additionally, the kind of "embedded devices" I'm referring to are simple but capable devices based on 100MHz or 200MHz cortex-m4 microcontrollers. And that is important to clarify because there won't be any Linux or complex libraries running on those devices. In the end, is such a waste of resources and completely unnecessary to have a powerful processor running Linux just to turn on and off a light bulb. In any case, I'm planning to use a BeagleBoard, Raspberry Pi, or any other board like that as my embedded devices. Just Microcontrollers because no more complexity than that is needed.
I don't know much about IoT platforms and those kinds of complex solutions out there. When I started this journey of finding out a way of connecting one embedded device with another through the internet I stumbled upon a couple of sites with IoT services.
I know that there are some IoT cloud services like:
Just to name a few. The main issues with those are cost and complexity. You have to pay to get those services and also you have to learn how to implement all the services they have, in case you need them all, and their APIs and maybe a bunch of other stuff that doesn't seem necessary to me to be able just to interchange some bytes between devices. I just want something simpler than that, something I can do myself.
You may say that implementing my own "cloud", if that is something I have to do, is not simple and sometimes is better to use those kinds of services for the sake of simplicity but there are two main reasons I want to know how to implement my own IoT services.
The main reason is that I want to do it myself. I don't want to rely on a 3rd party to connect my devices to each other and since I'll be developing the code and the hardware for my devices then it feels better to also create my own means to connect them as IoT devices.
The second reason is to learn how to do it. By knowing all the necessary things I need to achieve this, I will have a better understanding about the IoT world.
Also, I want to mention that I'm proficient in C and I use Linux as my everyday OS at work as well as in my home, so please avoid windows stuff because that is useless to me. I'm not afraid of anything I have to implement in C for my embedded devices or on Linux to implement whatever is needed to achieve my goal.
So my question is, what is it necessary to implement, and where, to be able to connect two or more embedded devices to each other with the purpose of data interchange between them?
This question What can I use to create an IoT on our own server? have something similar but is closed and doesn't have any answers, also assumes an already existing cloud infrastructure to be used. So it doesn't help me.
This other post What IoT services are available for storing/sending/publishing generic data in the cloud? has a similar question but the OP is asking explicitly for IoT services and I'm trying to avoid those.