mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Modbus service (#17250)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
a6662ae7dd
commit
9a86824a7c
@ -296,7 +296,9 @@ climates:
|
|||||||
default: C
|
default: C
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
#### Services
|
## Services
|
||||||
|
|
||||||
|
### Service `modbus.set-temperature`
|
||||||
|
|
||||||
| Service | Description |
|
| Service | Description |
|
||||||
| ------- | ----------- |
|
| ------- | ----------- |
|
||||||
@ -756,14 +758,13 @@ modbus:
|
|||||||
name: hub2
|
name: hub2
|
||||||
```
|
```
|
||||||
|
|
||||||
### Services
|
### Service `modbus.write_register`
|
||||||
|
|
||||||
|
|
||||||
| Service | Description |
|
| Service | Description |
|
||||||
| ------- | ----------- |
|
| ------- | ----------- |
|
||||||
| write_register | Write register. Requires `hub`, `unit`, `address` and `value` fields. `value` can be either single value or an array |
|
| write_register | Write register. Requires `hub`, `unit`, `address` and `value` fields. `value` can be either single value or an array |
|
||||||
|
|
||||||
#### Service Data Attributes
|
Description:
|
||||||
|
|
||||||
| Attribute | Description |
|
| Attribute | Description |
|
||||||
| --------- | ----------- |
|
| --------- | ----------- |
|
||||||
@ -772,6 +773,22 @@ modbus:
|
|||||||
| address | Address of the Register (e.g., 138) |
|
| address | Address of the Register (e.g., 138) |
|
||||||
| value | A single value or an array of 16-bit values. Single value will call modbus function code 6. Array will call modbus function code 16. Array might need reverse ordering. E.g., to set 0x0004 you might need to set `[4,0]` |
|
| value | A single value or an array of 16-bit values. Single value will call modbus function code 6. Array will call modbus function code 16. Array might need reverse ordering. E.g., to set 0x0004 you might need to set `[4,0]` |
|
||||||
|
|
||||||
|
### Service `modbus.write_coil`
|
||||||
|
|
||||||
|
| Service | Description |
|
||||||
|
| ------- | ----------- |
|
||||||
|
| write_coil | Write coil. Requires `hub`, `unit`, `address` and `state` fields. `state` can be either single bolean or an array |
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
| Attribute | Description |
|
||||||
|
| --------- | ----------- |
|
||||||
|
| hub | Hub name (defaults to 'default' when omitted) |
|
||||||
|
| unit | Slave address (1-255, mostly 255 if you talk to Modbus via TCP) |
|
||||||
|
| address | Address of the Register (e.g., 138) |
|
||||||
|
| state | A single boolean or an array of booleans. Single boolean will call modbus function code 6. Array will call modbus function code 16.
|
||||||
|
..
|
||||||
|
|
||||||
## Log warning (v1.0.8 and onwards)
|
## Log warning (v1.0.8 and onwards)
|
||||||
|
|
||||||
Pymodbus (which is the implementation library) was updated and issues a warning:
|
Pymodbus (which is the implementation library) was updated and issues a warning:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user