The Echolo Developer Hub

Welcome to the Echolo developer hub. You'll find comprehensive guides and documentation to help you start working with Echolo's IoT Platform as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Get Started with the IoT Service

The Echolo IoT Service is an IoT Message broker that allows devices to communicate to each other or to the cloud easily. This service uses a pub/sub (Publish & Subscribe) model allowing a Hub to connect and send or receive messages on any allowed Topics.

Note on Examples

All our examples will use the Echolo NPM Library but we support any mqtt library. When using a 3rd party library you will still need to authenticate with the service using your hubId and key. Often times this is labeled as username and password.

Before moving on...

You might want to view the NPM documents and get things installed first.

1) Open a connection to the IoT Service

First, we need to open the client and authenticate using our hubId and key.

let iot = Echolo.IoT({ "hubId": "myHubId", "key": "xxxx-xxxx-xxxx-xxxxx-xxxxxx-xxxxxxx" })

2) Subscribe to the Hub's Topic

When a hub is created, it gets its own topic that it can both read and write to. Review Topics and Hub for more information. For this example lets say our data is as follows:





As it shows in the Topics guide we form the topic path like so: hub/appId/hubId using the data above it comes to be: hub/12345678-1234-1234-1234-098765431/EcholoHub001

iot.on('connect', function() {

After we subscribe to the topic we then need to watch for an event called message.

iot.on('message', (topic, message) => {

3) Publish a message to the same Topic

Now that we have opened a subscription to the hub Topic. Let's send it a message, again we will be using the same topic above hub/12345678-1234-1234-1234-098765431/EcholoHub001.

let data = { myKey: 'My Value', someInt: 123 }

iot.publish('hub/12345678-1234-1234-1234-098765431/EcholoHub001', JSON.stringify(data))

Get Started with the IoT Service

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.