Skip to content

Commit

Permalink
added cpu-info to log
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaus Weber committed Dec 1, 2024
1 parent 648dccb commit 19210af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ You can find the manual of BL-NET here: https://www.ta.co.at/fileadmin/Downloads
<!--
Placeholder for next version: ### **WORK IN PROGRESS**
-->

### **WORK IN PROGRESS**

-

### 1.0.22 (2024-12-01)

- fixed negative current_heat_power
Expand Down
9 changes: 8 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
const utils = require("@iobroker/adapter-core");
// The net module is used to create TCP clients and servers
const net = require("node:net");
const os = require("node:os");

/**
* Adapter class for UVR16xx BL-NET devices.
Expand Down Expand Up @@ -59,7 +60,13 @@ class TaBlnet extends utils.Adapter {
this.log.info("config ip_address: " + this.config.ip_address);
this.log.info("config port: " + this.config.port);
this.log.info("config poll_interval: " + this.config.poll_interval);

// check whats in the config
const cpus = os.cpus();
cpus.forEach((cpu, index) => {
this.log.debug(`CPU ${index}: ${JSON.stringify(cpu)}`);
});
const cpuModel = cpus && cpus[0] && cpus[0].model ? cpus[0].model : 'unknown';

Check failure on line 68 in main.js

View workflow job for this annotation

GitHub Actions / check-and-lint

Strings must use doublequote
this.log.debug("CPU Model: " + cpuModel + " cpus[0]:" + JSON.stringify(cpus[0]));
// Start polling
this.startPolling();
}
Expand Down

0 comments on commit 19210af

Please sign in to comment.