Innogy: fix enable/disable using wrong modbus function
This commit is contained in:
parent
09aade90fd
commit
87182add66
1 changed files with 3 additions and 1 deletions
|
|
@ -127,7 +127,9 @@ func (wb *Innogy) Enable(enable bool) error {
|
|||
u = 1
|
||||
}
|
||||
|
||||
_, err := wb.conn.WriteSingleRegister(igyRegEnable, u)
|
||||
b := make([]byte, 2)
|
||||
binary.BigEndian.PutUint16(b, u)
|
||||
_, err := wb.conn.WriteMultipleRegisters(igyRegEnable, 1, b)
|
||||
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue