iobroker.solarviewdatareader 1.0.0 → 1.0.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.
File without changes
@@ -0,0 +1,155 @@
1
+ name: Test and Release
2
+
3
+ # Run this job on all pushes and pull requests
4
+ # as well as tags with a semantic version
5
+ on:
6
+ push:
7
+ branches:
8
+ - "*"
9
+ tags:
10
+ # normal versions
11
+ - "v[0-9]+.[0-9]+.[0-9]+"
12
+ # pre-releases
13
+ - "v[0-9]+.[0-9]+.[0-9]+-**"
14
+ pull_request: {}
15
+
16
+ jobs:
17
+ # Performs quick checks before the expensive test runs
18
+ check-and-lint:
19
+ if: contains(github.event.head_commit.message, '[skip ci]') == false
20
+
21
+ runs-on: ubuntu-latest
22
+
23
+ strategy:
24
+ matrix:
25
+ node-version: [14.x]
26
+
27
+ steps:
28
+ - name: Checkout code
29
+ uses: actions/checkout@v2
30
+
31
+ - name: Use Node.js ${{ matrix.node-version }}
32
+ uses: actions/setup-node@v1
33
+ with:
34
+ node-version: ${{ matrix.node-version }}
35
+
36
+ - name: Install Dependencies
37
+ run: npm ci
38
+
39
+ - name: Lint source code
40
+ run: npm run lint
41
+ - name: Test package files
42
+ run: npm run test:package
43
+
44
+ # Runs adapter tests on all supported node versions and OSes
45
+ adapter-tests:
46
+ if: contains(github.event.head_commit.message, '[skip ci]') == false
47
+
48
+ needs: [check-and-lint]
49
+
50
+ runs-on: ${{ matrix.os }}
51
+ strategy:
52
+ matrix:
53
+ node-version: [12.x, 14.x, 16.x]
54
+ os: [ubuntu-latest, windows-latest, macos-latest]
55
+
56
+ steps:
57
+ - name: Checkout code
58
+ uses: actions/checkout@v2
59
+
60
+ - name: Use Node.js ${{ matrix.node-version }}
61
+ uses: actions/setup-node@v1
62
+ with:
63
+ node-version: ${{ matrix.node-version }}
64
+
65
+ - name: Install Dependencies
66
+ run: npm ci
67
+
68
+ - name: Run unit tests
69
+ run: npm run test:unit
70
+
71
+ - name: Run integration tests (unix only)
72
+ if: startsWith(runner.OS, 'windows') == false
73
+ run: DEBUG=testing:* npm run test:integration
74
+
75
+ - name: Run integration tests (windows only)
76
+ if: startsWith(runner.OS, 'windows')
77
+ run: set DEBUG=testing:* & npm run test:integration
78
+
79
+ # TODO: To enable automatic npm releases, create a token on npmjs.org
80
+ # Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options
81
+ # Then uncomment the following block:
82
+
83
+ # Deploys the final package to NPM
84
+ deploy:
85
+ needs: [adapter-tests]
86
+
87
+ # Trigger this step only when a commit on any branch is tagged with a version number
88
+ if: |
89
+ contains(github.event.head_commit.message, '[skip ci]') == false &&
90
+ github.event_name == 'push' &&
91
+ startsWith(github.ref, 'refs/tags/v')
92
+
93
+ runs-on: ubuntu-latest
94
+ strategy:
95
+ matrix:
96
+ node-version: [14.x]
97
+
98
+ steps:
99
+ - name: Checkout code
100
+ uses: actions/checkout@v2
101
+
102
+ - name: Use Node.js ${{ matrix.node-version }}
103
+ uses: actions/setup-node@v1
104
+ with:
105
+ node-version: ${{ matrix.node-version }}
106
+
107
+ - name: Extract the version and commit body from the tag
108
+ id: extract_release
109
+ # The body may be multiline, therefore newlines and % need to be escaped
110
+ run: |
111
+ VERSION="${{ github.ref }}"
112
+ VERSION=${VERSION##*/v}
113
+ echo "::set-output name=VERSION::$VERSION"
114
+ BODY=$(git show -s --format=%b)
115
+ BODY="${BODY//'%'/'%25'}"
116
+ BODY="${BODY//$'\n'/'%0A'}"
117
+ BODY="${BODY//$'\r'/'%0D'}"
118
+ echo "::set-output name=BODY::$BODY"
119
+
120
+ - name: Publish package to npm
121
+ run: |
122
+ npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
123
+ npm whoami
124
+ npm publish
125
+
126
+ - name: Create Github Release
127
+ uses: actions/create-release@v1
128
+ env:
129
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
130
+ with:
131
+ tag_name: ${{ github.ref }}
132
+ release_name: Release v${{ steps.extract_release.outputs.VERSION }}
133
+ draft: false
134
+ # Prerelease versions create prereleases on Github
135
+ prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }}
136
+ body: ${{ steps.extract_release.outputs.BODY }}
137
+
138
+ # # When using Sentry for error reporting, Sentry could be informed about new releases
139
+ # # To enable create a API-Token in Sentry (User settings, API keys)
140
+ # # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options
141
+ # # Then uncomment and customize the following block:
142
+ # #- name: Notify Sentry.io about the release
143
+ # # run: |
144
+ # # npm i -g @sentry/cli
145
+ # # export SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
146
+ # # export SENTRY_URL=https://sentry.iobroker.net
147
+ # # export SENTRY_ORG=iobroker
148
+ # # export SENTRY_PROJECT=iobroker-fb-checkpresence
149
+ # # export SENTRY_VERSION=iobroker.fb-checkpresence@${{ steps.extract_release.outputs.VERSION }}
150
+ # # sentry-cli releases new $SENTRY_VERSION
151
+ # # sentry-cli releases finalize $SENTRY_VERSION
152
+ # # # Add the following line BEFORE finalize if repositories are connected in Sentry
153
+ # # #sentry-cli releases set-commits $SENTRY_VERSION --auto
154
+ # # # Add the following line BEFORE finalize if sourcemap uploads are needed
155
+ # # #sentry-cli releases files $SENTRY_VERSION upload-sourcemaps build/
@@ -0,0 +1,10 @@
1
+ {
2
+ "dry": false,
3
+ "addPlaceholder": true,
4
+ "verbose": true,
5
+ "all": false,
6
+ "plugins": ["iobroker", "license"],
7
+ "exec": {
8
+ "before_commit": "echo Hello World!"
9
+ }
10
+ }
package/CHANGELOG_OLD.md CHANGED
@@ -1,10 +1,24 @@
1
1
  # Older changes
2
+ ## 0.2.1
3
+ * (afuerhoff) self consumption meter optimized
4
+
5
+ ## 0.2.0
6
+ * (afuerhoff) Error handling optimized, self consumption meter implemented
7
+
8
+ ## 0.1.0
9
+ * (afuerhoff) optimizations for adding to latest repository
10
+
11
+ ## 0.0.5
12
+ * (afuerhoff) Code optimized, unload optimized, documentation added
13
+
2
14
  ## 0.0.4
3
15
  * (afuerhoff) Objects, Telnet client and checksum calculation changed
16
+
4
17
  ## 0.0.3
5
18
  * (afuerhoff) inverter selection added
19
+
6
20
  ## 0.0.2
7
21
  * (afuerhoff) test version
22
+
8
23
  ## 0.0.1
9
24
  * (afuerhoff) initial release
10
-
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2019-2021 Achim Fürhoff <achim.fuerhoff@outlook.de>
3
+ Copyright (c) 2019-2022 Achim Fürhoff <achim.fuerhoff@outlook.de>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,16 +1,15 @@
1
1
  ![Logo](admin/solarviewdatareader.png)
2
2
  # ioBroker.solarviewdatareader
3
3
 
4
- ![Number of Installations](http://iobroker.live/badges/solarviewdatareader-installed.svg)
5
- ![Number of Installations](http://iobroker.live/badges/solarviewdatareader-stable.svg)
6
- [![NPM version](http://img.shields.io/npm/v/iobroker.solarviewdatareader.svg)](https://www.npmjs.com/package/iobroker.solarviewdatareader)
4
+ [![NPM version](https://img.shields.io/npm/v/iobroker.solarviewdatareader.svg)](https://www.npmjs.com/package/iobroker.solarviewdatareader)
7
5
  [![Downloads](https://img.shields.io/npm/dm/iobroker.solarviewdatareader.svg)](https://www.npmjs.com/package/iobroker.solarviewdatareader)
8
- [![Dependency Status](https://img.shields.io/david/afuerhoff/iobroker.solarviewdatareader.svg)](https://david-dm.org/afuerhoff/iobroker.solarviewdatareader)
6
+ ![Number of Installations (latest)](https://iobroker.live/badges/solarviewdatareader-installed.svg)
7
+ ![Number of Installations (stable)](https://iobroker.live/badges/solarviewdatareader-stable.svg)
9
8
  [![Known Vulnerabilities](https://snyk.io/test/github/afuerhoff/ioBroker.solarviewdatareader/badge.svg)](https://snyk.io/test/github/afuerhoff/ioBroker.solarviewdatareader)
10
9
 
11
10
  [![NPM](https://nodei.co/npm/iobroker.solarviewdatareader.png?downloads=true)](https://nodei.co/npm/iobroker.solarviewdatareader/)
12
11
 
13
- **Tests:**: [![Travis-CI](http://img.shields.io/travis/afuerhoff/ioBroker.solarviewdatareader/master.svg)](https://travis-ci.org/afuerhoff/ioBroker.solarviewdatareader)
12
+ **Tests:** ![Test and Release](https://github.com/afuerhoff/ioBroker.solarviewdatareader/workflows/Test%20and%20Release/badge.svg)
14
13
 
15
14
  ## solarviewdatareader adapter for ioBroker
16
15
 
@@ -65,24 +64,30 @@ TKK= Temperature inverter
65
64
  Placeholder for the next version (at the beginning of the line):
66
65
  ### __WORK IN PROGRESS__
67
66
  -->
67
+ ### 1.0.4 (2022-02-09)
68
+ * (afuerhoff) dependencies updated
69
+ * (afuerhoff) issue #20 fixed
70
+
71
+ ### 1.0.3 (2021-12-08)
72
+ * (afuerhoff) dependencies updated
73
+
74
+ ### 1.0.2 (2021-05-07)
75
+ * (afuerhoff) node.js 14 and 16 compatibilty
76
+ * (afuerhoff) dependencies updated
77
+
78
+ ### 1.0.1 (2021-05-01)
79
+ * (afuerhoff) changes due to js-controller 3.3.x
80
+
68
81
  ### 1.0.0 (2021-04-25)
69
82
  * (afuerhoff) dependencies updated
70
83
  * (afuerhoff) documentation changed
71
84
  * (afuerhoff) minor changes
72
85
  * (afuerhoff) due to stable state version set to 1.0.0
73
86
 
74
- ### 0.2.1
75
- * (afuerhoff) self consumption meter optimized
76
- ### 0.2.0
77
- * (afuerhoff) Error handling optimized, self consumption meter implemented
78
- ### 0.1.0
79
- * (afuerhoff) optimizations for adding to latest repository
80
- ### 0.0.5
81
- * (afuerhoff) Code optimized, unload optimized, documentation added
82
87
  ## License
83
88
  MIT License
84
89
 
85
- Copyright (c) 2019-2021 Achim Fürhoff <achim.fuerhoff@outlook.de>
90
+ Copyright (c) 2019-2022 Achim Fürhoff <achim.fuerhoff@outlook.de>
86
91
 
87
92
  Permission is hereby granted, free of charge, to any person obtaining a copy
88
93
  of this software and associated documentation files (the "Software"), to deal
package/admin/admin.d.ts CHANGED
File without changes
File without changes
File without changes
package/admin/style.css CHANGED
File without changes
package/admin/words.js CHANGED
File without changes
package/io-package.json CHANGED
@@ -1,192 +1,168 @@
1
1
  {
2
- "common": {
3
- "name": "solarviewdatareader",
4
- "version": "1.0.0",
5
- "news": {
6
- "1.0.0": {
7
- "en": "dependencies updated\ndocumentation changed\nminor changes\ndue to stable state version set to 1.0.0",
8
- "de": "Abhängigkeiten aktualisiert\nDokumentation geändert\nkleinere Änderungen\naufgrund der stabilen Statusversion auf 1.0.0 eingestellt",
9
- "ru": "зависимости обновлены\nдокументация изменена\nнебольшие изменения\nиз-за стабильной версии 1.0.0",
10
- "pt": "dependências atualizadas\ndocumentação alterada\npequenas mudanças\ndevido à versão de estado estável definida como 1.0.0",
11
- "nl": "afhankelijkheden bijgewerkt\ndocumentatie gewijzigd\nkleine veranderingen\nvanwege stabiele statusversie ingesteld op 1.0.0",
12
- "fr": "dépendances mises à jour\ndocumentation modifiée\ndes changements mineurs\nen raison de la version de l'état stable définie sur 1.0.0",
13
- "it": "dipendenze aggiornate\nla documentazione è cambiata\nmodifiche minori\na causa della versione dello stato stabile impostata su 1.0.0",
14
- "es": "dependencias actualizadas\ndocumentación cambiada\ncambios menores\ndebido a la versión de estado estable establecida en 1.0.0",
15
- "pl": "zaktualizowane zależności\ndokumentacja uległa zmianie\ndrobne zmiany\nze względu na stabilną wersję stanu ustawioną na 1.0.0",
16
- "zh-cn": "依赖关系已更新\n文档已更改\n细微的变化\n由于稳定状态版本设置为1.0.0"
17
- },
18
- "0.2.1": {
19
- "en": "self consumption meter optimized",
20
- "de": "Selbstverbrauchsmesser optimiert",
21
- "ru": "счетчик собственного потребления оптимизирован",
22
- "pt": "medidor de autoconsumo otimizado",
23
- "nl": "eigen verbruiksmeter geoptimaliseerd",
24
- "fr": "compteur d'autoconsommation optimisé",
25
- "it": "misuratore di autoconsumo ottimizzato",
26
- "es": "medidor de autoconsumo optimizado",
27
- "pl": "miernik zużycia własnego zoptymalizowany",
28
- "zh-cn": "自耗表优化"
29
- },
30
- "0.2.0": {
31
- "en": "Error handling optimized, self consumption meter implemented",
32
- "de": "Fehlerbehandlung optimiert, Eigenverbrauchsmesser implementiert",
33
- "ru": "Оптимизирована обработка ошибок, реализован счетчик собственного потребления",
34
- "pt": "Tratamento de erros otimizado, medidor de autoconsumo implementado",
35
- "nl": "Foutafhandeling geoptimaliseerd, eigen verbruiksmeter geïmplementeerd",
36
- "fr": "Gestion des erreurs optimisée, compteur d'autoconsommation mis en œuvre",
37
- "it": "Gestione degli errori ottimizzata, misuratore di autoconsumo implementato",
38
- "es": "Manejo de errores optimizado, medidor de autoconsumo implementado",
39
- "pl": "Zoptymalizowana obsługa błędów, zaimplementowano miernik zużycia własnego",
40
- "zh-cn": "优化错误处理,实施自耗电表"
41
- },
42
- "0.1.0": {
43
- "en": "optimizations for adding to latest repository",
44
- "de": "Optimierungen zum Hinzufügen zum neuesten Repository",
45
- "ru": "оптимизации для добавления в последний репозиторий",
46
- "pt": "otimizações para adicionar ao repositório mais recente",
47
- "nl": "optimalisaties voor het toevoegen aan de nieuwste repository",
48
- "fr": "optimisations pour l'ajout au dernier référentiel",
49
- "it": "ottimizzazioni per l'aggiunta all'ultimo repository",
50
- "es": "optimizaciones para agregar al último repositorio",
51
- "pl": "optymalizacje w celu dodania do najnowszego repozytorium",
52
- "zh-cn": "添加到最新存储库的优化"
53
- },
54
- "0.0.5": {
55
- "en": "Code optimized, unload optimized, documentation added",
56
- "de": "Code optimiert, Entladen optimiert, Dokumentation hinzugefügt",
57
- "ru": "Оптимизирован код, оптимизирована выгрузка, добавлена документация",
58
- "pt": "Código otimizado, descarregado otimizado, documentação adicionada",
59
- "nl": "Code geoptimaliseerd, lossen geoptimaliseerd, documentatie toegevoegd",
60
- "fr": "Code optimisé, déchargement optimisé, documentation ajoutée",
61
- "it": "Codice ottimizzato, scarico ottimizzato, documentazione aggiunta",
62
- "es": "Código optimizado, descarga optimizada, documentación agregada",
63
- "pl": "Zoptymalizowany kod, zoptymalizowany rozładunek, dodano dokumentację",
64
- "zh-cn": "优化代码,优化卸载,添加文档"
65
- },
66
- "0.0.4": {
67
- "en": "Objects, checksum calculation and telnet client changed",
68
- "de": "Objekte, Prüfsummenberechnung und Telnet-Client geändert",
69
- "ru": "Объекты, расчет контрольной суммы и клиент Telnet изменены",
70
- "pt": "Objetos, cálculo de soma de verificação e cliente de telnet foram alterados",
71
- "nl": "Objecten, checksumberekening en telnet-client gewijzigd",
72
- "fr": "Objets, calcul de la somme de contrôle et client Telnet modifiés",
73
- "it": "Oggetti, calcolo del checksum e client telnet modificati",
74
- "es": "Objetos, cálculo de suma de comprobación y cliente telnet modificados.",
75
- "pl": "Zmieniono obiekty, obliczenia sum kontrolnych i klienta telnet",
76
- "zh-cn": "对象,校验和计算和telnet客户端已更改"
77
- },
78
- "0.0.3": {
79
- "en": "selection of the inverters added",
80
- "de": "Auswahl der Wechselrichter ergänzt",
81
- "ru": "добавлен выбор инверторов",
82
- "pt": "seleção dos inversores adicionados",
83
- "nl": "selectie van de omvormers toegevoegd",
84
- "fr": "sélection des inverseurs ajoutés",
85
- "it": "selezione degli inverter aggiunti",
86
- "es": "Selección de los inversores añadidos.",
87
- "pl": "wybór dodanych falowników",
88
- "zh-cn": "选择添加的逆变器"
89
- },
90
- "0.0.2": {
91
- "en": "First test version",
92
- "de": "Erste Testversion",
93
- "ru": "Первая тестовая версия",
94
- "pt": "Primeira versão de teste",
95
- "nl": "Eerste testversie",
96
- "fr": "Première version test",
97
- "it": "Prima versione di prova",
98
- "es": "Primera versión de prueba",
99
- "pl": "Pierwsza wersja testowa",
100
- "zh-cn": "第一个测试版"
101
- },
102
- "0.0.1": {
103
- "en": "initial release",
104
- "de": "Erstveröffentlichung",
105
- "ru": "Начальная версия",
106
- "pt": "lançamento inicial",
107
- "nl": "Eerste uitgave",
108
- "fr": "Première version",
109
- "it": "Versione iniziale",
110
- "es": "Versión inicial",
111
- "pl": "Pierwsze wydanie",
112
- "zh-cn": "首次出版"
113
- }
114
- },
115
- "title": "SolarViewDataReader",
116
- "titleLang": {
117
- "en": "SolarViewDataReader",
118
- "de": "SolarViewDataReader",
119
- "ru": "SolarViewDataReader",
120
- "pt": "SolarViewDataReader",
121
- "nl": "SolarViewDataReader",
122
- "fr": "SolarViewDataReader",
123
- "it": "SolarViewDataReader",
124
- "es": "SolarViewDataReader",
125
- "pl": "SolarViewDataReader",
126
- "zh-cn": "SolarViewDataReader"
127
- },
128
- "desc": {
129
- "en": "Get Data from SolarView",
130
- "de": "Daten von SolarView abrufen",
131
- "ru": "Получить данные из SolarView",
132
- "pt": "Obter dados do SolarView",
133
- "nl": "Verkrijg gegevens van SolarView",
134
- "fr": "Obtenir des données de SolarView",
135
- "it": "Ottieni dati da SolarView",
136
- "es": "Obtener datos de SolarView",
137
- "pl": "Uzyskaj dane z SolarView",
138
- "zh-cn": "从SolarView获取数据"
139
- },
140
- "authors": [
141
- "Achim Fürhoff <achim.fuerhoff@outlook.de>"
142
- ],
143
- "keywords": [
144
- "SolarView",
145
- "Data Logger",
146
- "Photovoltaik"
147
- ],
148
- "license": "MIT",
149
- "platform": "Javascript/Node.js",
150
- "main": "main.js",
151
- "icon": "solarviewdatareader.png",
152
- "enabled": true,
153
- "extIcon": "https://raw.githubusercontent.com/afuerhoff/ioBroker.solarviewdatareader/master/admin/solarviewdatareader.png",
154
- "readme": "https://github.com/afuerhoff/ioBroker.solarviewdatareader/blob/master/README.md",
155
- "loglevel": "info",
156
- "mode": "daemon",
157
- "type": "energy",
158
- "connectionType": "local",
159
- "dataSource": "poll",
160
- "compact": true,
161
- "materialize": true,
162
- "dependencies": [
163
- {
164
- "admin": ">=3.0.0"
165
- },
166
- {
167
- "js-controller": ">=1.4.2"
168
- }
169
- ]
2
+ "common": {
3
+ "name": "solarviewdatareader",
4
+ "version": "1.0.4",
5
+ "news": {
6
+ "1.0.4": {
7
+ "en": "dependencies updated\nissue #20 fixed",
8
+ "de": "Abhängigkeiten aktualisiert\nProblem Nr. 20 behoben",
9
+ "ru": "зависимости обновлены\nпроблема №20 исправлена",
10
+ "pt": "dependências atualizadas\nproblema 20 corrigido",
11
+ "nl": "afhankelijkheden bijgewerkt\nprobleem #20 opgelost",
12
+ "fr": "dépendances mises à jour\nproblème #20 corrigé",
13
+ "it": "dipendenze aggiornate\nproblema n. 20 risolto",
14
+ "es": "dependencias actualizadas\nproblema #20 solucionado",
15
+ "pl": "zaktualizowano zależności\nproblem nr 20 naprawiony",
16
+ "zh-cn": "已更新依赖项\n问题 #20 已修复"
17
+ },
18
+ "1.0.3": {
19
+ "en": "dependencies updated",
20
+ "de": "Abhängigkeiten aktualisiert",
21
+ "ru": "зависимости обновлены",
22
+ "pt": "dependências atualizadas",
23
+ "nl": "afhankelijkheden bijgewerkt",
24
+ "fr": "dépendances mises à jour",
25
+ "it": "dipendenze aggiornate",
26
+ "es": "dependencias actualizadas",
27
+ "pl": "zaktualizowano zależności",
28
+ "zh-cn": "依赖项已更新"
29
+ },
30
+ "1.0.2": {
31
+ "en": "node.js 14 and 16 compatibilty\ndependencies updated",
32
+ "de": "node.js 14 und 16 kompatibel\nAbhängigkeiten aktualisiert",
33
+ "ru": "Совместимость node.js 14 и 16\nзависимости обновлены",
34
+ "pt": "compatibilidade node.js 14 e 16\ndependências atualizadas",
35
+ "nl": "node.js 14 en 16 compatibiliteit\nafhankelijkheden bijgewerkt",
36
+ "fr": "compatibilité node.js 14 et 16\ndépendances mises à jour",
37
+ "it": "Node.js 14 e 16 compatibilità\ndipendenze aggiornate",
38
+ "es": "Compatibilidad de node.js 14 y 16\ndependencias actualizadas",
39
+ "pl": "node.js 14 i 16 kompatybilność\nzaktualizowane zależności",
40
+ "zh-cn": "node.js 14和16的兼容性\n依赖关系已更新"
41
+ },
42
+ "1.0.1": {
43
+ "en": "changes due to js-controller 3.3.x",
44
+ "de": "Änderungen aufgrund von js-controller 3.3.x.",
45
+ "ru": "изменения из-за js-controller 3.3.x",
46
+ "pt": "mudanças devido ao js-controller 3.3.x",
47
+ "nl": "veranderingen als gevolg van js-controller 3.3.x",
48
+ "fr": "changements dus à js-controller 3.3.x",
49
+ "it": "modifiche dovute a js-controller 3.3.x",
50
+ "es": "cambios debido a js-controller 3.3.x",
51
+ "pl": "zmiany spowodowane przez js-controller 3.3.x",
52
+ "zh-cn": "由于js-controller 3.3.x而发生的更改"
53
+ },
54
+ "1.0.0": {
55
+ "en": "dependencies updated\ndocumentation changed\nminor changes\ndue to stable state version set to 1.0.0",
56
+ "de": "Abhängigkeiten aktualisiert\nDokumentation geändert\nkleinere Änderungen\naufgrund der stabilen Statusversion auf 1.0.0 eingestellt",
57
+ "ru": "зависимости обновлены\nдокументация изменена\nнебольшие изменения\nиз-за стабильной версии 1.0.0",
58
+ "pt": "dependências atualizadas\ndocumentação alterada\npequenas mudanças\ndevido à versão de estado estável definida como 1.0.0",
59
+ "nl": "afhankelijkheden bijgewerkt\ndocumentatie gewijzigd\nkleine veranderingen\nvanwege stabiele statusversie ingesteld op 1.0.0",
60
+ "fr": "dépendances mises à jour\ndocumentation modifiée\ndes changements mineurs\nen raison de la version de l'état stable définie sur 1.0.0",
61
+ "it": "dipendenze aggiornate\nla documentazione è cambiata\nmodifiche minori\na causa della versione dello stato stabile impostata su 1.0.0",
62
+ "es": "dependencias actualizadas\ndocumentación cambiada\ncambios menores\ndebido a la versión de estado estable establecida en 1.0.0",
63
+ "pl": "zaktualizowane zależności\ndokumentacja uległa zmianie\ndrobne zmiany\nze względu na stabilną wersję stanu ustawioną na 1.0.0",
64
+ "zh-cn": "依赖关系已更新\n文档已更改\n细微的变化\n由于稳定状态版本设置为1.0.0"
65
+ },
66
+ "0.2.1": {
67
+ "en": "self consumption meter optimized",
68
+ "de": "Selbstverbrauchsmesser optimiert",
69
+ "ru": "счетчик собственного потребления оптимизирован",
70
+ "pt": "medidor de autoconsumo otimizado",
71
+ "nl": "eigen verbruiksmeter geoptimaliseerd",
72
+ "fr": "compteur d'autoconsommation optimisé",
73
+ "it": "misuratore di autoconsumo ottimizzato",
74
+ "es": "medidor de autoconsumo optimizado",
75
+ "pl": "miernik zużycia własnego zoptymalizowany",
76
+ "zh-cn": "自耗表优化"
77
+ },
78
+ "0.2.0": {
79
+ "en": "Error handling optimized, self consumption meter implemented",
80
+ "de": "Fehlerbehandlung optimiert, Eigenverbrauchsmesser implementiert",
81
+ "ru": "Оптимизирована обработка ошибок, реализован счетчик собственного потребления",
82
+ "pt": "Tratamento de erros otimizado, medidor de autoconsumo implementado",
83
+ "nl": "Foutafhandeling geoptimaliseerd, eigen verbruiksmeter geïmplementeerd",
84
+ "fr": "Gestion des erreurs optimisée, compteur d'autoconsommation mis en œuvre",
85
+ "it": "Gestione degli errori ottimizzata, misuratore di autoconsumo implementato",
86
+ "es": "Manejo de errores optimizado, medidor de autoconsumo implementado",
87
+ "pl": "Zoptymalizowana obsługa błędów, zaimplementowano miernik zużycia własnego",
88
+ "zh-cn": "优化错误处理,实施自耗电表"
89
+ }
170
90
  },
171
- "native": {
172
- "ipaddress": "",
173
- "port": "15000",
174
- "intervalVal": 1,
175
- "intervalstart": "00:00",
176
- "intervalend": "23:59",
177
- "d0converter": false,
178
- "pvi1": false,
179
- "pvi2": false,
180
- "pvi3": false,
181
- "pvi4": false,
182
- "scm1": false,
183
- "scm2": false,
184
- "scm3": false,
185
- "scm4": false,
186
- "scm5": false,
187
- "setCCU": false,
188
- "CCUSystemV": "hm-rega.0.xxxxx"
91
+ "title": "SolarViewDataReader",
92
+ "titleLang": {
93
+ "en": "SolarViewDataReader",
94
+ "de": "SolarViewDataReader",
95
+ "ru": "SolarViewDataReader",
96
+ "pt": "SolarViewDataReader",
97
+ "nl": "SolarViewDataReader",
98
+ "fr": "SolarViewDataReader",
99
+ "it": "SolarViewDataReader",
100
+ "es": "SolarViewDataReader",
101
+ "pl": "SolarViewDataReader",
102
+ "zh-cn": "SolarViewDataReader"
189
103
  },
190
- "objects": [],
191
- "instanceObjects": []
192
- }
104
+ "desc": {
105
+ "en": "Get Data from SolarView",
106
+ "de": "Daten von SolarView abrufen",
107
+ "ru": "Получить данные из SolarView",
108
+ "pt": "Obter dados do SolarView",
109
+ "nl": "Verkrijg gegevens van SolarView",
110
+ "fr": "Obtenir des données de SolarView",
111
+ "it": "Ottieni dati da SolarView",
112
+ "es": "Obtener datos de SolarView",
113
+ "pl": "Uzyskaj dane z SolarView",
114
+ "zh-cn": "从SolarView获取数据"
115
+ },
116
+ "authors": [
117
+ "Achim Fürhoff <achim.fuerhoff@outlook.de>"
118
+ ],
119
+ "keywords": [
120
+ "SolarView",
121
+ "Data Logger",
122
+ "Photovoltaik"
123
+ ],
124
+ "license": "MIT",
125
+ "platform": "Javascript/Node.js",
126
+ "main": "main.js",
127
+ "icon": "solarviewdatareader.png",
128
+ "enabled": true,
129
+ "extIcon": "https://raw.githubusercontent.com/afuerhoff/ioBroker.solarviewdatareader/master/admin/solarviewdatareader.png",
130
+ "readme": "https://github.com/afuerhoff/ioBroker.solarviewdatareader/blob/master/README.md",
131
+ "loglevel": "info",
132
+ "mode": "daemon",
133
+ "type": "energy",
134
+ "connectionType": "local",
135
+ "dataSource": "poll",
136
+ "compact": true,
137
+ "materialize": true,
138
+ "dependencies": [
139
+ {
140
+ "admin": ">=3.0.0"
141
+ },
142
+ {
143
+ "js-controller": ">=3.0.0"
144
+ }
145
+ ]
146
+ },
147
+ "native": {
148
+ "ipaddress": "",
149
+ "port": "15000",
150
+ "intervalVal": 1,
151
+ "intervalstart": "00:00",
152
+ "intervalend": "23:59",
153
+ "d0converter": false,
154
+ "pvi1": false,
155
+ "pvi2": false,
156
+ "pvi3": false,
157
+ "pvi4": false,
158
+ "scm1": false,
159
+ "scm2": false,
160
+ "scm3": false,
161
+ "scm4": false,
162
+ "scm5": false,
163
+ "setCCU": false,
164
+ "CCUSystemV": "hm-rega.0.xxxxx"
165
+ },
166
+ "objects": [],
167
+ "instanceObjects": []
168
+ }
File without changes
package/lib/tools.js CHANGED
File without changes
package/main.js CHANGED
@@ -9,8 +9,7 @@
9
9
  const utils = require('@iobroker/adapter-core');
10
10
 
11
11
  // Load your modules here, e.g.:
12
- const netcat = require('node-netcat');
13
- const util = require('util');
12
+ const net = require('net');
14
13
 
15
14
  let gthis;
16
15
  let sv_data;
@@ -53,13 +52,11 @@ function calcChecksum(string) {
53
52
  }
54
53
 
55
54
  async function createGlobalObjects(that) {
56
- const getStateP = util.promisify(that.getState);
57
-
58
55
  const opt = [
59
56
  //id, type, name, type, role, def, rd, wr, desc
60
57
  //common.type (optional - (default is mixed==any type) (possible values: number, string, boolean, array, object, mixed, file)
61
- ['info.connection', 'state', 'connection', 'boolean', 'indicator', false, true, false, 'Solarview connection state'],
62
- ['info.lastUpdate', 'state', 'lastUpdate', 'string', 'date', new Date('1900-01-01T00:00:00'), true, false, 'Last connection date/time'],
58
+ ['info.connection', 'state', 'connection', 'boolean', 'indicator.connected', false, true, false, 'Solarview connection state'],
59
+ ['info.lastUpdate', 'state', 'lastUpdate', 'string', 'date', (new Date('1900-01-01T00:00:00')).toString(), true, false, 'Last connection date/time'],
63
60
  ];
64
61
 
65
62
  for(let i=0; i < opt.length; i++) {
@@ -76,13 +73,11 @@ async function createGlobalObjects(that) {
76
73
  },
77
74
  native: {},
78
75
  });
79
- if (await getStateP(opt[i][0]) == null) that.setState(opt[i][0], opt[i][5], true); //set default
76
+ if (await that.getStateAsync(opt[i][0]) == null) that.setState(opt[i][0], opt[i][5], true); //set default
80
77
  }
81
78
  }
82
79
 
83
80
  async function createSolarviewObjects(that, device, additional) {
84
- const getStateP = util.promisify(that.getState);
85
-
86
81
  let opt = [
87
82
  //id, type, name, type, role, def, rd, wr, desc
88
83
  //common.type (optional - (default is mixed==any type) (possible values: number, string, boolean, array, object, mixed, file)
@@ -128,11 +123,11 @@ async function createSolarviewObjects(that, device, additional) {
128
123
  },
129
124
  native: {},
130
125
  });
131
- if (await getStateP(opt[i][0]) == null) that.setState(opt[i][0], opt[i][5], true); //set default
126
+ if (await that.getStateAsync(opt[i][0]) == null) that.setState(opt[i][0], opt[i][5], true); //set default
132
127
  }
133
128
  }
134
129
 
135
- function getData() {
130
+ async function getData(port, ip_address) {
136
131
  const starttime = gthis.config.intervalstart;
137
132
  let endtime = gthis.config.intervalend;
138
133
  if (endtime == '00:00') endtime = '23:59';
@@ -144,7 +139,10 @@ function getData() {
144
139
  timeoutCnt += 3000;
145
140
  to1 = setTimeout(function() {
146
141
  sv_cmd = '22*';
147
- conn.start();
142
+ conn.connect(port, ip_address, function() {
143
+ conn.write('22*');
144
+ conn.end();
145
+ });
148
146
  }, timeoutCnt);
149
147
  }
150
148
 
@@ -152,74 +150,107 @@ function getData() {
152
150
  timeoutCnt += 3000;
153
151
  to7 = setTimeout(function() {
154
152
  sv_cmd = '10*'; //pvi1 Wechselrichter 1
155
- conn.start();
153
+ conn.connect(port, ip_address, function() {
154
+ conn.write(sv_cmd);
155
+ conn.end();
156
+ });
156
157
  }, timeoutCnt);
157
158
  }
158
159
  if (gthis.config.scm1 == true){
159
160
  timeoutCnt += 3000;
160
161
  to8 = setTimeout(function() {
161
162
  sv_cmd = '11*';
162
- conn.start();
163
+ conn.connect(port, ip_address, function() {
164
+ conn.write(sv_cmd);
165
+ conn.end();
166
+ });
163
167
  }, timeoutCnt);
164
168
  }
165
169
  if (gthis.config.scm2 == true){
166
170
  timeoutCnt += 3000;
167
171
  to9 = setTimeout(function() {
168
172
  sv_cmd = '12*';
169
- conn.start();
173
+ conn.connect(port, ip_address, function() {
174
+ conn.write(sv_cmd);
175
+ conn.end();
176
+ });
170
177
  }, timeoutCnt);
171
178
  }
172
179
  if (gthis.config.scm3 == true){
173
180
  timeoutCnt += 3000;
174
181
  to10 = setTimeout(function() {
175
182
  sv_cmd = '13*';
176
- conn.start();
183
+ conn.connect(port, ip_address, function() {
184
+ conn.write(sv_cmd);
185
+ conn.end();
186
+ });
177
187
  }, timeoutCnt);
178
188
  }
179
189
  if (gthis.config.scm4 == true){
180
190
  timeoutCnt += 3000;
181
191
  to11 = setTimeout(function() {
182
192
  sv_cmd = '14*';
183
- conn.start();
193
+ conn.connect(port, ip_address, function() {
194
+ conn.write(sv_cmd);
195
+ conn.end();
196
+ });
184
197
  }, timeoutCnt);
185
198
  }
186
199
 
187
200
  if (dnow >= dstart && dnow <= dend ){ //Einspeisung und Leistungsdaten werden nur im Interval eingelesen
188
201
  sv_cmd = '00*'; //pvig
189
- conn.start();
202
+ conn.connect(port, ip_address, function() {
203
+ conn.write(sv_cmd);
204
+ conn.end();
205
+ });
190
206
  if (gthis.config.d0converter == true){
191
207
  timeoutCnt += 3000;
192
208
  to2 = setTimeout(function() {
193
209
  sv_cmd = '21*';
194
- conn.start();
210
+ conn.connect(port, ip_address, function() {
211
+ conn.write(sv_cmd);
212
+ conn.end();
213
+ });
195
214
  }, timeoutCnt);
196
215
  }
197
216
  if (gthis.config.pvi1 == true){
198
217
  timeoutCnt += 3000;
199
218
  to3 = setTimeout(function() {
200
219
  sv_cmd = '01*'; //pvi1 Wechselrichter 1
201
- conn.start();
220
+ conn.connect(port, ip_address, function() {
221
+ conn.write(sv_cmd);
222
+ conn.end();
223
+ });
202
224
  }, timeoutCnt);
203
225
  }
204
226
  if (gthis.config.pvi2 == true){
205
227
  timeoutCnt += 3000;
206
228
  to4 = setTimeout(function() {
207
229
  sv_cmd = '02*';
208
- conn.start();
230
+ conn.connect(port, ip_address, function() {
231
+ conn.write(sv_cmd);
232
+ conn.end();
233
+ });
209
234
  }, timeoutCnt);
210
235
  }
211
236
  if (gthis.config.pvi3 == true){
212
237
  timeoutCnt += 3000;
213
238
  to5 = setTimeout(function() {
214
239
  sv_cmd = '03*';
215
- conn.start();
240
+ conn.connect(port, ip_address, function() {
241
+ conn.write(sv_cmd);
242
+ conn.end();
243
+ });
216
244
  }, timeoutCnt);
217
245
  }
218
246
  if (gthis.config.pvi4 == true){
219
247
  timeoutCnt += 3000;
220
248
  to6 = setTimeout(function() {
221
249
  sv_cmd = '04*';
222
- conn.start();
250
+ conn.connect(port, ip_address, function() {
251
+ conn.write(sv_cmd);
252
+ conn.end();
253
+ });
223
254
  }, timeoutCnt);
224
255
  }
225
256
  }
@@ -280,28 +311,18 @@ class Solarviewdatareader extends utils.Adapter {
280
311
  // in this template all states changes inside the adapters namespace are subscribed
281
312
  //this.subscribeStates('*');
282
313
 
283
- //netcat parameters
284
- const params = {
285
- timeout: 3000,
286
- read_encoding: 'buffer'
287
- };
288
- conn = netcat.client(port, ip_address, params);
314
+ conn = new net.Socket();
289
315
 
290
316
  const cron = this.config.intervalVal * 60000;
291
317
  try {
292
- getData();
293
- //jobSchedule = schedule.scheduleJob(this.config.interval, function(){
318
+ getData(port, ip_address);
294
319
  jobSchedule = setInterval(async function(){
295
- getData();
320
+ getData(port, ip_address);
296
321
  }, cron);
297
322
  } catch (err) {
298
323
  this.log.error('schedule: ' + err.message);
299
324
  }
300
325
 
301
- conn.on('open', function(){
302
- conn.send(sv_cmd);
303
- });
304
-
305
326
  conn.on('data', async function(response) {
306
327
  try {
307
328
  if (response == null){
@@ -439,7 +460,7 @@ class Solarviewdatareader extends utils.Adapter {
439
460
  gthis.log.warn(sv_cmd + ': ' + csum.data);
440
461
  }
441
462
  }
442
- conn.send();
463
+ //conn.send();
443
464
  }
444
465
  } catch (error) {
445
466
  gthis.log.error('on data: ' + error.message);
@@ -476,6 +497,7 @@ class Solarviewdatareader extends utils.Adapter {
476
497
  clearTimeout(to9);
477
498
  clearTimeout(to10);
478
499
  clearTimeout(to11);
500
+ conn.destroy();
479
501
  callback();
480
502
  } catch (e) {
481
503
  callback();
package/main.test.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.solarviewdatareader",
3
- "version": "1.0.0",
3
+ "version": "1.0.4",
4
4
  "description": "Get data from SolarView",
5
5
  "author": {
6
6
  "name": "Achim Fürhoff",
@@ -18,39 +18,44 @@
18
18
  "url": "https://github.com/afuerhoff/ioBroker.solarviewdatareader"
19
19
  },
20
20
  "dependencies": {
21
- "@iobroker/adapter-core": "^2.4.0",
22
- "node-netcat": "1.4.8",
23
- "util": "^0.12.3"
21
+ "@iobroker/adapter-core": "^2.5.1"
24
22
  },
25
23
  "devDependencies": {
26
- "@alcalzone/release-script": "^1.9.0",
27
- "@iobroker/testing": "^2.4.4",
28
- "@types/chai": "^4.2.16",
29
- "@types/chai-as-promised": "^7.1.3",
30
- "@types/gulp": "^4.0.8",
31
- "@types/mocha": "^8.2.2",
32
- "@types/node": "^14.14.41",
24
+ "@alcalzone/release-script": "^3.5.2",
25
+ "@alcalzone/release-script-plugin-iobroker": "^3.5.1",
26
+ "@alcalzone/release-script-plugin-license": "^3.5.0",
27
+ "@iobroker/testing": "^2.5.4",
28
+ "@types/chai": "^4.3.0",
29
+ "@types/chai-as-promised": "^7.1.4",
30
+ "@types/gulp": "^4.0.9",
31
+ "@types/mocha": "^8.2.3",
32
+ "@types/node": "^14.18.0",
33
33
  "@types/proxyquire": "^1.3.28",
34
- "@types/sinon": "^10.0.0",
35
- "@types/sinon-chai": "^3.2.5",
36
- "axios": "^0.21.1",
34
+ "@types/sinon": "^10.0.6",
35
+ "@types/sinon-chai": "^3.2.8",
37
36
  "chai": "^4.3.4",
38
37
  "chai-as-promised": "^7.1.1",
39
- "eslint": "^7.25.0",
38
+ "eslint": "^7.32.0",
40
39
  "gulp": "^4.0.2",
41
- "mocha": "^8.3.2",
40
+ "hosted-git-info": "^4.1.0",
41
+ "mocha": "^8.4.0",
42
42
  "proxyquire": "^2.1.3",
43
43
  "sinon": "^10.0.0",
44
- "sinon-chai": "^3.6.0"
44
+ "sinon-chai": "^3.7.0"
45
45
  },
46
46
  "main": "main.js",
47
47
  "scripts": {
48
- "test:js": "mocha --opts test/mocha.custom.opts",
48
+ "watch:parcel": "parcel admin/src/index.jsx -d admin/build",
49
+ "build:parcel": "parcel build admin/src/index.jsx -d admin/build",
50
+ "build": "npm run build:parcel",
51
+ "test:js": "mocha --config test/mocharc.custom.json \"{!(node_modules|test)/**/*.test.js,*.test.js,test/**/test!(PackageFiles|Startup).js}\"",
49
52
  "test:package": "mocha test/package --exit",
50
53
  "test:unit": "mocha test/unit --exit",
51
54
  "test:integration": "mocha test/integration --exit",
52
55
  "test": "npm run test:js && npm run test:package",
53
- "lint": "eslint",
56
+ "aftest": "mocha test/af_test.js --exit",
57
+ "check": "tsc --noEmit -p tsconfig.check.json",
58
+ "lint": "eslint --ext .js,.jsx",
54
59
  "release": "release-script"
55
60
  },
56
61
  "bugs": {
package/scripts/gulp.sh CHANGED
File without changes
package/scripts/upload.sh CHANGED
File without changes
package/scripts/debug.sh DELETED
@@ -1,2 +0,0 @@
1
- /opt/iobroker/iobroker stop solarviewdatareader.0
2
- node --inspect-brk=192.168.178.67:5858 main.js --force --logs