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
// 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; |
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
- 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 |
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
Client { | |
connection: | |
Connection { | |
stream: | |
Socket { | |
_connecting: false, | |
_hadError: false, | |
_handle: [Object], | |
_parent: null, | |
_host: 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
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); |
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
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) |
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
#include <SoftwareSerial.h> | |
SoftwareSerial esp8266(5, 6); | |
int ready, connected = 0; | |
void setup() { | |
Serial.begin(115200); | |
esp8266.begin(115200); | |
} | |
void loop() { | |
if(esp8266.available()) |