Actual code running on CEZ rvo
This commit is contained in:
parent
86619fbcff
commit
a30a8588a7
12 changed files with 2841 additions and 1828 deletions
|
|
@ -187,7 +187,7 @@ exports.install = function(instance) {
|
|||
let mqtt_clientid = responseSettings[0]["mqtt_clientid"];
|
||||
let mqtt_username = responseSettings[0]["mqtt_username"];
|
||||
let mqtt_port = responseSettings[0]["mqtt_port"];
|
||||
|
||||
|
||||
console.log("wsmqttpublich -> loadSettings from db", responseSettings[0]);
|
||||
|
||||
opts = {
|
||||
|
|
@ -204,7 +204,7 @@ exports.install = function(instance) {
|
|||
}
|
||||
|
||||
connectToTbServer();
|
||||
}
|
||||
}
|
||||
|
||||
function connectToTbServer()
|
||||
{
|
||||
|
|
@ -217,16 +217,16 @@ exports.install = function(instance) {
|
|||
instance.status("Connected", "green");
|
||||
monitor.info("MQTT broker connected");
|
||||
|
||||
brokerready = true;
|
||||
brokerready = true;
|
||||
FLOW.OMS_brokerready = brokerready;
|
||||
wsmqtt_status = 'connected';
|
||||
wsmqtt_status = 'connected';
|
||||
});
|
||||
|
||||
broker.on('reconnect', function() {
|
||||
instance.status("Reconnecting", "yellow");
|
||||
brokerready = false;
|
||||
|
||||
FLOW.OMS_brokerready = brokerready;
|
||||
FLOW.OMS_brokerready = brokerready;
|
||||
});
|
||||
|
||||
broker.on('message', function(topic, message) {
|
||||
|
|
@ -245,6 +245,7 @@ exports.install = function(instance) {
|
|||
}
|
||||
|
||||
instance.send(instanceSendTo.rpcCall, {"topic":topic, "content":message });
|
||||
|
||||
});
|
||||
|
||||
broker.on('close', function(err) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue