Epever -> modbus -> esp32

Home Assistant, Arduino, SDS, Raspberry, Linux, vzdálený dohled, automatizace, měření, opensource, closedsource, hotová řešení, DIY, stavebnice, komponenty, software, postupy, návody, schémata, rady, zkušenosti ...
Migel
Příspěvky: 1454
Registrován: ned zář 25, 2022 10:47 am
Reputace: 168
Lokalita: Pod Karpatmi

Re: Epever -> modbus -> esp32

Nový příspěvek od Migel »

To neviem co znamena. ID mas jedno cislo bud 1, 2, 3, ...
JZ-2s5p 3,8kWp >> Epever 8415 AN
JV-2s3p 2,7kWp >> Epever 6415 AN
2x Victron MP2 5000V/A paralelne
48V 760Ah/35kWh Li-ion
a stále v štádiu budovania :repair: (rozširovania)
PetrDubi
Příspěvky: 1737
Registrován: úte říj 12, 2021 10:43 am
Reputace: 307
Lokalita: Blízko Ústí nad Labem
Systémové napětí: 48V
Výkon panelů [Wp]: 10790
Kapacita baterie [kWh]: 13
Chci prodávat energii: NE
Chci/Mám dotaci: NE

Re: Epever -> modbus -> esp32

Nový příspěvek od PetrDubi »

Pletou se ti tam dohromady různý věci.
Tady je stránka pro modbus:
https://esphome.io/components/modbus_controller.html

Tohle je nastavení portu, na který je připojený převodník na modbus

Kód: Vybrat vše

uart:
  id: mod_bus
  tx_pin: GPIOXX
  rx_pin: GPIOXX
  baud_rate: 115200
  stop_bits: 1

modbus:
  #flow_control_pin: GPIOXX
  send_wait_time: 200ms
  id: mod_bus_epever
Tady si nastavuješ konkrétní zařízení, se kterým komunikuješ - může jich být víc, pokud máš na stejné sběrnici máš víc zařízení.

Kód: Vybrat vše

modbus_controller:
  - id: epever
    ## the Modbus device addr
    address: 0x1
    modbus_id: mod_bus_epever
    command_throttle: 0ms
    setup_priority: -10
    update_interval: 10s
A potom si nastavíš jednotlivý senzory, které si tahají z toho zařízení nadefinovaného v modbus_controller informace

Kód: Vybrat vše

sensor:
  - platform: modbus_controller
    modbus_controller_id: epever
    id: array_rated_voltage
    name: "array_rated_voltage"
    address: 0x3000
    unit_of_measurement: "V"
    register_type: read
    value_type: U_WORD
    accuracy_decimals: 1
    filters:
      - multiply: 0.01
A všimni si, že tam jsou id, kdy na sebe postupně ty věci navazují - v první části je nadefinování kam je fyzicky modbus připojený, ve druhé máš nadefinovaný epever se svojí adresou a svým id a ve třetí je senzor, který se odvolává na id epeveru nadefinované ve druhé části. Těch senzorů a různých dalších hodnot můžeš mít ve třetí části mraky a všechny se odvolávají na zařízení, který jsi nadefinoval ve druhé části.
mobilní elektrárna 3x Uni-solar PVL-68 a Victron 75/15 MPPT
doma 3280 Wp JV, 3810 Wp JZ, 3690 Wp SZ, Easun SMW 8k (rebrandovaný MAX 8 kW), aku 13kWh 16s LiFePO4
PetrDubi
Příspěvky: 1737
Registrován: úte říj 12, 2021 10:43 am
Reputace: 307
Lokalita: Blízko Ústí nad Labem
Systémové napětí: 48V
Výkon panelů [Wp]: 10790
Kapacita baterie [kWh]: 13
Chci prodávat energii: NE
Chci/Mám dotaci: NE

Re: Epever -> modbus -> esp32

Nový příspěvek od PetrDubi »

Oprava:
Epever Modbus devices typically have an ID range of 1 to 247.
The default ID for most Epever solar charge controllers is 1.
The ID needs to be unique for each device on the Modbus network.
mobilní elektrárna 3x Uni-solar PVL-68 a Victron 75/15 MPPT
doma 3280 Wp JV, 3810 Wp JZ, 3690 Wp SZ, Easun SMW 8k (rebrandovaný MAX 8 kW), aku 13kWh 16s LiFePO4
Migel
Příspěvky: 1454
Registrován: ned zář 25, 2022 10:47 am
Reputace: 168
Lokalita: Pod Karpatmi

Re: Epever -> modbus -> esp32

Nový příspěvek od Migel »

Zeby z vyroby bolo take dlhe id sa mi nezda..vacsinou byva bud 1 alebo 2.Ale nic nieje nemozne..

Stym yaml si myslel ze ja mam nieco zle?..
JZ-2s5p 3,8kWp >> Epever 8415 AN
JV-2s3p 2,7kWp >> Epever 6415 AN
2x Victron MP2 5000V/A paralelne
48V 760Ah/35kWh Li-ion
a stále v štádiu budovania :repair: (rozširovania)
Forrest
Příspěvky: 156
Registrován: pát zář 09, 2022 1:42 pm
Reputace: 5
Lokalita: Ústeckoorlicko
Systémové napětí: 24V
Výkon panelů [Wp]: 900
Kapacita baterie [kWh]: 2,4
Chci prodávat energii: NE
Chci/Mám dotaci: NE
Bydliště: Č.T. Lhotka

Re: Epever -> modbus -> esp32

Nový příspěvek od Forrest »

ok, tak nějak chápu, jen to pospojit :-)... ty bloky vím jak navazujou.
pokud budou na jednom vláčku, tak co bude lepší? A navíc u toho druhýho nevím, jestli to schroustá modbus_controller: , protože tam ESP32 nemám, je tam klasická RS485/ETH. V prvním příkladu by mělo být funkční...

Kód: Vybrat vše

modbus:
  - name: epever
    type: rtuovertcp
    host: 192.168.10.34
    port: 503
    delay: 5
    timeout: 10

sensor:
  - platform: modbus
    scan_interval: 10
    registers:
      # První Epever (např. ID = 1)
      - name: "Battery Voltage Epever 1"
        hub: epever
        slave: 1
        address: 0x3104
        input_type: input
        data_type: uint16
        scale: 0.01
        unit_of_measurement: "V"

      # Druhý Epever (např. ID = 2)
      - name: "Battery Voltage Epever 2"
        hub: epever
        slave: 2
        address: 0x3104
        input_type: input
        data_type: uint16
        scale: 0.01
        unit_of_measurement: "V"
nebo

Kód: Vybrat vše


modbus:
  - id: mod_bus_epever
    type: rtuovertcp
    host: 192.168.10.34
    port: 503
    delay: 5ms
    timeout: 10s

modbus_controller:
  - id: epever1
    address: 0x01  # První regulátor
    modbus_id: mod_bus_epever
    command_throttle: 200ms
    setup_priority: -10

  - id: epever2
    address: 0x02  # Druhý regulátor
    modbus_id: mod_bus_epever
    command_throttle: 200ms
    setup_priority: -10

sensor:
  - platform: modbus_controller
    modbus_controller_id: epever1
    name: "Battery Voltage Regulator 1"
    id: battery_voltage_1
    address: 0x3104
    register_type: read
    value_type: U_WORD
    unit_of_measurement: "V"
    device_class: voltage
    state_class: measurement
    accuracy_decimals: 2
    filters:
      - multiply: 0.01

  - platform: modbus_controller
    modbus_controller_id: epever2
    name: "Battery Voltage Regulator 2"
    id: battery_voltage_2
    address: 0x3104
    register_type: read
    value_type: U_WORD
    unit_of_measurement: "V"
    device_class: voltage
    state_class: measurement
    accuracy_decimals: 2
    filters:
      - multiply: 0.01

Měnič China SAmoDoMo 1,5 kW a již 900Wp na rotátoru jménem "slunečnice"
Migel
Příspěvky: 1454
Registrován: ned zář 25, 2022 10:47 am
Reputace: 168
Lokalita: Pod Karpatmi

Re: Epever -> modbus -> esp32

Nový příspěvek od Migel »

Skor ten druhy ale malo by to byt jedno..
JZ-2s5p 3,8kWp >> Epever 8415 AN
JV-2s3p 2,7kWp >> Epever 6415 AN
2x Victron MP2 5000V/A paralelne
48V 760Ah/35kWh Li-ion
a stále v štádiu budovania :repair: (rozširovania)
PetrDubi
Příspěvky: 1737
Registrován: úte říj 12, 2021 10:43 am
Reputace: 307
Lokalita: Blízko Ústí nad Labem
Systémové napětí: 48V
Výkon panelů [Wp]: 10790
Kapacita baterie [kWh]: 13
Chci prodávat energii: NE
Chci/Mám dotaci: NE

Re: Epever -> modbus -> esp32

Nový příspěvek od PetrDubi »

Forrest:
To co jsem sem dával je yaml pro ESPhome (původně vlákno bylo o připojení přes ESP), pokud to připojuješ přímo do HA po síti přes převodník RTU/ETH, tak se ten zápis bude trošku lišit, protože HA to má v posledních verzích jinak:
https://www.home-assistant.io/integrations/modbus/

Tady je ukázka tý hlavičky pro tvůj převodník:

Kód: Vybrat vše

modbus:
  - name: modbus_hub
    type: rtuovertcp
    host: IP_ADDRESS
    port: 502
Tady ukázka více zařízení:

Kód: Vybrat vše

modbus:
  - name: modbus_hub
    type: tcp
    host: IP_ADDRESS_1
    port: 2020

  - name: modbus_hub2
    type: serial
    port: /dev/ttyUSB0
    baudrate: 9600
    bytesize: 8
    method: rtu
    parity: E
    stopbits: 1

A tady jedno zařízení s přiřazenýma senzorama:

Kód: Vybrat vše

modbus:
  - name: hub1
    type: tcp
    host: IP_ADDRESS
    port: 502
    sensors:
      - name: Sensor1
        unit_of_measurement: °C
        slave: 1
        address: 100
      - name: Sensor2
        unit_of_measurement: mg
        address: 110
        count: 2
      - name: Sensor3
        unit_of_measurement: °C
        slave: 1
        address: 120
        input_type: input
        data_type: float
        scale: 0.01
        offset: -273.16
        precision: 2
Ale tohle je modbus TCP a ten má jenom jednu adresu, pokud máš ten převodník, tak budeš muset asi u těch senzorů použít adresu jako u tvého příkladu dvě. Nemám s tím osobní zkušenosti, protože v HA používám jenom modbus TCP pro připojení do Siemens LOGO. Modbus RTU mám tahané přes ESP z TČ, ale tam je to všechno v ESPhome a do HA už jdou rovnou vyčtený hodnoty. Mám přes převodník modbus/eth připojený snímače dallas, ale ty vyčítám v tom LOGO a do HA mi jdou už jenom hodnoty přes modbus TCP, takže nevím, jak přesně se tohle řeší přímo v HA.
mobilní elektrárna 3x Uni-solar PVL-68 a Victron 75/15 MPPT
doma 3280 Wp JV, 3810 Wp JZ, 3690 Wp SZ, Easun SMW 8k (rebrandovaný MAX 8 kW), aku 13kWh 16s LiFePO4
skybor
Příspěvky: 1405
Registrován: pon dub 24, 2023 8:47 am
Reputace: 175
Lokalita: Lašská brána Beskyd
Systémové napětí: 48V
Výkon panelů [Wp]: 6kWp
Kapacita baterie [kWh]: 18kWh

Re: Epever -> modbus -> esp32

Nový příspěvek od skybor »

PetrDubi píše: pát kvě 23, 2025 11:00 am
Adresa modbus zařízení je číslo v rozsahu 0-65535, takže to může být i 62408

Kód: Vybrat vše

Epever Modbus devices typically have an ID range of 1 to 247. 
The default ID for most Epever solar charge controllers is 1. 
The ID needs to be unique for each device on the Modbus network. 
SkyFVE 6 kWp (ve výstavbě) na výzkumné "chytré" chatě. 4x MPPT Epever XTRA4415N 4x40A, 1x AC Charger WATE 42V/10A, Li-Ion 3x 12s 156Ah (18 kWh/44V), SkyPowerBox LF 4810 1kVA, Victron Atlas 48/1600, REVO VM II 5.5kW, APC SmartUPS 5kVA + PLC Siemens Logo! + Dell Optiplex 3040 Micro (Proxmox: HA, Node-RED, InfluxDB, Grafana, Mqtt, Zigbee2Mqtt, Samba, Tailscale)
PetrDubi
Příspěvky: 1737
Registrován: úte říj 12, 2021 10:43 am
Reputace: 307
Lokalita: Blízko Ústí nad Labem
Systémové napětí: 48V
Výkon panelů [Wp]: 10790
Kapacita baterie [kWh]: 13
Chci prodávat energii: NE
Chci/Mám dotaci: NE

Re: Epever -> modbus -> esp32

Nový příspěvek od PetrDubi »

Ano, máš pravdu. Dal jsem to rychle vyhledat na googlu a nevšiml jsem si, že to co mi našel je rozsah adres registrů v zařízení a ne adres zařízení na sběrnici (slave I'D).
Takže se omlouvám za mystifikaci ;)
mobilní elektrárna 3x Uni-solar PVL-68 a Victron 75/15 MPPT
doma 3280 Wp JV, 3810 Wp JZ, 3690 Wp SZ, Easun SMW 8k (rebrandovaný MAX 8 kW), aku 13kWh 16s LiFePO4
skybor
Příspěvky: 1405
Registrován: pon dub 24, 2023 8:47 am
Reputace: 175
Lokalita: Lašská brána Beskyd
Systémové napětí: 48V
Výkon panelů [Wp]: 6kWp
Kapacita baterie [kWh]: 18kWh

Re: Epever -> modbus -> esp32

Nový příspěvek od skybor »

Mám přes jeden ETH/RS485 převodník připojené čtyři Epever XTRA4415 a mám to takhle:
(přes modbus vyčítám ještě data z elektroměru a z Loga)

modbus.yaml

Kód: Vybrat vše

#modbus:


#EPEVER    
  - name: Epever
    type: tcp
    host: 10.0.0.90
    port: 502
    binary_sensors: !include modbus_epever_binary_sensors.yaml
    sensors: !include modbus_epever_sensors.yaml

#PRO380-MOD    
  - name: PRO380-MOD
    type: tcp
    host: 10.0.0.91
    port: 502
    sensors: !include modbus_pro380_sensors.yaml

#LOGO    
  - name: LOGO
    type: tcp
    host: 10.0.0.80
    port: 505
    binary_sensors: !include modbus_logo_binary_sensors.yaml
    sensors: !include modbus_logo_sensors.yaml
    switches: !include modbus_logo_switches.yaml
    lights: !include modbus_logo_lamps.yaml

modbus_epever_binary_sensors.yaml

Kód: Vybrat vše

#EPEVER binary sensors
      - name: PV1 Day/Night
        address: 8204
        input_type: discrete_input
        slave: 6
      - name: PV1 Over Temp
        address: 8192
        input_type: discrete_input
        slave: 6 
      - name: PV2 Day/Night
        address: 8204
        input_type: discrete_input
        slave: 7
      - name: PV2 Over Temp
        address: 8192
        input_type: discrete_input
        slave: 7 
      - name: PV3 Day/Night
        address: 8204
        input_type: discrete_input
        slave: 8
      - name: PV3 Over Temp
        address: 8192
        input_type: discrete_input
        slave: 8 
      - name: PV4 Day/Night
        address: 8204
        input_type: discrete_input
        slave: 9
      - name: PV4 Over Temp
        address: 8192
        input_type: discrete_input
        slave: 9 
modbus_epever_sensors.yaml

Kód: Vybrat vše

#EPEVER sensors
#EPEVER Controller PV1
#Rated Data
      - name: PV1 Charging Equipment Rated Input Voltage #0x003000
        unit_of_measurement: V
        slave: 6
        address: 12288
        input_type: input
        scale: 0.01
        precision: 1
        data_type: uint16
      - name: PV1 Array Input Voltage #0x003100
        unit_of_measurement: V
        slave: 6
        address: 12544
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV1 Array Input Current # 0x003101
        unit_of_measurement: A
        slave: 6
        address: 12545
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV1 Array Power # 3102 and 3103
        unit_of_measurement: W
        slave: 6
        address: 12546
        input_type: input
        scale: .01
        #count: 2
        precision: 2
        swap: word
        data_type: uint32
      - name: PV1 Battery Temperature #0x003110
        unit_of_measurement: °C
        slave: 6
        address: 12560
        input_type: input
        scale: 0.01
        precision: 2
        data_type: int16
      - name: PV1 Device Temperature #0x003111
        unit_of_measurement: °C
        slave: 6
        address: 12561
        input_type: input
        scale: 0.01
        precision: 2
        data_type: int16
      - name: PV1 Battery State of Charge #0x00311A
        unit_of_measurement: "%"
        slave: 6
        address: 12570
        input_type: input
        scale: 1
        precision: 0
        data_type: uint16
      - name: PV1 Battery Status #0x003200
        slave: 6
        address: 12800
        input_type: input
        scale: 1
        precision: 0
        data_type: uint16
        #######################################################################
        #D15: 1-Wrong identification for rated voltage
        #D8: Battery inner resistance, abnormal 1, normal 0
        #D7-D4: 00H Normal, 01H Over, Temp.(Higher than the warning settings) 02H Low Temp.(Lower than the warning settings),
        #D3-D0: 00H Normal ,01H Over Voltage. , 02H Under Voltage, 03H Over discharge, 04H Fault
        #Status analysis
        #Array status:address 3201 bits D15-D10
        #Charging status:address 3201 bits D3-D2
        #Battery status: address 3200 bits D7-D0
        #Load status: address 3201 bits D9-D7,
        #Device status: address 3200 bit D15 address 3202 bits D13-D8,D6-D4 address 3201 bits D6 address 2000
        ############################################################################################
      - name: PV1 Charging Equipment Status #0x003201
        slave: 6
        address: 12801
        input_type: input
        scale: 1
        precision: 0
        data_type: uint16
        #######################################################################
        #D15-D14: Input voltage status. 00H normal, 01H No input power connected, 02H Higher input voltage , 03H Input voltage error.
        #D13: Charging MOSFET is short circuit.
        #D12: Charging or Anti-reverse MOSFET is open circuit.
        #D11: Anti-reverse MOSFET is short circuit.
        #D10: Input is over current.
        #D9: The load is over current.
        #D8: The load is short circuit.
        #D7: Load MOSFET is short circuit.
        #D6:Disequilibrium in three circuits.A17
        #D4: PV input is short circuit.
        #D3-D2: Charging status. 00H No charging,01H Float,02H Boost, 03H Equalization.
        #D1: 0 Normal, 1 Fault.
        #D0: 1 Running, 0 Standby.
        #Status analysis
        #Array status:address 3201 bits D15-D10
        #Charging status:address 3201 bits D3-D2
        #Battery status: address 3200 bits D7-D0
        #Load status: address 3201 bits D9-D7,
        #Device status: address 3200 bit D15 address 3202 bits D13-D8,D6-D4 address 3201 bits D6 address 2000
        ############################################################################################
      - name: PV1 Maximum Battery Voltage Today #0x003302
        unit_of_measurement: V
        slave: 6
        address: 13058
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV1 Minimum Battery Voltage Today #0x003303
        unit_of_measurement: V
        slave: 6
        address: 13059
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV1 Generated Energy Today #0x00330C & 0D
        unit_of_measurement: kWh
        slave: 6
        address: 13068
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV1 Generated Energy This Month #0x00330E & 0F
        unit_of_measurement: kWh
        slave: 6
        address: 13070
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV1 Generated Energy This Year #0x003310 & 11
        unit_of_measurement: kWh
        slave: 6
        address: 13072
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV1 Total Generated Energy #0x003312 & 13
        unit_of_measurement: kWh
        slave: 6
        address: 13074
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV1 Battery Voltage #0x00331A
        unit_of_measurement: V
        slave: 6
        address: 13082
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV1 Battery Current #0x00331B & 1C
        unit_of_measurement: A
        slave: 6
        address: 13083
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
###############################################################################

#EPEVER Controller PV2
#Rated Data
      - name: PV2 Charging Equipment Rated Input Voltage #0x003000
        unit_of_measurement: V
        slave: 7
        address: 12288
        input_type: input
        scale: 0.01
        precision: 1
        data_type: uint16
      - name: PV2 Array Input Voltage #0x003100
        unit_of_measurement: V
        slave: 7
        address: 12544
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV2 Array Input Current # 0x003101
        unit_of_measurement: A
        slave: 7
        address: 12545
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV2 Array Power # 3102 and 3103
        unit_of_measurement: W
        slave: 7
        address: 12546
        input_type: input
        scale: .01
        #count: 2
        precision: 2
        swap: word
        data_type: uint32
      - name: PV2 Battery Temperature #0x003110
        unit_of_measurement: °C
        slave: 7
        address: 12560
        input_type: input
        scale: 0.01
        precision: 2
        data_type: int16
      - name: PV2 Device Temperature #0x003111
        unit_of_measurement: °C
        slave: 7
        address: 12561
        input_type: input
        scale: 0.01
        precision: 2
        data_type: int16
      - name: PV2 Battery State of Charge #0x00311A
        unit_of_measurement: "%"
        slave: 7
        address: 12570
        input_type: input
        scale: 1
        precision: 0
        data_type: uint16
      - name: PV2 Battery Status #0x003200
        slave: 7
        address: 12800
        input_type: input
        scale: 1
        precision: 0
        data_type: uint16
        #######################################################################
        #D15: 1-Wrong identification for rated voltage
        #D8: Battery inner resistance, abnormal 1, normal 0
        #D7-D4: 00H Normal, 01H Over, Temp.(Higher than the warning settings) 02H Low Temp.(Lower than the warning settings),
        #D3-D0: 00H Normal ,01H Over Voltage. , 02H Under Voltage, 03H Over discharge, 04H Fault
        #Status analysis
        #Array status:address 3201 bits D15-D10
        #Charging status:address 3201 bits D3-D2
        #Battery status: address 3200 bits D7-D0
        #Load status: address 3201 bits D9-D7,
        #Device status: address 3200 bit D15 address 3202 bits D13-D8,D6-D4 address 3201 bits D6 address 2000
        ############################################################################################
      - name: PV2 Charging Equipment Status #0x003201
        slave: 7
        address: 12801
        input_type: input
        scale: 1
        precision: 0
        data_type: uint16
        #######################################################################
        #D15-D14: Input voltage status. 00H normal, 01H No input power connected, 02H Higher input voltage , 03H Input voltage error.
        #D13: Charging MOSFET is short circuit.
        #D12: Charging or Anti-reverse MOSFET is open circuit.
        #D11: Anti-reverse MOSFET is short circuit.
        #D10: Input is over current.
        #D9: The load is over current.
        #D8: The load is short circuit.
        #D7: Load MOSFET is short circuit.
        #D6:Disequilibrium in three circuits.A17
        #D4: PV input is short circuit.
        #D3-D2: Charging status. 00H No charging,01H Float,02H Boost, 03H Equalization.
        #D1: 0 Normal, 1 Fault.
        #D0: 1 Running, 0 Standby.
        #Status analysis
        #Array status:address 3201 bits D15-D10
        #Charging status:address 3201 bits D3-D2
        #Battery status: address 3200 bits D7-D0
        #Load status: address 3201 bits D9-D7,
        #Device status: address 3200 bit D15 address 3202 bits D13-D8,D6-D4 address 3201 bits D6 address 2000
        ############################################################################################
      - name: PV2 Maximum Battery Voltage Today #0x003302
        unit_of_measurement: V
        slave: 7
        address: 13058
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV2 Minimum Battery Voltage Today #0x003303
        unit_of_measurement: V
        slave: 7
        address: 13059
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV2 Generated Energy Today #0x00330C & 0D
        unit_of_measurement: kWh
        slave: 7
        address: 13068
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV2 Generated Energy This Month #0x00330E & 0F
        unit_of_measurement: kWh
        slave: 7
        address: 13070
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV2 Generated Energy This Year #0x003310 & 11
        unit_of_measurement: kWh
        slave: 7
        address: 13072
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV2 Total Generated Energy #0x003312 & 13
        unit_of_measurement: kWh
        slave: 7
        address: 13074
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV2 Battery Voltage #0x00331A
        unit_of_measurement: V
        slave: 7
        address: 13082
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV2 Battery Current #0x00331B & 1C
        unit_of_measurement: A
        slave: 7
        address: 13083
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
###############################################################################

#EPEVER Controller PV3
#Rated Data
      - name: PV3 Charging Equipment Rated Input Voltage #0x003000
        unit_of_measurement: V
        slave: 8
        address: 12288
        input_type: input
        scale: 0.01
        precision: 1
        data_type: uint16
      - name: PV3 Array Input Voltage #0x003100
        unit_of_measurement: V
        slave: 8
        address: 12544
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV3 Array Input Current # 0x003101
        unit_of_measurement: A
        slave: 8
        address: 12545
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV3 Array Power # 3102 and 3103
        unit_of_measurement: W
        slave: 8
        address: 12546
        input_type: input
        scale: .01
        #count: 2
        precision: 2
        swap: word
        data_type: uint32
      - name: PV3 Battery Temperature #0x003110
        unit_of_measurement: °C
        slave: 8
        address: 12560
        input_type: input
        scale: 0.01
        precision: 2
        data_type: int16
      - name: PV3 Device Temperature #0x003111
        unit_of_measurement: °C
        slave: 8
        address: 12561
        input_type: input
        scale: 0.01
        precision: 2
        data_type: int16
      - name: PV3 Battery State of Charge #0x00311A
        unit_of_measurement: "%"
        slave: 8
        address: 12570
        input_type: input
        scale: 1
        precision: 0
        data_type: uint16
      - name: PV3 Battery Status #0x003200
        slave: 8
        address: 12800
        input_type: input
        scale: 1
        precision: 0
        data_type: uint16
        #######################################################################
        #D15: 1-Wrong identification for rated voltage
        #D8: Battery inner resistance, abnormal 1, normal 0
        #D7-D4: 00H Normal, 01H Over, Temp.(Higher than the warning settings) 02H Low Temp.(Lower than the warning settings),
        #D3-D0: 00H Normal ,01H Over Voltage. , 02H Under Voltage, 03H Over discharge, 04H Fault
        #Status analysis
        #Array status:address 3201 bits D15-D10
        #Charging status:address 3201 bits D3-D2
        #Battery status: address 3200 bits D7-D0
        #Load status: address 3201 bits D9-D7,
        #Device status: address 3200 bit D15 address 3202 bits D13-D8,D6-D4 address 3201 bits D6 address 2000
        ############################################################################################
      - name: PV3 Charging Equipment Status #0x003201
        slave: 8
        address: 12801
        input_type: input
        scale: 1
        precision: 0
        data_type: uint16
        #######################################################################
        #D15-D14: Input voltage status. 00H normal, 01H No input power connected, 02H Higher input voltage , 03H Input voltage error.
        #D13: Charging MOSFET is short circuit.
        #D12: Charging or Anti-reverse MOSFET is open circuit.
        #D11: Anti-reverse MOSFET is short circuit.
        #D10: Input is over current.
        #D9: The load is over current.
        #D8: The load is short circuit.
        #D7: Load MOSFET is short circuit.
        #D6:Disequilibrium in three circuits.A17
        #D4: PV input is short circuit.
        #D3-D2: Charging status. 00H No charging,01H Float,02H Boost, 03H Equalization.
        #D1: 0 Normal, 1 Fault.
        #D0: 1 Running, 0 Standby.
        #Status analysis
        #Array status:address 3201 bits D15-D10
        #Charging status:address 3201 bits D3-D2
        #Battery status: address 3200 bits D7-D0
        #Load status: address 3201 bits D9-D7,
        #Device status: address 3200 bit D15 address 3202 bits D13-D8,D6-D4 address 3201 bits D6 address 2000
        ############################################################################################
      - name: PV3 Maximum Battery Voltage Today #0x003302
        unit_of_measurement: V
        slave: 8
        address: 13058
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV3 Minimum Battery Voltage Today #0x003303
        unit_of_measurement: V
        slave: 8
        address: 13059
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV3 Generated Energy Today #0x00330C & 0D
        unit_of_measurement: kWh
        slave: 8
        address: 13068
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV3 Generated Energy This Month #0x00330E & 0F
        unit_of_measurement: kWh
        slave: 8
        address: 13070
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV3 Generated Energy This Year #0x003310 & 11
        unit_of_measurement: kWh
        slave: 8
        address: 13072
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV3 Total Generated Energy #0x003312 & 13
        unit_of_measurement: kWh
        slave: 8
        address: 13074
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV3 Battery Voltage #0x00331A
        unit_of_measurement: V
        slave: 8
        address: 13082
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV3 Battery Current #0x00331B & 1C
        unit_of_measurement: A
        slave: 8
        address: 13083
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
###############################################################################

#EPEVER Controller PV4
#Rated Data
      - name: PV4 Charging Equipment Rated Input Voltage #0x003000
        unit_of_measurement: V
        slave: 9
        address: 12288
        input_type: input
        scale: 0.01
        precision: 1
        data_type: uint16
      - name: PV4 Array Input Voltage #0x003100
        unit_of_measurement: V
        slave: 9
        address: 12544
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV4 Array Input Current # 0x003101
        unit_of_measurement: A
        slave: 9
        address: 12545
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV4 Array Power # 3102 and 3103
        unit_of_measurement: W
        slave: 9
        address: 12546
        input_type: input
        scale: .01
        #count: 2
        precision: 2
        swap: word
        data_type: uint32
      - name: PV4 Battery Temperature #0x003110
        unit_of_measurement: °C
        slave: 9
        address: 12560
        input_type: input
        scale: 0.01
        precision: 2
        data_type: int16
      - name: PV4 Device Temperature #0x003111
        unit_of_measurement: °C
        slave: 9
        address: 12561
        input_type: input
        scale: 0.01
        precision: 2
        data_type: int16
      - name: PV4 Battery State of Charge #0x00311A
        unit_of_measurement: "%"
        slave: 9
        address: 12570
        input_type: input
        scale: 1
        precision: 0
        data_type: uint16
      - name: PV4 Battery Status #0x003200
        slave: 9
        address: 12800
        input_type: input
        scale: 1
        precision: 0
        data_type: uint16
        #######################################################################
        #D15: 1-Wrong identification for rated voltage
        #D8: Battery inner resistance, abnormal 1, normal 0
        #D7-D4: 00H Normal, 01H Over, Temp.(Higher than the warning settings) 02H Low Temp.(Lower than the warning settings),
        #D3-D0: 00H Normal ,01H Over Voltage. , 02H Under Voltage, 03H Over discharge, 04H Fault
        #Status analysis
        #Array status:address 3201 bits D15-D10
        #Charging status:address 3201 bits D3-D2
        #Battery status: address 3200 bits D7-D0
        #Load status: address 3201 bits D9-D7,
        #Device status: address 3200 bit D15 address 3202 bits D13-D8,D6-D4 address 3201 bits D6 address 2000
        ############################################################################################
      - name: PV4 Charging Equipment Status #0x003201
        slave: 9
        address: 12801
        input_type: input
        scale: 1
        precision: 0
        data_type: uint16
        #######################################################################
        #D15-D14: Input voltage status. 00H normal, 01H No input power connected, 02H Higher input voltage , 03H Input voltage error.
        #D13: Charging MOSFET is short circuit.
        #D12: Charging or Anti-reverse MOSFET is open circuit.
        #D11: Anti-reverse MOSFET is short circuit.
        #D10: Input is over current.
        #D9: The load is over current.
        #D8: The load is short circuit.
        #D7: Load MOSFET is short circuit.
        #D6:Disequilibrium in three circuits.A17
        #D4: PV input is short circuit.
        #D3-D2: Charging status. 00H No charging,01H Float,02H Boost, 03H Equalization.
        #D1: 0 Normal, 1 Fault.
        #D0: 1 Running, 0 Standby.
        #Status analysis
        #Array status:address 3201 bits D15-D10
        #Charging status:address 3201 bits D3-D2
        #Battery status: address 3200 bits D7-D0
        #Load status: address 3201 bits D9-D7,
        #Device status: address 3200 bit D15 address 3202 bits D13-D8,D6-D4 address 3201 bits D6 address 2000
        ############################################################################################
      - name: PV4 Maximum Battery Voltage Today #0x003302
        unit_of_measurement: V
        slave: 9
        address: 13058
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV4 Minimum Battery Voltage Today #0x003303
        unit_of_measurement: V
        slave: 9
        address: 13059
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV4 Generated Energy Today #0x00330C & 0D
        unit_of_measurement: kWh
        slave: 9
        address: 13068
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV4 Generated Energy This Month #0x00330E & 0F
        unit_of_measurement: kWh
        slave: 9
        address: 13070
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV4 Generated Energy This Year #0x003310 & 11
        unit_of_measurement: kWh
        slave: 9
        address: 13072
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV4 Total Generated Energy #0x003312 & 13
        unit_of_measurement: kWh
        slave: 9
        address: 13074
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
      - name: PV4 Battery Voltage #0x00331A
        unit_of_measurement: V
        slave: 9
        address: 13082
        input_type: input
        scale: 0.01
        precision: 2
        data_type: uint16
      - name: PV4 Battery Current #0x00331B & 1C
        unit_of_measurement: A
        slave: 9
        address: 13083
        input_type: input
        scale: 0.01
        precision: 2
        #count: 2
        swap: word
        data_type: int32
###############################################################################
SkyFVE 6 kWp (ve výstavbě) na výzkumné "chytré" chatě. 4x MPPT Epever XTRA4415N 4x40A, 1x AC Charger WATE 42V/10A, Li-Ion 3x 12s 156Ah (18 kWh/44V), SkyPowerBox LF 4810 1kVA, Victron Atlas 48/1600, REVO VM II 5.5kW, APC SmartUPS 5kVA + PLC Siemens Logo! + Dell Optiplex 3040 Micro (Proxmox: HA, Node-RED, InfluxDB, Grafana, Mqtt, Zigbee2Mqtt, Samba, Tailscale)
Forrest
Příspěvky: 156
Registrován: pát zář 09, 2022 1:42 pm
Reputace: 5
Lokalita: Ústeckoorlicko
Systémové napětí: 24V
Výkon panelů [Wp]: 900
Kapacita baterie [kWh]: 2,4
Chci prodávat energii: NE
Chci/Mám dotaci: NE
Bydliště: Č.T. Lhotka

Re: Epever -> modbus -> esp32

Nový příspěvek od Forrest »

Tohle mi snad pomůže...Ale fakt pro blbý a koukám, na možnosti:
v adresáři homeassistant (tam kde je configuration.yaml) musím vytvořit modbus.yaml, kterej bude vypadat takhle:

Kód: Vybrat vše

modbus:
  - name: epever
    type: rtuovertcp
    host: 192.168.10.34
    port: 503
    delay: 5
    timeout: 10
    binary_sensors: !include epever_binary_sensors.yaml #sem napsat všechno co má binary_sensors
    sensors: !include epever_sensors.yaml #sem napsat všechno co má sensors
    switches: !include epever_switches.yaml #sem napsat všechno co má switches
    
Tím si oddělím "modbus". A zároveň v tom souboru směruju na to, co a odkud si má vzít - chápu to dobře?

A v configuration.yaml to bude vypadat jak?
Měnič China SAmoDoMo 1,5 kW a již 900Wp na rotátoru jménem "slunečnice"
Forrest
Příspěvky: 156
Registrován: pát zář 09, 2022 1:42 pm
Reputace: 5
Lokalita: Ústeckoorlicko
Systémové napětí: 24V
Výkon panelů [Wp]: 900
Kapacita baterie [kWh]: 2,4
Chci prodávat energii: NE
Chci/Mám dotaci: NE
Bydliště: Č.T. Lhotka

Re: Epever -> modbus -> esp32

Nový příspěvek od Forrest »

Tak už se mi to povedlo. Díky za poskytnutí yaml. Tady v tom posledním kódu je chybně modbus: .. pak v zápisu configuration.yaml jsem přidal modbus: !include modbus.yaml a pak po restartu vše OK!
Měnič China SAmoDoMo 1,5 kW a již 900Wp na rotátoru jménem "slunečnice"
Forrest
Příspěvky: 156
Registrován: pát zář 09, 2022 1:42 pm
Reputace: 5
Lokalita: Ústeckoorlicko
Systémové napětí: 24V
Výkon panelů [Wp]: 900
Kapacita baterie [kWh]: 2,4
Chci prodávat energii: NE
Chci/Mám dotaci: NE
Bydliště: Č.T. Lhotka

Re: Epever -> modbus -> esp32

Nový příspěvek od Forrest »

Migel píše: čtv kvě 08, 2025 6:40 pm
z prveho regulatora som pouzil pin4 ,pin6 na konektore rj45 a zapojil do max485 na svorky A a B.
Tadyk mám dotaz: všude se uvádí, že RJ45 ze zapojena dle obrázku... Ale, u většiny popisů je psáno, připojte na č.4 a č.6 nebo na č.3 a č.5 ... je to spojený? neměřil to někdo? Dělám si redukci, 3 a 4 mám na jeden vývod, 5 a 6 na druhý. Doufám, že to nemá fullduplex :-)
Přílohy
Obrázek1.png
Obrázek1.png (13.78 KiB) Zobrazeno 119 x
Měnič China SAmoDoMo 1,5 kW a již 900Wp na rotátoru jménem "slunečnice"
Migel
Příspěvky: 1454
Registrován: ned zář 25, 2022 10:47 am
Reputace: 168
Lokalita: Pod Karpatmi

Re: Epever -> modbus -> esp32

Nový příspěvek od Migel »

Ano je to spojene. No tiez mam zapojeny len jeden pin z kazdeho nemam ich spojene
JZ-2s5p 3,8kWp >> Epever 8415 AN
JV-2s3p 2,7kWp >> Epever 6415 AN
2x Victron MP2 5000V/A paralelne
48V 760Ah/35kWh Li-ion
a stále v štádiu budovania :repair: (rozširovania)
Uživatelský avatar
TomHC
Příspěvky: 2590
Registrován: pát lis 11, 2022 8:14 am
Reputace: 429
Lokalita: Hlohovec, SR
Systémové napětí: 48V
Výkon panelů [Wp]: 8820
Kapacita baterie [kWh]: 30
Chci prodávat energii: NE
Chci/Mám dotaci: NE
Bydliště: Hlohovec, SR

Re: Epever -> modbus -> esp32

Nový příspěvek od TomHC »

Ono sa to používa na daisy chain zapojenie viacero zariadení, aby si nemusel dávať dva vodiče do jedného terminálu.
Přílohy
daisy-chain-rs485-1-8469e98594a570bbec07609b6c6a6fcc.png
2x MUST PH1800 5.5kW, 9kWp V+J+Z, 600 Ah LiFePO4 s BMS JBD 200A, SW: Home Assistant na Synology DS923+ ku tomu ESPHome, Tasmota, MariaDB, InfluxDB, Telegraf, Grafana, Zigbee2MQTT..., HW: ESPlan (ESP32 + LAN 8720 + RS485). Nejaké moje projekty: MUST-ESPhome, ELTEK Flatpack2 ESPhome, ESP32-EMON, PZEM-017@WiFi, diyBMS-CurrentShunt-ESPhome 01/2023 -> 05/2025 = 11.4 MWh AC
Forrest
Příspěvky: 156
Registrován: pát zář 09, 2022 1:42 pm
Reputace: 5
Lokalita: Ústeckoorlicko
Systémové napětí: 24V
Výkon panelů [Wp]: 900
Kapacita baterie [kWh]: 2,4
Chci prodávat energii: NE
Chci/Mám dotaci: NE
Bydliště: Č.T. Lhotka

Re: Epever -> modbus -> esp32

Nový příspěvek od Forrest »

Jako jo, to je pochopitelný.. jen mám nějaký blok s tím groundováním...Na RS458 se GND fakt nikdy netahala. Příjde mi to kontraproduktivní :-)
Měnič China SAmoDoMo 1,5 kW a již 900Wp na rotátoru jménem "slunečnice"
Uživatelský avatar
TomHC
Příspěvky: 2590
Registrován: pát lis 11, 2022 8:14 am
Reputace: 429
Lokalita: Hlohovec, SR
Systémové napětí: 48V
Výkon panelů [Wp]: 8820
Kapacita baterie [kWh]: 30
Chci prodávat energii: NE
Chci/Mám dotaci: NE
Bydliště: Hlohovec, SR

Re: Epever -> modbus -> esp32

Nový příspěvek od TomHC »

2x MUST PH1800 5.5kW, 9kWp V+J+Z, 600 Ah LiFePO4 s BMS JBD 200A, SW: Home Assistant na Synology DS923+ ku tomu ESPHome, Tasmota, MariaDB, InfluxDB, Telegraf, Grafana, Zigbee2MQTT..., HW: ESPlan (ESP32 + LAN 8720 + RS485). Nejaké moje projekty: MUST-ESPhome, ELTEK Flatpack2 ESPhome, ESP32-EMON, PZEM-017@WiFi, diyBMS-CurrentShunt-ESPhome 01/2023 -> 05/2025 = 11.4 MWh AC
Forrest
Příspěvky: 156
Registrován: pát zář 09, 2022 1:42 pm
Reputace: 5
Lokalita: Ústeckoorlicko
Systémové napětí: 24V
Výkon panelů [Wp]: 900
Kapacita baterie [kWh]: 2,4
Chci prodávat energii: NE
Chci/Mám dotaci: NE
Bydliště: Č.T. Lhotka

Re: Epever -> modbus -> esp32

Nový příspěvek od Forrest »

Jo, tojo, došlo později :-) Jsem do toho měl zamotaný ještě galvanický oddělení RS485
Měnič China SAmoDoMo 1,5 kW a již 900Wp na rotátoru jménem "slunečnice"

Kdo je online

Uživatelé prohlížející si toto fórum: Claudebot [Bot] a 1 host