March 19, 20224 yr 2 hours ago, Hannesvz said: This did not work for me. It seems like you are not using a twisted PAIR with green orange brown… crimp your RJ45 like you would crimp a network cable (google 568A) @Joerg see https://github.com/kellerza/sunsynk/blob/main/sunsynk/definitions.py#L170
March 19, 20224 yr @Hannesvz glad you got it fixed! I would still change the wiring to be on a pair to minimise errors. No point in trying to fight the physics behind differential signals
March 19, 20224 yr On 2022/03/19 at 7:39 PM, Hannesvz said: The thing that fixed the inverter not speaking back to me was the modbus sn was set to 0, when I set it to 01 it fixed the issue immediately. For curiosity I tried to put it back to 0 and was unable to do so. @kellerza you should add to your github that people should remember to set the modbus sn to 01 < . Thanks for helping me everyone. Thanks - also been having issues trying to connect to my SunSynk. I've just tested addresses 0-255, seems SunSynk only responds to the broadcast address 0. Modbus RTU addresses are 1-255, with 0 being reserved for broadcast messages. EDIT: As mentioned by @_terminal below, the Modbus ID can be changed from the default broadcast 0 to another ID: Edited March 22, 20224 yr by system32
March 20, 20224 yr 13 hours ago, kellerza said: @Joerg see https://github.com/kellerza/sunsynk/blob/main/sunsynk/definitions.py#L170 Thank you! Is it 232 ? Actually I don't get data in all these registers, like no weekly, monthly and yearly values...I have the 8 kW Sunsynk and guess not all the registers are filled in all inverters? 13 hours ago, kellerza said:
March 20, 20224 yr 16 hours ago, kellerza said: @Hannesvz glad you got it fixed! I would still change the wiring to be on a pair to minimise errors. No point in trying to fight the physics behind differential signals Hey @kellerza So you are saying is, it should be either the orange&white/orange pair or the Brown&White/Brown pair That you use? Makes sense, I just thought that using solid colours would be easier and less likely to get confused 🙂
March 20, 20224 yr 5 hours ago, Joerg said: Yes, and 274-279 needs the first bit set to enable it in that timeslot. tbh, I set 232 once and simply alter the program 268-279 (soc target % and charge from grid) for either load shedding or normal state
March 20, 20224 yr 3 hours ago, Sc00bs said: Hey @kellerza So you are saying is, it should be either the orange&white/orange pair or the Brown&White/Brown pair That you use? Makes sense, I just thought that using solid colours would be easier and less likely to get confused 🙂 they are pairs for a reason 😀. If you crimp them like you would ethernet cables it should in most cases be on a pair https://github.com/kellerza/sunsynk#hardware we are using extremely low data rates and short distances in most cases. In theory, on pairs, eth 1gbps can reach 100m and rs-485 1.2km as someone quoted. but even for short distances, keep with the best practises!
March 20, 20224 yr 2 hours ago, kellerza said: Yes, and 274-279 needs the first bit set to enable it in that timeslot. tbh, I set 232 once and simply alter the program 268-279 (soc target % and charge from grid) for either load shedding or normal state That's odd. I can't poll 232 from my SunSynk 8kW. It shows an error. The rest works now. Some values show 0 like all the cumulative Values (week, month, year)...I guess these values are not working on my model..?
March 21, 20224 yr On 2022/03/20 at 6:40 AM, kellerza said: they are pairs for a reason 😀. If you crimp them like you would ethernet cables it should in most cases be on a pair https://github.com/kellerza/sunsynk#hardware we are using extremely low data rates and short distances in most cases. In theory, on pairs, eth 1gbps can reach 100m and rs-485 1.2km as someone quoted. but even for short distances, keep with the best practises! I'd like to get a better understanding of how the write feature works in your library / addon. I didn't see much info in the docs. What are you writing and how does it work from HA?
March 22, 20224 yr 6 hours ago, poldim said: I'd like to get a better understanding of how the write feature works in your library / addon. I didn't see much info in the docs. What are you writing and how does it work from HA? system_mode reads/writes the System Profile 😉 Which includes all these sensors. In HA it is represented as a single dropdown/select control (see example screenshots) The actual values in the presets are stored under /share/hass-addon-sunsynk on HA as yaml files. You can edit them and create new presets with different values. When you select UPDATE a file will be created with your current settings if that specific set of presets does not exist. Then you simply rename the files, change basic parameters and UPDATE again. In my example I change the time, capacity target % and charge from grid bit in slot 2. In slot 5 I simply allow charge from grid. To the left and the right you see other sensors I have included to visualize the system mode. (the system mode photo is simply one I had lying around and might not show 100% the values in HA)
March 22, 20224 yr Has anybody got the Waveshare RS485/CAN Hat (https://www.waveshare.com/rs485-can-hat.htm) working with Home Assistant OS? I have a working setup using a USB interface but I'm getting lots of Timeout errors, as discussed extensively on this thread. I've got access to the host OS and have managed to get the hat configured as a CAN interface (as a test). I'm struggling to get RS485 working. Does anybody have any pointers? ps: @kellerza I am very impressed with your Sunsynk add-on. That combined with the HA built in Energy Management and the power-distribution-card is very useful.
March 22, 20224 yr @JGB once you have the hat working as a CAN interface it might be as simple as connecting A&B instead of H&L. What I do miss from that HAT is the GND terminal and want to go as far as saying that it wont really solve your problems without it. Although RS-485 don't need the ground, a voltage difference between the GND with the 2-wire RS-485 converters is not ideal. Most of the cheap 5V SMPS gives you some floating ground, so there will be difference between GND. Much better to use a RS-485 receiver with GND if you are experiencing issues! This is my current favorite transceiver - https://www.robotics.org.za/W17286 It includes GND & protection. They also sell a slightly cheaper version with GND, without the protection. And the other important point is to keep the data lines on a twisted pair. You run this cable along/or cross AC and high current DC wires in the inverter. Thanks for the compliments. The addon really does what @Bloubul7 does with his Node-Red flows. It's only integrated much closer with HA and as a result simpler to deploy.
March 22, 20224 yr @JGB Check on your inverter under Advanced -> Multi-Inverter. If Modbus SN is set to 00 change that to 01. This solved my timeout issue. Edit: Likely not given you have an adapter that works. Edited March 22, 20224 yr by _terminal
March 23, 20224 yr @_terminal Thanks. I tried to set the Modbus SN as suggested, but it didn't make a difference. @kellerza I'm pretty sure the cabling is good. I crimped a RJ45 on both ends of the cable, tested it (with a network cable tester) and then cut the one end off to connect to the USB (https://www.robotics.org.za/RS485-3P). I used a twisted pair (1 + 2) for B and A and also used the ground (3). I'll give that Waveshare USB a try, although at this point, I think my problem may not be related to the choice of RS485 adaptor. I'm getting the following in the logs: Quote 2022-03-23 09:33:08,053 INFO Connecting to serial:///dev/ttyUSB0 2022-03-23 09:33:08,138 INFO ############################################################ 2022-03-23 09:33:08,139 INFO Inverter serial number '1234567890' 2022-03-23 09:33:08,141 INFO ############################################################ 2022-03-23 09:33:08,144 INFO MQTT: Connecting to mqtt@mqtt_host:1883 2022-03-23 09:33:08,168 INFO MQTT: Connection successful 2022-03-23 09:33:21,772 ERROR Timeout reading: 2022-03-23 09:33:34,789 ERROR Timeout reading: 2022-03-23 09:33:54,820 ERROR Timeout reading: 2022-03-23 09:34:12,848 ERROR Timeout reading: Debug shows it polls a few times and then "freezes" for around 10 seconds followed by the "Timeout reading:" entry. I think there may be some other hardware problem, perhaps with the USB Interface on the Pi. I am getting data from the inverter. It's enough to have a useful dashboard, but it is slightly delayed with all the 10 second pauses related to the timeouts. More importantly, it is gnawing at me knowing these timeouts are occurring
March 23, 20224 yr @JGB Other suggestions: try mbusd as the serial interface and tcp from the addon try the pymodbus driver try just the minimum amount of sensors (On some inverter models if you read an unknown/undefined register there are strange results including timeouts)
March 23, 20224 yr On 2022/03/19 at 7:46 PM, Hannesvz said: This dit work after all btw. Which RS485 port did you plug it into in the end? Interested to know which one works on the 5kw
March 23, 20224 yr 59 minutes ago, Sc00bs said: Which RS485 port did you plug it into in the end? Interested to know which one works on the 5kw Top left hand 485 socket works for me.
March 23, 20224 yr Strangely enough only the bms485 worked but not the rs485. Probably a different pinout.
March 24, 20224 yr I’m having the same issue and no luck in resolving it. My MQTT connects from node-red but the Inverter just keeps switching between connected, queueing, timeout, reconnecting, initialise, init, opened. Like i said i tried 2 different USB adapters and also 2 different RPI’s and the same thing happens. I have HA running with, node-red, influx MQTT etc all installed as HA add-ons. I've also tried a different RPI 3b with PI-OS and NR but exactly the same issue. I also tried a second usb adapter and a different network cable question on the network cable - If i take a normal cat 5e cable and cut the one end off and connect it to the USB as per the diagrams mentioned in the forum will it work or do i have to re-crimp the RJ45 side? thanks image971×283 24.6 KB image971×283 24.6 KB image1942×566 61.4 KB image971×283 24.3 KB Edited March 24, 20224 yr by McAllstar
March 24, 20224 yr this is how I have cabled my connection. Maybe someone can take a look and see if it is correct. image1920×1215 239 KB image1408×1168 155 KB image1414×1256 99.4 KB image1414×1778 150 KB image1414×1778 124 KB
March 24, 20224 yr @McAllstaruse only the orange/orange-white pair and green-white for ground. Just 3 wires https://github.com/kellerza/sunsynk#deye-8kw-inverter
March 24, 20224 yr thanks, I did try that. Let me try it again and see what happens. Did you look at my RJ45 picture? does it look correct? Thanks Brett
March 24, 20224 yr I assume that you connection is not working @McAllstar Have you check in Node Red if the requests are being sent out? I would start with adding 2 x debug nodes onto the Modbus read screens in Node Red and tick the system status and node status boxes so that is displays what is going on with nodes. The inverter node should also be polling data to the inverter and should flash between active & queing. The Modbus Que info should also be changing value as the data is queued. It should show you the requests being sent out to the inverter and then the response from the inverter. If the requests are being sent out but your aren't getting any response. - Check if the USB-RS485 adapter lights are flashing If they are flashing then there is something wrong with either the cable or the connection somewhere between the adapter and the inverter. Plugged into wrong port, Ethenet cable wired up incorrectly, wires not connected properly etc. If the adapter is not flashing then I would suspect that there is a problem with either the setup of the USB port in Node Red or the USB-RS485 adapter. I have had experience with USB ports on raspberry pi's moving around with /dev/ttyUSB0 not always being the same port so would check that first. Check the USB settings in the Inverter node and try changing it from 0 - 1 and see if that helps or plug the adapter into a different USB port. If you are getting the data back from the inverter but can't see it in home assistant then I would check your database and MQTT settings. Edited March 24, 20224 yr by Sc00bs More info
March 24, 20224 yr 3 hours ago, McAllstar said: question on the network cable - If i take a normal cat 5e cable and cut the one end off and connect it to the USB as per the diagrams mentioned in the forum will it work or do i have to re-crimp the RJ45 side? There are two main ways that Ethernet cables are wired. T-568-A & T-568-B B is the most common way and the way that was used for the diagrams that were provided. best is to wire it using one of the pairs Orange/White & Orange or Brown/White & Brown It will work using both pairs but only necessary to have one.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.