Close
0%
0%

mqopen

Open-source IoT platform

Similar projects worth following
mqopen is open-source IoT platform for sensors and other devices interconnected using MQTT protocol. It offers solution for smart homes, data logging, environment surveillance and automation.

You can find more information about the project at http://mqopen.org

It creates open source network of very cheap devices which can collect data or can be controlled for some actions. Also provides tools for data processing and network health monitoring.

This project is divided in three main parts:

  1. Infrastructure
  2. Nodes
  3. Data processing

Features

  • Open source - We believe that you can only trust to open source solution. You can never be sure that any closed source solution isn't backdoored, has't some critical vulnerability or creepy snooping feature.
  • Scalable - MQTT based infrastructure allows you to very easily create new kind of endpoint devices or data processing software and deploy it into existing network.
  • Extensible - You can deploy only one device without need of any complex infrastructure or you can have thousand devices span over the world. Possibilities are endless.
  • Secure - Designed to be secured against data leak and network compromise

Infrastructure

Infrastructure is based on MQTT protocol. It is lightweight publish-subscribe communication protocol originally developed by IBM.

Network is designed to span over many locations over the world, each with its own local MQTT broker. All local MQTT brokers are connected to single central MQTT broker to form large and robust network.

This approach allows to use cheap hardware for building endpoint devices and also use SSL encryption for data exchange.

Use of MQTT based network has several advantages:

  • Minimize traffic - MQTT required very minimal network traffic. It also offers retain feature which allows you to send only environmental changes. Sensor do not have to periodically send that a doors are still closed.
  • Response time - When some device needs to get some information, it do not have to poll some other device for it. Network can store this information itself.
  • M:N relationship - Publish-subscribe communication allows you to build single device which reads data from multiple sensors and vice versa.
  • Unified interface - MQTT is well documented and you can connect other MQTT compliant devices into same network.
  • 3rd party independent - You don't have to rely to functionality if some 3rd party service.
  • Distributed approach - Only small part of the network will be paralyzed when some broker goes down.
  • Central processing - You can process and analyze data at single point.
  • Real-time monitoring - Network can store information about which devices are online and which are not.
  • Encryption - Bridging brokers via SLL tunnels.

Nodes

Main part of this mqopen are endpoint devices. These devices can be sensors for gathering data, but also devices which can read data from the network and take some actions based on them.

Node is generally a device connected to MQTT network and capable of sending or receiving data. It can read data from various sensors or control some hardware.

All mqopen nodes shares same source code. They only differ in the configuration. This means than there is no need to maintain many differed source trees, which can leads to problematic bug fixing and code maintaining issues. When you find bug in some core routine, just fix it in the one place. And what about porting the code for another architecture?

User also don't have to write single line of code when building a new node. You don't have to implement any setup or loop functions like in Arduino or its derivatives. Creating your own bugs inst't a progress. All what user have to do is download a source code and configure it.

Node firmware is configured using kconfig langue originally developed by Linux kernel developers. Yes, you don't have to modify any header files either (like configuring firmware for 3D printer). Just issue 'make menuconfig' command and enjoy configuration interface.

Firmware is written in plain C language without any mysterious Arduino or LUA layers. These project are excellent tools for prototyping, but not for serious work. C language allows to do optimizations and you exactly know, what the processor does.

Firmware source code acts as framework which allows easy extensibility for adding new functionality....

Read more »

  • 1 × Virtual private server with public IP address For central MQTT broker and OpenVPN server
  • 1 × Raspberry Pi For local MQTT broker
  • 1 × Arduino
  • 1 × enc28j60 LAN module
  • 1 × DHT22 sensor

  • Building IoT incubator

    Ivo Slanina12/05/2016 at 12:24 1 comment

    Hello open-source and IoT community!

    I paused development of mqopen for a while, due lack of spare time. But I got few ideas what to do and I'm in programming mood, so let's continue in development.

    I'm experimenting with incubator project. I want to build very simple incubator for my sister. She is breeding cockroaches as feeder insect for her bearded dragon.

    So, first some fact about cockroaches, particularly about Blaptica dubia species. They ideal temperature is about 28-30 °C. If temperature is higher than 30 °C, they lifetime is shorter. Also, the will not breed below 20 °C. They generally likes higher humidity. This species don't need that much high humidity, compared to other ones. But, high humidity leads to creating of mold. Recommended humidity slightly above 60 %. Blaptica dubia are sexually adult after 8 - 12 months, so keeping them as feeder insect as quite long term run. If the colony dies, it takes long time to grow new one.

    Incubator design

    So, incubator should have following features:

    • Sensor for measuring temperature and humidity in the colony.
    • Relay for controlling the heater.
    • 12 V power output for controlling computer fan.
    • Alarm to notify user of something goes wrong.

    Computer fan is experimental feature. It should ensure better air flow in the incubator box and potentially suck wet and warm air out. It is also supposed to be used in other applications, so 12 V power output can be useful.

    Of course, incubator will be connected into network using MQTT protocol. It will report temperature, humidity or state of heaters, and potential alarms. It should be also configured over network connection.

    Let me know if you like the project :)

  • mqspeak update

    Ivo Slanina07/12/2016 at 17:30 0 comments

    I'm happy to announce that I released new mqspeak version a few days ago. It contains some bug fixes and also some new features. Let'st briefly describe them:

    Update waiting

    When channel update consists of data from multiple sensors, it may happen that one sensor die. By default channel never will be updated until data from all sensors arrives. Inactive sensor causes channel update will be stalled.

    When update waiting enabled, mqspeak will wait defined amount of seconds and then sends out even incomplete channel update.

    On-Change update

    I have implemented 'onchange' updater for handling asynchronous events, like opening and closing a doors or events from buttons. This updater simply sends every configured MQTT message to ThingSpeak/Phant channel. If events happens too often, mqspeak will store them in local buffer and send them out when remote server can accept new update.

    syslog support

    I removed logging to stdout and replaced it by logging to syslog. It provides easier control what the services does and more convenient debugging.

    Download

    New mqspeak version is already uploaded into pip repository. You can install it by issuing of following command:

    $ sudo pip3 install mqspeak

  • Monitoring swimming pool with mqopen

    Ivo Slanina06/16/2016 at 14:49 0 comments

    One of the most common sensors is Dallas DS18B20 temperature sensor. It is pretty cheap, accurate, has only one data wire and is available in water-proof package. mqopen has already support for DS18B20, so building simple temperature sensor is really easy.

    It comes handy at the start of the summer for monitoring water temperature in a swimming pool. I built a probe very similar to this one, except with water-resistant cable join.

    Sensor itself is placed at the bottom of the swimming pool where the water temperature is lowest. Other end of the probe is plugged in ESP8266 node under little roof, protected against rain.

    Sensor periodically reads water temperature and sends it to my MQTT network. mqspeak then collect the data and updates ThingSpeak channel with actual water temperature. Final graph (from rainy day) looks like this:

  • ESP8266 node firmware update

    Ivo Slanina06/10/2016 at 13:36 0 comments

    I made some progress on my ESP8266 node firmware. My goal is to build single, robust, configurable and reliable piece of code for these little IoT devices, to avoid redundant implementations and unnecessary bugs. You can download it from my GitHub. Users should be able to configure it in kconfig interface and create firmware their own IoT device without need to write single line of code or even modifying any header file.

    List of esp8266-node updates:

    • Added service topics - I added various service MQTT topics which node sends into network when it connects. This is useful for statistics purposes. debugging or for searching nodes with obsolete firmware or hardware versions.
    • Device class - I divided nodes into two basic classes:
      • Sensor - Sensor device sends data to network.
      • Reactor - Reactor devices reacts to data from sensors and take some actions. I have already implemented some prototype code, but this part is in the main development.
    • Asynchronous sensors - I implemented abstraction layer for synchronous and asynchronous sensors. Synchronous sensor periodically sends data. Asynchronous ones waits for some event and sends data only when event happens (with retain bit set). This feature takes advantage of MQTT to save bandwith and improve response time for a other devices. I'm building a door sensor which reports every time when door status changes (open / closed).
    • Initial data publish - Nature of asynchronous sensor it that it sends data only when event happens. I implemented logic which sends sensor state when node becomes online, if the state is relevant.
    • Various bug fixes - I fixed some bugs in the code and hopefully improved device reliability.

    I have lot of ideas for another improvements, stay tuned :) http://mqopen.org/

  • New sensors for ESP8266 node

    Ivo Slanina05/24/2016 at 11:41 0 comments

    After I got working kconfig tool for my ESP8266 firmware, I can more effectively implement new kind of sensors. So, the firmware now supports these ones:

    • DHT22
    • DHT11
    • DS18B20
    • BH1750FVI
    • BMP180
    • Buttons

    Button is special and most recent kind of sensor. It is asynchronous and interrupt driven. It is also be considered to be used as abstraction layer. In future realeases, it should handle other asynchronous devices, such as PIR motion detector. It just detect rising or falling edge and transmits MQTT update message. It is in experimental phase, but it can be very useful.

    All necessary configuration steps are done via 'make menuconfig'. You can find more details on my wiki page.

  • Start of mqopen project

    Ivo Slanina05/19/2016 at 11:10 0 comments

    I'm constantly developing my IoT network. Adding new features, fixing bugs, building larger network, creating new software, etc... For that reason I decided to find a name for the project and run a website.

    I wrote some HOWTOs and other stuff, homepage, created some pictures and created little website.

    You can find it at http://mqopen.org. That't the project name.

  • Making firmware source code more professional

    Ivo Slanina04/27/2016 at 11:25 0 comments

    I'm currently tinkering about convenient configuration for each IoT endpoint device. Each device have to be configured to correct network settings, it own name, connected sensors, MQTT setting and lot other stuff. When I want to create a device with new sensor, I have to create new branch of source code and make appropriate patches to it.

    It's very tedious and stupid approach, so I plan to merge all branches into one solid codebase and provide ultimate configuration tool. I successfully ported kernel's Kconfig tool to my project. It still requires lot of work. But finally, I have my working prototype :)

  • Diagnostic work in progress

    Ivo Slanina03/23/2016 at 09:34 0 comments

    For last few months I work on device diagnostic and health monitoring software. I have already some prototype which I plan to release. I call it 'mqguard'

    Its divided into two parts:

    • Backed diagnostics daemon. Written in python. Its responsibility is monitoring MQTT traffic and apply some checking rules to it. It can detect anomalies such as error codes, invalid values, timeouting or flooding and other things.
    • Frontend user interface. It's single page web application written in JavaScript. This part of diagnostics communicates with daemon over websockets and displays realtime data to user.

    Here are some sreenshots:

    I plan to release alfa version very soon. I'm writing build and deploy instructions, documentation and fixing some minor bugs.

  • ​ESP8266 board arrived!

    Ivo Slanina03/16/2016 at 18:47 0 comments

  • mqspeak release

    Ivo Slanina03/09/2016 at 16:17 0 comments

    I was refactoring mqspeak bridge. I moved some code into separate library to avoid code duplication in my other software. Most importantly, I used setuptools for package distribution. Now you can install mqspeak with following command:

    $ sudo pip3 install mqspeak

    To use mqspeak, you need to create configuration file. Example configuration can be found at project GitHub repository. Easiest way how to run mqspeak is start it as systemd service. Sample unit file can be also found in git.

    Please let me now some feedback or bug reports :)

View all 21 project logs

Enjoy this project?

Share

Discussions

srainsdon wrote 03/08/2016 at 16:49 point

This is something I've been working on at my place you have your final project mapped out so much better then mine. I will be watching and throwing my two cents in when i have it for you.

  Are you sure? yes | no

Luke Beno wrote 09/07/2015 at 12:23 point

This looks like a good beginning to a cool project.  If you are interested in some hardware ideas for these nodes you can check out my project.  https://hackaday.io/project/4648-analogio-a-full-stack-iot-platform.  Also an alternative to ThingSpeak is the phant.io lib from Sparkfun.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

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