Disclaimer: all CLOUDBIT™ images are from littleBits
"The cloudBit is the easiest way to create internet-connected devices. You can now snap the internet to anything! Retrofit your thermostat to control it remotely, or set up a sound-triggered alarm system that texts you alerts - the possibilities are endless." ...from littleBits
Cloud API to access litteBits Cloud API endpoints to manage your cloudbits
The littleBits Cloud API is rate limited to prevent abuse that would degrade our ability to maintain consistent API performance for all users. (host : https://api-http.littlebitscloud.cc
)
-
"Blynk is a Platform with iOS and Android apps to control Arduino, Raspberry Pi and the likes over the Internet." ...from blynk.cc
-
"Node-RED : a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways. It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click." ...from nodered.org
-
blynk + Node-RED for the additional information.
-
littlebits-cloud-http lightweight wrapper for littleBits Cloud HTTP API
In a function
node (triggered by Blynk-ws read event
node),
// "access_token" and "device_id" are acquired from littlebit cloudcontrol setting page
var api = require('littlebits-cloud-http')
.defaults({ access_token: '**jfslf478jliwt9s**' });
api.output({device_id: '**slkjfie**', percent: 50, duration_ms: 5000 });
Create a new subscription for device_id
.
// "access_token" and "device_id" are acquired from littlebit cloudcontrol setting page
var api = require('littlebits-cloud-http')
.defaults({ access_token: '**jfslf478jliwt9s**' });
api.subscribe( {
subscriber_id : 'https://immense-garden-*****.herokuapp.com/bits',
publisher_id : '**slkjfie**',
publisher_events : [ 'amplitude' ]
});
NOTE Cloud Control and littlebits Invent App worked as advertised. However, the sub/pub model doesn't ( littlebits/cloud-client-api-http
has no updates over 3 years.) I didn't find any suitable working example yet. subscriber_id
was assgined with the public URL (Node/Express on Heroku Platform) but Express /bits
POST handler received no request.