Does your controller look like this? I don’t see the RS485 port.
Gotcha. What does the connector look like? Under the blue panel? The others have an RJ45 which is wired differently than a standard ethernet cable. You didn’t show that in your first picture. On mine, I don’t have a second green connector where you have the brown and blue wires. Rather, the ethernet cord is wired directly to the green connector you have on the left. But without knowing how you have that part of the connector crossed over from the controller, we can’t see the wiring.
Somewhere up the thread I think there’s a pinout for the RJ45 plug.
However you have that wired, you can check for voltage at the RJ45 plug on the EW11 end. The main thing is that the Elfin pinouts and Epever pinouts are definitely different, and you have to wire it accordingly.
I don’t have RJ45 on my Epever, just the terminal kind below
I also followed the instruction i got from EW11 manual
Try swapping the A and B RS485 wires, either where they connect to your device or on the EW11 terminal block. One is Transmit and one is Receive, so if they are connected backwards it won’t damage anything, but you won’t have communications.
The first thing I would do is check for voltage at the middle pins of the green connector on the EW11 dongle. If there’s voltage, it’s a problem on the EW11 half. If there’s no voltage there, it’s a problem on the controller half.
As @Dartx84 said, you can swap the A/B wires once you have power. But if the green light isn’t coming on yet, that won’t help.
I made some progress. After a number of tries I found that the first 2 wires are power and now my ew11 is powered and configured.
i configured in home assistant but i am getting below error. I have tried different data types but all give similar error.
Logger: homeassistant.components.modbus.validators
Source: components/modbus/validators.py:97
Integration: Modbus (documentation, issues)
First occurred: 6:02:50 pm (20 occurrences)
Last logged: 6:02:50 pm
Solar Battery Rated Current with uint is not valid, trying to convert
Solar Battery Rated Voltage with uint is not valid, trying to convert
Solar Battery Temperature with uint is not valid, trying to convert
Solar Battery Remaining Capacity with uint is not valid, trying to convert
Solar Battery Status with uint is not valid, trying to convert
here is my configuration.yaml
modbus:
- type: tcp
name: "ew11"
host: 192.168.5.249
port: 502
close_comm_on_error: false
timeout: 9
retry_on_empty: true
retries: 10
sensors:
#Solar Battery
- name: "Solar Battery Voltage"
address: 13082
data_type: uint
slave: 1
unit_of_measurement: V
input_type: input
scale: 0.01
precision: 3
scan_interval: 10
- name: "Solar Battery Amp Low"
address: 13083
slave: 1
data_type: uint
input_type: input
unit_of_measurement: A
scale: 0.01
precision: 3
scan_interval: 10
- name: "Solar Battery Amp High"
address: 13084
slave: 1
data_type: uint
input_type: input
unit_of_measurement: A
scale: 0.01
precision: 3
scan_interval: 10
- name: "Solar Battery Maximum Voltage Today"
address: 13058
data_type: uint
slave: 1
unit_of_measurement: V
input_type: input
scale: 0.01
precision: 3
scan_interval: 10
- name: "Solar Battery Minimum Voltage Today"
address: 13059
data_type: uint
slave: 1
unit_of_measurement: V
input_type: input
scale: 0.01
precision: 3
scan_interval: 10
- name: "Solar Battery Rated Current"
address: 12293
slave: 1
data_type: uint
input_type: input
unit_of_measurement: A
scale: 0.01
precision: 3
scan_interval: 10
- name: "Solar Battery Rated Voltage"
address: 12573
data_type: uint
slave: 1
unit_of_measurement: V
input_type: input
scale: 0.01
precision: 3
scan_interval: 10
- name: "Solar Battery Temperature"
address: 12560
slave: 1
data_type: uint
input_type: input
unit_of_measurement: °C
precision: 1
scale: 0.01
scan_interval: 10
- name: "Solar Battery Remaining Capacity"
address: 12570
slave: 1
data_type: uint
input_type: input
unit_of_measurement: '%'
scale: 0.01
precision: 3
scan_interval: 10
- name: "Solar Battery Status"
address: 12800
slave: 1
data_type: uint
input_type: input
scale: 0.01
precision: 3
scan_interval: 10
I am not sure what i am missing.
I have tried swapping the A and B RS485 wire but still not working.
Logger: homeassistant.components.modbus.modbus
Source: components/modbus/modbus.py:250
Integration: Modbus (documentation, issues)
First occurred: 11:31:01 AM (2 occurrences)
Last logged: 11:31:11 AM
Pymodbus: ew11: ew11 connect failed, retry in pymodbus
Pymodbus: ew11: Modbus Error: [Connection] Failed to connect[ModbusTcpClient(192.168.5.249:502)]
Logger: pymodbus.client.sync
Source: /usr/local/lib/python3.9/site-packages/pymodbus/client/sync.py:218
First occurred: 11:31:01 AM (11 occurrences)
Last logged: 11:31:51 AM
Connection to (192.168.5.249, 502) failed: [Errno 111] Connection refused
I found the issue with the “ew11 connect failed”. I was using port 501 instead of 502 so that is resolved but still unable to read data.
Logger: homeassistant.components.modbus.validators
Source: components/modbus/validators.py:97
Integration: Modbus (documentation, issues)
First occurred: 11:45:37 AM (4 occurrences)
Last logged: 11:45:37 AM
Solar Battery Remaining Capacity with uint is not valid, trying to convert
Solar Battery Status with uint is not valid, trying to convert
Latest Error
Logger: homeassistant.components.modbus.modbus
Source: components/modbus/modbus.py:250
Integration: Modbus (documentation, issues)
First occurred: 11:54:03 AM (1 occurrences)
Last logged: 11:54:03 AM
Pymodbus: ew11: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received)
HI, in developer tools, what value did you see?. I reckon the ‘register address’ for both value is different from my model.
In developer tools i only have Modbus: Write register
and Modbus: Write coil
Mine is unavailable. HA is not yet able to get response from the controller. I guess that is why it is unavailable. i am not sure why it is reporting [Invalid Message] No response received, expected at least 2 bytes (0 received)
I also use an EPEVER-Charge Controller
These are the serial standard-settings:
i think the problem lies with your sensor-configuration…
my Current-Sensor looks like this:
- name: "Sol2 Charging A"
unit_of_measurement: A
slave: 1
address: 13083
input_type: input
scale: 0.01
precision: 2
count: 2
swap: word
scan_interval: 120
int16 (2 Bytes) is the standard, but you need to read two bytes
Within the Sensor-Configuration the data-type is otherwise defined by how the read data is interpreted
- count … how many bytes you read
- swap … defines in what order the bytes are arranged
I made the suggested changes but still not working.
Config
sensors:
- name: "Battery Remaining Capacity"
address: 12570
slave: 1
data_type: uint16
input_type: input
unit_of_measurement: '%'
count: 2
swap: word
scale: 0.01
precision: 3
scan_interval: 10
Serial setting
Error Transaction failed. invalid message
2021-10-07 12:06:43 DEBUG (SyncWorker_0) [pymodbus.client.sync] Connection to Modbus server established. Socket ('192.168.5.74', 54443)
2021-10-07 12:06:43 WARNING (SyncWorker_0) [homeassistant.components.modbus.modbus] modbus ew11 communication open
2021-10-07 12:06:54 DEBUG (SyncWorker_5) [pymodbus.transaction] Current transaction state - IDLE
2021-10-07 12:06:54 DEBUG (SyncWorker_5) [pymodbus.transaction] Running transaction 1
2021-10-07 12:06:54 DEBUG (SyncWorker_5) [pymodbus.transaction] SEND: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x4 0x31 0x1a 0x0 0x2
2021-10-07 12:06:54 DEBUG (SyncWorker_5) [pymodbus.client.sync] New Transaction state 'SENDING'
2021-10-07 12:06:54 DEBUG (SyncWorker_5) [pymodbus.transaction] Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2021-10-07 12:07:03 DEBUG (SyncWorker_5) [pymodbus.transaction] Transaction failed. (Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received))
Try update elfin
But serial port frames should increase in both ways
Elfin is sending to device, but not receiving