TCP spout/syphon to Raspberry PI over LAN

Ok, I found one workaround that I feel good about.

The server sends a “bonjour” packet on the network that includes whatever random port number it chose on startup.
If you can pickup on this message, you will know the info needed to start the instance on the raspberry pi.

I wrote a little script that picks up on the messages send by the TCPvp

from zeroconf import ServiceBrowser, Zeroconf
import time
import json
serverList = []
class MyListener:
    def remove_service(self, zeroconf, type, name):
        print("Service %s removed" % (name,))
    def add_service(self, zeroconf, type, name):
        info = zeroconf.get_service_info(type, name)
        serverList.append({'name':info.server, 'port':info.port})

zeroconf = Zeroconf()
listener = MyListener()
browser = ServiceBrowser(zeroconf, "_tl_tcpvt._tcp.local.", listener)

time.sleep(1)
zeroconf.close()

print(json.dumps(serverList))

Next, I wrote a script on the PI that will launch the TCP client with whatever port and IP I specity.

works great so far and I can scatter pi’s around my studio to pick up on different streams.
I like this because it keeps the control on my end, It should also find any other TCPSpout or TCPSiphon server on the LAN and be able to route it to any of the pis

1 Like