bpaauwe / RokuPoly

ISY Polygot node server to interface with Roku media players.
Other
1 stars 0 forks source link

Node server "crashes" #5

Open DanPerovich opened 3 years ago

DanPerovich commented 3 years ago

After an undetermined period of time, the RokuPoly node server no longer works...requests to interact with a Roku no longer work. Looking at the logs, I see the same exception occurring anytime the node server stops working:

2020-10-17 18:09:48,029 Controller polyinterface ERROR polyinterface:write: Exception in thread Controller: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/home/pi/.local/lib/python3.7/site-packages/polyinterface/polyinterface.py", line 854, in _parseInput self.longPoll() File "/home/pi/.polyglot/nodeservers/RokuMediaPlayer/nodes/roku.py", line 71, in longPoll self.nodes[node].longPoll() File "/home/pi/.polyglot/nodeservers/RokuMediaPlayer/nodes/roku_node.py", line 29, in longPoll self.update_status(self.active) File "/home/pi/.polyglot/nodeservers/RokuMediaPlayer/nodes/roku_node.py", line 34, in update_status self.setDriver('GV1', self.apps[address][1], report=True, force=True) KeyError: '65067'

bpaauwe commented 3 years ago

Does the log happen to show what application is associated with id 65067?

I had problems with certain application names using characters that didn't work with the ISY and had to do some character substitutions to make them work. Given that I only use a small subset of the the available apps on the Roku platform, I may have missed some.

DanPerovich commented 3 years ago

Looks like it is "Starz":

pi@raspberrypi:~/.polyglot/nodeservers/RokuMediaPlayer/logs $ cat debug.log | grep 65067

2020-10-20 14:35:25,767 MQTT polyinterface DEBUG roku:discover: STARZ, 65067

2020-10-20 14:35:25,785 MQTT polyinterface ERROR write_profile:write_nodedef: {'TV Room': {'ip': '192.168.1.26', 'configured': True, 'node_id': 'roku_26', 'apps': {'31012': ('FandangoNOW Movies and TV', 1), '13': ('Prime Video', 2), '13842': ('VUDU', 3), '149733': ('Boomerang', 4), '69091': ('4K Spotlight', 5), '151908': ('The Roku Channel', 6), '2285': ('Hulu', 7), '164003': ('Cartoon Network', 8), '46041': ('Sling TV', 9), '297924': ('iHeartRadio Family', 10), '34376': ('ESPN', 11), '552944': ('Roku Tips and Tricks', 12), '13535': ('Plex - Stream for Free', 13), '66595': ('Nick Jr.', 14), '88798': ('Minecraft by HappyKids.tv', 15), '62701': ('AFV Animals-Animal and Pet Video', 16), '62702': ('AFV Kids-FreeandSafe Funny Video', 17), '90819': ('The Gummibaer Channel', 18), '291097': ('Disney Plus', 19), '32828': ('DisneyNOW', 20), '23333': ('PBS KIDS', 21), '52838': ('Nickelodeon', 22), '184661': ('Roku Streaming Player Intro', 23), '837': ('YouTube', 24), '261333': ('ET Live', 25), '251088': ('STIRR - the new free TV', 26), '2213': ('Roku Media Player', 27), '12': ('Netflix', 28), '32614': ('HappyKids.tv', 29), '11055': ('Newsy', 30), '593210': ('MetaTube', 31), '65978': ('CNNgo', 32), '155319': ('RAG', 33), '65067': ('STARZ', 34), '579377': ('FuturisticHub', 35), '0': ('Screensaver', 0)}}}

bpaauwe commented 3 years ago

Ok, it's not the name then.

I notice it's near the end of the list, is this something you added recently? The node server is only checking the installed apps at startup so it does need to be restarted if new apps are added.

I did add a check so that it shouldn't crash anymore when this happens but the new apps won't show up on the list of apps to launch until the node server is restarted.

DanPerovich commented 3 years ago

I don't think I added Starz recently. We don't currently subscribe to Starz, I'm not sure we ever have unless it was free.

Just installed v2.0.2. I'll report back my findings after a few days of testing to make sure the crash no longer occurs.

Thanks!