iobroker.sbfspot 4.1.3 → 4.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -51,6 +51,9 @@ sometimes npm intall must be called more then one time to successfully install a
51
51
 
52
52
  ## Changelog
53
53
 
54
+ ### 4.1.4 (2023-04-07)
55
+ * (René) dependencies updated
56
+
54
57
  ### 4.1.3 (2023-01-31)
55
58
  * (René) dependencies updated
56
59
 
package/io-package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "sbfspot",
4
- "version": "4.1.3",
4
+ "version": "4.1.4",
5
5
  "news": {
6
- "4.1.3": {
6
+ "4.1.4": {
7
7
  "en": "dependencies updated",
8
8
  "de": "Abhängigkeiten aktualisiert",
9
9
  "ru": "зависимости обновлены",
@@ -0,0 +1,27 @@
1
+ const bluetooth = require('node-bluetooth');
2
+
3
+
4
+
5
+ let parentAdapter;
6
+
7
+ function test(adapter) {
8
+
9
+ parentAdapter = adapter;
10
+
11
+ const device = new bluetooth.DeviceINQ();
12
+
13
+
14
+ device
15
+ .on('finished', function () {
16
+ parentAdapter.log.warn("finished ");
17
+ })
18
+ .on('found', function found(address, name) {
19
+ parentAdapter.log.warn('Found: ' + address + ' with name ' + name);
20
+ }).scan();
21
+
22
+ }
23
+
24
+
25
+ module.exports = {
26
+ test
27
+ }
package/main.js CHANGED
@@ -18,7 +18,7 @@ const utils = require("@iobroker/adapter-core");
18
18
  //const { json } = require("stream/consumers");
19
19
  const SunCalc = require("suncalc2");
20
20
 
21
-
21
+ //const bluetooth_test = require("./lib/SMA_Bluetooth").test;
22
22
 
23
23
 
24
24
  let adapter;
@@ -56,7 +56,11 @@ let killTimer;
56
56
 
57
57
  async function main() {
58
58
 
59
- if (typeof adapter.config.databasetype == "undefined") {
59
+
60
+ //bluetooth_test();
61
+
62
+
63
+ if (adapter.config.databasetype === undefined) {
60
64
  adapter.log.error("databasetype not defined. check and update settings and save");
61
65
  adapter.terminate ? adapter.terminate(11) : process.exit(11);
62
66
  }
@@ -187,7 +191,7 @@ async function GetSystemDateformat() {
187
191
  try {
188
192
  const ret = await adapter.getForeignObjectAsync("system.config");
189
193
 
190
- if (typeof ret != undefined && ret != null) {
194
+ if (ret !== undefined && ret != null) {
191
195
  //dateformat = ret.common.dateFormat;
192
196
  longitude = ret.common.longitude;
193
197
  latitude = ret.common.latitude;
@@ -1116,11 +1120,11 @@ function DB_Disconnect() {
1116
1120
 
1117
1121
  adapter.log.debug("disconnect database");
1118
1122
  if (adapter.config.databasetype == "mySQL" || adapter.config.databasetype == "MariaDB") {
1119
- if (typeof mysql_connection != undefined && mysql_connection != null) {
1123
+ if (mysql_connection !== undefined && mysql_connection != null) {
1120
1124
  mysql_connection.end();
1121
1125
  }
1122
1126
  } else {
1123
- if (typeof sqlite_db != undefined && sqlite_db != null) {
1127
+ if (sqlite_db !== undefined && sqlite_db != null) {
1124
1128
  sqlite_db.close();
1125
1129
  }
1126
1130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.sbfspot",
3
- "version": "4.1.3",
3
+ "version": "4.1.4",
4
4
  "description": "sbfspot (SMA inverter) Adapter",
5
5
  "author": {
6
6
  "name": "René G.",
@@ -18,9 +18,9 @@
18
18
  "url": "https://github.com/rg-engineering/ioBroker.sbfspot"
19
19
  },
20
20
  "dependencies": {
21
- "@iobroker/adapter-core": "2.6.7",
22
- "better-sqlite3": "8.0.1",
23
- "mysql2": "3.1.0",
21
+ "@iobroker/adapter-core": "2.6.8",
22
+ "better-sqlite3": "8.2.0",
23
+ "mysql2": "3.2.0",
24
24
  "suncalc2": "1.8.1"
25
25
  },
26
26
  "devDependencies": {
@@ -30,7 +30,7 @@
30
30
  "@types/chai-as-promised": "7.1.5",
31
31
  "@types/gulp": "4.0.10",
32
32
  "@types/mocha": "10.0.1",
33
- "@types/node": "18.11.18",
33
+ "@types/node": "18.15.11",
34
34
  "@types/proxyquire": "1.3.28",
35
35
  "@types/request-promise-native": "1.0.18",
36
36
  "@types/sinon": "10.0.13",
@@ -38,11 +38,11 @@
38
38
  "axios": "0.27.2",
39
39
  "chai": "4.3.7",
40
40
  "chai-as-promised": "7.1.1",
41
- "eslint": "8.31.0",
41
+ "eslint": "8.37.0",
42
42
  "gulp": "4.0.2",
43
43
  "mocha": "10.2.0",
44
44
  "proxyquire": "2.1.3",
45
- "sinon": "15.0.1",
45
+ "sinon": "15.0.3",
46
46
  "sinon-chai": "3.7.0"
47
47
  },
48
48
  "main": "main.js",
package/sbfspot.njsproj CHANGED
@@ -49,6 +49,9 @@
49
49
  <Content Include="docs\en\install_arm.md">
50
50
  <SubType>Code</SubType>
51
51
  </Content>
52
+ <Content Include="lib\SMA_Bluetooth.js">
53
+ <SubType>Code</SubType>
54
+ </Content>
52
55
  <Content Include="lib\tools.js">
53
56
  <SubType>Code</SubType>
54
57
  </Content>