pkwagner/yasdi2mqtt

Home Assistant not connecting with SMA inverters

shoei600 opened this issue · 4 comments

Hi all,
I'm hoping somebody can help me get over this final stage get things working. I have tried the original setup in a docker on a Windows machine. On startup the script would run fine and connect to mqtt broker, then no further output at all. It was getting too complicated for me so I opted to use the Home Assistant version (https://github.com/frankol/yasdi2mqtt/tree/master) which has the port detail resolved.

With the help of wireshark I have now managed to get udp packets targeting one inverter and it is responding from port 24273 to 24272. I don't seem to be able to get others responding and this is probably because they're not setup correctly in yasdi.ini. Could somebody please check?

[DriverModules]
Driver0=yasdi_drv_ip
Driver1=yasdi_drv_serial

[COM1]
Device=/dev/ttyUSB0
Media=RS485
Baudrate=1200
Protocol=SMANet

[IP0]
Protocol=SMANet
Device0=192.168.100.54
[IP1]
Protocol=SMANet
Device1=192.168.100.51
[IP2]
Protocol=SMANet
Device2=192.168.100.52
[IP3]
Protocol=SMANet
Device3=192.168.100.55
[IP4]
Protocol=SMANet
Device4=192.168.100.234

[Misc]
DebugOutput=/dev/stdout

The config file has both UDP and TCP ports declared but doesn't say which direction for each. The yasdi2mqtt log still just shows searching and never completes or has even one device available anywhere.

On the inverters I have both TCP 24272 and UDP 24273 enabled, is this correct? Is both required or just UDP?

Thanks.

Sorry for the late response. Is the issue still relevant?

Hi Paul, I never could get this working and was not able to get any support with it. I now communicate with them via modbus which has its own issues and SMA have now told me they are unable to support modbus even though it's built in to their products. So I would like to revisit it.

#47 might be related to your issue, as TCP does not seem to be enabled in the current version of yasdi2mqtt.

Have you tried running your config with yasdishell?

Hi shoei600,

I think you have to put every device into the same 'IP0' driver section 'cause they collides with the same local listen port (with no further parameter). When you use multiple sections for IP instead then all 'DeviceX' entryies should start with "Device0" again.
So I suggest you to try again with this setup:

--- cut ---
[DriverModules]
Driver0=yasdi_drv_ip
Driver1=yasdi_drv_serial

[COM1]
Device=/dev/ttyUSB0
Media=RS485
Baudrate=1200
Protocol=SMANet

[IP0]
Protocol=SMANet
Device0=192.168.100.54
Device1=192.168.100.51
Device2=192.168.100.52
Device3=192.168.100.55
Device4=192.168.100.234

[Misc]
DebugOutput=/dev/stdout
--- cut ---

If you communicate with UDP only you can remove the "COM1" section for serial communication.

It's easy to check if this works. Recompile yasdi and enable debug output. Start 'yasdishell' and it should output something like this where all IP addresses are listed as 'Added new peer...':

grafik