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
var msg = { temperature: +(Math.random()*5 + 25).toFixed(1) }; | |
var metadata = { data: 40 }; | |
var msgType = "POST_TELEMETRY_REQUEST"; | |
return { msg: msg, metadata: metadata, msgType: msgType }; |
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
Custom Label example: | |
<div style="position: relative; white-space: nowrap; text-align: center; font-size: 14px; top: 5px;"> | |
<span style="border: 2px solid #000; border-radius: 10px; color: #000; background-color: #fff; padding-left: 5px; padding-right: 5px; padding-top: 3px; padding-bottom: 3px;">${entityName}</span> | |
</div> | |
Color function example: |
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
Custom Label example: | |
<div style="position: relative; white-space: nowrap; text-align: center; font-size: 14px; top: 5px;"> | |
<span style="border: 2px solid #000; border-radius: 10px; color: #000; background-color: #fff; padding-left: 5px; padding-right: 5px; padding-top: 3px; padding-bottom: 3px;">${entityName}</span> | |
</div> | |
Color function example: |
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
var mqtt = require('mqtt'); | |
const ACCESS_TOKEN = process.argv[2]; | |
var client = mqtt.connect('mqtt://pe.thingsboard.io',{ | |
username: ACCESS_TOKEN | |
}); | |
var softwareVersion = 'v1.2.3.456', | |
temperature = 25; |
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
var mqtt = require('mqtt'); | |
const ACCESS_TOKEN = process.argv[2]; | |
var client = mqtt.connect('mqtt://demo.thingsboard.io',{ | |
username: ACCESS_TOKEN | |
}); | |
var waterData = { | |
waterIncrement: Math.random(), | |
water: 11583 |
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
var mqtt = require('mqtt'); | |
const ACCESS_TOKEN = process.argv[2]; | |
var client = mqtt.connect('mqtt://demo.thingsboard.io',{ | |
username: ACCESS_TOKEN | |
}); | |
var energyData = { | |
energyIncrement: Math.random(), | |
energy: 19546 |
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
var mqtt = require('mqtt'); | |
const ACCESS_TOKEN = process.argv[2]; | |
var client = mqtt.connect('mqtt://demo.thingsboard.io',{ | |
username: ACCESS_TOKEN | |
}); | |
var controlValue, | |
realValue = 25; |