Wattsonic photovoltaic power plant FVE - integration

you don’t need to install mariadb, when you are using default db. just include wattsonic_sql_postgre.yaml

thanks…
it works

If it is the same like MTec Energy butler, gen2 and gen3 are nearly the same.
They use the same modbus registers exept 3xxxx and 4xxxx (Gen3 uses 3xxxx whereas Gen2 uses 4xxxx).
To easily convert config from gen3 to gen2 you could use sed:

sed -E 's/\b3([0-9]{4})\b/4\1/g' gen3.yaml > gen2.yaml

1 Like

I added new script wattsonic_charge_battery_from_grid. Script sets inverter to economic mode, waits until battery is full charged and sets back general mode

1 Like

Nice work :+1: thank you very much for your great effort. Let me have a question, how can I set “selling energy to grid” using your integration. Thanks a lot

you must set economic mode a define selling time (look on this structure wattsonic_ecomode_period1_struct and derived sensors wattsonic_ecomode_period1_chargedischarge_setting…)
for writing values look at the example in script wattsonic_charge_battery_from_grid

Hello GiZMoSK,

I created modified Sunways yaml. Please where I can send it to you? Because on the github I only can do a fork of your project.

Thanks Jan CZ

create an issue and paste the code there :slight_smile:
thank you

Hi!
Is this converter working and how can i connect them?
I have a A-Tronix inverter with A-Tronix Battary pack.
The manufacturer does not provide any information on how to obtain the data for Smarthome. So I’m looking for another way to monitor the solar system and the batteries.
Thank you for feedback!
BR Mercy

A-Tronic is same as Wattsonic/Sunways. You need to know whether it is gen2 or gen3 (compare pictures)

Hi!
one question - i have an Wattsonic Gen3 and your integration works fine!
the only thing is, that i want to limit the power when loading the battery from grid.

am i right that the script is defined in the wattsonic.yaml and that these is the section:

wattsonic_charge_battery_from_grid:
alias: wattsonic_charge_battery_from_grid
sequence:
- service: modbus.write_register
data:
hub: wattsonic
slave: 247
address: 53006
value: 1
- service: modbus.write_register
data:
hub: wattsonic
slave: 247
address: 53007
value:
- 1
- 1
- 65535
- 1000
- 65535
- 0
- 5947

is the limitation is the register 53010 an this must be the “-1000” above - right?
in the wattsonic docu its an percentage number - if i want to put it to 20% power from
grid loading, i have to change the value “-1000” to “-200” …

is this correct?

many thanks!

yes, multiply by 10.
this is the decode routine:
wattsonic_ecomode_period1_power_limit=
‘{{ states(’‘sensor.wattsonic_ecomode_period1_struct’‘).split(’‘,’')[3]|float(0)/10|default(-1

many thanks - i will test it

Hi!
since a few days i have the problem, that the script is not working “charge_battery_from_grid”.
if i start the script the inverter doesnt change into economy mode and nothing happens.

if a manually start the script: wattsonic_mode_economic the inverter changes to this mode - also if i change back manually to general it works.

This is the code:
alias: wattsonic_charge_battery_from_grid
sequence:

  • service: modbus.write_register
    data:
    hub: wattsonic
    slave: 247
    address: 53006
    value: 1
  • service: modbus.write_register
    data:
    hub: wattsonic
    slave: 210
    address: 53007
    value:
    - 1
    - 1
    - 65535
    - 500
    - 65535
    - 0
    - 5947
  • service: script.1712817316534
    data: {}
  • wait_for_trigger:
    • platform: state
      entity_id:
      • sensor.wattsonic_hybrid_inverter_working_mode_setting
        to: “258”
        timeout:
        hours: 0
        minutes: 10
        seconds: 0
        milliseconds: 0
  • if:
    • condition: state
      entity_id: sensor.wattsonic_battery_mode
      state: “0”
      then:
    • wait_for_trigger:
      • platform: state
        entity_id:
        • sensor.wattsonic_battery_mode
          to: “1”
          timeout:
          hours: 0
          minutes: 10
          seconds: 0
          milliseconds: 0
  • wait_for_trigger:
    • platform: state
      entity_id:
      • sensor.wattsonic_battery_mode
        to: “0”
        timeout:
        hours: 3
        minutes: 0
        seconds: 0
        milliseconds: 0
  • service: script.wattsonic_mode_general_migriert
    data: {}
  • service: notify.email_o365
    metadata: {}
    data:
    message: Wattsonic - Battery load from Grid - off - HASS
    title: Wattsonic - Battery load from Grid - off - HASS
    target: [email protected]
  • service: input_boolean.turn_off
    data: {}
    target:
    entity_id: input_boolean.wattsonic_batterie_mit_kaufstrom_laden_sofort
    mode: single

this is from the Traces:

can anyone help me please?

thanks

it seems, that you migrated scripts from external yaml to configuration.yaml and something went wrong. Look what is inside script.wattsonic_mode_general_migriert and script.1712817316534 and wattsonic_mode_economic_migriert .
Try changing script.1712817316534 to wattsonic_mode_economic

Hi!

First of all, big thanks for sharing the example of how to integrate Wattsonic into Home Assistant. It’s been super helpful!

I’ve been tinkering with it and I’m curious if anyone has figured out how to tweak the power settings using Modbus. Specifically, I’m trying to configure the Wattsonic inverter to temporarily prioritise exporting power to the grid over charging the battery. I’ve considered limiting the battery charge current, but I’ve hit a roadblock in finding the right approach.

Do you have any insights or ideas on how to approach this? Thanks in advance for any help!

can you do this using their app? Have you tried Economy mode ? What is you motivation?

Ok, yes, this setting is not even in their application, and it was probably a very stupid approach to try to go this way to the goal.

I also thought of the Economy mode, but if I’ve got it right, by default, it doesn’t use the battery at all without any other settings. Then, you can set it to charge or discharge the battery within a time window with a possible power limit.

My motivation is to use the grid injection during the morning peak on spot, when the consumption of my house is covered first and the rest of energy goes to the grid. The battery can be charged during the rest of the day. However, I do not want to disable the battery completely, because when consumption increases (e.g. morning coffee), the value of the house consumption would exceed the energy supplied by the FVE and would have to be purchased from the grid. Given the prices, this does not make sense at all.

We already have a Wattsonic at home, but unfortunately our grid connection is not yet complete, so I cannot test it in practice. But I would like to be ready :wink: