iobroker.bydhvs 1.5.0 → 1.5.2
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/CHANGELOG_OLD.md +13 -0
- package/LICENSE +21 -21
- package/README.md +16 -18
- package/admin/jsonConfig.json +108 -0
- package/docs/byd-hexstructure.md +78 -0
- package/eslint.config.mjs +33 -0
- package/io-package.json +89 -31
- package/lib/constants.js +127 -0
- package/lib/methods.js +56 -0
- package/main.js +1461 -965
- package/package.json +33 -27
- package/prettier.config.mjs +8 -0
- package/PSD_Battery_Icons.psd +0 -0
- package/admin/admin.d.ts +0 -93
- package/admin/index_m.html +0 -113
- package/admin/style.css +0 -32
- package/admin/words.js +0 -81
- package/lib/tools.js +0 -99
package/CHANGELOG_OLD.md
CHANGED
@@ -1,4 +1,17 @@
|
|
1
1
|
# Older changes
|
2
|
+
## 1.4.0 (2022-10-31)
|
3
|
+
* Update of referred modules (mainly around testing)
|
4
|
+
* improvmenets contributed by Tapter (5 modules, readme and better readable code)
|
5
|
+
* Better detection of battery type and inverter
|
6
|
+
* SOC not only from normal data but from diagnosis-data, too. There we have one decimal place more
|
7
|
+
* removed frequency limit for battery detail data
|
8
|
+
* increased max count of temperature measurements for HVS to 64
|
9
|
+
* support for up to 5 HVS modules
|
10
|
+
|
11
|
+
## 1.3.0 (2021-11-06)
|
12
|
+
* updated even more dependencies
|
13
|
+
* official release with new state SOH
|
14
|
+
|
2
15
|
## 1.2.4-0 (2021-11-02)
|
3
16
|
* Added state: SOH
|
4
17
|
* updated dependencies as suggested from bot
|
package/LICENSE
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c)
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 Christian <github@familie-herrmann.de>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
@@ -6,7 +6,7 @@ BYD HVS Battery poll data
|
|
6
6
|
|
7
7
|
## Introduction
|
8
8
|
|
9
|
-
This Adapter takes data from a byd PV battery ( https://www.bydbatterybox.com/ ) and puts them into datapoints in the adapter. Unfortunately there is no official API and no documentation, so I used wireshark and a byd-hvs-simulator to try to understand the communication. My adapter simulates the byd-app, sends similar packets to the device and analyses the responses.
|
9
|
+
This Adapter takes data from a byd PV battery ( https://www.bydbatterybox.com/ ) and puts them into datapoints in the adapter. Unfortunately there is no official API and no documentation, so I used wireshark and a byd-hvs-simulator to try to understand the communication. My adapter simulates the byd-app, sends similar packets to the device and analyses the responses.
|
10
10
|
|
11
11
|
## be careful
|
12
12
|
|
@@ -19,10 +19,10 @@ Up to 5 HVS Modules are now supported.
|
|
19
19
|
## settings
|
20
20
|
|
21
21
|
Interval: That's easy: how often (s) shall the data be polled
|
22
|
-
IP-Adress: Thats self explaining. Either you use the standard address ( 192.168.16.254 ) and change the routing at home, e.g.: https://www.photovoltaikforum.com/thread/150898-byd-hvs-firmware-update/?postID=2215343#post2215343 . The advantage is: The beConnect app works, too. Other possibility: You change the IP-Adress of the box. But: Be warned: the text on the webpage is confusing and if you are not absolutely shure about the things you do: PLEASE do not touch the settings. In the German forums I read from people who were locked out of their system and there is no way back, either byd sends you a replacement HVU or you have to buy a new one.
|
22
|
+
IP-Adress: Thats self explaining. Either you use the standard address ( 192.168.16.254 ) and change the routing at home, e.g.: https://www.photovoltaikforum.com/thread/150898-byd-hvs-firmware-update/?postID=2215343#post2215343 . The advantage is: The beConnect app works, too. Other possibility: You change the IP-Adress of the box. But: Be warned: the text on the webpage is confusing and if you are not absolutely shure about the things you do: PLEASE do not touch the settings. In the German forums I read from people who were locked out of their system and there is no way back, either byd sends you a replacement HVU or you have to buy a new one.
|
23
23
|
Battery-details: As explained above: Do you need the details of the battery? If so: set the checkobx.
|
24
24
|
Battery-details - every ... cycles :Also like above, should be clear
|
25
|
-
Test Mode - show data in error log: If you check this box: the sent and recieved data are displayed in the error-log, so you can easily download the data and send it to me in case of errors.
|
25
|
+
Test Mode - show data in error log: If you check this box: the sent and recieved data are displayed in the error-log, so you can easily download the data and send it to me in case of errors.
|
26
26
|
Copy and Paste does not work - the data is cut at the end. You will have to download it before you send it to me.
|
27
27
|
|
28
28
|
[Link zur nativen deutschen Readme:](README-German.md)
|
@@ -32,8 +32,19 @@ Copy and Paste does not work - the data is cut at the end. You will have to down
|
|
32
32
|
Placeholder for the next version (at the beginning of the line):
|
33
33
|
### __WORK IN PROGRESS__
|
34
34
|
-->
|
35
|
+
### 1.5.2 (2025-08-02)
|
36
|
+
* (arteck) add socketConnection DP
|
37
|
+
* (arteck) use jsconConfig
|
38
|
+
* (arteck) refactoring to modern Code
|
39
|
+
* (arteck) use direct socket connection without detour IPClient
|
40
|
+
* first Version with two towers in NPM
|
41
|
+
|
42
|
+
### 1.5.1 (2024-01-15)
|
43
|
+
* Enable the possibility to get informations from a two tower setup
|
44
|
+
* BREAKING CHANGE of Structure.
|
45
|
+
|
35
46
|
### 1.5.0 (2023-11-04)
|
36
|
-
* Breaking change: nodejs 16 minimum required
|
47
|
+
* Breaking change: nodejs 16 minimum required
|
37
48
|
* automated checks and release-script repaired (thanks to mcm1957, he did the work)
|
38
49
|
* nothing else changed in code
|
39
50
|
|
@@ -45,25 +56,12 @@ Copy and Paste does not work - the data is cut at the end. You will have to down
|
|
45
56
|
* Removed some bugs in detecting inverter
|
46
57
|
* Inverternumber ist logged, so I can easily add new inverters if neccerary, just send me the silly-log if inverter is unknown.
|
47
58
|
|
48
|
-
### 1.4.0 (2022-10-31)
|
49
|
-
* Update of referred modules (mainly around testing)
|
50
|
-
* improvmenets contributed by Tapter (5 modules, readme and better readable code)
|
51
|
-
* Better detection of battery type and inverter
|
52
|
-
* SOC not only from normal data but from diagnosis-data, too. There we have one decimal place more
|
53
|
-
* removed frequency limit for battery detail data
|
54
|
-
* increased max count of temperature measurements for HVS to 64
|
55
|
-
* support for up to 5 HVS modules
|
56
|
-
|
57
|
-
### 1.3.0 (2021-11-06)
|
58
|
-
* updated even more dependencies
|
59
|
-
* official release with new state SOH
|
60
|
-
|
61
59
|
###
|
62
60
|
|
63
61
|
## License
|
64
62
|
MIT License
|
65
63
|
|
66
|
-
Copyright (c)
|
64
|
+
Copyright (c) 2025 Christian <github@familie-herrmann.de>
|
67
65
|
|
68
66
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
69
67
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -0,0 +1,108 @@
|
|
1
|
+
{
|
2
|
+
"type": "panel",
|
3
|
+
"i18n": true,
|
4
|
+
"items": {
|
5
|
+
"Account settings": {
|
6
|
+
"type": "header",
|
7
|
+
"text": "Adapter settings for BYD Battery",
|
8
|
+
"size": 2,
|
9
|
+
"newLine": true
|
10
|
+
},
|
11
|
+
|
12
|
+
"ConfPollInterval": {
|
13
|
+
"type": "number",
|
14
|
+
"label": "Interval (s)",
|
15
|
+
"unit": "sec",
|
16
|
+
"hidden": "data.ConfOverridePollInterval === true",
|
17
|
+
"min": 30,
|
18
|
+
"max": 3600,
|
19
|
+
"xs": 12,
|
20
|
+
"sm": 12,
|
21
|
+
"md": 4,
|
22
|
+
"lg": 3,
|
23
|
+
"xl": 3
|
24
|
+
},
|
25
|
+
|
26
|
+
"ConfIPAdress": {
|
27
|
+
"type": "text",
|
28
|
+
"label": "IP Address",
|
29
|
+
"xs": 12,
|
30
|
+
"sm": 12,
|
31
|
+
"md": 4,
|
32
|
+
"lg": 3,
|
33
|
+
"xl": 3
|
34
|
+
},
|
35
|
+
|
36
|
+
"ConfOverridePollInterval": {
|
37
|
+
"type": "checkbox",
|
38
|
+
"label": "Use poll interval from state and not from here",
|
39
|
+
"newLine": true,
|
40
|
+
"xs": 12,
|
41
|
+
"sm": 12,
|
42
|
+
"md": 8,
|
43
|
+
"lg": 4,
|
44
|
+
"xl": 4
|
45
|
+
},
|
46
|
+
|
47
|
+
"ConfBatDetails": {
|
48
|
+
"type": "checkbox",
|
49
|
+
"label": "Diagnosis Data from Battery (only tested with two and four modules)",
|
50
|
+
"xs": 12,
|
51
|
+
"sm": 12,
|
52
|
+
"md": 8,
|
53
|
+
"lg": 4,
|
54
|
+
"xl": 4
|
55
|
+
},
|
56
|
+
|
57
|
+
"ConfTestMode": {
|
58
|
+
"type": "checkbox",
|
59
|
+
"label": "Test Mode - show data in error log",
|
60
|
+
"newLine": true,
|
61
|
+
"xs": 12,
|
62
|
+
"sm": 12,
|
63
|
+
"md": 8,
|
64
|
+
"lg": 4,
|
65
|
+
"xl": 4
|
66
|
+
},
|
67
|
+
|
68
|
+
"ConfDetailshowoften": {
|
69
|
+
"newLine": true,
|
70
|
+
"type": "number",
|
71
|
+
"label": "Battery-details - every ... cycles",
|
72
|
+
"xs": 12,
|
73
|
+
"sm": 12,
|
74
|
+
"md": 4,
|
75
|
+
"lg": 3,
|
76
|
+
"xl": 3
|
77
|
+
},
|
78
|
+
"ConfBydTowerCount": {
|
79
|
+
"newLine": true,
|
80
|
+
"type": "select",
|
81
|
+
"label": "Count of towers",
|
82
|
+
"xs": 12,
|
83
|
+
"sm": 12,
|
84
|
+
"md": 4,
|
85
|
+
"lg": 3,
|
86
|
+
"xl": 3,
|
87
|
+
"options": [
|
88
|
+
{
|
89
|
+
"label": "1",
|
90
|
+
"value": "1"
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"label": "2",
|
94
|
+
"value": "2"
|
95
|
+
}
|
96
|
+
]
|
97
|
+
},
|
98
|
+
"ConfStoreRawMessages": {
|
99
|
+
"type": "checkbox",
|
100
|
+
"label": "Enable to store the raw messages",
|
101
|
+
"xs": 12,
|
102
|
+
"sm": 12,
|
103
|
+
"md": 8,
|
104
|
+
"lg": 4,
|
105
|
+
"xl": 4
|
106
|
+
}
|
107
|
+
}
|
108
|
+
}
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# Structure of BYD HVS Messages
|
2
|
+
|
3
|
+
## Captureing of messages
|
4
|
+
These messages and decrypted by capturing the communication between the software Be Connect and the hardware. The position and information of each information is interpreted by the community and may be incorrect. Please take only valid information from BYD or its sub-companies.
|
5
|
+
|
6
|
+
|
7
|
+
## Messages
|
8
|
+
|
9
|
+
After a TCP Connection is estalished the communication requires to send a command to receive data or execute a measurement. The project of smarthomeNG describe it as a similarity for ModBus that we read and write registers with the TCP connection.
|
10
|
+
https://github.com/lgb-this/plugins/blob/develop/byd_bat/user_doc.rst
|
11
|
+
All Messages have a Header in Byte 1 and 2.
|
12
|
+
|
13
|
+
### Message 0 - Initiate connection and Basic data
|
14
|
+
The send out message is ```010300000066c5e0```
|
15
|
+
|
16
|
+
| Byte | Type | Description |
|
17
|
+
|:-- |:--:|:--|
|
18
|
+
| 3 to 21 | string | This is the serialnumber. On the 2. character you can identify the hardwaretype (HVS, HVM, ...) |
|
19
|
+
| 27 + 28 | character | Version in format V(27).(28) for the first BMU |
|
20
|
+
| 29 + 30 | character | Version in format V(29).(30) for the 2nd BMU |
|
21
|
+
| 33 | integer | used tower BMU |
|
22
|
+
| 36 | 2 seperate byte integer | 1 byte - towers; 2 byte - modules (23 => 2 towers & 3 modules) |
|
23
|
+
| 38 | enum | 0: OffGrid; 1: OnGrid; 2: Backup |
|
24
|
+
|
25
|
+
### Message 1 - System diagnosis
|
26
|
+
The send out message is ```01030500001984cc```
|
27
|
+
|
28
|
+
| Byte | Type | Descriptio |
|
29
|
+
|:-- |:--:|:--|
|
30
|
+
| 3 | int16 signed | SOC of the whole system |
|
31
|
+
| 5 | int16 signed | System max volts |
|
32
|
+
| 7 | int16 signed | System min volts |
|
33
|
+
| 9 | int16 signed | System SOH |
|
34
|
+
| 11 | int16 signed | System amperes |
|
35
|
+
| 13 | int16 unsigned | Battery volts with SF 100 |
|
36
|
+
| 15 | int16 signed | max Temperature |
|
37
|
+
| 17 | int16 signed | min Temperature |
|
38
|
+
| 19 | int16 signed | Battery Temperature |
|
39
|
+
| 29 | int16 signed | Error Number |
|
40
|
+
| 31 + 32 | characters | Param T |
|
41
|
+
| 35 | int16 unsigned | Ouput voltage with SF 100 |
|
42
|
+
| 37 | int16 unsigned | Total charge of the system |
|
43
|
+
| 41 | int16 unsinged | Total discharge of the system |
|
44
|
+
|
45
|
+
### Message 2 - System diagnosis
|
46
|
+
the send command is ```010300100003040e```
|
47
|
+
|
48
|
+
| Byte | Type | Descriptio |
|
49
|
+
|:-- |:--:|:--|
|
50
|
+
| 3 | enum | inverter type |
|
51
|
+
| 5 | enum | Battery type: 0: HVL; 1: HVM; 2: HVS |
|
52
|
+
|
53
|
+
### Message 5 - Tower basic information
|
54
|
+
|
55
|
+
| Byte | Type | Descriptio |
|
56
|
+
|:-- |:--:|:--|
|
57
|
+
| 5 | int16 signed | Tower max Volt |
|
58
|
+
| 7 | int16 singed | Tower min Volt |
|
59
|
+
| 9 | int | max volt cell number |
|
60
|
+
| 10 | int | min volt cell number |
|
61
|
+
| 11 | int16 signed | max temperature |
|
62
|
+
| 13 | int 16 signed | min temperature |
|
63
|
+
| 15 | int | max temperature cell |
|
64
|
+
| 16 | int | min temperature cell number |
|
65
|
+
| 17 - 32 | MSB, LSB | Balancing Flags |
|
66
|
+
| 33 | int32 Unsigned | tower charge total with SF 1000 |
|
67
|
+
| 37 | int32 Unsigned | tower discharge total with SF 1000 |
|
68
|
+
| 45 | int16 signed | tower battery voltage SF 10 |
|
69
|
+
| 51 | int16 singed | tower volt out |
|
70
|
+
| 53 | int16 signed | SOC Percentage |
|
71
|
+
| 55 | int16 signed | SOH percentage |
|
72
|
+
| 57 | int16 signed | Currentamperes |
|
73
|
+
| 59 + 60 | hex | state |
|
74
|
+
|
75
|
+
## Glossary
|
76
|
+
| Short | Description |
|
77
|
+
|:--:|:-- |
|
78
|
+
| SF | Scale Factor (Value 1234 & SF 100 => Real Value: 12.34) |
|
@@ -0,0 +1,33 @@
|
|
1
|
+
// ioBroker eslint template configuration file for js and ts files
|
2
|
+
// Please note that esm or react based modules need additional modules loaded.
|
3
|
+
import config from '@iobroker/eslint-config';
|
4
|
+
|
5
|
+
export default [
|
6
|
+
...config,
|
7
|
+
|
8
|
+
{
|
9
|
+
// specify files to exclude from linting here
|
10
|
+
ignores: [
|
11
|
+
'.dev-server/',
|
12
|
+
'.vscode/',
|
13
|
+
'*.test.js',
|
14
|
+
'test/**/*.js',
|
15
|
+
'*.config.mjs',
|
16
|
+
'build',
|
17
|
+
'admin/build',
|
18
|
+
'admin/words.js',
|
19
|
+
'admin/admin.d.ts',
|
20
|
+
'**/adapter-config.d.ts'
|
21
|
+
]
|
22
|
+
},
|
23
|
+
|
24
|
+
{
|
25
|
+
// you may disable some 'jsdoc' warnings - but using jsdoc is highly recommended
|
26
|
+
// as this improves maintainability. jsdoc warnings will not block buiuld process.
|
27
|
+
rules: {
|
28
|
+
// 'jsdoc/require-jsdoc': 'off',
|
29
|
+
|
30
|
+
},
|
31
|
+
},
|
32
|
+
|
33
|
+
];
|
package/io-package.json
CHANGED
@@ -1,8 +1,24 @@
|
|
1
1
|
{
|
2
2
|
"common": {
|
3
3
|
"name": "bydhvs",
|
4
|
-
"version": "1.5.
|
4
|
+
"version": "1.5.2",
|
5
5
|
"news": {
|
6
|
+
"1.5.2": {
|
7
|
+
"en": "add socketConnection DP\nuse jsconConfig\nrefactoring to modern Code\nuse direct socket connection without detour IPClient\nfirst Version with two towers in NPM",
|
8
|
+
"de": "anschlussdose Anschluss DP\nverwendung jsconConfig\nrefactoring to modern Code\nverwendung direkter Steckdosenanschluss ohne Umweg IPClient\nerste Version mit zwei Türmen in NPM",
|
9
|
+
"ru": "скачать SocketConnection DP\nиспользовать jsconconfig\nрефакторинг современного кода\nиспользовать прямое сокетное соединение без обхода IPClient\nпервая версия с двумя башнями в NPM",
|
10
|
+
"pt": "add socketConnection DP\nusar o jsconConfig\nrefatorização para código moderno\nusar conexão direta do socket sem desvio IPClient\nprimeira versão com duas torres em NPM",
|
11
|
+
"nl": "socket toevoegenConnection DP\njsconConfig gebruiken\nrefactoring naar moderne code\ndirecte aansluiting gebruiken zonder omleiding IPClient\neerste versie met twee torens in NPM",
|
12
|
+
"fr": "ajouter socketConnection DP\nutiliser jsconConfig\nla révision du Code moderne\nutiliser la connexion à prise directe sans détour IPClient\npremière version avec deux tours en NPM",
|
13
|
+
"it": "aggiungere socketConnection DP\nuso jsconConfig\nrefactoring al moderno Codice\nutilizzare connessione presa diretta senza deviazione IPClient\nprima versione con due torri in NPM",
|
14
|
+
"es": "añadir socketConnection DP\njsconConfig\nrefactoring to modern Code\nuso de conexión de toma directa sin desvío IPClient\nprimera versión con dos torres en NPM",
|
15
|
+
"pl": "dodaj socketConnection DP\nużyj jsconConfig\nrefaktoring do nowoczesnego kodu\nkorzystanie z bezpośredniego połączenia gniazdka bez złącza IPClient\npierwsza wersja z dwiema wieżami w NPM",
|
16
|
+
"uk": "додати розеткиConnection DP\nвикористовуйте jsconConfig\nрефакторинг сучасного коду\nвикористовувати прямий з'єднання роз'єму без скидання IPClient\nперша версія з двома вежами в NPM",
|
17
|
+
"zh-cn": "添加套接字 DP\n使用 jscon 配置\n重构现代代码\n使用不绕路的直插座连接\n第一版,国家预防机制有两个塔"
|
18
|
+
},
|
19
|
+
"1.5.1": {
|
20
|
+
"en": "Working with parallel towers. you can setup it in admin page."
|
21
|
+
},
|
6
22
|
"1.5.0": {
|
7
23
|
"en": "Breaking change: nodejs 16 minimum required \nautomated checks and release-script repaired (thanks to mcm1957, he did the work)\nnothing else changed in code",
|
8
24
|
"de": "Breaking change: nodejs 16 minimum erforderlich\nautomatisierte kontrollen und release-script repariert (dank mcm1957, er tat die arbeit)\nnichts anders geändert in code",
|
@@ -55,30 +71,6 @@
|
|
55
71
|
"uk": "5 модулів підтримуються, частотний ліміт для видалення пилу, оновлення безпеки",
|
56
72
|
"zh-cn": "5个单元支助,清除的污染频率限制,安全更新"
|
57
73
|
},
|
58
|
-
"1.3.1": {
|
59
|
-
"en": "updated even more dependencies\nofficial release with new state SOH",
|
60
|
-
"de": "noch mehr Abhängigkeiten aktualisiert\noffizielle Veröffentlichung mit neuem Zustand SOH",
|
61
|
-
"ru": "обновлено еще больше зависимостей\nофициальный релиз с новым состоянием SOH",
|
62
|
-
"pt": "atualizou ainda mais dependências\nlançamento oficial com novo estado SOH",
|
63
|
-
"nl": "nog meer afhankelijkheden bijgewerkt\nofficiële release met nieuwe staat SOH",
|
64
|
-
"fr": "mis à jour encore plus de dépendances\nsortie officielle avec le nouvel état SOH",
|
65
|
-
"it": "aggiornato ancora più dipendenze\nrilascio ufficiale con il nuovo stato SOH",
|
66
|
-
"es": "actualizado aún más dependencias\nlanzamiento oficial con el nuevo estado SOH",
|
67
|
-
"pl": "zaktualizowałem jeszcze więcej zależności\noficjalne wydanie z nowym stanem SOH",
|
68
|
-
"zh-cn": "更新了更多依赖项\n正式发布新状态 SOH"
|
69
|
-
},
|
70
|
-
"1.2.4-0": {
|
71
|
-
"en": "Added state: SOH\nupdated dependencies as suggested from bot",
|
72
|
-
"de": "Hinzugefügter Zustand: SOH\naktualisierte Abhängigkeiten wie vom Bot vorgeschlagen",
|
73
|
-
"ru": "Добавлено состояние: SOH\nобновленные зависимости, как было предложено от бота",
|
74
|
-
"pt": "Estado adicionado: SOH\ndependências atualizadas conforme sugerido pelo bot",
|
75
|
-
"nl": "Toegevoegde staat: SOH\nbijgewerkte afhankelijkheden zoals voorgesteld door bot",
|
76
|
-
"fr": "État ajouté : SOH\ndépendances mises à jour comme suggéré par le bot",
|
77
|
-
"it": "Stato aggiunto: SOH\ndipendenze aggiornate come suggerito da bot",
|
78
|
-
"es": "Estado añadido: SOH\ndependencias actualizadas según lo sugerido por el bot",
|
79
|
-
"pl": "Dodany stan: SOH\nzaktualizowane zależności zgodnie z sugestią bota",
|
80
|
-
"zh-cn": "添加状态:SOH\n按照 bot 的建议更新依赖项"
|
81
|
-
},
|
82
74
|
"1.2.3": {
|
83
75
|
"en": "changed ratio of logo",
|
84
76
|
"de": "geändertes Verhältnis des Logos",
|
@@ -123,9 +115,11 @@
|
|
123
115
|
"keywords": [
|
124
116
|
"byd hvs battery pv"
|
125
117
|
],
|
126
|
-
"
|
118
|
+
"licenseInformation": {
|
119
|
+
"license": "MIT",
|
120
|
+
"type": "free"
|
121
|
+
},
|
127
122
|
"platform": "Javascript/Node.js",
|
128
|
-
"main": "main.js",
|
129
123
|
"icon": "bydhvs.png",
|
130
124
|
"enabled": true,
|
131
125
|
"extIcon": "https://raw.githubusercontent.com/ChristianH17/ioBroker.bydhvs/master/admin/bydhvs.png",
|
@@ -136,18 +130,69 @@
|
|
136
130
|
"compact": true,
|
137
131
|
"connectionType": "local",
|
138
132
|
"dataSource": "poll",
|
139
|
-
"
|
133
|
+
"messages": [
|
134
|
+
{
|
135
|
+
"condition": {
|
136
|
+
"operand": "and",
|
137
|
+
"rules": [
|
138
|
+
"oldVersion<1.5.1",
|
139
|
+
"newVersion>=1.5.1"
|
140
|
+
]
|
141
|
+
},
|
142
|
+
"title": {
|
143
|
+
"en": "Changed structure of Diagnosis and CellDetails.",
|
144
|
+
"de": "Geänderte Struktur der Diagnose und CellDetails.",
|
145
|
+
"ru": "Изменение структуры диагностики и клеточных деталей.",
|
146
|
+
"pt": "Estrutura alterada de Diagnóstico e CellDetails.",
|
147
|
+
"nl": "Veranderde structuur van Diagnose en CellDetails.",
|
148
|
+
"fr": "Structure modifiée du diagnostic et des détails cellulaires.",
|
149
|
+
"it": "Struttura modificata di Diagnosi e CellDetails.",
|
150
|
+
"es": "Estructura modificada de Diagnóstico y Detalles Celulares.",
|
151
|
+
"pl": "Zmieniona struktura diagnostyki i cellDetails.",
|
152
|
+
"uk": "Змінена структура діагностики та клітинних деталей.",
|
153
|
+
"zh-cn": "已改变的诊断和细胞分类的结构."
|
154
|
+
},
|
155
|
+
"text": {
|
156
|
+
"en": "Changed structure of Diagnosis and CellDetails. We introduced an additional level for each tower. Example: Old Structure: bydhvs.0.Diagnosis.SOC; New Structure: bydhvs.0.Diagnosis.Tower_1.SOC; You should check your Database/Influx/... subscriptions.",
|
157
|
+
"de": "Geänderte Struktur der Diagnose und CellDetails. Wir haben für jeden Turm ein zusätzliches Niveau eingeführt. Beispiel: Alte Struktur: bydhvs.0.Diagnosis.SOC; Neue Struktur: bydhvs.0.Diagnosis.Tower_1.SOC; Sie sollten Ihre Datenbank/Influx/... Abonnements überprüfen.",
|
158
|
+
"ru": "Изменение структуры диагностики и клеточных деталей. Мы ввели дополнительный уровень для каждой башни. Пример: Старая структура: bydhvs.0.Diagnosis.SOC; Новая структура: bydhvs.0.Diagnosis.Tower_1.SOC; Вы должны проверить свою базу данных / Influx /... подписки.",
|
159
|
+
"pt": "Estrutura alterada de Diagnóstico e CellDetails. Introduzimos um nível adicional para cada torre. Exemplo: Old Structure: bydhvs.0.Diagnosis.SOC; New Structure: bydhvs.0.Diagnosis.Tower_1.SOC; Você deve verificar seu banco de dados / Influx /... assinaturas.",
|
160
|
+
"nl": "Veranderde structuur van Diagnose en CellDetails. We hebben een extra niveau voor elke toren ingevoerd. Voorbeeld: Oude structuur: bydhvs.0.Diagnose.SOC; Nieuwe structuur: bydhvs.0.Diagnose.Tower_1.SOC; Controleer uw Database/Influx/... abonnementen.",
|
161
|
+
"fr": "Structure modifiée du diagnostic et des détails cellulaires. Nous avons introduit un niveau supplémentaire pour chaque tour. Exemple: Ancienne structure: bydhvs.0.Diagnosis.SOC; Nouvelle structure: bydhvs.0.Diagnosis.Tower_1.SOC; Vous devriez vérifier vos abonnements Database/Influx/...",
|
162
|
+
"it": "Struttura modificata di Diagnosi e CellDetails. Abbiamo introdotto un livello aggiuntivo per ogni torre. Esempio: Struttura vecchia: bydhvs.0.Diagnosis.SOC; Nuova struttura: bydhvs.0.Diagnosis.Tower_1.SOC; Si consiglia di controllare il database/Influx/... abbonamenti.",
|
163
|
+
"es": "Estructura modificada de Diagnóstico y Detalles Celulares. Presentamos un nivel adicional para cada torre. Ejemplo: Old Structure: bydhvs.0.Diagnosis.SOC; New Structure: bydhvs.0.Diagnosis.Tower_1.SOC; Usted debe comprobar sus suscripciones de Base de Datos/Influjo/...",
|
164
|
+
"pl": "Zmieniona struktura diagnostyki i cellDetails. Wprowadziliśmy dodatkowy poziom dla każdej wieży. Przykład: Stara struktura: bydhvs.0.Diagnosis.SOC; Nowa struktura: bydhvs.0.Diagnosis.Tower _ 1.SOC; Powinieneś sprawdzić swoją bazę danych / Influm /... subskrypcje.",
|
165
|
+
"uk": "Змінена структура діагностики та клітинних деталей. Ми ввели додатковий рівень для кожної вежі. Приклад: Стара структура: bydhvs.0.Diagnosis.SOC; Нова структура: bydhvs.0.Diagnosis.Tower_1.SOC; Ви повинні перевірити вашу базу даних/Influx/... підписки.",
|
166
|
+
"zh-cn": "已改变的诊断和细胞分类的结构。 我们为每座塔增加了一层 例:旧结构:bydhvs.0.Diagnosis.SOC;新结构:bydhvs.0.Diagnosis.Tower_1.SOC; 您应该检查您的数据库/ Influx/... 订阅 ."
|
167
|
+
},
|
168
|
+
"link": "https://github.com/christianh17/ioBroker.bydhvs/pull/262",
|
169
|
+
"linkText": "Reiew SourceCode of that change or report an issue",
|
170
|
+
"level": "warn",
|
171
|
+
"buttons": [
|
172
|
+
"agree",
|
173
|
+
"cancel"
|
174
|
+
]
|
175
|
+
}
|
176
|
+
],
|
177
|
+
"adminUI": {
|
178
|
+
"config": "json",
|
179
|
+
"tab": "materialize"
|
180
|
+
},
|
140
181
|
"dependencies": [
|
141
182
|
{
|
142
|
-
"js-controller": ">=
|
183
|
+
"js-controller": ">=5.0.19"
|
143
184
|
}
|
144
|
-
]
|
185
|
+
],
|
186
|
+
"tier": 2
|
145
187
|
},
|
146
188
|
"native": {
|
147
189
|
"ConfPollInterval": "60",
|
148
190
|
"ConfIPAdress": "192.168.16.254",
|
149
191
|
"ConfDetailshowoften": 60,
|
150
|
-
"
|
192
|
+
"ConfBydTowerCount": 1,
|
193
|
+
"ConfStoreRawMessages": false,
|
194
|
+
"pingInterval": 15000,
|
195
|
+
"ConfOverridePollInterval": 0
|
151
196
|
},
|
152
197
|
"objects": [],
|
153
198
|
"instanceObjects": [
|
@@ -171,6 +216,19 @@
|
|
171
216
|
"def": false
|
172
217
|
},
|
173
218
|
"native": {}
|
219
|
+
},
|
220
|
+
{
|
221
|
+
"_id": "info.socketConnection",
|
222
|
+
"type": "state",
|
223
|
+
"common": {
|
224
|
+
"role": "indicator.connected",
|
225
|
+
"name": "is socket connected",
|
226
|
+
"type": "boolean",
|
227
|
+
"read": true,
|
228
|
+
"write": false,
|
229
|
+
"def": false
|
230
|
+
},
|
231
|
+
"native": {}
|
174
232
|
}
|
175
233
|
]
|
176
234
|
}
|
package/lib/constants.js
ADDED
@@ -0,0 +1,127 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
const myRequests = [
|
4
|
+
Buffer.from('010300000066c5e0', 'hex'), //0
|
5
|
+
Buffer.from('01030500001984cc', 'hex'), //1
|
6
|
+
Buffer.from('010300100003040e', 'hex'), //2
|
7
|
+
Buffer.from('0110055000020400018100f853', 'hex'), //3 start measuring
|
8
|
+
Buffer.from('010305510001d517', 'hex'), //4
|
9
|
+
Buffer.from('01030558004104e5', 'hex'), //5
|
10
|
+
Buffer.from('01030558004104e5', 'hex'), //6
|
11
|
+
Buffer.from('01030558004104e5', 'hex'), //7
|
12
|
+
Buffer.from('01030558004104e5', 'hex'), //8
|
13
|
+
// to read the 5th module, the box must first be reconfigured
|
14
|
+
Buffer.from('01100100000306444542554700176f', 'hex'), //9 switch to second turn for the last few cells
|
15
|
+
Buffer.from('0110055000020400018100f853', 'hex'), //10 start measuring remaining cells (like 3)
|
16
|
+
Buffer.from('010305510001d517', 'hex'), //11 (like 4)
|
17
|
+
Buffer.from('01030558004104e5', 'hex'), //12 (like 5)
|
18
|
+
Buffer.from('01030558004104e5', 'hex'), //13 (like 6)
|
19
|
+
// The BYD tool also issues two more requests, probably to gather even more cells in some larger setups
|
20
|
+
Buffer.from('01030558004104e5', 'hex'), //14 (like 7)
|
21
|
+
Buffer.from('01030558004104e5', 'hex'), //15 (like 8)
|
22
|
+
//
|
23
|
+
// ONLY if two towers in parallel
|
24
|
+
Buffer.from('01100550000204000281000853', 'hex'), // 16 - Switch to Box 2 -> 281
|
25
|
+
];
|
26
|
+
|
27
|
+
/* Während des Updates des BMS funktioniert das Auslesen offensichtlich nicht, hier die Antworten des Speichers (Seriennummer verfälscht und CRC des ersten Paketes nicht neu berechnet)
|
28
|
+
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 7 8 9 0 1 2 3 4 5 6 7 8 9 0
|
29
|
+
01 03 cc 50 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 78 78 78 78 78 03 0d 03 0f 03 14 01 00 03 12 02 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 15 04 0c 12 38 2b 82 b2
|
30
|
+
01 03 32 00 43 01 4a 01 4a 00 63 ff f8 52 a8 00 15 00 14 00 14 00 00 03 0f 00 00 00 00 00 00 09 02 00 02 52 76 17 03 00 00 13 84 00 00 00 02 09 02 00 00 04 2c 92 5b
|
31
|
+
01 03 06 03 12 02 01 01 00 c8 ad
|
32
|
+
01 90 04 4d c3 <- Das scheint eine Fehlercondition zu sein.
|
33
|
+
5 min. später klappte es wieder und dann war auch die neue F/W-Version in der Antwort enthalten
|
34
|
+
*/
|
35
|
+
|
36
|
+
const byd_stat_tower = [
|
37
|
+
'Battery Over Voltage', // Bit 0
|
38
|
+
'Battery Under Voltage', // Bit 1
|
39
|
+
'Cells OverVoltage', // Bit 2
|
40
|
+
'Cells UnderVoltage', // Bit 3
|
41
|
+
'Cells Imbalance', // Bit 4
|
42
|
+
'Charging High Temperature(Cells)', // Bit 5
|
43
|
+
'Charging Low Temperature(Cells)', // Bit 6
|
44
|
+
'DisCharging High Temperature(Cells)', // Bit 7
|
45
|
+
'DisCharging Low Temperature(Cells)', // Bit 8
|
46
|
+
'Charging OverCurrent(Cells)', // Bit 9
|
47
|
+
'DisCharging OverCurrent(Cells)', // Bit 10
|
48
|
+
'Charging OverCurrent(Hardware)', // Bit 11
|
49
|
+
'Short Circuit', // Bit 12
|
50
|
+
'Inversly Connection', // Bit 13
|
51
|
+
'Interlock switch Abnormal', // Bit 14
|
52
|
+
'AirSwitch Abnormal', // Bit 15
|
53
|
+
];
|
54
|
+
|
55
|
+
const myINVs = [
|
56
|
+
'Fronius HV', //0
|
57
|
+
'Goodwe HV', //1
|
58
|
+
'Fronius HV', //2
|
59
|
+
'Kostal HV', //3
|
60
|
+
'Goodwe HV', //4
|
61
|
+
'SMA SBS3.7/5.0', //5
|
62
|
+
'Kostal HV', //6
|
63
|
+
'SMA SBS3.7/5.0', //7
|
64
|
+
'Sungrow HV', //8
|
65
|
+
'Sungrow HV', //9
|
66
|
+
'Kaco HV', //10
|
67
|
+
'Kaco HV', //11
|
68
|
+
'Ingeteam HV', //12
|
69
|
+
'Ingeteam HV', //13
|
70
|
+
'SMA SBS 2.5 HV', //14
|
71
|
+
'undefined', //15
|
72
|
+
'SMA SBS 2.5 HV', //16
|
73
|
+
'Fronius HV', //17
|
74
|
+
'undefined', //18
|
75
|
+
'SMA STP', //19
|
76
|
+
];
|
77
|
+
|
78
|
+
const myINVsLVS = [
|
79
|
+
'Fronius HV',
|
80
|
+
'Goodwe HV',
|
81
|
+
'Goodwe HV',
|
82
|
+
'Kostal HV',
|
83
|
+
'Selectronic LV',
|
84
|
+
'SMA SBS3.7/5.0',
|
85
|
+
'SMA LV',
|
86
|
+
'Victron LV',
|
87
|
+
'Suntech LV',
|
88
|
+
'Sungrow HV',
|
89
|
+
'Kaco HV',
|
90
|
+
'Studer LV',
|
91
|
+
'Solar Edge LV',
|
92
|
+
'Ingeteam HV',
|
93
|
+
'Sungrow LV',
|
94
|
+
'Schneider LV',
|
95
|
+
'SMA SBS2.5 HV',
|
96
|
+
'Solar Edge LV',
|
97
|
+
'Solar Edge LV',
|
98
|
+
'Solar Edge LV',
|
99
|
+
'unknown',
|
100
|
+
];
|
101
|
+
|
102
|
+
const myErrors = [
|
103
|
+
'High Temperature Charging (Cells)',
|
104
|
+
'Low Temperature Charging (Cells)',
|
105
|
+
'Over Current Discharging',
|
106
|
+
'Over Current Charging',
|
107
|
+
'Main circuit Failure',
|
108
|
+
'Short Current Alarm',
|
109
|
+
'Cells Imbalance',
|
110
|
+
'Current Sensor Failure',
|
111
|
+
'Battery Over Voltage',
|
112
|
+
'Battery Under Voltage',
|
113
|
+
'Cell Over Voltage',
|
114
|
+
'Cell Under Voltage',
|
115
|
+
'Voltage Sensor Failure',
|
116
|
+
'Temperature Sensor Failure',
|
117
|
+
'High Temperature Discharging (Cells)',
|
118
|
+
'Low Temperature Discharging (Cells)',
|
119
|
+
];
|
120
|
+
|
121
|
+
module.exports = {
|
122
|
+
myRequests,
|
123
|
+
byd_stat_tower,
|
124
|
+
myINVs,
|
125
|
+
myINVsLVS,
|
126
|
+
myErrors,
|
127
|
+
};
|