Skip to content

Instantly share code, notes, and snippets.

View bastisk's full-sized avatar

Basti SK bastisk

View GitHub Profile
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
'use strict';
var Protocol = require('azure-iot-device-amqp').AmqpWs;
var Protocol = require('azure-iot-device-http').Http;
var Client = require('azure-iot-device').Client;
var Message = require('azure-iot-device').Message;
@bastisk
bastisk / Help.bat
Last active March 27, 2018 09:26
Doing the stuff with command line
- Login to DockerRepo
docker login -u crskiotedgemunich -p <password> crskiotedgemunich.azurecr.io
- Build the image
cd C:\Users\work\Filtermodule
docker build .
- Tag the image
docker tag d6f919f623a2 crskiotedgemunich.azurecr.io/filtermodule:latest
- push the image
docker push crskiotedgemunich.azurecr.io/filtermodule:latest
- login with edgectl
@bastisk
bastisk / console.log
Created December 10, 2015 11:09
Logfile for client issue
Client {
connection:
Connection {
stream:
Socket {
_connecting: false,
_hadError: false,
_handle: [Object],
_parent: null,
_host: null,
@bastisk
bastisk / app.js
Created December 10, 2015 11:06
client undefined
var mosca = require('mosca');
var mqtt = require('mqtt');
var client = mqtt.createClient(1883, "localhost", {username: "user", password: "pass"});
var moscaSettings = {
port: 1883,
}
var server = new mosca.Server(moscaSettings);
server.on('ready', setup);
SELECT
MAX(time) AS time,
MAX(temperature) as TempMax,
Min(temperature) as TempMin,
AVG(temperature) as TempAvg
FROM
Input TIMESTAMP BY time
GROUP BY
TumblingWindow(Second, 20)
#include <SoftwareSerial.h>
SoftwareSerial esp8266(5, 6);
int ready, connected = 0;
void setup() {
Serial.begin(115200);
esp8266.begin(115200);
}
void loop() {
if(esp8266.available())