iobroker.weathersense 1.0.0 → 1.0.1

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
@@ -10,12 +10,17 @@
10
10
 
11
11
  **Tests:** ![Test and Release](https://github.com/ltspicer/ioBroker.weathersense/workflows/Test%20and%20Release/badge.svg)
12
12
 
13
- ## weathersense adapter for ioBroker
13
+ ## WeatherSense adapter for ioBroker
14
14
 
15
15
  WeatherSense is a cloud for weather stations. This adapter reads data from the WeatherSense server.
16
16
 
17
17
  See: https://play.google.com/store/apps/details?id=com.emax.weahter&hl=de_CH
18
18
 
19
+ Some WiFi weather stations use the WeatherSense Cloud.
20
+
21
+ For example, this WiFi weather station from Ideoon (Pearl):
22
+
23
+ ![Screenshot](https://github.com/ltspicer/WeatherSense/blob/main/wetterstation.png)
19
24
 
20
25
  ## Use:
21
26
  Simply enter your WeatherSense account login details (email and password).
@@ -24,6 +29,10 @@ The data can also be sent via MQTT.
24
29
 
25
30
 
26
31
  ## Changelog
32
+ ### 1.0.1 (2025-07-02)
33
+
34
+ - Code cleanups
35
+
27
36
  ### 1.0.0 (2025-07-01)
28
37
 
29
38
  - Initial release
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "weathersense",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "news": {
6
+ "1.0.1": {
7
+ "en": "Code cleanups",
8
+ "de": "Aufräumen von Codes",
9
+ "ru": "Очистка кода",
10
+ "pt": "Limpeza de código",
11
+ "nl": "Code opruiming",
12
+ "fr": "Nettoyage du code",
13
+ "it": "Pulizia del codice",
14
+ "es": "Limpieza del código",
15
+ "pl": "Czyszczenie kodu",
16
+ "uk": "Чистка коду",
17
+ "zh-cn": "代码清理"
18
+ },
6
19
  "1.0.0": {
7
20
  "en": "First release",
8
21
  "de": "Erstes Release"
@@ -37,7 +50,7 @@
37
50
  "loglevel": "info",
38
51
  "tier": 3,
39
52
  "mode": "schedule",
40
- "schedule": "*/5 * * * *",
53
+ "schedule": "*/10 * * * *",
41
54
  "allowInit": true,
42
55
  "type": "metering",
43
56
  "compact": true,
@@ -55,8 +68,7 @@
55
68
  {
56
69
  "admin": ">=7.4.10"
57
70
  }
58
- ],
59
- "installedFrom": "file:/opt/iobroker/ioBroker.weathersense"
71
+ ]
60
72
  },
61
73
  "encryptedNative": [
62
74
  "passwort",
package/main.js CHANGED
@@ -77,9 +77,9 @@ class WeatherSense extends utils.Adapter {
77
77
 
78
78
  try {
79
79
  const instObj = await this.getForeignObjectAsync(`system.adapter.${this.namespace}`);
80
- if (instObj && instObj.common && instObj.common.schedule && instObj.common.schedule === "*/5 * * * *") {
81
- instObj.common.schedule = `*/${Math.floor(Math.random() * 6)} * * * *`;
82
- this.log.info(`Default schedule found and adjusted to spread calls better over the full hour!`);
80
+ if (instObj && instObj.common && instObj.common.schedule && instObj.common.schedule === "*/10 * * * *") {
81
+ instObj.common.schedule = `*/${(Math.floor(Math.random() * 5) + 3)} * * * *`;
82
+ this.log.info(`Default schedule found and adjusted to spread calls better over 3-7 minutes!`);
83
83
  await this.setForeignObjectAsync(`system.adapter.${this.namespace}`, instObj);
84
84
  this.terminate ? this.terminate() : process.exit(0);
85
85
  return;
@@ -328,16 +328,15 @@ class WeatherSense extends utils.Adapter {
328
328
 
329
329
 
330
330
  // Funktion zum Erzeugen des MD5-Hashes
331
- hashPassword(pw, key) {
332
- const combined = pw + key;
331
+ hashPassword(pw) {
332
+ const combined = pw + "emax@pwd123";
333
333
  return crypto.createHash("md5").update(combined, "utf8").digest("hex").toUpperCase();
334
334
  }
335
335
 
336
336
  // Login-Funktion
337
337
  async login(USERNAME, PASSWORD) {
338
- const MD5_KEY = "emax@pwd123";
339
338
  const LOGIN_URL = "https://47.52.149.125/V1.0/account/login";
340
- const hashed_pw = this.hashPassword(PASSWORD, MD5_KEY);
339
+ const hashed_pw = this.hashPassword(PASSWORD);
341
340
 
342
341
  const headers = {
343
342
  "Content-Type": "application/json; charset=utf-8",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.weathersense",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Read in data from WeatherSense",
5
5
  "author": {
6
6
  "name": "Daniel Luginbühl",
@@ -36,7 +36,7 @@
36
36
  "@iobroker/testing": "^5.0.4",
37
37
  "@tsconfig/node18": "^18.2.4",
38
38
  "@types/chai": "^4.3.12",
39
- "@types/chai-as-promised": "^8.0.1",
39
+ "@types/chai-as-promised": "^8.0.2",
40
40
  "@types/mocha": "^10.0.10",
41
41
  "@types/node": "^24.0.8",
42
42
  "@types/proxyquire": "^1.3.31",
@@ -44,7 +44,7 @@
44
44
  "@types/sinon-chai": "^3.2.12",
45
45
  "chai": "^4.5.0",
46
46
  "chai-as-promised": "^8.0.1",
47
- "eslint": "^9.28.0",
47
+ "eslint": "^9.30.0",
48
48
  "mocha": "^11.5.0",
49
49
  "proxyquire": "^2.1.3",
50
50
  "sinon": "^21.0.0",