For some reason, my Roku isn't always detected. At first I thought it was only when opening an closing EG fast for testing purposes, but after many tests I can't find rhyme or reason for it.
My EG system is on a wireless bridge and it could be that SSDP is sometimes being dropped, though some evidence I saw makes it appear that occasionally the SSDP broadcast isn't even sent.
Rather then spend time figuring out why, I have added (back in) some ability to hardcode the Rokus.
While Dragon470's solution above may appeal to some, I didn't want to use it because I didn't want to "blast" the network with requests. Additionally, that solution appears to work only for class C subnets - which not everyone will have.
TBH, Dragon can probably fix up these issues quickly, but I'm not big into python, so I decided to implement my own straightforward solution instead.
In this version, you can specify up to 3 hardcoded Roku devices. I require that you provide both the IP and Serial #.
At first, the serial # wasn't required as you can set any unique value for the dictionary. However, I noticed that you could have problems if your commands were based on the original serial # and it was no longer specified.
What I would like to do is just be able to provide an IP address - and then use that to connect directly to the roku and ask for its serial #. I haven't quite figured out the python code to do that yet - so for now you need to specify both values.
These values are only used if NO devices are detected. They aren't added cumulatively to a list of detected ones (that should be trivial to reorder though).
Again, I hope all these suggestions (if not my exact solutions) can be merged back into the official plugin!
- RokuNet plugin 0.2.2
- (22.18 KiB) Downloaded 128 times
You can use the try_connect part only in the blasting method I used. This only will require a self reference and the ip you want to check. Within the function it looks up the serial number and adds it to self.rlist.What I would like to do is just be able to provide an IP address - and then use that to connect directly to the roku and ask for its serial #. I haven't quite figured out the python code to do that yet - so for now you need to specify both values.
I realize the the subnet mask could be used to make the range of ip address. I just didn't set this up as it was originally part of another plugin. I will probably look in to it and change both plugins.
I don't have time to go over what you added by you, but will soon. I am also not the original plugin creator, but will see if I can work something out with him to get the first post modified so the most current plugin link can be there.