Testpanel with new thermometer komponent
This commit is contained in:
parent
31b5dbba5c
commit
ba4a11a99a
39 changed files with 6415 additions and 2952 deletions
|
|
@ -5,7 +5,8 @@ exports.color = '#888600';
|
|||
exports.version = '1.0.2';
|
||||
exports.icon = 'sign-out';
|
||||
exports.input = 2;
|
||||
exports.output = 4;
|
||||
exports.output = ["red", "white", "blue"];
|
||||
exports.author = 'Daniel Segeš';
|
||||
exports.options = { host: 'tb-stage.worksys.io', port: 1883, clientid: "", username: "" };
|
||||
|
||||
exports.html = `<div class="padding">
|
||||
|
|
@ -198,6 +199,7 @@ exports.install = function(instance) {
|
|||
TRY(function() {
|
||||
|
||||
message = JSON.parse(message);
|
||||
console.log("ooooo------x", message);
|
||||
if (message.hasOwnProperty("device") && message.hasOwnProperty("data") && message.data.hasOwnProperty("id")) {
|
||||
client.publish(topic, `{"device": ${message.device}, "id": ${message.data.id}, "data": {"success": true}}`, {qos:1});
|
||||
instance.send(SEND_TO.rpcCall, {"device": message.device, "id": message.data.id, "RPC response": {"success": true}});
|
||||
|
|
@ -261,8 +263,6 @@ exports.install = function(instance) {
|
|||
let stringifiedJson = JSON.stringify(data.data);
|
||||
client.publish("v1/gateway/telemetry", stringifiedJson, {qos: 1});
|
||||
|
||||
instance.send(3, stringifiedJson);
|
||||
|
||||
//backup telemetry
|
||||
if(createTelemetryBackup)
|
||||
{
|
||||
|
|
@ -450,7 +450,6 @@ exports.install = function(instance) {
|
|||
let message = JSON.stringify(o);
|
||||
|
||||
client.publish("v1/gateway/telemetry", message, {qos:1});
|
||||
instance.send(3, message);
|
||||
|
||||
//remove from database
|
||||
await promisifyBuilder(nosql.remove().where("id", id));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue