View no-lang.json
{
"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,
View gist:d5c168b6777debe897bcca33f47039ec
{
"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,
View response.json
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
View ez-final.ino
// 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
View lelylan_raspy.py
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)
# -------------- #
View intellykitchen.js
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 dev@lelylan.com) \n");
View services.js
exports.mqtt = {
type: 'process',
specific: {
repositoryUrl: 'git@github.com:lelylan/mqtt.git',
execute: {
args: '-e "DEBUG=lelylan" -e "REDIS_HOST=178.62.31.9" -p 1883:1883 -d'
}
}
};
View system.js
exports.name = 'lelylan_mqtt';
exports.namespace = 'lelylan_mqtt';
exports.id = '6b4b4e3f-f22e-4516-bffb-e1a8daafb3ea';
exports.topology = {
local: {
},
direct: {
machine$1: {
View haproxy.cfg
# 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
...
View haproxy.cfg
# Listen to all MQTT requests (port 1883)
listen mqtt
# MQTT binding to port 1883
bind *:1883
# communication mode (MQTT works on top of TCP)
mode tcp
option tcplog
# balance mode (to choose which MQTT server to use)
balance leastconn
# MQTT server 1