Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
arteck authored Nov 2, 2023
1 parent 1eb21db commit 984c5fa
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,12 @@ class fullybrowserControll extends utils.Adapter {
// Set Device isAlive Status - we could also use setStateChanged()...
this.setState(this.fullysEnbl[ip].id + '.alive', { val: isAlive, ack: true });

if (isAlive) {
this.log.info(`${this.fullysEnbl[ip].name} is alive (MQTT: ${msg})`);
} else {
this.log.warn(`${this.fullysEnbl[ip].name} is not alive! (MQTT: ${msg})`);
if (this.config.messageMQTTAlive) {
if (isAlive) {
this.log.info(`${this.fullysEnbl[ip].name} is connected (MQTT: ${msg})`);
} else {
this.log.warn(`${this.fullysEnbl[ip].name} is not alive! (MQTT: ${msg})`);
}
}
}

Expand Down

0 comments on commit 984c5fa

Please sign in to comment.