home_assistant_solarman
home_assistant_solarman copied to clipboard
Way to control Deye Inverter
Hi,
First, one of the best Home Assistant addons out there for me.
I am using a Deye inverter SUN-8K-SG01LP1
I was wondering if there is a way to control anything on the inverter, as in change any setting from Home Assistant.
If there is, then a person can do many interesting things through Home Assistant.
Thanks
Yes, please integrate control. F.e. (de)active time of use in inverter config.
Yes, one idea in mind is to be able to turn ON and OFF the gen force, remotely
Currently, have to go down and up a building in case I need to force turn ON the generator
I came up with a config to turn gen on/off for the deye invertor. I chose custom_parameters.yaml
for the configuration, and changed the file slightly to this:
requests:
- start: 0x0003
end: 0x0070
mb_functioncode: 0x03
- start: 0x0096
end: 0x00f9
mb_functioncode: 0x03
- start: 0x00FA
end: 0x0146
# end: 0x0117
mb_functioncode: 0x03
parameters:
# ... all the parameters from deye_hybrid ...
- group: Settings
items:
- name: "Grid Charge Ampere"
class: "current"
uom: "A"
scale: 1
rule: 1
registers: [0x00E6]
icon: 'mdi:current-dc'
- name: "Gen Force"
class: ""
uom: ""
state_class: ""
scale: 1
rule: 1
registers: [0x0146]
icon: 'mdi:generator-stationary'
lookup:
- key: 0
value: "Off"
- key: 8192
value: "On"
requests
needs a change to be able to query 0x0146 which is "gen force" option. And then I have template switch that uses the service to turn on/off:
switch:
- platform: template
switches:
gen_force:
friendly_name: "Deye Gen Force"
value_template: |
{{ is_state("sensor.deye_gen_force", "On") }}
turn_on:
service: solarman.write_multiple_holding_registers
data:
register: 326
values: "{{ [8192] }}"
turn_off:
service: solarman.write_multiple_holding_registers
data:
register: 326
values: "{{ [0] }}"
icon_template: >-
{% if is_state("sensor.deye_gen_force", "On") %}
mdi:engine
{% else %}
mdi:engine-off
{% endif %}
Hi,
Great!!! I will try to see if I can do it. Thanks
Sorry, do I make the file custom_parameters.yaml, or is it supposed to be there?
If I make it, how do I make it recognizable to the system? Where do I call it?
Thanks
You can use "configure" for your existing integration to switch to custom parameters config. This is a file you edit manually, in solarman custom component directory
Ok. Will try it when I am free. Thanks
Hi. I was very busy for a long time from being able to try anything.
I apologize for that.
I am finally going to try right now.
I made my own custom parameter config
I just need to know if I also need to add the template swith in the same file, ex: custom_parameters.yaml
Or does it go into the home assistant configuration.yaml file?
Is it possible to add it to the same file without having to go to configuration.yaml?
Thank you very much for your help