3

I've never used modbus before.

I have an eBox-Wifi Epever connected to an MPPT charge controller TRIRON for solar power.

I was able to make it connect to my wifi and now has an accessible IP : 192.168.39.149

I just want to extract some data from it, battery Voltage, etc...

On http://192.168.39.149:80, i have a web interface for administration. (Which is not what i want.)

After an nmap, I see that there is port 8088 open. (Can use modbus there maybe ? no web interface on this port.)

I installed and used modbus_cli like that modbus -b 115200 -p 1 192.168.39.149:8088 3101 but I can't make it return anything...

https://files.i4wifi.cz/inc/_doc/attach/StoItem/7068/MODBUS-Protocol-v25.pdf

http://www.solar-elektro.cz/data/dokumenty/1733_modbus_protocol.pdf

https://github.com/favalex/modbus-cli

EDIT : I changed for baud 9600 and port 502. (Which are the defaults for modbus ?) enter image description here

bob dylan
  • 989
  • 2
  • 10
  • 26
  • I use EPEVER controllers but have avoided these WIFI units because the docs ([manual](https://www.epever.com/wp-content/uploads/2021/11/eBox-WIFI-01-Manual-EN-V2.0.pdf), [datasheet](https://www.epever.com/product/ebox-wifi-01-wifi-serial-server/)) make no mention of Modbus support. I'd suggest [asking EPEVER](https://www.epever.com/contact/) directly. – Brits Dec 20 '21 at 20:13
  • @Brits Are you using something like a "Epever CC-USB-RS485-150U" usb/rj45 cable instead ? I really need to find a way to extract raw data with rpi from my MPPT. – bob dylan Dec 21 '21 at 07:57
  • We wire our own cables; mainly deploy tracer3215bn units which appear to have the same rs485 connector as the Triton units. Have not tried this with a pi but an rs485 hat should work (I suspect the epever cables will also be ok). – Brits Dec 21 '21 at 09:05
  • @Brits I have seen some code with IP and this 8088 port like here : https://github.com/gabrielpc1190/Home-Assistant_EPEver-eBox-Wifi-01-MODBUS But I'm not using home assistant, i just want to send a request from command line. Don't know how to use Modbus :( – bob dylan Dec 21 '21 at 12:45
  • I saw that too - it's important to note that it appears to be using Modbus RTU over TCP (which differs from Modbus TCP). However the example seems somewhat incomplete and there is no real documentation. I'd suggest asking Epever, I've found their support team to be pretty good. – Brits Dec 21 '21 at 21:32
  • Note that the baud rate relates to communication between the eBox-WIFI and the controller - the EPEVER units I work with all use 115200 (there is an option to change this but it does not work!). If you can communicate with the unit using the EPEVER Android app then the baud rate is set correctly. – Brits Dec 27 '21 at 23:40

3 Answers3

1

Try python modpoll tool with the following configuration, install modpoll via pip install modpoll if not installed.

  • Create a local config file, e.g. epever.csv, only added voltage/current/power values for testing.

    device,mydevice,1,,,
    poll,holding_register,12544,4,BE_LE,
    ref,PV_array_input_voltage,12544,uint16,r,V,0.01
    ref,PV_array_input_current,12545,uint16,r,A,0.01
    ref,PV_array_input_power,12546,uint32,r,W,0.01
    
  • poll local device,

    modpoll --tcp 192.168.39.149 --tcp-port 8088 --config epever.csv
    

The configuration assumes you keep the device ID = 1 (default), and use BE_LE endian, please adjust endian setting according to the platform running on.

balun
  • 1,191
  • 1
  • 7
  • 12
  • I just have an error : `2021-12-26 20:41:05,832 | I | modpoll.main | ====== modpoll polling at rate:5.0s, actual:5.0s ====== 2021-12-26 20:41:09,369 | E | modpoll.modbus_task | Reading device:mydevice, FuncCode:3, Start_address:12544, Size:4... ERROR ===== references from device: mydevice ===== failed to poll device: mydevice Done.` – bob dylan Dec 26 '21 at 19:43
  • The error is the same if I replace 8088 by another port or even another IP. Communication isn't established... – bob dylan Dec 26 '21 at 19:50
  • I've changed baud to 9600 which seems to be the default but same... and port 502. (I've added screenshot from parameters.) – bob dylan Dec 27 '21 at 07:32
  • The port is open, and hanging in a browser, so something is running on it, but i can't take anything from it. :/ – bob dylan Dec 27 '21 at 07:40
  • the baudrate shall be set according to your TRIRON device, if you didn't change, default setting is 115200; while the tcp-server port setting will decide which port to connect from your client, in this case, if you set to 502, then change the command arguments to `--tcp-port 502` – balun Dec 27 '21 at 11:50
  • Reverted, but still the same problem persist. Connection doesn't seem to be established. – bob dylan Dec 28 '21 at 13:52
  • Could you make sure the device is working? like read some values via their web interface or application? if so, you can use wireshark to see the correct communication packets for TCP side of ebox, and use serial port sinifer tool for the other side if necessary. Once you know the correct format, then adjust your client tool accordingly. – balun Dec 30 '21 at 07:32
  • Device working normally with phone app in AP mode (With data I'm interested in). In STA Mode it connects successfully to my home wifi, has an IP 192.168.39.149, and the web admin interface is working well on port 80. But didn't answer any requests from the tcp server port (8088 or 502). Something is there because the port is clearly open... but modpoll request and co (tcpmodbus.py, modbus_cli...) are failing to return any data. (I will try wireshark later today) – bob dylan Dec 31 '21 at 08:42
  • Basically, i can extract the data only with the phone app. (But AP only) – bob dylan Dec 31 '21 at 08:43
  • I surrendered and bought a RS485 usb cable. :( – bob dylan Jan 01 '22 at 16:29
  • anyway thx for answering, I'll delete this question soon. – bob dylan Jan 02 '22 at 09:54
  • Please don't delete the question (the fact that you could not get this working may be useful to others who want to trey the same thing in the future). – Brits Jan 30 '22 at 03:51
0

I don't know if you need more than the graph for EPever Solar Station. That is what I use and it works really good. I connect STA mode Not AP. I create a virtual COM9 port Baut Rate 115200, 192.168.0.7 :8088. I create a new SSID:LSD Passw. 12345678 in the router assign a static IP 192.168.0.7 I used android app "PortTester" and I see IP 192.168.0.7 port 8088 is open fast and simple. Follow this video like I did... https://www.youtube.com/watch?v=RrEumwFHfJ4 What I try to do is integrate it in Home Assistant.

  • Based upon this I'd guess that port 8088 is Modbus RTU over TCP because I'm pretty sure that the EPEVER application uses Modbus RTU (mentioned this possibility in a comment above) – Brits Jan 30 '22 at 04:03
0

I see something here, it since to be someone has connect... https://community.home-assistant.io/t/epever-modbus-rs-485-config/214397/3

I don't know if this work?

modbus:

  • type: tcp host: 10.240.1.4 port: 8088 name: epever4 timeout: 2
  • type: rtuovertcp host: 10.240.1.4 port: 8088 name: epever4