Git Product home page Git Product logo

Comments (23)

tkdrob avatar tkdrob commented on June 11, 2024 1

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.

lsiepel avatar lsiepel commented on June 11, 2024

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.

oyow avatar oyow commented on June 11, 2024

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.

mojo333 avatar mojo333 commented on June 11, 2024

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.

oyow avatar oyow commented on June 11, 2024

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.

alsmith avatar alsmith commented on June 11, 2024

Remove the double quotes and that might get you a bit further.

from multicast-relay.

oyow avatar oyow commented on June 11, 2024

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.

alsmith avatar alsmith commented on June 11, 2024

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.

dbs179 avatar dbs179 commented on June 11, 2024

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.

tkdrob avatar tkdrob commented on June 11, 2024

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.

ChimpRocket avatar ChimpRocket commented on June 11, 2024

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.

ChimpRocket avatar ChimpRocket commented on June 11, 2024

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.

lsiepel avatar lsiepel commented on June 11, 2024

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.

tkdrob avatar tkdrob commented on June 11, 2024

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.

ChimpRocket avatar ChimpRocket commented on June 11, 2024

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.

mojo333 avatar mojo333 commented on June 11, 2024

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.

tkdrob avatar tkdrob commented on June 11, 2024

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.

alsmith avatar alsmith commented on June 11, 2024

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.

johntdyer avatar johntdyer commented on June 11, 2024

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.

alsmith avatar alsmith commented on June 11, 2024

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.

ChimpRocket avatar ChimpRocket commented on June 11, 2024

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.

mojo333 avatar mojo333 commented on June 11, 2024

As long as you have --noMDNS then you will be fine having multicast DNS enabled on Unifi.

from multicast-relay.

u20p17 avatar u20p17 commented on June 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.