This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function skynet (config, cb) { | |
if (!cb && typeof config === 'function') { | |
cb = config | |
config = {} | |
} | |
function loadScript(url, callback) | |
{ | |
// Adding the script tag to the head as suggested before | |
var head = document.getElementsByTagName('head')[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST http://skynet.im/devices | |
{"ipAddress":"72.44.240.228","uuid":"641ddf90-1dab-11e4-892c-43aa68a33343","timestamp":"2014-08-06T20:51:08.424Z","token":"r3oen29jq0110pb97pspngm0w5e6zuxr","channel":"main","online":false} | |
curl -X POST -d "wind=12&temperature=78" http://skynet.im/data/641ddf90-1dab-11e4-892c-43aa68a33343 --header "skynet_auth_uuid: 641ddf90-1dab-11e4-892c-43aa68a33343" --header "skynet_auth_token: r3oen29jq0110pb97pspngm0w5e6zuxr" | |
{"timestamp":"2014-08-06T20:53:21.818Z","uuid":"641ddf90-1dab-11e4-892c-43aa68a33343","wind":"12","temperature":"78","ipAddress":"72.44.240.228","eventCode":700,"_id":"53e295c19f716f0f7477688d"} | |
curl -L -X GET http://skynet.im/data/641ddf90-1dab-11e4-892c-43aa68a33343 --header "skynet_auth_uuid: 641ddf90-1dab-11e4-892c-43aa68a33343" --header "skynet_auth_token: r3oen29jq0110pb97pspngm0w5e6zuxr" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -L -X GET --header "skynet_auth_uuid: 641ddf90-1dab-11e4-892c-43aa68a33343" --header "skynet_auth_token: r3oen29jq0110pb97pspngm0w5e6zuxr" "http://skynet.im/data/641ddf90-1dab-11e4-892c-43aa68a33343?start=2013-08-06T20:50:21.818Z&finish=2013-08-06T20:60:21.818Z" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo npm install alljoyn | |
npm WARN package.json jade@0.26.1 No README data | |
npm WARN package.json nodeconf2013@0.0.0 No repository field. | |
npm WARN package.json wave@0.2.3 'repositories' (plural) Not supported. Please pick one as the 'repository' field | |
npm WARN package.json wemo@0.1.0 No repository field. | |
npm WARN package.json websocket-stream@0.2.0 No repository field. | |
npm WARN package.json wemonode@1.0.11 No repository field. | |
npm WARN package.json pusher-pipe@0.0.10 No README data | |
> alljoyn@0.0.0 install /usr/local/src/node_modules/alljoyn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MONGODB_URI=mongodb://localhost:27017/skynet \ | |
SSL_CERT=../meshblu-certs/skynet.im/server.crt \ | |
SSL_KEY=../meshblu-certs/skynet.im/server.key \ | |
REDIS_HOST=localhost \ | |
REDIS_PORT=6379 \ | |
COAP_PORT=5683 \ | |
COAP_HOST=localhost \ | |
MQTT_DATABASE_URI=mqtt.octoblu.com \ | |
MQTT_PORT=1883 \ | |
MQTT_PASSWORD="987...777" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MONGODB_URI=mongodb://localhost:27017/skynet \ | |
SSL_CERT=../meshblu-certs/skynet.im/server.crt \ | |
SSL_KEY=../meshblu-certs/skynet.im/server.key \ | |
REDIS_HOST=localhost \ | |
REDIS_PORT=6379 \ | |
COAP_PORT=5683 \ | |
COAP_HOST=localhost \ | |
MQTT_DATABASE_URI=mqtt.octoblu.com \ | |
MQTT_PORT=1883 \ | |
MQTT_PASSWORD="987...777" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SSSSS kk tt | |
* SS kk kk yy yy nn nnn eee tt | |
* SSSSS kkkkk yy yy nnn nn ee e tttt | |
* SS kk kk yyyyyy nn nn eeeee tt | |
* SSSSS kk kk yy nn nn eeeee tttt | |
* yyyyy | |
* | |
* SkynetClient for http://skynet.im, OPEN COMMUNICATIONS NETWORK & API FOR | |
* THE INTERNET OF THINGS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conn.gatewayConfig({ | |
uuid: 'gateway-uuid', | |
token: 'gateway-token', | |
method: 'createSubdevice', | |
type: 'skynet-bean', | |
name: 'bean' | |
}, function(results){ console.log(results); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
msg.subdevice = "blink1"; | |
if (msg.payload.score > 0) { | |
var color = "green"; | |
} else if (msg.payload.score < 0){ | |
var color = "red"; | |
} else if (msg.payload.score === 0){ | |
var color = "blue"; | |
} | |
msg.payload = {"on":true, "color": color}; | |
return msg; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************************************** | |
This gps example logs a stream of data: | |
coordinates, detected satellites, timestamps, and altitude. | |
For best results, try it while outdoors. | |
**********************************************************/ | |
var tessel = require('tessel'); | |
var gpsLib = require('gps-a2235h'); | |
var request = require('request'); | |
var querystring = require('querystring'); |
OlderNewer