Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two Interfaces attached to iobroker/Raspi: SMA-EM listen on wrong Interface #403

Closed
Flippo710 opened this issue Jun 3, 2022 · 20 comments
Closed
Labels

Comments

@Flippo710
Copy link

Describe the bug
I have to networks attached to Raspi and iobroker. My Solar SHM is attached to wlan0 instead of eth0. The adapter listens to eth0 instead of wlan0. So i can't reach my SHM.

To Reproduce
Steps to reproduce the behavior:

  1. Install adapter
  2. Go to Logs
  3. Listen via UDP on Device eth0 with IP XXX.XXX.XXX.XXX on Port 9522 for Multicast IP 239.12.255.254

Versions:

  • Adapter version: 0.6.5
  • Operating system: Raspi

Additional context
Add any other context about the problem here.

@TGuybrush
Copy link

The adapter binds to all interfaces which have a valid IPv4 address when the adapter is started. Can you confirm that the wlan0 device has a valid IPv4 address?

@pdbjjens
Copy link
Contributor

@Flippo710
Could you please check your network configuration (e.g. using ifconfig -a ) to see if anything is wrong with your wlan0 interface as @TGuybrush suggested? Are there any other relevant messages in the iobroker log?

@Flippo710
Copy link
Author

Sorry Guys, I was in vacation :)

I tried to reinstall the adapter again, now, it listens to both interfaces:

grafik

But still no connection. So I turned up Wireshark on the PI and found the following packets:

grafik

So there is definitly traffic arriving at the PI from the SHM (its the 192.168.0.5!)

Any idea?

@pdbjjens
Copy link
Contributor

@Flippo710
What do you mean by "no connection"? Does the Instance connection indicator in the instance Tab turn green? Is the Object tree in the Objects Tab (sma-em.0) generated? I suggest that we continue the discussion in the iobroker forum where you already posted your problem. Maybe some other users have also ideas.

@Flippo710
Copy link
Author

Hey,

yep, I have a tree, which is empty.

And I have no conection to a device or service...:

grafik

@pdbjjens
Copy link
Contributor

@Flippo710
Did you configure direct meter communication in Sunny Portal?
Regarding the wireshark recording: Can you filter on the multicast destination ip 239.12.255.254? SMA-EM does not listen on dest ip 192.168.0.255

@Flippo710
Copy link
Author

No, I didnt configure direct meter communication...(well, I didn't read anything about it, or that I have to configure it...)

And I get no packages from this MC :(

@pdbjjens
Copy link
Contributor

pdbjjens commented Jun 17, 2022

@Flippo710
You should not configure direct meter communication unless you absolutely need it because of network issues. So we can rule out this as a problem. If you do not get udp packages from 239.12.255.254 the most likely reason is that your network infrastructure (routers, switches) does not properly forward multicast packages from the SHM to your RPI. In which network are the inverters? I assume in the same network as the SHM? Do the inverters receive the SHM multicasts?

@pdbjjens
Copy link
Contributor

@Flippo710
Has this issue been resolved meanwhile so that I can close it?

@krafel
Copy link

krafel commented Oct 26, 2022

I have actually the same problem when I assign multiple IPs to one NIC. The last version working for me is 0.6.1-beta.0. I still have this version in production. It would be helpful to be able to choose which IP to use.

@pdbjjens
Copy link
Contributor

@krafel
As mentioned by @TGuybrush above, the adapter binds to all interfaces which have a valid IPv4 address when the adapter is started. Thus if your network is configured correctly and the SHM multicasts arrive on any of the bound interfaces, the sma-em adapter should start. Would you please provide an iobroker log of the startup of the sma-em and other relevant information on your system like sw-versions and network configuration (e.g. using ifconfig -a ) so that we can figure out what goes wrong.

@Rennsemme5
Copy link

@pdbjjens here I have teh same Issue.

image
image

The log of the start of sma-em is like the following
image

Hope you could help me out and get the sma-em adapter running.

Many thanks and kindest regards
Rainer

@pdbjjens
Copy link
Contributor

@Rennsemme5
Would you please provide an iobroker log of the startup of the sma-em and other relevant information on your system like sw-versions and network configuration (e.g. using ifconfig -a ) so that we can figure out what goes wrong.

@Rennsemme5
Copy link

Sorry, included one picture twice. The correct log of the startup of the sma-em should be this one:
image

SW-Versions:
ioBroker 6.3.5 on a raspberry pi
SMA-EM-Adapter 0.6.5
SMA devices are STP7000TL-20 and ev charger and sunnyhomemanager 2.0 connected over a switch with a fritz box cable 6591.

For the network configuration I don't know exactly, which information you need. There is no special configuration used.

@pdbjjens
Copy link
Contributor

pdbjjens commented Feb 27, 2023

@Rennsemme5
in which network are the SMA components? The same as the RasPi i.e. 192.168.178.xxx ? Is the STP connected via WLAN?
SHM and EVC are probably connected via eth?
What type of switch is it?
Is some other program running on the RasPi usinf multicast, e.g. EVCC?

@Rennsemme5
Copy link

Yes, the SMA components are within the same network as the RasPi. all components are connected with LAN. The switch is the one which is proposed from SMA. It is the TP-Link TL-SF1005D.
On the RaspPi is only the ioBroker with less adapters running. It is my first ioBroker and I'm still at the beginning.

@pdbjjens
Copy link
Contributor

@Rennsemme5
looks all quite normal - which are the other adapters? For what purpose do you need the WLAN on the RasPi. Would it be possible to deactivate it for a test? Another thing you could try is stop and restart sma-em and if that does not help, uninstall and reinstall it. As I am running out of ideas, maybe you can post your problem in the ioBroker Forum
https://forum.iobroker.net/topic/43011/test-adapter-sma-em-v0-6-x-latest. Likely some other user has more ideas.
One last idea: was direct meter communication configured in the SHM configuration on Sunny Portal?

@Rennsemme5
Copy link

The other adapters are
image

I don't need WLAN on RasPi. You think I should turn it off directly at the raspi

direct metering is configurated.
"Bezug und Einspeisung" = Internes Energy Meter
"PV-Erzeugung" = kein Zähler
"Messintervall internes Energy Meter:" 200 ms
Direkte Zähler Kommunikation: Gerät 1 = IP of Discovergy energy meter; Gerät 2 = IP of Sunny Tripower inverter; Gerät 3 = IP of EV Charger.

Hope that helps a little bit

@pdbjjens
Copy link
Contributor

@Rennsemme5
O.k- direct meter communication may be the reason that sma-em does not receive multicast messages from SHM. I am not sure if the SHM sends out multicast messages if direct meter communication is configured. If that is so, you are out of luck, since afaik you can configure only 3 single cast targets in Sunny Portal.

@Rennsemme5
Copy link

yes, direct meter communication was the reason. I deaktivated it and now it looks great. So I have to follow up, if there are problems on the SMA products without direct comunication. Hopefully not. Many thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants