Detecting a kodi server on the network
#1
Hello,

I've got a question not really related to JSON-RPC but maybe you can put me in the right direction...
I'd like to detect all KODI-servers on my network. What is the best way to go?

I thought of sending a broadcast event on the network, but I am not sure what would be the right port to use to detect the running servers.
I have tried to send broadcast events in java using but to no avail. I use the port 8278 I found mentioned in a website , but like I said I am not sure if that's the correct one.

Can anyone of you point me in the right direction? Perhaps somebody has a piece of source code - if it is not in Java, no problem - I'll try to map it to Java then.

Thanks a lot,


Rudi
Reply
#2
I use SSDP (UPnP) to detect Kodi/XBMC in my XBMC2 plugin for EventGhost. You need to have UPnP enabled in Kodi/XBMC for it to work.

You need fairly simple code for it, here is an Python example (Not Kodi/XBMC specific)

jonib
XBMC2, EventGhost plugin. Image
Reply
#3
You could also try Zeroconf which is made for exactly this purpose and it also provides you with the ports you can use.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#4
Pretty sure Kore uses Zeroconf so if you adhere to the open source license you can peak at that code.
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#5
(2015-03-12, 10:22)Montellese Wrote: You could also try Zeroconf which is made for exactly this purpose and it also provides you with the ports you can use.
Don't you need some Apple software (at least on Windows) installed to use ZeroConf?

jonib
XBMC2, EventGhost plugin. Image
Reply
#6
Yes on windows you need the Bonjour Service installed. On any other platform Kodi has Zeroconf built in.

Nonetheless it's what Zeroconf has been made for.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#7
(2015-03-12, 18:27)Montellese Wrote: Yes on windows you need the Bonjour Service installed. On any other platform Kodi has Zeroconf built in.
Hmm, why isn't it built in on Windows?

jonib
XBMC2, EventGhost plugin. Image
Reply
#8
AFAIK there's no library that runs on windows that we could use.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply

Logout Mark Read Team Forum Stats Members Help
Detecting a kodi server on the network0