This file contains hidden or 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
"use strict"; | |
var fs = require('fs'); | |
var SFTPServer = require("node-sftp-server"); | |
var ReadableStreamClone = require("readable-stream-clone"); | |
// create the server | |
var srv = new SFTPServer({ | |
privateKeyFile: "./id_rsa", | |
temporaryFileDirectory: "./tmp" | |
}); |
This file contains hidden or 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
{ | |
"id": "5735a694dcba0f0892824613", | |
"batch_id": "MARCASAR002", | |
"customer_id": "5731fdd2b3f30a687138ceea", | |
"uri": "http://admin.idcork.com/batches/5735a694dcba0f0892824613", | |
"code": null, | |
"description": null, | |
"article": null, | |
"quality": null, | |
"diameter": null, |
This file contains hidden or 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
{ | |
"id": "5735a694dcba0f0892824613", | |
"batch_id": "MARCASAR002", | |
"customer_id": "5731fdd2b3f30a687138ceea", | |
"uri": "http://admin.idcork.com/batches/5735a694dcba0f0892824613", | |
"code": null, | |
"description": null, | |
"article": null, | |
"quality": null, | |
"diameter": null, |
This file contains hidden or 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
a:1:{i:0;a:8:{i:0;a:21:{s:2:"id";s:1:"1";s:10:"customerId";s:1:"1";s:10:"operatorId";s:1:"1";s:15:"rack_group_name";s:5:"Staz1";s:17:"gruop_station_uid";s:12:"notAssigned2";s:19:"rack_group_location";s:14:"Staz. -12-05 -10-28 -08-26 -08-26 -11-19 -11-20 -12-06 -11-19 |
This file contains hidden or 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
// Generic libraries | |
#include <Adafruit_CC3000.h> | |
#include <ccspi.h> | |
#include <SPI.h> | |
#include <cc3000_PubSubClient.h> | |
// Interrupt and control pins | |
#define ADAFRUIT_CC3000_IRQ 2 | |
#define ADAFRUIT_CC3000_VBAT 8 | |
#define ADAFRUIT_CC3000_CS 10 |
This file contains hidden or 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
import paho.mqtt.client as paho | |
import RPi.GPIO as GPIO | |
import json, time | |
# device credentials | |
device_id = '<DEVICE_ID>' # * set your device id (will be the MQTT client username) | |
device_secret = '<DEVICE_SECRET>' # * set your device secret (will be the MQTT client password) | |
random_client_id = '<CLIENT_ID>' # * set a random client_id (max 23 char) | |
# -------------- # |
This file contains hidden or 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
var mraa = require('mraa'); | |
console.log("\n"); | |
console.log("╦┌┐┌┌┬┐┌─┐┬ ┬ ┬ ┬ ┬┌─┬┌┬┐┌─┐┬ ┬┌─┐┌┐┌"); | |
console.log("║│││ │ ├┤ │ │ └┬┘ ├┴┐│ │ │ ├─┤├┤ │││"); | |
console.log("╩┘└┘ ┴ └─┘┴─┘┴─┘┴ ┴ ┴┴ ┴ └─┘┴ ┴└─┘┘└┘"); | |
console.log("\nWelcome to the Intelly Kitchen tutorial based on Intel Edison and Lelylan \n"); | |
console.log("(This is a proof of concept and could not properly work as expected. Any help appreciated [email protected]) \n"); |
This file contains hidden or 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
exports.mqtt = { | |
type: 'process', | |
specific: { | |
repositoryUrl: '[email protected]:lelylan/mqtt.git', | |
execute: { | |
args: '-e "DEBUG=lelylan" -e "REDIS_HOST=178.62.31.9" -p 1883:1883 -d' | |
} | |
} | |
}; |
This file contains hidden or 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
exports.name = 'lelylan_mqtt'; | |
exports.namespace = 'lelylan_mqtt'; | |
exports.id = '6b4b4e3f-f22e-4516-bffb-e1a8daafb3ea'; | |
exports.topology = { | |
local: { | |
}, | |
direct: { | |
machine$1: { |
This file contains hidden or 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
# Listen to all MQTT requests | |
listen mqtt | |
# MQTT binding to port 1883 | |
bind *:1883 | |
# MQTT binding to port 8883 | |
bind *:8883 ssl crt /certs/lelylan.pem | |
... |
NewerOlder