Open geophys-hub opened 2 years ago
I have the same tracer. You must use xr_usb driver. Follow the step by step guide: https://stackoverflow.com/questions/57313343/modbus-cant-read-data-from-epever-tracer-1210a-to-raspberry
I was able to install the RX driver thanks to your hint! Many thanks for this!
Here the new error-log in /var/log/daemon.log:
Mar 21 13:17:12 rpi3 Node-RED[409]: 21 Mar 13:17:12 - [error] [modbus-flex-getter:Modbus Get] Error: Client Not Ready To Read At State reconnecting Mar 21 13:17:13 rpi3 Node-RED[409]: 21 Mar 13:17:13 - [error] [modbus-flex-getter:Modbus Get] Error: Client Not Ready To Read At State init Mar 21 13:17:14 rpi3 Node-RED[409]: 21 Mar 13:17:14 - [error] [modbus-flex-getter:Modbus Get] Error: Client Not Ready To Read At State init Mar 21 13:17:15 rpi3 Node-RED[409]: 21 Mar 13:17:15 - [error] [modbus-flex-getter:Modbus Get] Error: Client Not Ready To Read At State reconnecting Mar 21 13:17:17 rpi3 Node-RED[409]: 21 Mar 13:17:17 - [error] [modbus-flex-getter:Modbus Get] Error: Client Not Ready To Read At State init Mar 21 13:17:17 rpi3 Node-RED[409]: 21 Mar 13:17:17 - [warn] [modbus-flex-getter:Modbus Get] Modbus Failure On State sending Get More About It By Logging Mar 21 13:17:17 rpi3 Node-RED[409]: 21 Mar 13:17:17 - [warn] [modbus-flex-getter:Modbus Get] Modbus Failure On State sending Get More About It By Logging Mar 21 13:17:17 rpi3 Node-RED[409]: 21 Mar 13:17:17 - [error] [modbus-flex-getter:Modbus Get] Error: Timed out
There are the settings:
Device ttyXRUSB0 is ready!
root@rpi3:~# ls /dev/tty* /dev/tty /dev/tty12 /dev/tty17 /dev/tty21 /dev/tty26 /dev/tty30 /dev/tty35 /dev/tty4 /dev/tty44 /dev/tty49 /dev/tty53 /dev/tty58 /dev/tty62 /dev/ttyAMA0 /dev/tty0 /dev/tty13 /dev/tty18 /dev/tty22 /dev/tty27 /dev/tty31 /dev/tty36 /dev/tty40 /dev/tty45 /dev/tty5 /dev/tty54 /dev/tty59 /dev/tty63 /dev/ttyprintk /dev/tty1 /dev/tty14 /dev/tty19 /dev/tty23 /dev/tty28 /dev/tty32 /dev/tty37 /dev/tty41 /dev/tty46 /dev/tty50 /dev/tty55 /dev/tty6 /dev/tty7 /dev/ttyXRUSB0 /dev/tty10 /dev/tty15 /dev/tty2 /dev/tty24 /dev/tty29 /dev/tty33 /dev/tty38 /dev/tty42 /dev/tty47 /dev/tty51 /dev/tty56 /dev/tty60 /dev/tty8 /dev/tty11 /dev/tty16 /dev/tty20 /dev/tty25 /dev/tty3 /dev/tty34 /dev/tty39 /dev/tty43 /dev/tty48 /dev/tty52 /dev/tty57 /dev/tty61 /dev/tty9 root@rpi3:~#
The XR driver is loaded: dmesg | grep usb ... [ 9.374491] xr_usb_serial_common: Exar USB UART (serial port) driver ...
Thank you for your quick help.
That also makes me think...
Do I have the correct cable to read out?
The Python Test Script PROBLEM is SOLVED!
The problem sat 30 cm in front of the screen! I had defined the device /dev/ttyRXUSB0. That was incorrect! /dev/ttyXRUSB0 is correct ;)
Now, the testscript works fine
Wich std rj45 pin 4 blue on -, pin 6 green on +
Thanks! But i have the cable from the manual ... CC...150 The python Test Script work fine. The cable is ok. The problem should be my node-red configuration ...
Question: I rename all 3 Modbus-Flex-Getter --> Servername "Tracer_3210_AN" I have the same USB-configuration. The name for this is for all USB0. Now, all three Modbus-Flex-Getter are active, but now is the error message in daemon.log
"message: "TypeError: Cannot read property 'lastUpdatedAt' of null",
I probably did it completely wrong ...
If I don't find it I'll reinstall the raspi image and node-red too.
The real problem was actually the missing XR driver as Adam wrote.
Change the type of Modbus server to "Serial" from "Serial Expert". My setup is working without modbus read issues over six months.
The problem could be changes in the register addresses and function code of the newly purchased EPEver Tracer 3210AN.
I found references to this while researching.
If someone has the same problem, they can have a look here:
https://github.com/rosswarren/epevermodbus
After installing you find in folder ./epevermodbus driver.py. Compares the parameters used there.
@mmsfla if you are still stuck I wrote up a step by step foolproof guide. https://medium.com/@mitchross09/solar-energy-monitoring-with-raspberry-pi-and-node-red-ed59e287cdd4
for some reason after I remove the CDC-ACM driver and installing the driver I can't find the /dev/ttyXRUSB0. I tried it many times in different orders but same result.
anyone can help?
thanks in advance
Hello Adam, thank you for your hard work. I have a connection problem. I am using epever tracer 3210an, a RS485 USB cable and a RASPI 3b. I installed Node-Red yesterday following your instructions. But unfortunately I can't get in touch with EPEver. Here is the event in /var/log/daemon.log: { Mar 20 16:00:50 rpi3 Node-RED[410]: payload: { Mar 20 16:00:50 rpi3 Node-RED[410]: value: undefined, Mar 20 16:00:50 rpi3 Node-RED[410]: unitid: 1, Mar 20 16:00:50 rpi3 Node-RED[410]: fc: 4, Mar 20 16:00:50 rpi3 Node-RED[410]: address: 12544, Mar 20 16:00:50 rpi3 Node-RED[410]: quantity: 18, Mar 20 16:00:50 rpi3 Node-RED[410]: emptyMsgOnFail: true, Mar 20 16:00:50 rpi3 Node-RED[410]: keepMsgProperties: true, Mar 20 16:00:50 rpi3 Node-RED[410]: messageId: new ObjectId("623741a2fcca8f991afd26ab") Mar 20 16:00:50 rpi3 Node-RED[410]: }, Mar 20 16:00:50 rpi3 Node-RED[410]: topic: 'livestats', Mar 20 16:00:50 rpi3 Node-RED[410]: _msgid: 'e897b8b8ad8aa219', Mar 20 16:00:50 rpi3 Node-RED[410]: messageId: new ObjectId("623741a2fcca8f991afd26ab"), Mar 20 16:00:50 rpi3 Node-RED[410]: error: { Mar 20 16:00:50 rpi3 Node-RED[410]: message: 'Error: Client Not Ready To Read At State reconnecting', Mar 20 16:00:50 rpi3 Node-RED[410]: source: { Mar 20 16:00:50 rpi3 Node-RED[410]: id: '2c18fdaf.8153d2', Mar 20 16:00:50 rpi3 Node-RED[410]: type: 'modbus-flex-getter', Mar 20 16:00:50 rpi3 Node-RED[410]: name: 'Modbus Get', Mar 20 16:00:50 rpi3 Node-RED[410]: count: 1 Mar 20 16:00:50 rpi3 Node-RED[410]: }, Mar 20 16:00:50 rpi3 Node-RED[410]: stack: 'Error: Client Not Ready To Read At State reconnecting\n' + Mar 20 16:00:50 rpi3 Node-RED[410]: ' at Object. (/home/pi/.node-red/node_modules/node-red-contrib-modbus/modbus/maps/modbus-client.js:472:15)\n' +
Mar 20 16:00:50 rpi3 Node-RED[410]: ' at Object.emit (events.js:314:20)\n' +
Mar 20 16:00:50 rpi3 Node-RED[410]: ' at Object.emit (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:185:20)\n' +
Mar 20 16:00:50 rpi3 Node-RED[410]: ' at Object._inputCallback (/home/pi/.node-red/node_modules/node-red-contrib-modbus/modbus/maps/modbus-flex-getter.js:146:21)\n' +
Mar 20 16:00:50 rpi3 Node-RED[410]: ' at /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:207:26\n' +
Mar 20 16:00:50 rpi3 Node-RED[410]: ' at Object.trigger (/usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/hooks.js:149:13)\n' +
Mar 20 16:00:50 rpi3 Node-RED[410]: ' at Object.Node._emitInput (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:199:11)\n' +
Mar 20 16:00:50 rpi3 Node-RED[410]: ' at Object.Node.emit (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:183:25)\n' +
Mar 20 16:00:50 rpi3 Node-RED[410]: ' at Object.Node.receive (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:482:10)\n' +
Mar 20 16:00:50 rpi3 Node-RED[410]: ' at Immediate._onImmediate (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:814:52)'
Mar 20 16:00:50 rpi3 Node-RED[410]: }
Mar 20 16:00:50 rpi3 Node-RED[410]: }
I configured the modbus clients as follows:
My cable is recognized, a driver is loaded. I checked that with lsusb and in dmesg.
Can you spot an error in the screenshot?
Many thanks in advance
Frank