Build your Own Sensor

microBees as always loved the Developer Community and we do our best to fulfill your requests.
So we made ​​a small sketch for Arduino to send updates from your DIY sensors.
For now we have considered only temperature sensors but in future we’ll include all your DIY projects and sensors.
If you haven’t gateBee yet buy it now here.

How to

microBees from gateBee version Y2015M04D12 has added a MQTT Broker on our gateBee.
MQTT (formerly MQ Telemetry Transport) is an ISO standard (ISO/IEC PRF 20922)[2] publish-subscribe based “light weight” messaging protocol for use on top of the TCP/IP protocol. It is designed for connections with remote locations where a “small code footprint” is required or the network bandwidth is limited. The publish-subscribe messaging pattern requires a message broker. The broker is responsible for distributing messages to interested clients based on the topic of a message. Andy Stanford-Clark and Arlen Nipper of Cirrus Link Solutions authored the first version of the protocol in 1999. (from Wikipedia)

To send your updates to microBees Cloud you have only to send an MQTT message to your local gateBee that will process the message, checking and encrypting it, and will ship it to our Cloud.

The choosed topic to send custom update is “sensor_in”.

Warnings

– Do not send update with a delay from each others less to 3 seconds.
– Do not do any port forward to your gateBee; it will not accept messages from others networks.
– Follow the following standard packet.

Example
{
"product_id":20,
"conf":{
"smartbee_serial":180892,
"smartgate_serial":"B3-35-FB-82-A4-02"
},
"data":{
"param_type":5,
"param_num":1,
"payload":[14.88]
}
}
Fields
Field name Description Type
product_id Sensor Identifier to allow cloud to recognize the sensor (20 for temperature sensor) Long
smartbee_serial Is a your UID for the sensor String
smartgate_serial Your gateBee serial. If wrong the packet will drop. Long
param_type Identify that the param type you’re sending (5 is Float) Integer
param_num The number of params Integer
payload Your payload JSONArray of Float
For Arduino we have made a simple sketch to submit your updates.
You have to made a very simple circuit following this schematic, then download the sketch.

arduino-lm35

DOWNLOAD NOW
You can now download our sketch from GitHub