StephanJoubert / home_assistant_solarman

Home Assistant component for Solarman collectors used with a variety of inverters.
Apache License 2.0
555 stars 199 forks source link

How to find registers for specific parameters? #137

Open jweea opened 1 year ago

jweea commented 1 year ago

Hi everyone

I'm using the deye hybrid inverter with logger SN #23xxxxxxxx. Everything works great and really appriciate this component.

However my system setup involves using micro-inverters, and I'd like to include this "Total Production MI"

Capture

Wounding if someone found its registers? Since the number is large, I'm guessing there should be two registers, and they should be the same as generator because it uses GEN port.

Is there a way to find the registers related? Tried register_scan.py but it keeps throwing "unpack requires a buffer of 2 bytes".

Thanks!

K3iVi commented 1 year ago

This is for DEYE 6-12k SG04-lp3 These are the modbus registers. New in version 104 of modbus file, translator and kWh helped :) 536 发电机日发电量 R 0.1kWh 537 发电机总发电量低字节 R 0.1kWh 538 发电机总发电量高字节 R 0.1kWh

 - start: 0x0218
    end: 0x021A
    mb_functioncode: 0x03
- name: "Microinverter power generation of today"
  class: "energy"
  state_class: "total_increasing"
  uom: "kWh"
  scale: 0.1
  rule: 3
  registers: [0x0218]
  icon: 'mdi:transmission-tower-import'

- name: "Microinverter power generation total"
  class: "energy"
  state_class: "total_increasing"
  uom: "kWh"
  scale: 0.1
  rule: 3
  registers: [0x0219,0x021A]
  icon: 'mdi:transmission-tower-import'