-
Notifications
You must be signed in to change notification settings - Fork 3
Decoding of Battery Type and Error Code; small fixes; CT Info and Settings #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
d281dd5
9ef7bf7
9332284
4b0b520
8d9232d
b62c00f
d51f8a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
alias: Set CT Ratio Based on Netzanschluss Leistung | ||
description: Adjust sun12k_general_ct_ratio based on netzanschluss_leistung | ||
triggers: | ||
- entity_id: sensor.netzanschluss_leistung | ||
below: -8000 | ||
for: "00:00:10" | ||
trigger: numeric_state | ||
- entity_id: sensor.netzanschluss_leistung | ||
above: -1000 | ||
for: "00:00:10" | ||
trigger: numeric_state | ||
- trigger: time_pattern | ||
seconds: "30" | ||
actions: | ||
- choose: | ||
- conditions: | ||
- condition: numeric_state | ||
entity_id: sensor.netzanschluss_leistung | ||
below: -8000 | ||
sequence: | ||
- target: | ||
entity_id: number.sun12k_general_ct_ratio | ||
data: | ||
value: 1000 | ||
action: number.set_value | ||
- conditions: | ||
- condition: numeric_state | ||
entity_id: sensor.netzanschluss_leistung | ||
above: -1000 | ||
sequence: | ||
- target: | ||
entity_id: number.sun12k_general_ct_ratio | ||
data: | ||
value: 2000 | ||
action: number.set_value | ||
mode: restart |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is where I am more concerned. I originally structured the Repository in:
Your Not sure how / if we should restructure everything to make it a bit more Consistent, since it's a bit of à La Carte Menu, where everybody can choose the different Components they would like. And obviously no 2 Configurations will ever be the same. Any Tips ? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
substitutions: | ||
name: deye #name in ESPhome | ||
esp_name: deye | ||
device_description: "Esphome component for Deye sun-12k-sg04lp3" #Description in ESPhome | ||
modbus_controller_id: deye_modbus_controller #just a random name for the modbus controler - this is the high frequency controller for live values | ||
device_type: sun12k #all entities in Home Assistant will start with this text to help identify the entitys | ||
entities_id_prefix: SUN12K | ||
entities_name_prefix: SUN12K | ||
esphome: | ||
name: ${name} | ||
|
||
esp32: | ||
board: wt32-eth01 | ||
framework: | ||
type: esp-idf | ||
|
||
# Enable logging | ||
logger: | ||
level: INFO | ||
baud_rate: 0 | ||
|
||
# Enable Home Assistant API | ||
ota: | ||
platform: esphome | ||
password: !secret ota_password | ||
|
||
# Enable Home Assistant API | ||
api: | ||
encryption: | ||
key: !secret api_encryption | ||
|
||
ethernet: | ||
type: LAN8720 | ||
mdc_pin: GPIO23 | ||
mdio_pin: GPIO18 | ||
clk_mode: GPIO0_IN | ||
phy_addr: 1 | ||
power_pin: GPIO16 | ||
|
||
time: | ||
- platform: homeassistant | ||
|
||
uart: | ||
- id: uart_deye | ||
tx_pin: GPIO17 | ||
rx_pin: GPIO05 | ||
baud_rate: 115200 | ||
stop_bits: 1 | ||
rx_buffer_size: 4096 | ||
|
||
modbus: | ||
- id: modbus_deye | ||
uart_id: uart_deye | ||
|
||
modbus_controller: | ||
- id: ${modbus_controller_id} | ||
address: 0x1 | ||
modbus_id: modbus_deye | ||
setup_priority: -10 | ||
update_interval: 1sec | ||
|
||
packages: | ||
# Different modules for the different sections of the inverter | ||
solar: !include esphome-for-deye/modules/solar.yaml | ||
battery: !include esphome-for-deye/modules/battery.yaml | ||
|
||
load: !include esphome-for-deye/modules/load.yaml | ||
generator: !include esphome-for-deye/modules/generator.yaml # Generator, Micro Inverter or Smart Load | ||
general: !include esphome-for-deye/modules/general.yaml | ||
status: !include esphome-for-deye/modules/status.yaml | ||
internal: !include esphome-for-deye/modules/internal.yaml # Internal CTs Current/Power Measurement | ||
inverter: !include esphome-for-deye/modules/inverter.yaml | ||
ups: !include esphome-for-deye/modules/ups.yaml | ||
out-of-grid: !include esphome-for-deye/modules/out-of-grid.yaml | ||
|
||
# | ||
# Enable for grid-connected systems | ||
grid: !include esphome-for-deye/modules/grid.yaml | ||
external: !include esphome-for-deye/modules/external.yaml # External CTs Current/Power Measurement | ||
|
||
|
||
advanced: !include esphome-for-deye/modules/advanced_readwrite_select.yaml | ||
# Time of Use for Grid-Connected Systems | ||
time-of-use-common: !include esphome-for-deye/modules/time-of-use-common.yaml | ||
# Only Include ONE of these (select OR number) | ||
time-of-use-time-as-select: !include esphome-for-deye/modules/time-of-use-time-as-select.yaml | ||
#time-of-use-time-as-number: !include modules/time-of-use-time-as-number.yaml |
KastB marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
template: | ||
sensor: | ||
- name: "Netzanschluss Leistung" | ||
unit_of_measurement: "W" | ||
state: > | ||
{% set netz_deye = states('sensor.sun12k_external_ct_active_power_total') | float %} | ||
{% set ratio = states('number.sun12k_general_ct_ratio') | float %} | ||
|
||
{{ (netz_deye * 2000 / ratio) | round(1, default=0) }} | ||
device_class: power |
Uh oh!
There was an error while loading. Please reload this page.