GerryDazoo / Slinger

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

3.08 not letting go of Slingboxes after disconnection #166

Closed floormanager1 closed 1 year ago

floormanager1 commented 1 year ago

Hi, Firstly, thank you for all your work in keeping us Slinging. I'm about to work away from home again and the Slingbox has always been my saviour. I'm been playing with the multiple slingbox option on one server and have come up with an interesting issue. For the older boxes, Pro and ProHD, after I've closed VLC, the slingbox stays connected and will only stop streaming, when the server is shut down. The 350 on the same server disconnects, as do the older boxes on a single server. I am sure it's me; any clues? I should add I'm running the server on Windows 10. Paul

[SLINGBOXES] sb1=ProHD sb2=Red sb3=350

[ProHD] sbtype="Solo/Pro/ProHD" password=xxxxxxxxxx ;finderid=nogood4CF70531865D73650A16A0A536 ipaddress=192.168.1.19 port=5002 Resolution=12 FrameRate=30 VideoBandwidth=2000 VideoSmoothness=63 VideoSource=1 maxstreams=3 ;StartChannel=155 ;RemoteLock=yes ;Remote=ProHD_remote.txt

[Red] sbtype="Solo/Pro/ProHD" password=xxxxxxxxxx
ipaddress=192.168.1.17 ;finderid=BAD95DAED609364C8204F2BC5FBDC363 port=5001 Resolution=12 FrameRate=30 VideoBandwidth=2000 VideoSmoothness=63 VideoSource=1 ;RemoteLock=yes ;StartChannel=155 ;Remote=solo_remote.txt

[350] sbtype="350" password=xxxxxxxxxxxxxxxxxxx ;finderid=E706A7405882C03A076502246DAD632F
ipaddress=192.168.1.12 port=5201 Resolution=12 FrameRate=30 VideoBandwidth=2000 VideoSmoothness=63 VideoSource=0 ;Remote=m1_remote.txt

[SERVER] ; local port number for the server to listen on for connections ; port number+1 is used by the remote control code. port=8085 maxremotestreams=4 URLbase=Paul ;enableremote=yes

GerryDazoo commented 1 year ago

Please post all the server output please. When the last stream stops the connection to the SB should close. How did you determine it stays streaming?

-Gerry

From: floormanager1 @.> Sent: Sunday, October 23, 2022 3:24 PM To: GerryDazoo/Slinger @.> Cc: Subscribed @.***> Subject: [GerryDazoo/Slinger] 3.08 not letting go of Slingboxes after disconnection (Issue #166)

Hi, Firstly, thank you for all your work in keeping us Slinging. I'm about to work away from home again and the Slingbox has always been my saviour. I'm been playing with the multiple slingbox option on one server and have come up with an interesting issue. For the older boxes, Pro and ProHD, after I've closed VLC, the slingbox stays connected and will only stop streaming, when the server is shut down. The 350 on the same server disconnects, as do the older boxes on a single server. I am sure it's me; any clues? Paul

[SLINGBOXES] sb1=ProHD sb2=Red sb3=350

[ProHD] sbtype="Solo/Pro/ProHD" password=xxxxxxxxxx ;finderid=nogood4CF70531865D73650A16A0A536 ipaddress=192.168.1.19 port=5002 Resolution=12 FrameRate=30 VideoBandwidth=2000 VideoSmoothness=63 VideoSource=1 maxstreams=3 ;StartChannel=155 ;RemoteLock=yes ;Remote=ProHD_remote.txt

[Red] sbtype="Solo/Pro/ProHD" password=xxxxxxxxxx ipaddress=192.168.1.17 ;finderid=BAD95DAED609364C8204F2BC5FBDC363 port=5001 Resolution=12 FrameRate=30 VideoBandwidth=2000 VideoSmoothness=63 VideoSource=1 ;RemoteLock=yes ;StartChannel=155 ;Remote=solo_remote.txt

[350] sbtype="350" password=xxxxxxxxxxxxxxxxxxx ;finderid=E706A7405882C03A076502246DAD632F ipaddress=192.168.1.12 port=5201 Resolution=12 FrameRate=30 VideoBandwidth=2000 VideoSmoothness=63 VideoSource=0 ;Remote=m1_remote.txt

[SERVER] ; local port number for the server to listen on for connections ; port number+1 is used by the remote control code. port=8085 maxremotestreams=4 URLbase=Paul ;enableremote=yes

— Reply to this email directly, view it on GitHub https://github.com/GerryDazoo/Slinger/issues/166 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AYOYVQIMT7SHAQXJWHS32OTWEV7EDANCNFSM6AAAAAARMMRVGA . You are receiving this because you are subscribed to this thread. https://github.com/notifications/beacon/AYOYVQLSFTC7JTPHYDL2MWLWEV7EDA5CNFSM6AAAAAARMMRVGCWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHFJINP7M.gif Message ID: @. @.> >

floormanager1 commented 1 year ago

Hi Gerry, here's the server

C:\Users\Paul\Desktop\3.08>( REM if code is not on your C drive switch to the correct drive letter REM g: REM use the full pathname to where your code is located cd slingbox slingbox_server.exe REM or if your using python use the full path to whatever python interpreter you're using. REM "c:\Program Files\Python39\python.exe" slingbox_server.py ) The system cannot find the path specified. Version : 3.08c Running on Windows-10-10.0.19043-SP0 pid= 22884 Using config file config.ini Connection Manager Running on port 8085 with 4 max streams using URL Paul. BOXES [('sb1', 'ProHD'), ('sb2', 'Red'), ('sb3', '350')] Streamer Running: 4 config.ini ProHD ProHD 8085 8388608 Streamer Running: 4 config.ini 350 350 8085 8388608 starting up on port 8085 8388608 Checking for slingbox at ('192.168.1.19', 5002) Streamer Running: 4 config.ini Red Red 8085 8388608 Checking for slingbox at ('192.168.1.12', 5201) Checking for slingbox at ('192.168.1.17', 5001) ('192.168.1.19', 5002) OK ProHD Using slingbox at ('192.168.1.19', 5002) ('192.168.1.17', 5001) OK Red Using slingbox at ('192.168.1.17', 5001) Streamer: ProHD Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox ('192.168.1.12', 5201) OK Streamer: Red Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox 350 Using slingbox at ('192.168.1.12', 5201) Streamer: 350 Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox Building page for ProHD Building page for Red Building page for 350

Slinginfo "Solo/Pro/ProHD" 12 30 192.168.1.19 5002 3000 3 ProHD Starting Stream for 192.168.1.29:57633 Connecting... ('192.168.1.19', 5002) Control ProHD Selecting Video Source 1 Keycodes= [1, 4, 5, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 46, 62, 63, 65, 66, 67, 72, 74, 75, 76, 77] VideoParameters: Resolution= 12 FrameRate= 30 VideoBandwidth= 2000 VideoSmoothness= 63 IframeRate= 5 AudioBitRate= 64 Connecting... ('192.168.1.19', 5002) Stream ProHD Stream started at 10/24/2022, 08:42:03 732 0 .10/24/2022, 08:42:22 ProHD Stream Terminated for 192.168.1.29:57633 [WinError 10054] An existing connection was forcibly closed by the remote host ProHD Shutting down connections Streamer: ProHD Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox 10/24/2022, 08:44:30 Streaming connection from ('192.168.1.29', 57683)

Slinginfo "Solo/Pro/ProHD" 12 30 192.168.1.19 5002 3000 3 ProHD Starting Stream for 192.168.1.29:57683 Connecting... ('192.168.1.19', 5002) Control cmd: 0x7e err: 0x13 176 ProHD Box in use! Kicking off other user. ProHD Selecting Video Source 1 Keycodes= [1, 4, 5, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 46, 62, 63, 65, 66, 67, 72, 74, 75, 76, 77] VideoParameters: Resolution= 12 FrameRate= 30 VideoBandwidth= 2000 VideoSmoothness= 63 IframeRate= 5 AudioBitRate= 64 Connecting... ('192.168.1.19', 5002) Stream ProHD Stream started at 10/24/2022, 08:44:38 732 0 .....

When I look at the Slingbox, the streaming lights are still on. As you can see, when I reconnect, it kicks off the other user.

floormanager1 commented 1 year ago

Here's after a bit more testing. The Pro and ProHD boxes do not let go, whereas the 350 does. C:\Users\Paul\Desktop\3.08>( REM if code is not on your C drive switch to the correct drive letter REM g: REM use the full pathname to where your code is located cd slingbox slingbox_server.exe REM or if your using python use the full path to whatever python interpreter you're using. REM "c:\Program Files\Python39\python.exe" slingbox_server.py ) The system cannot find the path specified. Version : 3.08c Running on Windows-10-10.0.19043-SP0 pid= 22884 Using config file config.ini Connection Manager Running on port 8085 with 4 max streams using URL Paul. BOXES [('sb1', 'ProHD'), ('sb2', 'Red'), ('sb3', '350')] Streamer Running: 4 config.ini ProHD ProHD 8085 8388608 Streamer Running: 4 config.ini 350 350 8085 8388608 starting up on port 8085 8388608 Checking for slingbox at ('192.168.1.19', 5002) Streamer Running: 4 config.ini Red Red 8085 8388608 Checking for slingbox at ('192.168.1.12', 5201) Checking for slingbox at ('192.168.1.17', 5001) ('192.168.1.19', 5002) OK ProHD Using slingbox at ('192.168.1.19', 5002) ('192.168.1.17', 5001) OK Red Using slingbox at ('192.168.1.17', 5001) Streamer: ProHD Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox ('192.168.1.12', 5201) OK Streamer: Red Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox 350 Using slingbox at ('192.168.1.12', 5201) Streamer: 350 Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox Building page for ProHD Building page for Red Building page for 350

Slinginfo "Solo/Pro/ProHD" 12 30 192.168.1.19 5002 3000 3 ProHD Starting Stream for 192.168.1.29:57633 Connecting... ('192.168.1.19', 5002) Control ProHD Selecting Video Source 1 Keycodes= [1, 4, 5, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 46, 62, 63, 65, 66, 67, 72, 74, 75, 76, 77] VideoParameters: Resolution= 12 FrameRate= 30 VideoBandwidth= 2000 VideoSmoothness= 63 IframeRate= 5 AudioBitRate= 64 Connecting... ('192.168.1.19', 5002) Stream ProHD Stream started at 10/24/2022, 08:42:03 732 0 .10/24/2022, 08:42:22 ProHD Stream Terminated for 192.168.1.29:57633 [WinError 10054] An existing connection was forcibly closed by the remote host ProHD Shutting down connections Streamer: ProHD Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox 10/24/2022, 08:44:30 Streaming connection from ('192.168.1.29', 57683)

Slinginfo "Solo/Pro/ProHD" 12 30 192.168.1.19 5002 3000 3 ProHD Starting Stream for 192.168.1.29:57683 Connecting... ('192.168.1.19', 5002) Control cmd: 0x7e err: 0x13 176 ProHD Box in use! Kicking off other user. ProHD Selecting Video Source 1 Keycodes= [1, 4, 5, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 46, 62, 63, 65, 66, 67, 72, 74, 75, 76, 77] VideoParameters: Resolution= 12 FrameRate= 30 VideoBandwidth= 2000 VideoSmoothness= 63 IframeRate= 5 AudioBitRate= 64 Connecting... ('192.168.1.19', 5002) Stream ProHD Stream started at 10/24/2022, 08:44:38 732 0 ........10/24/2022, 08:46:08 ProHD 1 Clients.192.168.1.29:57683 ...10/24/2022, 08:46:38 ProHD Stream Terminated for 192.168.1.29:57683 [WinError 10054] An existing connection was forcibly closed by the remote host ProHD Shutting down connections Streamer: ProHD Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox 10/24/2022, 08:46:53 Streaming connection from ('192.168.1.29', 57714)

Slinginfo "Solo/Pro/ProHD" 12 30 192.168.1.19 5002 3000 3 ProHD Starting Stream for 192.168.1.29:57714 Connecting... ('192.168.1.19', 5002) Control cmd: 0x7e err: 0x13 176 ProHD Box in use! Kicking off other user. ProHD Selecting Video Source 1 Keycodes= [1, 4, 5, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 46, 62, 63, 65, 66, 67, 72, 74, 75, 76, 77] VideoParameters: Resolution= 12 FrameRate= 30 VideoBandwidth= 2000 VideoSmoothness= 63 IframeRate= 5 AudioBitRate= 64 Connecting... ('192.168.1.19', 5002) Stream ProHD Stream started at 10/24/2022, 08:47:02 732 0 ...10/24/2022, 08:47:39 ProHD Stream Terminated for 192.168.1.29:57714 [WinError 10054] An existing connection was forcibly closed by the remote host ProHD Shutting down connections Streamer: ProHD Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox 10/24/2022, 08:47:54 Streaming connection from ('192.168.1.29', 57731)

Slinginfo "Solo/Pro/ProHD" 12 30 192.168.1.17 5001 3000 10 Red Starting Stream for 192.168.1.29:57731 Connecting... ('192.168.1.17', 5001) Control Red Selecting Video Source 1 Keycodes= [1, 4, 5, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 24, 25, 26, 27, 28, 29, 35, 36, 38, 39, 40, 41, 42, 46, 62, 63, 65, 66, 67, 72, 74, 75, 76, 77] VideoParameters: Resolution= 12 FrameRate= 30 VideoBandwidth= 2000 VideoSmoothness= 63 IframeRate= 5 AudioBitRate= 64 Connecting... ('192.168.1.17', 5001) Stream Red Stream started at 10/24/2022, 08:47:57 577 0 ....10/24/2022, 08:48:41 Red Stream Terminated for 192.168.1.29:57731 [WinError 10054] An existing connection was forcibly closed by the remote host Red Shutting down connections Streamer: Red Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox 10/24/2022, 08:49:24 Streaming connection from ('192.168.1.29', 57742)

Slinginfo "350" 12 30 192.168.1.12 5201 3072 10 350 Starting Stream for 192.168.1.29:57742 Connecting... ('192.168.1.12', 5201) Control 350 Selecting Video Source 0 Keycodes= [1, 4, 5, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 24, 25, 26, 27, 28, 29, 35, 36, 38, 39, 40, 41, 42, 46, 62, 63, 65, 66, 67, 72, 74, 75, 76, 77] VideoParameters: Resolution= 12 FrameRate= 30 VideoBandwidth= 2000 VideoSmoothness= 63 IframeRate= 5 AudioBitRate= 64 Connecting... ('192.168.1.12', 5201) Stream 350 Stream started at 10/24/2022, 08:49:27 744 0 ...10/24/2022, 08:50:01 350 Stream Terminated for 192.168.1.29:57742 [WinError 10054] An existing connection was forcibly closed by the remote host 350 Shutting down connections Streamer: 350 Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox 10/24/2022, 08:50:14 Streaming connection from ('192.168.1.29', 57766)

Slinginfo "Solo/Pro/ProHD" 12 30 192.168.1.17 5001 3000 10 Red Starting Stream for 192.168.1.29:57766 Connecting... ('192.168.1.17', 5001) Control Red Selecting Video Source 1 Keycodes= [1, 4, 5, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 24, 25, 26, 27, 28, 29, 35, 36, 38, 39, 40, 41, 42, 46, 62, 63, 65, 66, 67, 72, 74, 75, 76, 77] VideoParameters: Resolution= 12 FrameRate= 30 VideoBandwidth= 2000 VideoSmoothness= 63 IframeRate= 5 AudioBitRate= 64 Connecting... ('192.168.1.17', 5001) Stream Red Stream started at 10/24/2022, 08:50:18 577 0 10/24/2022, 08:50:18 Red Stream Terminated for 192.168.1.29:57766 [WinError 10053] An established connection was aborted by the software in your host machine Red Shutting down connections Streamer: Red Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox 10/24/2022, 08:50:35 Streaming connection from ('192.168.1.29', 57772)

Slinginfo "Solo/Pro/ProHD" 12 30 192.168.1.17 5001 3000 10 Red Starting Stream for 192.168.1.29:57772 Connecting... ('192.168.1.17', 5001) Control cmd: 0x7e err: 0x13 176 Red Box in use! Kicking off other user. Red Selecting Video Source 1 Keycodes= [1, 4, 5, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 24, 25, 26, 27, 28, 29, 35, 36, 38, 39, 40, 41, 42, 46, 62, 63, 65, 66, 67, 72, 74, 75, 76, 77] VideoParameters: Resolution= 12 FrameRate= 30 VideoBandwidth= 2000 VideoSmoothness= 63 IframeRate= 5 AudioBitRate= 64 Connecting... ('192.168.1.17', 5001) Stream Red Stream started at 10/24/2022, 08:50:40 577 0 ...10/24/2022, 08:51:17 Red Stream Terminated for 192.168.1.29:57772 [WinError 10054] An existing connection was forcibly closed by the remote host Red Shutting down connections Streamer: Red Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox 10/24/2022, 08:51:27 Streaming connection from ('192.168.1.29', 57785)

Slinginfo "350" 12 30 192.168.1.12 5201 3072 10 350 Starting Stream for 192.168.1.29:57785 Connecting... ('192.168.1.12', 5201) Control 350 Selecting Video Source 0 Keycodes= [1, 4, 5, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 24, 25, 26, 27, 28, 29, 35, 36, 38, 39, 40, 41, 42, 46, 62, 63, 65, 66, 67, 72, 74, 75, 76, 77] VideoParameters: Resolution= 12 FrameRate= 30 VideoBandwidth= 2000 VideoSmoothness= 63 IframeRate= 5 AudioBitRate= 64 Connecting... ('192.168.1.12', 5201) Stream 350 Stream started at 10/24/2022, 08:51:30 744 0 ...

It seems related to this error cmd: 0x7e err: 0x13 176

GerryDazoo commented 1 year ago

This I think is a bug in the Singbox Pro/Solo code or I just don't know how it's suppose to work. My code does properly close the video and control stream sockets but it doesn't look like the SB gets the message. So every time you restart the stream you'll get this message. Doesn't happen on the 500. It can be safely ignored. The SB does sort itself out after some time.
So no it's not really streaming it just sort of looks like it from the logs.

floormanager1 commented 1 year ago

Okay thanks Gerry. Like I said, it did not happen with the single servers. But pleased it's not me nor a bug! All the best, Paul

GerryDazoo commented 1 year ago

For sure not you. But I did have a closer look at what the Sling code does when it closes a stream to the Solo and it does appear it sends a "logout" command as well as closing the sockets. I'll stick that into the next release and things should be a little clearer.