Module Integration Guides
Linux

Pushing data to Bytebeam

6min

This section talks about how to push the data from the device to the cloud. Data is pushed to the cloud in Streams.

To push data you need to write an application that connects to uplink over TCP and pushes data to it. Uplink then in turn pushes the data to the cloud over MQTT.



Document image


As an example, this guide assumes you are pushing temperature data to Bytebeam.

Create a stream on the cloud

First, let us create a stream called temperature on the Bytebeam cloud. First, go to Bytebeam Cloud. Now, click on your username in the top right corner and navigate to the “Settingssection.

Document image




Next, select Streams and Click on "Create Stream".

Document image


Now, enter the stream name and column name. In this example, we have chosen the data type of temperature as Float64. Click on the "Submit" button.

Document image


The temperature stream should be visible under the "Streams" section.

Document image


Configuration on the device side

You can now write to uplink from your application. Below you can see samples for some popular languages.



demo.py
demo.js
demo.rs
demo.go


If you do not see your favorite language do not worry. You can write to uplink in 2 easy steps:

  1. Create a TCP socket and connect to localhost and port 5050
  2. Periodically write data in the below JSON format to the port (NOTE: newline delimited)



JSON


In the above JSON you need to auto-increment the sequence for each packet and the timestamp needs to be in milliseconds

The temperature data should now be visible on the cloud. Head over to Bytebeam Cloud and go to Device Management -> Device tab. Now click on the device and Select "Show Streams".

Select "temperature" stream.

Document image

Document image


The temperature data should be visible on the cloud now.

Document image