Comments (23)
At least for me, Sonos uses an extra mDNS address. What got this working for me was to add --relay 255.255.255.255:1900
to the command.
from multicast-relay.
Not an issue, but help for anyone moving over to the podman-less version of the UDM OS. You can easily get this up and running without containers as Python v3.5.3 is already installed by default.
Once you've downloaded
multicast-relay.py
to your UDM Pro, run as follows:
/usr/bin/python3 /data/multicast-relay/multicast-relay.py --interfaces brX brY brZ --noMDNS
where brX, brY etc are the interfaces you want to multicast. Obviously you can also pass parameters such as
--noMDNS
etc as you see fit.I have also setup on_boot.d by using a slightly modified version from here: https://di-marco.net/blog/it/2022-01-22-unchain_the_udm_pro_se/. Modified in that I edited the script to point to
"/data"
instead of the old"/mnt/data"
which doesn't exist anymore.Alternatively, you can also follow the instructions to install podman (being mindful of using
/data
and not/mnt/data
) but it'd be a complete pain to re-setup every time there was an UDM upgrade so I wanted to move away from that.
Exactly why i use this tool. Really hope UI will add the multicast relay function to it's base services. Anyway, i use it on a seperate box, but if i understand it right, this on_boot.d
method survives reboots and psisbly also updates?! That would remove a dependency on that extra box.
from multicast-relay.
I have multicast-relay.py copied to basically the same path but I am getting permission denied when trying to run. I'm in as root? The readme says to install 'netifaces' package. Is that already on UDM-SE?
from multicast-relay.
What's the exact error you're seeing?
I can't speak for the UDM-SE as I have a UDM-PRO running v2.4.23 but I didn't need to install any packages in order for this to work.
from multicast-relay.
In addition to UDM-SE this is also on v3.0.13 so maybe they changed something
root@UDM-SE:~# "/usr/bin/python3 /data/multicast-relay/multicast-relay.py" --interfaces br0 br10 br20 --noMDNS -bash: /usr/bin/python3 /data/multicast-relay/multicast-relay.py: Permission denied
from multicast-relay.
Remove the double quotes and that might get you a bit further.
from multicast-relay.
No change. I didn't have a python3 folder in /usr/bin so I created it. From the examples it looks like there's a space after python3. Thinking that mattered I kept it and used the quotes. But no dice
from multicast-relay.
Ah it is a problem if you don't have python3 - it needs to be an executable, so you ought to remove the directory. The quotes are definitely a problem though: they should not be used.
You might be able to use something like this to install python:
unify-os shell
apt-get update
apt-get install python3
from multicast-relay.
Not an issue, but help for anyone moving over to the podman-less version of the UDM OS. You can easily get this up and running without containers as Python v3.5.3 is already installed by default.
Once you've downloaded
multicast-relay.py
to your UDM Pro, run as follows:
/usr/bin/python3 /data/multicast-relay/multicast-relay.py --interfaces brX brY brZ --noMDNS
where brX, brY etc are the interfaces you want to multicast. Obviously you can also pass parameters such as
--noMDNS
etc as you see fit.I have also setup on_boot.d by using a slightly modified version from here: https://di-marco.net/blog/it/2022-01-22-unchain_the_udm_pro_se/. Modified in that I edited the script to point to
"/data"
instead of the old"/mnt/data"
which doesn't exist anymore.Alternatively, you can also follow the instructions to install podman (being mindful of using
/data
and not/mnt/data
) but it'd be a complete pain to re-setup every time there was an UDM upgrade so I wanted to move away from that.
Any chance you can write an idiots guide to this? I'm super familiar with running it in the containerized version, but not sure how to copy the .py file to my UDM Pro. I just moved to 2.4.27 so this is super helpful!
UPDATE: I was able to figure this out. Here are my instructions for anyone that isn't savvy enough to just get it right away.
UDM Pro Multicast Relay on Unifi OS 2.4.27
Logging on:
Open Putty and select UDM Pro
Enter Username: root
Enter Password: SSH Password
Changing Directory:
In Putty enter this command:
cd /data
Create Multicast-Relay Folder:
In Putty enter this command:
mkdir multicast-relay
Changing Directory:
In Putty enter this command:
cd /data/multicast-relay
Download multicast-relay.py file:
In Putty enter this command:
curl https://raw.githubusercontent.com/alsmith/multicast-relay/master/multicast-relay.py -o multicast-relay.py
Changing Directory:
In Putty enter this command:
cd /usr/bin
Run the Multicast Relay:
In Putty enter this command:
python3 /data/multicast-relay/multicast-relay.py --interfaces br0 br10 br20 --noMDNS
from multicast-relay.
I have UDM Pro on Early Access. The script works in connecting my phone to Sonos across VLANs but only for a couple minutes before I have to restart the script. I am not sure what causes this other than time.
from multicast-relay.
I have UDM Pro on Early Access. The script works in connecting my phone to Sonos across VLANs but only for a couple minutes before I have to restart the script. I am not sure what causes this other than time.
I'm also on UDMP early access. In my case the script runs fine and I can tail the verbose log and see it doing its stuff. But for me, the Sonos part never works and I never got it working in the podman days or on various versions on UDMP. I'm thinking it must be something in my UDM config but I've pretty much tried everything and got nowhere! Does anyone have a listed of settings that are required in the UDM networks?
In the end, I resorted to using an old iPhone that sits in the same VLAN as Sonos! But I'd love to get the mcast relay working instead.
Thanks.
from multicast-relay.
At least for me, Sonos uses an extra mDNS address. What got this working for me was to add
--relay 255.255.255.255:1900
to the command.
Absolute genius! :-) That worked right away for me with no other changes required. Clearly I should've spent more time studying these protocols and analysing my pcaps! Many thanks for that precious nugget of info 👍
from multicast-relay.
Does this work for UDMP 3.0.20 ? I might move my solution from a seperate box to UDMP. Hopefully UI will fix their mDNS so it will be possible to relay this natively.
from multicast-relay.
I am on early release and it works. Just know that you will have to make it run at startup. There are guides out there to make it do that.
from multicast-relay.
Does this work for UDMP 3.0.20 ? I might move my solution from a seperate box to UDMP. Hopefully UI will fix their mDNS so it will be possible to relay this natively.
Yes, I'm running the same version and it works with the fix tkdrob posted above. I'm running several scripts at startup using the di-marco.net method at the top of this thread.
from multicast-relay.
At least for me, Sonos uses an extra mDNS address. What got this working for me was to add
--relay 255.255.255.255:1900
to the command.
@alsmith any chance you can add this into the core code?
from multicast-relay.
It can easily be added but it falls under mDNS and not SSDP. Sonos uses both. I am not sure how @alsmith wants to classify it.
Not everyone would need or want that extra mDNS address.
from multicast-relay.
At least for me, Sonos uses an extra mDNS address. What got this working for me was to add
--relay 255.255.255.255:1900
to the command.@alsmith any chance you can add this into the core code?
Consider it done...
from multicast-relay.
So if we're running this should any of the multicast / IGMP configs be set on the unifi device itself? Worried about potential conflicts
from multicast-relay.
Did anyone figure out if the UniFi multicast option needs to be enabled or disabled? Or if it even matters either way ?
from multicast-relay.
I have 'IGMP Snooping' and 'Multicast DNS' enabled on the SONOS speaker and SONOS client networks. Doesn't conflict with this mcast relay.
from multicast-relay.
As long as you have --noMDNS
then you will be fine having multicast DNS enabled on Unifi.
from multicast-relay.
Hi, I just tried the script with the following commands:
cd /tmp
wget https://github.com/alsmith/multicast-relay/raw/master/multicast-relay.py
python3 multicast-relay.py --foreground --verbose --noMDNS --interfaces br40 br0
Everything seems to work with my sonos speakers. But how can I put the script in 'autostart' of the UDM-SE that it starts running again after reboots/firmware updates? Thanks!
EDIT: is this the way to go? (I have OS3.2.7 installed) https://github.com/unifi-utilities/unifios-utilities/tree/main/on-boot-script-2.x
EDIT2: did it via 'systemd' (Y)
from multicast-relay.
Related Issues (20)
- Breaking update for --listen HOT 2
- Issues with mDNS and Airplay devices HOT 5
- Not all broadcast addresses are accepted
- --ifFilter HOT 2
- OpenWRT and python3 HOT 4
- Devices not discoverable HOT 1
- Any Chance to add Wake On Lan? HOT 1
- latest commit broken HOT 1
- /healthz healthcheck endpoint HOT 1
- Usage on windows HOT 1
- UniFi UDM Pro v3.1.x
- Python 3.12
- ifFilter.json
- Error mdnsForceUnicast
- Could I use multicast-relay to forward over a Unifi Site Magic Site - Site VPN?
- Could I use multicast-relay to forward over a Unifi Site Magic Site - Site VPN?
- Relay One Way
- Can't discover Samsung TV in Youtube app HOT 2
- Script needs to be restarted regularly HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from multicast-relay.