squirreltown
Roku Guru

FInd box on LAN

I want to write a roku function that will find a device on my LAN. It's a RaspberryPi,  which interestingly has the same first-half of the MAC address as all other pi's -B8:27:EB.
I haven't worked with these parts of the SDK, so I'm looking for a basic description of the components needed to do that. Thanks.
Kinetics Screensavers
Tags (1)
0 Kudos
36 REPLIES 36
belltown
Roku Guru

Re: FInd box on LAN

I think you'll need to know its IP address.
Tags (1)
0 Kudos
squirreltown
Roku Guru

Re: FInd box on LAN

Bummer. How does a media player find a server? The pi is setup as a webserver. The Roku is set up to enter the I.P. manually now. Sure would be nice...
Kinetics Screensavers
Tags (1)
0 Kudos
belltown
Roku Guru

Re: FInd box on LAN

If you install some kind of UPnP software on the Pi that can respond to SSDP M-SEARCH requests, then I can post some code I have that discovers the IP addresses of other Rokus on the network that can easily be adapted to find your Pi(s) on the network.
Tags (1)
0 Kudos
squirreltown
Roku Guru

Re: FInd box on LAN

Thank you. I'll look into making that happen and get back. Pi-world is pretty big, there must be something out there.
Kinetics Screensavers
Tags (1)
0 Kudos
EnTerr
Roku Guru

Re: FInd box on LAN

even easier - tell your router to always give the same IP to that MAC address, a feature often called "DHCP reservations"
Tags (1)
0 Kudos
squirreltown
Roku Guru

Re: FInd box on LAN

"EnTerr" wrote:
even easier - tell your router to always give the same IP to that MAC address, a feature often called "DHCP reservations"

Yes, well I do that at home, I want to make it more portable.
Kinetics Screensavers
Tags (1)
0 Kudos
EnTerr
Roku Guru

Re: FInd box on LAN

"squirreltown" wrote:
I want to write a roku function that will find a device on my LAN. It's a RaspberryPi,  which interestingly has the same first-half of the MAC address as all other pi's -B8:27:EB.

This will let you know why https://en.wikipedia.org/wiki/MAC_addre ... ss_details
Don't think you can use it though, there is no B/S API to query ARP cache.
Tags (1)
0 Kudos
EnTerr
Roku Guru

Re: FInd box on LAN

"squirreltown" wrote:
Yes, well I do that at home, I want to make it more portable.

What's the reason to want to know RasPi's IP from a Roku - are there particular services running on it?
If so, you might be able to discover that in a hacky way - say if there is web server, you can have some code that scans the network for your guy on port 80, knowing what to expect there.
Tags (1)
0 Kudos
squirreltown
Roku Guru

Re: FInd box on LAN

As was inevitable, I've built a thing that is too complex, uses too much bandwidth, and is too artsy to be a screensaver so I've decided it's an installation. The Pi is a web server, holds all the files and does Imagemagick processing. So anything I can do to make it slicker while demonstrating it seems worth the effort. I think I will try @belltown 's way first, but what you describe sounds like second choice for sure, If I get there I'll ask again about how I might go about that.

Thanks both of you for answering, I appreciate it.
Kinetics Screensavers
Tags (1)
0 Kudos
Community is Temporarily in Read-Only Mode!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. You will not be able to log in or post new comments or kudos during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 12 and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

Thanks for your patience — we’re excited to share what’s next!