Jump to content

SonosController NodeServer


simplextech

Recommended Posts

6 hours ago, simplextech said:

I need more information to determine if this is isolated to only this NS or not.  If it is then I'll need to go in and do further debugging and try and find the root cause.

Hi @simplextech, I only have one other PGC nodeserver, and that's Ring, which stays up through almost anything.  This problem is limited to Sonoscontroller.

Short poll 60, long poll 7200 here.

Thanks for your work on this.

Link to comment
Share on other sites

14 minutes ago, Bumbershoot said:

Hi @simplextech, I only have one other PGC nodeserver, and that's Ring, which stays up through almost anything.  This problem is limited to Sonoscontroller.

Short poll 60, long poll 7200 here.

Thanks for your work on this.

Ring as far as I'm aware (I've looked at it's code :) ) doesn't poll anything and instead receives data so that's a difference there.  Ring is also written in JavaScript which is a different Polyglot Interface so that's different too.

Well I've been meaning to put more time into SonosController and possibly a overhaul re-write is in store.  I'll see what I can do to get this version stable.  I re-installed it from PGC today on my test environment to let it just run and see if I can catch anything different.  UDI is aware and I'm sure will help with pulling PGC info if needed. 

 

Link to comment
Share on other sites

8 minutes ago, simplextech said:

Ring as far as I'm aware (I've looked at it's code :) ) doesn't poll anything and instead receives data so that's a difference there.  Ring is also written in JavaScript which is a different Polyglot Interface so that's different too.

Well I've been meaning to put more time into SonosController and possibly a overhaul re-write is in store.  I'll see what I can do to get this version stable.  I re-installed it from PGC today on my test environment to let it just run and see if I can catch anything different.  UDI is aware and I'm sure will help with pulling PGC info if needed. 

 

I can install the Tesla nodeserver and monitor it going forward.

Link to comment
Share on other sites

Found a couple of low hanging fruit I can resolve.  Issue will effect if a player/group is added to the environment after the NS is running if the player/group was not added to the ISY previously.  I'll get this updated soon.

Development progress will be slightly delayed as I'm having to use my primary computer as my Testing system too as my "server" took a dump on me.  New parts are ordered but not amazon Prime :(.  So my CC's are now hurting and once the wife see's bill I'll be hurting ;)

 

Link to comment
Share on other sites

FWIW, I got this error on the previous version.

2020-10-06 06:57:22,568 [MQTT      ] [DEBUG] Recieved Message: config
2020-10-06 07:45:24,530 [Controller] [ERROR] Exception in thread Controller:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 381, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 978, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 371, in connect
    ssl_context=context,
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 384, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/local/lib/python3.7/ssl.py", line 412, in wrap_socket
    session=session
  File "/usr/local/lib/python3.7/ssl.py", line 853, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.7/ssl.py", line 1117, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:1056)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 727, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 439, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.ws.sonos.com', port=443): Max retries exceeded with url: /control/api/v1/households/Sonos_Vf4EGWq1koTooBJaVyufkOVHV5.ri7sR2ZLDIhpvEt0VyyG/groups/RINCON_48A6B845ABE801400:1507372996/groupVolume (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:1056)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/nodeserver/sonos/sonos_control.py", line 35, in sonos_get_api
    req = requests.get(url, headers=self.headers)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.ws.sonos.com', port=443): Max retries exceeded with url: /control/api/v1/households/Sonos_Vf4EGWq1koTooBJaVyufkOVHV5.ri7sR2ZLDIhpvEt0VyyG/groups/RINCON_48A6B845ABE801400:1507372996/groupVolume (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:1056)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.7/site-packages/pgc_interface/pgc_interface.py", line 795, in _parseInput
    self.shortPoll()
  File "./SonosController.py", line 211, in shortPoll
    group_volume = self.SonosControl.get_group_volume(household, group_id)
  File "/app/nodeserver/sonos/sonos_control.py", line 148, in get_group_volume
    r_json = self.sonos_get_api(group_volume_url)
  File "/app/nodeserver/sonos/sonos_control.py", line 43, in sonos_get_api
    urllib3.exceptions.NewConnectionError, urllib3.exceptions.ConnectionResetError) as Ex:
AttributeError: module 'urllib3.exceptions' has no attribute 'ConnectionResetError'

 

Link to comment
Share on other sites

46 minutes ago, bcdavis75 said:

Tried the version.  Looks like it failed.  guessing it's the same issue others are having.

sonoscontroller-0021b902512a-2 (2).txt 5.96 kB · 0 downloads

@Bumbershoot

This is interesting as I've been running all night ling from my test docker system.  The difference being that it DOES NOT use the AWS servers.  Is there something wrong in PGC/AWS I wonder?

Link to comment
Share on other sites

2 hours ago, glarsen said:

ssl.SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:1056)

Ohhh goody and SSL error... that's lower level than the nodeserver as the python requests library uses what's available on the system.  Interesting that I'm not receiving any of those errors though.

I wish the logging module would load in AWS so I could see what is making that call......

The other items in your is showing that groups/players exist in the Sonos system but are not created within the ISY yet.  You should run re-discover.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      36.5k
    • Total Posts
      367.6k
×
×
  • Create New...