May 18, 20215 yr 30 minutes ago, Sc00bs said: Firstly, make sure that you disable the Flows that Bloubul did to write setting back to your inverter otherwise you may end up with your inverter settings being changed. You only want to have the ModbusRead & Inverter monitoring flows enabled. Then I would disable all of the queries being sent except perhaps the SOC query and see if you are getting the data back using the debug option on the SOC. If you are getting the data there then I would check in the InfluxDB to see if the data is being sent there. I created another flow with all of the downloadable variables that I could find, it includes some that were not in Bloubuls flow and have attached it. flows (2).json 47.83 kB · 1 download Cool, i've done all that. Still getting all the errors like before, but MQTT is populating as well as influxdb. Will try serial expert
May 19, 20215 yr I tried serial expert - made no discernable difference. Looking at my ModBusRead flow I can see the inverter going from: Initialize Init Connected Queuing Active Timeout Non-stop in a loop with about 2-5 seconds between each state. All values populate into grafana and MQTT very well - albeit with about 1 minute delay. So inbetween all the errors, something is working but for some reason it seems to timeout soon thereafter. Debug Errors range in the below: Error: Client Not Ready To Read At State init Error: Client Not Ready To Read At State reconnecting Error: Timed out Modbus Failure On State sending Get More About It By Logging Not sure if this is supposed to be normal? @Sc00bs is your debug log empty?
May 19, 20215 yr What is your guys polling timing set to? I have mine on 15sec. But don't want to overload the inverter data side.
May 19, 20215 yr 1 minute ago, Luminous said: What is your guys polling timing set to? I have mine on 15sec. But don't want to overload the inverter data side. On @Bloubul7 flow it's 1.5 seconds, on @Sc00bsflow it's 5. Is that too frequent?
May 19, 20215 yr I don't get errors from the Modbus connection in my debug. I get an error from one of the headers, not sure which one it is and haven't spent the time to work which one is causing the issue as yet What platform are you running on? I run mine on a Intel Nuc i5, so have plenty of processor cycles available. I set my sample rate lower so as to keep the size of the Db a bit more manageable.
May 19, 20215 yr I'm running on a raspberry pi 3b. The influx dB is on my Synology NAS and the mqtt broker is on my Home Assistant Pi4. Also brings me to another point. Is it possible to get all entities from mqtt automatically added to my home assistant? Should I change the topics to have a "homeassistant/sensor/" prefix? Or is there another simpler way?
May 19, 20215 yr Author 11 minutes ago, jacauc said: I'm running on a raspberry pi 3b. The influx dB is on my Synology NAS and the mqtt broker is on my Home Assistant Pi4. Also brings me to another point. Is it possible to get all entities from mqtt automatically added to my home assistant? Should I change the topics to have a "homeassistant/sensor/" prefix? Or is there another simpler way? Just check and make sure which ttyUSB has been assigned to your cable
May 19, 20215 yr Just now, Bloubul7 said: Just check and make sure which ttyUSB has been assigned to your cable It's ttyusb0. No other USB devices are connected to the Pi. When clicking the search button on node red, I'm given only two options: ttyusb0 and ttyama0 Could it be the power supply? Saw an undervolt warning. Will change power supply and see if it is any better.
May 19, 20215 yr I am also running an a Pi 3 at 1.5sec polling rate. Also have the under voltage warning on the Pi most of the time so dont think it is that either. Are you sure your polarity on the 485 connections are correct? I would try swopping the 485 wires over.
May 19, 20215 yr Just now, LawnChairLarry said: I am also running an a Pi 3 at 1.5sec polling rate. Also have the under voltage warning on the Pi most of the time so dont think it is that either. Are you sure your polarity on the 485 connections are correct? I would try swopping the 485 wires over. Well, I did it exactly as I was explained. Wires 2 and 7 in A and 1 and 8 in B. Have a few of those usb converters, so tried another also to see if that eliminates the issue. Exact same results. I'm also guessing that if the polarity was wrong it wouldn't work at all. Mine works, just times out every few seconds
May 19, 20215 yr What RS485 converter do you use? Might cause a problem. I run mine on a raspberry pi zero w without any problems. I go from (inverter)RJ45 -> rs485 to usb converter -> usb extention cable -> usb to micro usb cable -> rpi zero. And also use a cheap usb power adopter without any problems
May 19, 20215 yr I have a few of these as per attached picture. I'm doing inverter rs485 port to Cat 6 to usb converter A/B and connected directly in the Pi 3B. I'm also thinking that the influx and mqtt connections are irrelevant since the timeout is between pi and inverter.
May 19, 20215 yr 4 minutes ago, jacauc said: I have a few of these as per attached picture. I'm doing inverter rs485 port to Cat 6 to usb converter A/B and connected directly in the Pi 3B. I'm also thinking that the influx and mqtt connections are irrelevant since the timeout is between pi and inverter. I have heard numerous problems with those cheap ones. Best would be to try one of these. https://www.robotics.org.za/RS485-3P?search=485
May 19, 20215 yr 4 minutes ago, Luminous said: I have heard numerous problems with those cheap ones. Best would be to try one of these. https://www.robotics.org.za/RS485-3P?search=485 @Sc00bs, I know you said you are using the same cheap adapter. Was there any specific driver that had to be installed in Linux for it to work as expected?
May 19, 20215 yr I haven't had any issues with my cheap one, I have a spare waveshare RS485-Ethernet converter if you would like to try that. https://www.banggood.com/Waveshare-Two-way-Transparent-Transmission-Serial-Server-RS485-to-Ethernet-Module-RJ45-Network-Port-p-1697682.html
May 19, 20215 yr I'll try a third USB device to see if that works any better. Will hold off for now with the other devices. FWIW, I updated all packages on the Pi and also reinstalled nodejs using the script on the node red site. Everything now on latest versions. Same result.
May 19, 20215 yr More debug Linux raspberrypi 5.10.17-v7+ #1414 SMP Fri Apr 30 13:18:35 BST 2021 armv7l The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed May 19 11:46:19 2021 from 192.168.1.70 pi@raspberrypi:~ $ sudo node-red-start Start Node-RED Once Node-RED has started, point a browser at http://192.168.1.121:1880 On Pi Node-RED works better with the Firefox or Chrome browser Use sudo systemctl enable nodered.service to autostart Node-RED at every boot Use sudo systemctl disable nodered.service to disable autostart on boot To find more nodes and example flows - go to http://flows.nodered.org Starting as root systemd service. 19 May 11:49:48 - [warn] [modbus-flex-getter:Inverter] Modbus Failure On State sending Get More About It By Logging 19 May 11:49:48 - [error] [modbus-flex-getter:Inverter] Error: Timed out 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:49 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:50 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:51 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:51 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:51 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:51 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:51 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State reconnecting 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init 19 May 11:49:52 - [error] [modbus-flex-getter:Inverter] Error: Client Not Ready To Read At State init ^C pi@raspberrypi:~ $
May 19, 20215 yr Another one, did you imports someone else's code? Try and delete everything and setup just an injector switch a function and modbus flex getter node with debug.
May 19, 20215 yr 6 hours ago, jacauc said: Well, I did it exactly as I was explained. Wires 2 and 7 in A and 1 and 8 in B. Have a few of those usb converters, so tried another also to see if that eliminates the issue. Exact same results. I'm also guessing that if the polarity was wrong it wouldn't work at all. Mine works, just times out every few seconds My inverter got installed on Friday, and I'm currently waiting for my USB - RS485 converters to be delivered. I've set up Node Red, and reading up as much as I can before I'm able to continue. I'm wondering if the wiring indicated is perhaps incorrect? The Sunsynk manual indicates the below wiring on the RJ45 port: No RS485 Pin 1 RS485B 2 RS485A 3 GND 4 5 6 GND 7 RS485B 8 RS485A By mixing 2+7 and 1+8, aren't you adding both A+B to each of A and B of the USB converter?
May 19, 20215 yr 6 hours ago, jacauc said: @Sc00bs, I know you said you are using the same cheap adapter. Was there any specific driver that had to be installed in Linux for it to work as expected? 6 hours ago, Luminous said: I have heard numerous problems with those cheap ones. Best would be to try one of these. https://www.robotics.org.za/RS485-3P?search=485 I can confirm this, I originally had the USB RS485 adapter with the bare circuit board as mentioned in Luminous' post above and I had no issues. I then upgraded to the R30.00 adapter from microrobotics that jacauc was using and I had issues with it so I'm back to the original adapter.
May 19, 20215 yr For the moment I just set up the timeout value to 100ms (fail fast) and disabled the error logging. All of the values make it to mqtt and influx about 9/10 cycles, so even though imperfect, it's not hampering my ability to use the data. Ignorance is bliss for the moment
May 20, 20215 yr I'm having the exact same issue as @jacauc. I wonder if the current batch of converters from https://www.robotics.org.za/ is faulty?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.