ojeysky Posted February 8, 2021 Share Posted February 8, 2021 4 minutes ago, Bloubul7 said: Use the bottom diagram, the table is incorrect. I used the bottom diagram and then connected cable strand 1 and 7 to the usb. After connection,I ran cat /dev/ttyUSB1 on my pi but didn't get any response. Is there something am doing wrong? Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 8, 2021 Share Posted February 8, 2021 (edited) 10 minutes ago, Vassen said: The diagram shows pin 2,7 connected to RS485A, and 1,8 connected to RS485B. Where did You get the USB adapter from. Does it not require some drivers. Here is the link to the adapter, you do find it has A and B label and that's what I used, but from what i think you are saying. A is one end of the cable and B is the other end of the cable right? So 2,7 goes into rj45? And 1,8 goes into the usb? No driver requirement was indicated, it's possible it's a driver thing but first I want to be sure I have gotten the cable right. Edited February 8, 2021 by ojeysky Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 8, 2021 Share Posted February 8, 2021 4 minutes ago, Vassen said: No. RS485 is a 2 wire interface. If you look at the diagram of the wiring, you can see see on pins 2 and 7, it says rs485A, and pins 1 and 8 say RS485B. So 2 and 7 is joined together and connected to pin A of the adapter and 1,8 is joined together and connected to pin B of the adapter. As far as I know, even if the cable is not correct, you should still be able to see the port on the pi if you query it. I’m no expert on this though. Yes I see the port on the pi just not getting data, let me now connect the cables as you have indicated. Thanks Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 8, 2021 Share Posted February 8, 2021 I just get connected status even after modifying the cable arrangement, still not data, is there a way i should know if this is working? cat /dev/ttyUSB1 did you reveal any result Quote Link to comment Share on other sites More sharing options...
Bloubul7 Posted February 8, 2021 Share Posted February 8, 2021 You will only receive data once you have polled the modbus address. Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 8, 2021 Share Posted February 8, 2021 On 2020/10/05 at 3:45 PM, Bloubul7 said: Hi and welcome to the forum, On the inverter side I have made use of a Raspberry Pi Zero with RS485 expansion HAT. The inverter connects to the Pi through the RS485 port using the pinouts posted earlier The Pi Zero has been configured as a Modbus Gateway and essentially converts to the Modbus RTU to Modbus TCP. See link for library used - https://medium.com/@boonsanti/raspberry-pi-3-model-b-modbus-rs-485-to-modbus-tcp-ip-gateway-9ed14ce2c08e I then have another Raspberry Pi which I use as my main Home automation server (Pi 4, 8gb ram with 256gb NVME drive). On the server Pi I utilize Node Red to communicate with the Mod Bus relay and retrieve the specific register addresses which I want to monitor. From there Node Red then formats the values and MQTT then values to my Home Assistant for display as well as log the values in an Influx DB for Grafana integration I am trying to get the functions working on my node-red, can i see a sample of what you added to solar_pv_day function node for instance? Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 8, 2021 Share Posted February 8, 2021 51 minutes ago, Bloubul7 said: You will only receive data once you have polled the modbus address. pardon my questions, how do i go about that? I was able to connect via node-red but its throwing up the error message below: "TypeError: Cannot create property 'fc' on number '1612780922024'" I have attached screenshot of a single input that i wanted to read from the inverter which is PV1 input for instance, i saw the address in the modbus register is 186 but not receiving any info when i used that Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 8, 2021 Share Posted February 8, 2021 12 minutes ago, Vassen said: What does your function 186 look like? You need something like this msg.payload = { 'fc': 3, 'unitid': 1, 'address': 186, 'quantity': 1 }; msg.topic = "Solar_PV1_Power" return msg; okay now i am getting a different error message(see attached), looks like the connection to the inverter is not established afterall. Guess i need to look at the cable again. I am clear on the converter side of the cabling, can you confirm if the inverter side of the cable in the normal rj45 cate5e T-568B cable arrangement? similar to the pics attached? Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 8, 2021 Share Posted February 8, 2021 33 minutes ago, Vassen said: yes, its a standard rj45 cable Thanks a lot for helping out, now i have response(attached), but the next time i issued the query i started getting modus failure error again. So what could be the reason for this? Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 8, 2021 Share Posted February 8, 2021 5 minutes ago, Vassen said: also check if queue commands and reconnect on timeout is enabled on the flex getter Have a look at my settings on flex getter, is that not correct? Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 8, 2021 Share Posted February 8, 2021 12 minutes ago, Vassen said: maybe try to add a gate node between the timestamp and function node Can't find this on the list of nodes, searched for gate, perhaps need to install? Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 8, 2021 Share Posted February 8, 2021 (edited) 8 minutes ago, Vassen said: its just a gate node. under flex getter, i have type set to serial. I have set it as serial yet i get same error, how about the serial type and other fields? Edit: Rebooted my pi now i am getting response Edited February 8, 2021 by ojeysky Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 8, 2021 Share Posted February 8, 2021 Just now, Vassen said: others look fine. Just to confirm. You are using the RS485 port on the inverter. Yes thats where the rj45 is plugged into Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 8, 2021 Share Posted February 8, 2021 Thanks for the help @Vassenreally appreciate. I was checking the modbus document but could not find the address for total PV, instead it has individual PV do you know? Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 8, 2021 Share Posted February 8, 2021 12 minutes ago, Vassen said: did you get it working now? Yes, there is no total PV, You can get PV1 and PV2 and just add the 2 using the sum node. Yes its working now, integrating with mqtt is my next challenge, i have mqtt already running could you share syntax of the mqtt import function? Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 8, 2021 Share Posted February 8, 2021 On 2020/11/16 at 4:51 PM, innesleroux said: Hi this is very interesting. Awesome work! @Bloubul7 can you possibly share your Node Red flows? Thanks a lot I will also appreciate if @Bloubul7 could share the node red flow Quote Link to comment Share on other sites More sharing options...
innesleroux Posted February 8, 2021 Share Posted February 8, 2021 Hi everyone, I still have not figuered out how to write (change) addresses using Node Red - I.e. enable / disable time of use etc. Reading info from inverter using @Vassen info works great but even after looking up the relevant protocols I am still missing something. Anyone able to post the flow? Thanks Quote Link to comment Share on other sites More sharing options...
GMeiburg Posted February 9, 2021 Share Posted February 9, 2021 Hi everyone, Thank you for a great thread so far. I have a Sunsynk 8kw inverter with 4.8kwh First National Li-ion Battery Module. The inverter and battery is connected using the RS485 port. I bought a USB/RS485 dongle and want to know if I can plug it into the batteries Rs485 Port as it has two. Will I still be able to talk to the inverter or will the fact that it is connected to the batteries not work? Thank you in advance Quote Link to comment Share on other sites More sharing options...
Denarius Posted February 11, 2021 Share Posted February 11, 2021 On 2021/02/09 at 4:28 PM, GMeiburg said: Hi everyone, Thank you for a great thread so far. I have a Sunsynk 8kw inverter with 4.8kwh First National Li-ion Battery Module. The inverter and battery is connected using the RS485 port. I bought a USB/RS485 dongle and want to know if I can plug it into the batteries Rs485 Port as it has two. Will I still be able to talk to the inverter or will the fact that it is connected to the batteries not work? Thank you in advance @GMeiburg I doubt you will be able to read inverter values when you are plugged into the battery. Everyone here is reading via the inverter RS485 port, but according to the documentation you should be able to read the data from the Wifi/RS232 port. So you probably want one of these (there are cheaper options): https://www.takealot.com/ugreen-usb2-0-m-to-db9-rs232-2m-cab-bk/PLID40361956 Or is your inverter Wifi and RS485 port already occupied? Quote Link to comment Share on other sites More sharing options...
Ryeman Posted February 13, 2021 Share Posted February 13, 2021 This has been a great thread and big learning curve. Big thanks for all the input from everyone, I have also been able to extract the data via rs485 and build first draft dashboard for my Sunsynk 5.5kw. (The data will still smooth out ) Doing this via below path with 1 min update: 1) Synsync-> Rs485 -> RPi4 -> Node Red(on RPi) -> InfluxDB (On Rpi) -> Grafana(on Rpi) 2) AGM Battery -> BMV -> RPi4 -> Node Red -> InfluxDB -> Grafana I have also tried to map the Modbus registers to the values on the Sunsync display that could assist. (might be room for improvement or corrections) Cliff and Yellow Measure 2 Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 13, 2021 Share Posted February 13, 2021 5 minutes ago, Ryeman said: This has been a great thread and big learning curve. Big thanks for all the input from everyone, I have also been able to extract the data via rs485 and build first draft dashboard for my Sunsynk 5.5kw. (The data will still smooth out ) Doing this via below path with 1 min update: 1) Synsync-> Rs485 -> RPi4 -> Node Red(on RPi) -> InfluxDB (On Rpi) -> Grafana(on Rpi) 2) AGM Battery -> BMV -> RPi4 -> Node Red -> InfluxDB -> Grafana I have also tried to map the Modbus registers to the values on the Sunsync display that could assist. (might be room for improvement or corrections) Are you getting you data to mqtt using node-red? Could share the node-red flow? Quote Link to comment Share on other sites More sharing options...
ojeysky Posted February 15, 2021 Share Posted February 15, 2021 On 2020/11/24 at 9:37 PM, Cybertza said: Here is my Node Layout for ref, Still busy playing, but seems to be working ok as well. I think the HA direct is going to be a pain with all the restarts that would be required to test. Hi, could you share the syntax you have in the switch node and function node (msg.topic...)? Quote Link to comment Share on other sites More sharing options...
GMeiburg Posted February 15, 2021 Share Posted February 15, 2021 On 2021/02/11 at 10:06 AM, Denarius said: @GMeiburg I doubt you will be able to read inverter values when you are plugged into the battery. Everyone here is reading via the inverter RS485 port, but according to the documentation you should be able to read the data from the Wifi/RS232 port. So you probably want one of these (there are cheaper options): https://www.takealot.com/ugreen-usb2-0-m-to-db9-rs232-2m-cab-bk/PLID40361956 Or is your inverter Wifi and RS485 port already occupied? @Denarius Thank you for the reply, Damn it's a shame that it would not work in that way then. Yes my Wifi/RS232 port is occupied with the Solarman wifi dongle but I hate that it takes so long to update(although 10 min is not so bad). I think I will remove the Wifi/Rs232 logger and get one of those cables you posted(Thank you for that ) and go down that route Once again thank you to you and the forum for the help! Kind Regards Quote Link to comment Share on other sites More sharing options...
Ryeman Posted February 19, 2021 Share Posted February 19, 2021 Did any one else get a new software update, I did request an update for the Coms some time back (myne was on Ve.4.0.9). Only realized the updated was sent after the inverter just suddenly shutdown leaving us in darkness and rushed to do some fault finding, but only after switching everything off and running out of ideas did I realize it was the update that was applied. Just wish there was some form of warning so a person could prep However since everything powered down and then restarted once I switched back from grid, my Modbus logger stopped working most likely due to reboot of Rpi with some lost missing start-ups. Has anyone else received an update that has impacted their Modbus interface ? For the Sunsynk 5.5kw unit I am now on: Protocol: V0.2.0.1 Control: V2.1.5.4 Coms: VE.4.1.5 Quote Link to comment Share on other sites More sharing options...
GMeiburg Posted February 22, 2021 Share Posted February 22, 2021 On 2021/02/19 at 9:48 PM, Ryeman said: Did any one else get a new software update, I did request an update for the Coms some time back (myne was on Ve.4.0.9). Only realized the updated was sent after the inverter just suddenly shutdown leaving us in darkness and rushed to do some fault finding, but only after switching everything off and running out of ideas did I realize it was the update that was applied. Just wish there was some form of warning so a person could prep However since everything powered down and then restarted once I switched back from grid, my Modbus logger stopped working most likely due to reboot of Rpi with some lost missing start-ups. Has anyone else received an update that has impacted their Modbus interface ? For the Sunsynk 5.5kw unit I am now on: Protocol: V0.2.0.1 Control: V2.1.5.4 Coms: VE.4.1.5 Hi Ryeman, I dont have my modbus running yet but I did also receive an update on Sunday morning @ 04:00 21/02/2021. I have noticed that my versions are as follow: Version Information Protocol Version:V0.2.0.1 Control Software Version 1:V3.8.7.6 Communication CPU Software Version:VE.4.1.5 Does the Control version have an impact maybe? Regards Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.