FVE s podporou z DS

rva
Příspěvky: 4527
Registrován: úte dub 23, 2013 10:21 am
Reputace: 824
Lokalita: Kousek od Lysé nad Labem
Systémové napětí: 48V
Výkon panelů [Wp]: 46000
Kapacita baterie [kWh]: 40
Chci prodávat energii: NE
Chci/Mám dotaci: NE
Bydliště: Kousek od Lysé nad Labem

Re: FVE s podporou z DS

Nový příspěvek od rva »

U elektromobilu chci vyšší dobíjecí proudy z fv elektrárny - počítám s regulací do nějakých 32A (až vyměním současný jistič 25 A) dle:
1. kolik okamžité energie z FV panelů je k dispozici
2. kolik je k dispozici volného výkonu měničů
3. abych netrápil baterie vysokým vybíjecím proudem.
Čínský "wallbox" je integrovaný v HomeAssistant přes tuya (mám ho přes tuya local, takže nepotřebuje cloud) a umožňuje za dobíjení měnit proud. Ne teda z jedné hodnoty přímo na druhou, ale když nastavím jiný proud, tak na chvíli přestane dobíjet a pak začne na nové hodnotě proudu. Zvažuji jestli v automatizaci pak nesledovat i napětí na wallboxu. Pro detekci případného uvolněného kontaktu a vypnutí dobíjení než někde začnou sršet jiskry.
Přílohy
2025-10-25 Dobíjení elektromobilu.png
2025-10-25 AFYEEV 7.2kW 1f 32A.png
_______________________________________________________________________
43 kWp, LiFePO4 62 kWh,
EPSolar 60 A/150 V ET6415N + 3x Isolar SM II (5 kW, 450 V, 80 A) + Axpert PIP 5048MS
glottis
Příspěvky: 3246
Registrován: stř úno 02, 2022 10:30 am
Reputace: 394
Lokalita: okolí Mělníka
Systémové napětí: 48V
Výkon panelů [Wp]: 13000
Kapacita baterie [kWh]: 15

Re: FVE s podporou z DS

Nový příspěvek od glottis »

Podívej se na soft evcc. Umí to milion wallboxu a truhle logiku, aby to něco nepresvihlo nebo vymezovalo to má. Do ha pak jde napojit přímo evcc
rva
Příspěvky: 4527
Registrován: úte dub 23, 2013 10:21 am
Reputace: 824
Lokalita: Kousek od Lysé nad Labem
Systémové napětí: 48V
Výkon panelů [Wp]: 46000
Kapacita baterie [kWh]: 40
Chci prodávat energii: NE
Chci/Mám dotaci: NE
Bydliště: Kousek od Lysé nad Labem

Re: FVE s podporou z DS

Nový příspěvek od rva »

Díval jsem se na to. Výrobce wallboxu který mám jsem tam nenašel, třeba je to kompatibilní s nějakým jiným. Ale i tak jsem usoudil, že když mám HA, tak raději budu realizovat maximum v něm a když to půjde, tak nebudu instalovat další software okolo. Tuya zařízení nepreferuji, ale je pod nimi snad nejvíc věcí a cenově jsou atraktivní. Pro věci, kterých funkčnost je pro elektrárnu zásadní, dám přednost třeba Shelly.
_______________________________________________________________________
43 kWp, LiFePO4 62 kWh,
EPSolar 60 A/150 V ET6415N + 3x Isolar SM II (5 kW, 450 V, 80 A) + Axpert PIP 5048MS
rva
Příspěvky: 4527
Registrován: úte dub 23, 2013 10:21 am
Reputace: 824
Lokalita: Kousek od Lysé nad Labem
Systémové napětí: 48V
Výkon panelů [Wp]: 46000
Kapacita baterie [kWh]: 40
Chci prodávat energii: NE
Chci/Mám dotaci: NE
Bydliště: Kousek od Lysé nad Labem

Re: FVE s podporou z DS

Nový příspěvek od rva »

Pár FV panelů je připojených na mppt regulátor EASUN 48100 (100A) a tak jsem doplnil sběr dat do HA pomocí převodníku RS485/TTL na esp32_C3. Na RS485 už ani nedávají konektor, tak se musí pájet. esp32_C3 mám s displejem, tak na něm rotují základní hodnoty.

Kód: Vybrat vše

substitutions:
  name: esp32-c3-easun
  friendly_name: esp32-c3-EASUN
  device_description: "Komunikace s mppt regulátorem EASUN - převodník RS485/TTL + displej SSD1306 na modulu esp32"
  updates: 10s
  tx_pin: GPIO20
  rx_pin: GPIO21

esphome:
  name: ${name}
  friendly_name: ${friendly_name}
  comment: ${device_description}
  min_version: 2024.6.0
  name_add_mac_suffix: false
  project:
    name: esphome.web
    version: '1.0'

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: esp-idf

# Enable logging
logger:
# level: INFO
  baud_rate: 0  

# Enable Home Assistant API
api:
  encryption:
    key: "xxxx"

ota:
  - platform: esphome
    password: "xxxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
# Optional manual IP
#  manual_ip:
#    static_ip: 192.168.0.76
#    gateway: 192.168.0.1
#    subnet: 255.255.255.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32-C3-Easun"
    password: "xxxx"
# V HA se pak k položkám "edit" a "logs" objeví položka "visit", kde se po kliknutí otevře stránka esphome daného zařízení
web_server:
 port: 80

captive_portal:

i2c:
   - id: bus_a
     sda: GPIO5
     scl: GPIO6
     scan: true
 #  - id: bus_b
 #    sda: GPIOXX
 #    scl: GPIOXX
 #    scan: true

# Nadefinování několika fontů, ze kterých si budu vybírat pro zobrazení na displeji
font:
  - file: "gfonts://Roboto"
    id: font1
    size: 16

  - file: "gfonts://Material+Symbols+Outlined"
    id: font2
    size: 12

  - file: "gfonts://Material+Symbols+Outlined"
    id: font3
    size: 16

  - file: "gfonts://Material+Symbols+Outlined"
    id: font4
    size: 32

time:
  - platform: homeassistant
    id: esptime 

uart:
- id: modbus_serial_port
  tx_pin: ${tx_pin}
  rx_pin: ${rx_pin}
  baud_rate: 9600
  stop_bits: 1

modbus:
#flow_control_pin: GPIO2
#send_wait_time: 200ms
  id: mod_bus_easun2
  uart_id: modbus_serial_port
  send_wait_time:
    milliseconds: 200

modbus_controller:
- id: easun2
  address: 0x1
  modbus_id: mod_bus_easun2
  command_throttle: 200ms
  setup_priority: -10
  update_interval: ${updates}

sensor:
  - platform: modbus_controller
    modbus_controller_id: easun2
    id: easun2_battery_voltage
    name: "easun2_Battery voltage"
    custom_command: [0x1,0x3,0x01,0x02,0x00,0x01]
    unit_of_measurement: "V"
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: easun2
    id: easun2_charging_current
    name: "easun2_Charging current"
    custom_command: [0x1,0x3,0x01,0x03,0x00,0x01]
    unit_of_measurement: "A"
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.01
  - platform: modbus_controller
    modbus_controller_id: easun2
    id: easun2_charging_power
    name: "easun2_Charging power"
    custom_command: [0x1,0x3,0x01,0x04,0x00,0x01]
    unit_of_measurement: "W"
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: easun2
    id: easun2_actual_temperature
    name: "easun2_Actual temperature"
    custom_command: [0x1,0x3,0x01,0x05,0x00,0x01]
    unit_of_measurement: "°C"
    value_type: U_WORD
    bitmask: 0xFF00
  - platform: modbus_controller
    modbus_controller_id: easun2
    id: easun2_pv_input_voltage
    name: "easun2_PV array input voltage"
    custom_command: [0x1,0x3,0x01,0x09,0x00,0x01]
    unit_of_measurement: "V"
    value_type: U_WORD
    accuracy_decimals: 2
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: easun2
    id: easun2_max_day_power
    name: "easun2_Maximum day power"
    custom_command: [0x1,0x3,0x01,0x0A,0x00,0x01]
    unit_of_measurement: "W"
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: easun2
    id: easun2_power_day_generation
    name: "easun2_Power day generation"
    custom_command: [0x1,0x3,0x01,0x0B,0x00,0x01]
    unit_of_measurement: "Wh"
    state_class: "total_increasing"
    device_class: "energy"
    value_type: U_WORD
    accuracy_decimals: 2
  - platform: modbus_controller
    modbus_controller_id: easun2
    id: easun2_power_day_consumption
    name: "easun2_Power day consumption"
    custom_command: [0x1,0x3,0x01,0x0C,0x00,0x01]
    unit_of_measurement: "Wh"
    state_class: "total_increasing"
    device_class: "energy"
    value_type: U_WORD
    accuracy_decimals: 2
  - platform: modbus_controller
    modbus_controller_id: easun2
    id: easun2_charging_status_number
    name: "easun2_Charging status number"
    custom_command: [0x1,0x3,0x01,0x0D,0x00,0x01]
    value_type: U_WORD
    bitmask: 0x00FF
    on_value:
      - if:
          condition:
            lambda: 'return id(easun2_charging_status_number).state == 0;'
          then:
            - text_sensor.template.publish:
                id: easun2_charging_status_text
                state: "No charge"
      - if:
          condition:
            lambda: 'return id(easun2_charging_status_number).state == 1;'
          then:
            - text_sensor.template.publish:
                id: easun2_charging_status_text
                state: "Open charge mode"
      - if:
          condition:
            lambda: 'return id(easun2_charging_status_number).state == 2;'
          then:
            - text_sensor.template.publish:
                id: easun2_charging_status_text
                state: "MPPT charge mode"
      - if:
          condition:
            lambda: 'return id(easun2_charging_status_number).state == 3;'
          then:
            - text_sensor.template.publish:
                id: easun2_charging_status_text
                state: "Equalizing charge mode"
      - if:
          condition:
            lambda: 'return id(easun2_charging_status_number).state == 4;'
          then:
            - text_sensor.template.publish:
                id: easun2_charging_status_text
                state: "Boost charge mode"
      - if:
          condition:
            lambda: 'return id(easun2_charging_status_number).state == 5;'
          then:
            - text_sensor.template.publish:
                id: easun2_charging_status_text
                state: "Float charge mode"
      - if:
          condition:
            lambda: 'return id(easun2_charging_status_number).state == 6;'
          then:
            - text_sensor.template.publish:
                id: easun2_charging_status_text
                state: "Current limit!!!"

  - platform: modbus_controller
    modbus_controller_id: easun2
    name: "easun2_Alarm information"
    id: easun2_alarm_information
    custom_command: [0x1,0x3,0x01,0x0E,0x00,0x01]
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: easun2
    name: "easun2_Total running days"
    id: easun2_total_running_days
    custom_command: [0x1,0x3,0x01,0x0F,0x00,0x01]
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: easun2
    id: easun2_cumulative_power_generation
    name: "easun2_Cumulative power generation"
    custom_command: [0x1,0x3,0x01,0x10,0x00,0x02]
    unit_of_measurement: "kWh"
    state_class: "total_increasing"
    device_class: "energy"
    value_type: U_DWORD
  - platform: modbus_controller
    modbus_controller_id: easun2
    id: easun2_cumulative_power_consumption
    name: "easun2_Cumulative power consumption"
    custom_command: [0x1,0x3,0x01,0x12,0x00,0x02]
    unit_of_measurement: "Wh"
    state_class: "total_increasing"
    device_class: "energy"
    value_type: U_DWORD

binary_sensor:
  - platform: template
    id: easun2_alarm_batt_h_odrv
    name: "easun2_Alarm Batt Vol higher than ODRV"
    entity_category: diagnostic
    lambda: |-
      uint16_t alarm = id(easun2_alarm_information).state;
      if (alarm & 0x0001) {  // místo bitRead(alarm, 0)
        return true;
      } else {
        return false;
      }
  - platform: template
    id: easun2_alarm_batt_s_odrv
    name: "easun2_Alarm Batt Vol smaller than ODRV"
    entity_category: diagnostic
    lambda: |-
      uint16_t alarm = id(easun2_alarm_information).state;
      if (alarm & 0x0002) {
        return true;
      } else {
        return false;
      }
  - platform: template
    id: easun2_alarm_batt_h_arv
    name: "easun2_Alarm Batt higher than ARV"
    entity_category: diagnostic
    lambda: |-
      uint16_t alarm = id(easun2_alarm_information).state;
      if (alarm & 0x0004) {
        return true;
      } else {
        return false;
      }
  - platform: template
    id: easun2_alarm_long_press_load_btn
    name: "easun2_Alarm Long press load btn"
    entity_category: diagnostic
    lambda: |-
      uint16_t alarm = id(easun2_alarm_information).state;
      if (alarm & 0x0008) {
        return true;
      } else {
        return false;
      }
  - platform: template
    id: easun2_alarm_lower_load_pwr
    name: "easun2_Alarm Lover load power"
    entity_category: diagnostic
    lambda: |-
      uint16_t alarm = id(easun2_alarm_information).state;
      if (alarm & 0x0010) {
        return true;
      } else {
        return false;
      }
  - platform: template
    id: easun2_alarm_ctrl_tmp_lo_to_ot_ret_val
    name: "easun2_Alarm Controller temp lowed to OT ret val"
    entity_category: diagnostic
    lambda: |-
      uint16_t alarm = id(easun2_alarm_information).state;
      if (alarm & 0x0020) {
        return true;
      } else {
        return false;
      }
  - platform: template
    id: easun2_alarm_amb_tmp_lo_to_ot_ret_val
    name: "easun2_Alarm Ambient temp lowed to OT ret val"
    entity_category: diagnostic
    lambda: |-
      uint16_t alarm = id(easun2_alarm_information).state;
      if (alarm & 0x0040) {
        return true;
      } else {
        return false;
      }
  - platform: template
    id: easun2_alarm_pwr_lo_to_ret_val
    name: "easun2_Alarm Power lowed to return value"
    entity_category: diagnostic
    lambda: |-
      uint16_t alarm = id(easun2_alarm_information).state;
      if (alarm & 0x0080) {
        return true;
      } else {
        return false;
      }
  - platform: template
    id: easun2_alarm_timing
    name: "easun2_Alarm Timing"
    entity_category: diagnostic
    lambda: |-
      uint16_t alarm = id(easun2_alarm_information).state;
      if (alarm & 0x0100) {
        return true;
      } else {
        return false;
      }
  - platform: template
    id: easun2_alarm_batt_lo_to_ret_val
    name: "easun2_Alarm Batt lowed to OV return value"
    entity_category: diagnostic
    lambda: |-
      uint16_t alarm = id(easun2_alarm_information).state;
      if (alarm & 0x0200) {
        return true;
      } else {
        return false;
      }
  - platform: template
    id: easun2_alarm_pv_rev_pol
    name: "easun2_Alarm PV reversed polarity"
    entity_category: diagnostic
    lambda: |-
      uint16_t alarm = id(easun2_alarm_information).state;
      if (alarm & 0x1000) {
        return true;
      } else {
        return false;
      }
  - platform: template
    id: easun2_alarm_batt_rev_pol
    name: "easun2_Alarm Batt reversed polarity"
    entity_category: diagnostic
    lambda: |-
      uint16_t alarm = id(easun2_alarm_information).state;
      if (alarm & 0x2000) {
        return true;
      } else {
        return false;
      }
  

text_sensor:
  - platform: template
    name: "easun2_Charging status text"
    id: easun2_charging_status_text

button:
  - platform: restart
    name: "easun2_ESP_Restart"





display:
  - platform: ssd1306_i2c
    i2c_id: bus_a
    model: "SSD1306 72x40"
    #reset_pin: D2
    address: 0x3C
#za lambda se píše kód přímo v C. V tomto případě se na displeji střídá několik hodnot (čas, teplota, tlak, vlhkost)
    lambda: |-
          switch (id(page))
            {
            case 1:
              it.strftime(5, 12, id(font1), TextAlign::BASELINE_LEFT, "%H:%M", id(esptime).now());
              break;
            case 2:
              if (id(easun2_charging_power).has_state()) 
                {
                it.printf(5, 16, id(font1), TextAlign::BASELINE_LEFT , "%.0fW", id(easun2_charging_power).state);
                }
              break;
            case 3:
              if (id(easun2_pv_input_voltage).has_state()) 
                {
                it.printf(5, 20, id(font1), TextAlign::BASELINE_LEFT , "%.0fV FV", id(easun2_pv_input_voltage).state);      
                }
              break;
            case 4:
              if (id(easun2_charging_current).has_state()) 
                {
                it.printf(5, 24, id(font1), TextAlign::BASELINE_LEFT , "%.1fA", id(easun2_charging_current).state);      
                }
              break;
            case 5:
              if (id(easun2_power_day_generation).has_state()) 
                {
                it.printf(5, 24, id(font1), TextAlign::BASELINE_LEFT , "%.0fWh", id(easun2_power_day_generation).state);      
                }
              break;  
          }

globals:
- id: page
  type: int
  initial_value: "1"

# cyklus zajišťující v 2s intervalech zobrazení jednotlivých hodnot
interval:
- interval: 2s
  then:
    - lambda: |-
        id(page) = (id(page) + 1);
        if (id(page) > 5) {
          id(page) = 1;
        }
    
    
Přílohy
EASUN v HA.png
EASUN - espHome (4).jpg
_______________________________________________________________________
43 kWp, LiFePO4 62 kWh,
EPSolar 60 A/150 V ET6415N + 3x Isolar SM II (5 kW, 450 V, 80 A) + Axpert PIP 5048MS

Kdo je online

Uživatelé prohlížející si toto fórum: Claudebot [Bot], Google [Bot], Semrush [Bot] a 0 hostů