"Unable to initialize roku" after upgrade 0.37

started getting this error after update.

Getting the same error:

ERROR (Thread-6) [homeassistant.components.media_player.roku] Unable to initialize roku

Can’t find anything explaining the new changes to entity id for roku that could have caused the issue or any dependant files required

Updated and getting the same error. In the configuration, I tried commenting out the host IP, added discovery, both with and without commenting out the Roku media player, and still won’t work. The player doesn’t show up in my list of devices.

Fixed the issue. I replaced the roku.py code with an older version. File is here on RP install:
/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/media_player/roku.py

Older roku.py code found here:
https://raw.githubusercontent.com/home-assistant/home-assistant/469472914b029b3392fc22cf3e8edebe42d6342a/homeassistant/components/media_player/roku.py

Is there any plans to getting this resolved in future version updates? I am still seeing this error in 37.3 AIO and the temp fix of using an older roku.py seems to be the only solution. It works but the error log also states can’t use new features because of the old roku.py being used.

1 Like

I’ve tinkered with this problem for a little while and figured out some suggestions. First of all for the roku to initialize properly, the devices need to be named. This is done through the roku website, my.roku.com. Then the devices need to be restarted. It takes a while for the names to propagate to the devices. I found that out because when the next day my devices still didn’t have proper names when suddenly they started working. Maybe something can be added back into the code base that allows a built in workaround for those who haven’t named their devices or prefer the default name. Something like this in \deps\roku\core.py would do the trick:

class DeviceInfo(object):

def __init__(self, modelname, modelnum, swversion, sernum, userdevicename):
    self.modelname = modelname
    self.modelnum = modelnum
    self.swversion = swversion
    self.sernum = sernum
    self.userdevicename = userdevicename

    if self.userdevicename is None:
        self.userdevicename = "roku_" + self.sernum

Hi,
I added the if statement to my core.py and it works fine now. I have a Telstra TV (Australian device) which is a rebadged Roku - so can’t log onto the Roku website to name it. The code therefore sorted it out.

So how do we get the code into the released product? (I’m a github noob)

Thx
James