Passive listening / sniffing SMA protocol on RS485? #30
-
I was able to successfully connect in to the RS485 and Yasdi2Mqtt is collecting and sending data to my MQTT server. However, it is not stable with frequent online/offline in the logs with the DeviceID changing to random numbers. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
Maybe you can play around a bit with the included Also, @MOS6510 (the godfather of |
Beta Was this translation helpful? Give feedback.
-
Why is yasdi or yasdi2mqtt operating as a master on the bus? Is it causing the device ids to change, or is that happening for some other reason. In my case the inverter (Sunny Island battery inverter) is the only device on the rs485 (piggyback board in the inverter, to a 485:usb adapter on the RPi), and the inverter is always the only device there. In my controls, I added watchdog timer functionality, so if a device has gone away for some reason, then see if it is back and restart communication with it. If there's no way around the device id's changing on your system, maybe it could use some other command to find the new id and restart using that. But, is the device id the serial number of each inverter? |
Beta Was this translation helpful? Give feedback.
-
Thank you everyone for all the different ideas. I think I may have solved the problem using some of the information in this thread as well as other discussion topics here. I started looking at the yasdi code and the SMAData1 and SMANET protocol specifications which are pretty specific in the timings and realized with my very rusty C skills, I would more than likely break than solve my problem. Ultimately the solutions that seems to be working for me so far is a combination of using RS485 UDP Server/Client devices (in my case the WaveShare RS485 to Eth(B)) and a combination of baud rate settings to the inverter and the Sunpower PVS2 I am suing could help. After way too much tinkering with settings, I think I found a solution that has been solid for over 24 hours. I have two SMA SB5000-TL-22 inverters, that seem to be working fine at 19200 baud. On the Waveshare RS485 gateway device connected to the inverters, I set them to transparent UDP with the baud rate to 19200 and the client address to both the Yasdi2Mqtt and the RS485 gateway connected to the Sunpower PVS. I also tested with the USR-TCP232 as a UDP Server which worked as well. On the PV Supervisor side, I set the gateway to 1200baud towards the supervisor . These settings seem to be working well now. No online/offline messages so far and the PVS Web interface has been showing the inverters connected without errors. The gateway devices along with fast baud rates seem to be keeping the connection times low enough the 1200baud PVS has not noticed it being offline, nor has it overwhelmed the inverters. |
Beta Was this translation helpful? Give feedback.
Thank you everyone for all the different ideas. I think I may have solved the problem using some of the information in this thread as well as other discussion topics here. I started looking at the yasdi code and the SMAData1 and SMANET protocol specifications which are pretty specific in the timings and realized with my very rusty C skills, I would more than likely break than solve my problem.
Looking at the notes above and the other discussion topics, it seems like there was potential for speeding up the baud rates as well as using the UDP gateways and the Yasdi IP driver.
Ultimately the solutions that seems to be working for me so far is a combination of using RS485 UDP Server/Client de…