Git Product home page Git Product logo

home-assistant_config's Introduction

home-assistant_config's People

Contributors

danielhiversen avatar jamescw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

home-assistant_config's Issues

403 error when attempting to connect with Google + 'could not locate client caller'

Hi @Danielhiversen

Thank you for putting this together and sharing it.

I'm using your script along with an RFID-reader arrangement that @hovee shared here:
https://community.home-assistant.io/t/google-music-in-ha/10976/120?u=mttsmmrssprks

I almost have things working but when my Home Assistant attempts to connect to Google Play Music, I get the following error messages. Do you know what might be causing these?:

2018-05-12 23:26:07 ERROR (Thread-12) [custom_components.switch.gmusic] Failed to get track (GetStreamUrl: 403 Client Error: Forbidden for url: https://mclients.googleapis.com/music/mplay?sig=vdOiAlx-fd5JvMh7K2hFn0t0HZA&net=mob&opt=hi&tier=fr&dv=0&hl=en_US&pt=e&songid=c0f673e1-2ceb-3873-b579-12c74708f4b1&slt=1526167567609
(requests kwargs: {'method': 'GET', 'headers': {'Authorization': '<omitted>', 'X-Device-ID': 'iosB71B204E-F6EA-43D7-B1DB-29ECFFA8ABBF'}, 'allow_redirects': False, 'url': 'https://mclients.googleapis.com/music/mplay', 'params': {'sig': b'vdOiAlx-fd5JvMh7K2hFn0t0HZA', 'net': 'mob', 'opt': 'hi', 'tier': 'fr', 'dv': 0, 'hl': 'en_US', 'pt': 'e', 'songid': 'c0f673e1-2ceb-3873-b579-12c74708f4b1', 'slt': '1526167567609'}})
(response was: '<HTML>\n<HEAD>\n<TITLE>Forbidden</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Forbidden</H1>\n<H2>Error 403</H2>\n</BODY>\n</HTML>\n'))
2018-05-12 23:26:07 INFO (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: message=Failed to get track (GetStreamUrl: 403 Client Error: Forbidden for url: https://mclients.googleapis.com/music/mplay?sig=vdOiAlx-fd5JvMh7K2hFn0t0HZA&net=mob&opt=hi&tier=fr&dv=0&hl=en_US&pt=e&songid=c0f673e1-2ceb-3873-b579-12c74708f4b1&slt=1526167567609
(requests kwargs: {'method': 'GET', 'headers': {'Authorization': '<omitted>', 'X-Device-ID': 'iosB71B204E-F6EA-43D7-B1DB-29ECFFA8ABBF'}, 'allow_redirects': False, 'url': 'https://mclients.googleapis.com/music/mplay', 'params': {'sig': b'vdOiAlx-fd5JvMh7K2hFn0t0HZA', 'net': 'mob', 'opt': 'hi', 'tier': 'fr', 'dv': 0, 'hl': 'en_US', 'pt': 'e', 'songid': 'c0f673e1-2ceb-3873-b579-12c74708f4b1', 'slt': '1526167567609'}})
(response was: '<HTML>\n<HEAD>\n<TITLE>Forbidden</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Forbidden</H1>\n<H2>Error 403</H2>\n</BODY>\n</HTML>\n')), source=custom_components/switch/gmusic.py, exception=, timestamp=1526167567.7296267, level=ERROR>

The error messages above always seem to be preceded by this series of issues I get when I first start Home Assistant and after I pass the value of a playlist to it.

2018-05-12 23:26:06 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service=turn_on, domain=switch, service_data=entity_id=['switch.google_music'], service_call_id=1975722832-26>
{'absolutePosition': '01937889337530657663', 'creationTimestamp': '1523577235365678', 'trackId': 'be2d5142-4ec8-35e8-8daa-e0569448b784', 'id': 'c2d9d78d-ef1a-31e2-af95-126948da0caf', 'lastModifiedTimestamp': '1523577235365678', 'kind': 'sj#playlistEntry', 'source': '1', 'playlistId': '9142d3a3-3d2d-4da3-9361-a84a4df2f2be', 'clientId': '77949a01-cc81-40b1-bb93-6ec803ee415a', 'deleted': False}
2018-05-12 23:26:07 INFO (Thread-12) [gmusicapi.protocol.shared] could not locate client caller in stack:
  File "/usr/lib/python3.5/threading.py", line 882, in _bootstrap
    self._bootstrap_inner()

  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()

  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)

  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 66, in _worker
    work_item.run()

  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)

  File "/home/homeassistant/.homeassistant/custom_components/switch/gmusic.py", line 120, in turn_on
    self._play()

  File "/home/homeassistant/.homeassistant/custom_components/switch/gmusic.py", line 209, in _play
    self._next_track()

  File "/home/homeassistant/.homeassistant/custom_components/switch/gmusic.py", line 174, in _next_track
    url = self._api.get_stream_url(track['trackId'])

  File "<decorator-gen-102>", line 2, in get_stream_url

  File "/srv/homeassistant/lib/python3.5/site-packages/gmusicapi/utils/utils.py", line 293, in wrapper
    return function(*args, **kw)

  File "/srv/homeassistant/lib/python3.5/site-packages/gmusicapi/clients/mobileclient.py", line 388, in get_stream_url
    return self._make_call(mobileclient.GetStreamUrl, song_id, device_id, quality)

  File "/srv/homeassistant/lib/python3.5/site-packages/gmusicapi/clients/shared.py", line 84, in _make_call
    return protocol.perform(self.session, self.validate, *args, **kwargs)

  File "/srv/homeassistant/lib/python3.5/site-packages/gmusicapi/protocol/shared.py", line 199, in perform
    log.debug("%s(args=%s, kwargs=%s)",

  File "/srv/homeassistant/lib/python3.5/site-packages/gmusicapi/utils/utils.py", line 107, in __getattr__
    stack = traceback.extract_stack()

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.