The Realtime Cloud Messaging SDK for Tessel
Part of the The Realtime® Framework, Realtime Cloud Messaging (aka ORTC) is a secure, fast and highly scalable cloud-hosted Pub/Sub real-time message broker for web and mobile apps.
When you need to communicate in real-time with your Tessel devices Realtime Cloud Messaging is the reliable, easy, unbelievably fast, “works everywhere” solution.
The Realtime Tessel sample app
Before running this sample install the Realtime Cloud Messaging SDK for Tessel using the following commands:
cd sample npm install realtime-tessel
To execute the blink sample in your Tessel run the following commands:
tessel run blink.js
This sample will subscribe the Realtime channel
tessel and when any message is received your Tessel leds will toggle.
tessel. You should see the Tessel leds toggle when messages are received.
NOTE: For simplicity these samples assume you're using a Realtime® Framework developers' application key with the authentication service disabled (every connection will have permission to publish and subscribe to any channel). For security guidelines please refer to the Security Guide.
Don't forget to replace
YOUR_APPLICATION_PRIVATE_KEYwith your own application key. If you don't already own a free Realtime® Framework application key, get one now.
The Tessel SDK API reference documentation can be found here.
The complete Realtime® Messaging reference documentation is available here