8000 SleepIQ Credentials issue · Issue #43401 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

SleepIQ Credentials issue #43401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jpenrodST opened this issue Nov 19, 2020 · 5 comments · Fixed by #43505
Closed

SleepIQ Credentials issue #43401

jpenrodST opened this issue Nov 19, 2020 · 5 comments · Fixed by #43505

Comments

@jpenrodST
Copy link

The problem

For the past few days now HA can no longer authenticate with the SleepIQ API

Environment

  • Home Assistant Core release with the issue: Version 0.118.0
  • Last working Home Assistant Core release (if known): Version 0.118.0
  • Operating environment (OS/Container/Supervised/Core): Ubuntu
  • Integration causing this issue: sleepiq
  • Link to integration documentation on our website:
    https://www.home-assistant.io/integrations/sleepiq/

Problem-relevant configuration.yaml

# Sleep Number Bed
sleepiq:
  username: !secret sleepnumber_user
  password: !secret sleepnumber_password

Traceback/Error logs

Setup failed for sleepiq: Integration failed to initialize.
10:25:31 AM – setup.py (ERROR)
SleepIQ failed to login, double check your username and password"
10:25:30 AM – sleepiq (ERROR)

Additional information

@joshdreagan
Copy link

The issue seems to be in the sleepyq client library that's used. I tried the following simple test:

from sleepyq import Sleepyq
client = Sleepyq("my_sleepiq_username", "my_sleepiq_password")
client.login()

and got the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jreagan/.local/lib/python3.8/site-packages/sleepyq/__init__.py", line 125, in login
    self._session.params['_k'] = r.json()['key']
  File "/usr/lib/python3.8/site-packages/requests/models.py", line 898, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.8/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python3.8/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I opened the following issue Sleepyq client unable to login #11.

@ratsputin
Copy link

For those checking this, there are now instructions for a manual fix in the above issue. The problem appears to stem from SleepIQ now checking the user agent due to API call volume. There was a request made to the author of homebridge to take down his integration by SleepIQ due to impact on their users.

@joshdreagan
Copy link

I wouldn't close this one just yet @jpenrodST. For a proper fix, we'll need to submit a PR to the sleepyq project, wait for it to get merged, wait for them to cut a new release, and then have the component here in Home Assistant update to use the new version.

@jpenrodST jpenrodST reopened this Nov 20, 2020
@jpenrodST
Copy link
Author

sorry, new to submitting stuff reopened.

@joshdreagan
Copy link

Ok. The sleepyq issue has been resolved: technicalpickles/sleepyq#11

The latest released version 0.8.1 contains the fix. Can someone update the dependency here in the manifest.json file and merge it for the next release? I'd do it myself, but I'm not really sure how to run tests for this project.

@ahertz ahertz mentioned this issue Nov 21, 2020
21 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
0