There are 2 ways to get data from Atmotube:
In this article we will parse the data from Bluetooth broadcast packets.
The most common task is to get the data from Atmotube remotely. Atmotube devices do not have a Wi-Fi module so you need an extra bridge to connect it to the cloud.
There are several options for connecting Atmotube devices to your own cloud:
In this article we will describe BLE<>Wi-Fi router option. Router supports HTTP or MQTT. We will use MQTT as connection protocol and save data to the database.
There are a lot of BLE<>WiFi routers on the market. For example MINEW G1. You can order it from Alibaba or another marketplace.
You can use any managed MQTT broker (like https://www.cloudmqtt.com/) but the simplest way is to deploy your own instance of Mosquito - open-source MQTT broker. You will need one or several linux cloud instances to deploy:
You will need to specify the following information (example is for a MINEW router):
The Atmotube BLE packet consists of two parts: Advertising packet and Scan Response packet. You will need both parts to parse the data. To catch Scan Response packets you will need to enable Active scanning.
To minimize the MQTT data you can use regex filter for raw Atmotube data. For Advertising packet you can use ^.*41544D4F54554245 (ATMOTUBE in hex). For Scan Response packet you can use ^.*7306.. (fw version for Atmotube PLUS) and ^.*7405.. (fw version for Atmotube PRO).
To check if your router sends data to the broker you can use any MQTT client (like MQTTBox).
Subscribe to the MQTT topic you specified at Step 3.
At the last step you have to combine Advertising packets and Scan Response packets and parse the data in order to save it to the database. We will use node.js to parse packets and save it to MongoDB database.
NodeJS, socket.io and MongoDB are not part of this tutorial. You can find a complete example source code here: https://github.com/atmotube/atmotube-mqtt-nodejs
As a result you can achieve complete and remote access to the data collected by Atmotube Wearable Air Pollution and Weather Trackers.