davidrapan / ha-solarman

⚡ Solarman Stick Logger integration for 🏠 Home Assistant
MIT License
110 stars 25 forks source link

Writing modbus registers #68

Closed amiko24 closed 3 months ago

amiko24 commented 3 months ago

Hello David, how can I write the registers.

I use such an automation to write the wallbox registers via Modbus. (See yaml code below). Does it work the same way with the Deye Iverters? What is the name of the hub for Deye sg04lp3? Slave number is 1 or 0?

`- id: '1680707528756' alias: Setze Ladestrom description: '' trigger:

PV-Joe commented 3 months ago

I don’t know about the write registers but:

Slave number is 1

… for my Deye SG04LP3

It works fine!

gedger commented 3 months ago

When I look at the services provided by solarman I only see. IMG_0263

gedger commented 3 months ago

So this is a working call to change a holding register. IMG_0264

amiko24 commented 3 months ago

it should also work via device

` - action: solarman.write_holding_register metadata: {} data: wait_for_attempts: 5 device: 70ddcba05b16bf94857f18e9836eb017 register: 80 value: 1 mode: single``

gedger commented 3 months ago

It only works with device, the GUI translates the friendly device name to device id for you. if you look at the service call I showed above then the yaml is .

      - service: solarman.write_holding_register
        data:
          wait_for_attempts: 5
          device: db2d333f97371cec16797b695551cef5
          register: 3051
          value: 10000