Feller-AG / wiser-api

MIT License
12 stars 1 forks source link

Issues when gateway on separate Vlan #27

Open alexzeitgeist opened 1 year ago

alexzeitgeist commented 1 year ago

Hi,

I apologize if this is not directly related to the API, but I thought maybe someone can help me find a solution to my problem.

Currently I've 16 devices connected to my Wiser Gateway - all of them Dali's and NS's (Nebenstellen). It works well when I connect the gateway to the home network (say 192.168.1.0/24) , which is also used by my phone with the Wiser Home app.

For several reasons I would prefer to have the Wiser Gateway connect to another Wlan SSID which is on a separate Vlan (say 192.168.2.0/24). It's the network I use for all IoT devices. The firewall is setup so that devices on my home network can connect to the IoT network but not vice versa unless it is an already established connection. It works fine with other devices but not with the Wiser Gateway. The app can still connect with the Gateway, but the input in the app is now very laggy. Also, any information regarding the status of the lights is not available (it shows off), and it cannot be controlled.

So I guess there is some kind of broadcast or similar required to pass from the IoT Vlan to the home Vlan? Or am I missing something else?

Thanks a lot for your help!

Alex

PhilippImhof commented 1 year ago

The app can still connect with the Gateway, but the input in the app is now very laggy.

This seems to be a general problem of the app, if I may say so...

alexzeitgeist commented 1 year ago

The app can still connect with the Gateway, but the input in the app is now very laggy.

This seems to be a general problem of the app, if I may say so...

I agree, but relatively speaking, the lag is a lot worse if it tries to connect across the two Vlans.

woodworm commented 1 year ago

It shouldn't make any difference if the µGW is connected to a VLAN 🤔. Can you also notice a delay if you control the loads directly via the web interface of the µGW??

alexzeitgeist commented 1 year ago

@woodworm hi, the lag isn't terrible, but yes, it is more noticable when connected on the segregated Vlan (IoT). I think it has to do with packets not arriving to the app on my mobile, which is on the other Vlan (main). The app does detect the uGW, but switching tabs is very slow, and the status for all lights is unavailable and they cannot be controlled.

As mentioned - my default setup is that devices on Vlan-main can see and contact devices on Vlan-IoT, and established connections work in both ways, but devices on Vlan-IoT cannot see devices on Vlan-main nor contact them if there isn't an established connection. In other words, broadcasts etc. from Vlan-IoT don't reach Vlan-main either.

Do you know if there are any specific broadcast/mDNS/IGMP issue at play here? I don't know the network internals of the wiser-feller system and would love to learn more.

woodworm commented 1 year ago

The APP requires mDNS once to find the ip-address of the µGW in the network. After that... the whole communication runs over port 80 with the protocols http and websocket. To display the status of all lights, the APP needs a websocket connection to the µGW. It seems the websocket connection cannot be established, or is immediately interrupted in your setup.

alexzeitgeist commented 1 year ago

Thanks for the info, @woodworm! I will check why the websocket connection doesn't seem to work over Vlans. Some IoT devices have a "security feature", like Samsung TVs running Tizen, which refuse to communicate using websockets when the source IP address is not on the TV’s subnet.