Skip to content

Commit 0bca78e

Browse files
committed
Fix typos and formatting
1 parent 0347016 commit 0bca78e

File tree

1 file changed

+30
-23
lines changed

1 file changed

+30
-23
lines changed

customization.md

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Customizing
22

3-
The hart of this component is the parameter-definition file ex *deye_hybrid.yaml*. By changing the file, the behaviour is totally changed.
3+
The heart of this component is the parameter-definition file, such as *deye_hybrid.yaml*. By changing the file, the behaviour is totally changed.
44

55
NOTE:
6-
In order to leave your customized file intact during upgrades, copy the most relevant yaml file to a file called "custom_parameters.yaml, and set the "lookup_file" option in configuration.yaml to point to it.
6+
In order to leave your customized file intact during upgrades, copy the most relevant yaml file to a file called `custom_parameters.yaml`, and set the "lookup_file" option in configuration.yaml to point to it (or just select the file in the configuration flow UI).
77

88
~~~ YAML
99
sensor:
@@ -35,13 +35,16 @@ requests:
3535
- start: 0x00f4
3636
end: 0x00f8
3737
mb_functioncode: 0x03
38-
3938
~~~
4039

4140
This block specifies that the component should issue three requests to the logger, the first one requesting parameters 0x0003 up to 0x000E, then a second request for parmeters 0x003B up to 0x0070, and the last for parameters 0x000f4 up to 0x00f8. All of the requests will be sent using Modbus Function Code 0x03.
4241

42+
The **maximum number** of registers that can be queried using the protocol **for each request is 125** (see [here](https://github.com/jmccrohan/pysolarmanv5/issues/51#issuecomment-1902238661)), but some loggers may get errors like `CRC validation failed` if the length is too much; in that case, reduce the length (`end-start`) by doing multiple requests.
43+
44+
If you get `V5FrameError: V5 frame contains invalid sequence number` errors in the log, it might be caused by concurrency (i.e. more than one client connected to the same logger stick).
45+
4346
## 2. Parameters
44-
This section defines the induvidual parameter definitions. For example:
47+
This section defines the individual parameter definitions: each parameter creates one sensor in Home Assistant. For example:
4548

4649
~~~ YAML
4750
parameters:
@@ -57,33 +60,36 @@ parameters:
5760
icon: 'mdi:solar-power'
5861
~~~
5962

60-
### group
63+
The register must be included in the requests of the previous point, otherwise the sensor will have an `Unknown` value in Home Assistant.
64+
65+
Pay attention to the registers order when more than one are required; it could be descending when 2 registers are joint together or not, depending on the inverter.
66+
67+
### Group
6168
The group just groups parameters that belong together. The induvidual parameter-items has to be placed in a group. The *items* parameters contains the parameter definitions that belong in the group.
6269

6370
### Parameter-item
6471

6572

66-
|field||description|
73+
|Field||Description|
6774
|-|-|-|
6875
|name||The *name* field of the home-assistant entity #|
6976
|class||The *class* field of the home-assistant entity #|
70-
|state_class||The *state_class* field of the home assistant entity ##|
77+
|state_class||The *state_class* field of the home-assistant entity ##|
7178
|uom||The *unit_of_measurement* field of the home-assistant entity #|
7279
|icon||The *icon* field of the home-assistant entity #|
7380
|| **The fields below define how the value from the logger is parsed** |
74-
|scale||Scaling factor for the value read from the logger|
75-
|rule||Method to interpret the data from the logger ###|
76-
|mask||A mask to filter only used bit fields. This is especialy useful for flag fields|
77-
|registers||Array of register fields that comprises the value. If the value is placed in a number of registers, this array will contain more than one item.|
81+
|scale||Scaling factor for the value read from the logger (default: 1)|
82+
|rule||Method to interpret the data from the logger (see the table below)|
83+
|mask||A mask to filter only used bit fields; this is especialy useful for flag fields|
84+
|registers||Array of register fields that comprises the value; if the value is placed in a number of registers, this array will contain more than one item (note: order is important)|
7885
|lookup||Defines a key-value pair for values where an integer maps to a string field|
79-
||**The following is optional and could be used, if the inverter delivers sometimes non usable data (e.g. Total Production == 0.0)**|
86+
||**The following is optional and could be used, if the inverter delivers sometimes non-usable data (e.g. Total Production == 0.0)**|
8087
|validation| ||
8188
||min|Spefifies the minimum value to accept|
8289
||max|Specifies the maximum value to accept|
83-
||invalidate_all| Optional: invalidate complete dataset if specified. If not specified, it will only invalidate the specific parameter|
84-
90+
||invalidate_all| Optional: invalidate the complete dataset if specified; if not specified, it will only invalidate the specific parameter|
8591

86-
Example yaml file for the example mentioned above:
92+
Example yaml file for the mentioned above:
8793

8894
~~~ YAML
8995
- name: "Total Production"
@@ -103,17 +109,18 @@ Example yaml file for the example mentioned above:
103109

104110
\## see https://developers.home-assistant.io/docs/core/entity/sensor/#entities-representing-a-total-amount
105111

106-
### The rule field specifies how to interpret the binary data.
112+
### Rule
113+
The `rule` field specifies how to interpret the binary data contained in the register(s).
107114

108115
| Rule # | Description | Example |
109116
|--------|-----------------------|------------------------------------------------------------------------------------------------------------------------|
110-
| 1 | unsigned 16-bit value | |
111-
| 2 | signed 16 bit value | |
112-
| 3 | unsigned 32 bit value | |
113-
| 4 | signed 32 bit value | |
114-
| 5 | ascii value | |
115-
| 6 | bit field | |
117+
| 1 | Unsigned 16-bit value | |
118+
| 2 | Signed 16 bit value | |
119+
| 3 | Unsigned 32 bit value | |
120+
| 4 | Signed 32 bit value | |
121+
| 5 | ASCII value | |
122+
| 6 | Bit field | |
116123
| 7 | Version | |
117124
| 8 | Date Time | |
118-
| 9 | Time | Time value as string<ul><li>Example 1: Register Value 2200 => Time Value: 22:00</li><li>Example 2: Register value: 400 => 04:00</li></ul> |
125+
| 9 | Time | Time value as string<ul><li>Example 1: Register Value 2200 => Time Value: 22:00</li><li>Example 2: Register value: 400 => 04:00</li></ul>|
119126

0 commit comments

Comments
 (0)