Journey through the internet of things world
Wanted to explore and understand the ecosystem of internet of things.
Started with some hardware
ESP8266 ESP-01S is used in a range of relatively cheap board which can connect to a wifi network, handle some IOs and be programmed using the arduino language and software.
Mated with a temperature sensor and a power regulator (supports 3.3v only), you get a small circuit that can read data and publish it.
libraries used :
dht
mqtt
wifi
Where to ?
MQTT is a protocol used to handle object to object communications. Light and supported by free brokers and libraries for several languages, it takes a few hours to get started and publish the first message.
broker used :
hivemq
also mosquitto and other
In our basic example, the object sends data - publishes and we retrieve the data published on a phone or website.
The broker is a middle ground where the data is made available.
Using the data
many free IOS apps out there that provide user friendly custom interfaces to subscribe to mutt publications and to also publish
Trialed "IoT OnOff" which is simple to configure and provided a result without trouble.
When collecting data from sensors, one might think of doing 2 types of things with it :
store it and analyse it at a later date
and
trigger actions - publish messages, send instruction to connected objects, ... based on the data collected
As such the standard apps accessing the data don't allow to implement such features.
So, tried a bit further.
There is a web service on the market that allows to do a bit a programming
http://www.thingstud.io
alternatively, a javascript library can be used to develop html pages that connect to a mutt broker and subscribe and publish messages.
Paho was trailed and gave satisfaction for a quick start.
It then becomes simple to populate a database like MySql through the javascript programming and store the data.
documentation on javascript library:
https://www.eclipse.org/paho/clients/js/
https://www.hivemq.com/blog/mqtt-client-library-encyclopedia-paho-js
Wanted to explore and understand the ecosystem of internet of things.
Started with some hardware
ESP8266 ESP-01S is used in a range of relatively cheap board which can connect to a wifi network, handle some IOs and be programmed using the arduino language and software.
Mated with a temperature sensor and a power regulator (supports 3.3v only), you get a small circuit that can read data and publish it.
libraries used :
dht
mqtt
wifi
Where to ?
MQTT is a protocol used to handle object to object communications. Light and supported by free brokers and libraries for several languages, it takes a few hours to get started and publish the first message.
broker used :
hivemq
also mosquitto and other
In our basic example, the object sends data - publishes and we retrieve the data published on a phone or website.
The broker is a middle ground where the data is made available.
Using the data
many free IOS apps out there that provide user friendly custom interfaces to subscribe to mutt publications and to also publish
Trialed "IoT OnOff" which is simple to configure and provided a result without trouble.
When collecting data from sensors, one might think of doing 2 types of things with it :
store it and analyse it at a later date
and
trigger actions - publish messages, send instruction to connected objects, ... based on the data collected
As such the standard apps accessing the data don't allow to implement such features.
So, tried a bit further.
There is a web service on the market that allows to do a bit a programming
http://www.thingstud.io
alternatively, a javascript library can be used to develop html pages that connect to a mutt broker and subscribe and publish messages.
Paho was trailed and gave satisfaction for a quick start.
It then becomes simple to populate a database like MySql through the javascript programming and store the data.
documentation on javascript library:
https://www.eclipse.org/paho/clients/js/
https://www.hivemq.com/blog/mqtt-client-library-encyclopedia-paho-js
Comments
Post a Comment