GerryDazoo / Slinger

Reuse SlingBox hardware without SlingBox Servers
170 stars 34 forks source link

Issues after updating to 4.0 (I think) #594

Open shadowscott opened 1 year ago

shadowscott commented 1 year ago

Server: Raspberry Pi Zero Slingbox Model: Slingbox 350

Was previously using v3.0x, updated to v4.0 I think (I moved the 3 files slingbox_server.py, config.ini, sling.service to /home/slingbox and re-ran all of the 5 steps for the service/chmod, but no way to see what version of the software I'm actually running even in /tmp/slingbox).

Still experiencing issues/delay/graphical bugs when using IR commands, previously did not need to specify an IP Address, but now I needed to specify in the config.ini (seems like it isn't dynamically finding the IP anymore, but not sure why).

Let me know what you'd like to see to help troubleshoot if you can.

GerryDazoo commented 1 year ago

A little late but you should not have had to make any changes to the service/chmod. Just replace the slingbox_server.py file with the latest. The very FIRST thing the server prints when it starts is the version information. Please post all the server output when it starts so we can see what's happening.

Can you be a little more specific about what a "graphical bug" is? The delay is caused by buffering in your Media player. Sorry I can't do anything about that. Try my player https://github.com/GerryDazoo/SlingerPlayer.

shadowscott commented 1 year ago

Ah, I did not know that all you need to actually update is is slingbox_server.py. So just replace that file and stop/start service? Or is there something else that's needed?

So, this is what it looks like when I first connect with IP specified; I DO see the version here now as 4.0.1, so I guess things are working: Version : 4.01 Running on Linux-6.1.21+-armv6l-with-glibc2.31 pid= 3548 slingbox_server.py Using config file config.ini Connection Manager Running on port 8080 with 10 max streams using URL slingbox. Building page for Slingbox Reading Custom Remote definition from /home/pi/Slinger2/remote.txt Starting Streamer Thread for Slingbox Streamer Running: 10 config.ini SLINGBOX 8080 8080 8388608 starting up on port 8080 8388608 8080 Checking for slingbox at ('192.168.1.75', 5201) 0 8080 ('192.168.1.75', 5201) OK 8080 Using slingbox at ('192.168.1.75', 5201) Streamer: 8080 Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox

05/08/2023, 16:10:03.616 RemoteControl connection from ('MY_IP', 62867) Remote Control Connected GET Remote 05/08/2023, 16:10:30.713 RemoteControl connection from ('MY_IP', 62868) Remote Control Connected GET Remote

This is what happens when I try to connect without specifying the IP in the config.ini (like I used to have): Version : 4.01 Running on Linux-6.1.21+-armv6l-with-glibc2.31 pid= 3649 slingbox_server.py Using config file config.ini Connection Manager Running on port 8080 with 10 max streams using URL slingbox. Building page for Slingbox Reading Custom Remote definition from /home/pi/Slinger2/remote.txt Starting Streamer Thread for Slingbox Streamer Running: 10 config.ini SLINGBOX 8080 8080 8388608 starting up on port 8080 8388608 8080 Checking for slingbox at ('', 5201) 0 8080 Error connecting to ('', 5201) 8080 No valid slingbox ip info found in config.ini Exception in thread Thread-2: Traceback (most recent call last): File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner self.run() File "/usr/lib/python3.9/threading.py", line 892, in run self._target(*self._args, **self._kwargs) File "/home/slingbox/slingbox_server.py", line 578, in streamer boxes = find_slingbox_info(name) File "/home/slingbox/slingbox_server.py", line 141, in find_slingbox_info for local_ip, broadcast, interface in ip4_addresses(): File "/home/slingbox/slingbox_server.py", line 114, in ip4_addresses interfaces = netifaces.interfaces() NameError: name 'netifaces' is not defined

Here's the log that I see sometimes when all I do is open the Remote (no stream): 05/08/2023, 16:04:50.768 RemoteControl connection from ('MY_IP', 62839) Remote Control Connected GET Remote 05/08/2023, 16:04:50.994 Streaming request from ('MY_IP', 62840) /apple-touch-icon-120x120-precomposed.png Error: Can't find streamer for /apple-touch-icon-120x120-precomposed.png/8080 in dict_keys(['/slingbox/8080']) 05/08/2023, 16:04:51.044 Streaming request from ('MY_IP', 62841) /apple-touch-icon-120x120-precomposed.png Error: Can't find streamer for /apple-touch-icon-120x120-precomposed.png/8080 in dict_keys(['/slingbox/8080']) 05/08/2023, 16:04:51.09 Streaming request from ('MY_IP', 62842) /apple-touch-icon-120x120-precomposed.png Error: Can't find streamer for /apple-touch-icon-120x120-precomposed.png/8080 in dict_keys(['/slingbox/8080']) 05/08/2023, 16:04:51.153 Streaming request from ('MY_IP', 62843) /apple-touch-icon-120x120.png Error: Can't find streamer for /apple-touch-icon-120x120.png/8080 in dict_keys(['/slingbox/8080']) 05/08/2023, 16:04:51.209 Streaming request from ('MY_IP', 62844) /apple-touch-icon-120x120.png Error: Can't find streamer for /apple-touch-icon-120x120.png/8080 in dict_keys(['/slingbox/8080']) 05/08/2023, 16:04:51.2 Streaming request from ('MY_IP', 62845) /apple-touch-icon-120x120.png Error: Can't find streamer for /apple-touch-icon-120x120.png/8080 in dict_keys(['/slingbox/8080']) 05/08/2023, 16:04:51.313 Streaming request from ('MY_IP', 62846) /apple-touch-icon-precomposed.png Error: Can't find streamer for /apple-touch-icon-precomposed.png/8080 in dict_keys(['/slingbox/8080']) 05/08/2023, 16:04:51.365 Streaming request from ('MY_IP', 62847) /apple-touch-icon-precomposed.png Error: Can't find streamer for /apple-touch-icon-precomposed.png/8080 in dict_keys(['/slingbox/8080']) 05/08/2023, 16:04:51.428 Streaming request from ('MY_IP', 62848) /apple-touch-icon-precomposed.png Error: Can't find streamer for /apple-touch-icon-precomposed.png/8080 in dict_keys(['/slingbox/8080']) 05/08/2023, 16:04:51.494 Streaming request from ('MY_IP', 62849) /apple-touch-icon.png Error: Can't find streamer for /apple-touch-icon.png/8080 in dict_keys(['/slingbox/8080']) 05/08/2023, 16:04:51.557 Streaming request from ('MY_IP', 62850) /apple-touch-icon.png Error: Can't find streamer for /apple-touch-icon.png/8080 in dict_keys(['/slingbox/8080']) 05/08/2023, 16:04:51.60 Streaming request from ('MY_IP', 62851) /apple-touch-icon.png Error: Can't find streamer for /apple-touch-icon.png/8080 in dict_keys(['/slingbox/8080'])

knoppix1337 commented 9 months ago

I have the same problem, in the function:

def ip4_addresses():

There is no reference to:

import netifaces

If I put:

import netifaces

In the beginning of the scripts import references, (and have netifaces installed, of course) everything seems to work fine

The import is somehow not making it to the:

def ip4_addresses():

function.

GerryDazoo commented 9 months ago

Not sure whats happening on your system. The import of netifaces is in

def find_slingbox_info(name): try: import netifaces except: print('ERROR. Cannot scan local network for slingboxes\nBecause the "netifaces" python modules has not been installed') return []

before it calls get ipv4_addresses. I don't see the ERROR message before seeing the log about print(name, 'No valid slingbox ip info found in config.ini')

So I don't see a way for the code to get into ipv4_address without netifaces being define.

knoppix1337 commented 9 months ago

I've had issues with Python similar to this, when dealing with def's and imports, but you can see from shadowscott's log:

File "/home/slingbox/slingbox_server.py", line 114, in ip4_addresses interfaces = netifaces.interfaces() NameError: name 'netifaces' is not defined

Which is the same that I am getting on my end, but the global "import netifaces" seems to make it down to there somehow.