Skip to content
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

Switched from unmaintained tuyapy to tuyaha #24821

Merged

Conversation

@PaulAnnekov
Copy link
Contributor

commented Jun 28, 2019

Description:

After 10 days, access token to Tuya API expires and tuyapy library tries to acquire a new one, but that function calls a broken url. This leads to an error like this:

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='px1.tuyaeu.comhomeassistant', port=443): Max retries exceeded with url: /access.do?grant_type=refresh_token&refresh_token=... (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fade0473748>: Failed to establish a new connection: [Errno -2] Name or service not known'))

I don't know whether Tuya API allows to use expired token, but still this bug should be fixed. As tuyapy maintainer has left the company and there was no reply from tuyasmart@tuya.com for a week, I forked tuyapy. The name of the new library is tuyaha. Version 0.0.1 is already published to pypi and contains fixed code. This PR uses new library.

Related issue: possible fix for #20413

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
@balloob

This comment has been minimized.

Copy link
Member

commented Jun 28, 2019

Let's hold off. I'll contact tuya. I got some emails

@balloob

This comment has been minimized.

Copy link
Member

commented Jun 30, 2019

I sent them a message, if they don't respond by Thursday, let's merge this.

@PaulAnnekov

This comment has been minimized.

Copy link
Contributor Author

commented Jun 30, 2019

@PaulAnnekov

This comment has been minimized.

Copy link
Contributor Author

commented Jul 5, 2019

@balloob any news?

@balloob

This comment has been minimized.

Copy link
Member

commented Jul 6, 2019

Nope.

@balloob balloob merged commit 97ed7fb into home-assistant:dev Jul 6, 2019

13 checks passed

build Workflow: build
Details
ci/circleci: pre-install-all-requirements Your tests passed on CircleCI!
Details
ci/circleci: pre-test 3.5.5 Your tests passed on CircleCI!
Details
ci/circleci: pre-test 3.6 Your tests passed on CircleCI!
Details
ci/circleci: pre-test 3.7 Your tests passed on CircleCI!
Details
ci/circleci: pylint Your tests passed on CircleCI!
Details
ci/circleci: static-check Your tests passed on CircleCI!
Details
ci/circleci: test 3.5.5 Your tests passed on CircleCI!
Details
ci/circleci: test 3.6 Your tests passed on CircleCI!
Details
ci/circleci: test 3.7 Your tests passed on CircleCI!
Details
cla-bot Everyone involved has signed the CLA
codecov/patch Coverage not affected when comparing a69a007...081ddcf
Details
codecov/project 94.13% (target 90%)
Details
@linlingzi

This comment has been minimized.

Copy link

commented Jul 7, 2019

thanks,Can you help me
#24570

KJonline added a commit to Rendili/home-assistant that referenced this pull request Jul 8, 2019
Merge branch 'hive_water_heater' of github.com:Rendili/home-assistant…
… into hive_water_heater

* 'hive_water_heater' of github.com:Rendili/home-assistant: (21 commits)
  Sensibo, add HVAC_MODE_OFF (home-assistant#25016)
  Add support for arcam fmj receivers (home-assistant#24621)
  Enphase envoy individual inverter production (home-assistant#24445)
  Implement Twilio SMS notify MediaUrl support (home-assistant#24971)
  Climate 1.0 (home-assistant#23899)
  Correct socket use in cert_expiry platform (home-assistant#25011)
  Added missing yeelight models mapping (home-assistant#24963)
  Install requirements for integrations in packages before importing them. (home-assistant#25005)
  Upgrade insteonplm to 0.16.0 and add INSTEON scene triggering (home-assistant#24765)
  Upgrade hdate==0.8.8 (home-assistant#25008)
  upgrade switchmate to latest lib (home-assistant#25006)
  Test dependency updates (home-assistant#25004)
  Add support for aurora ABB Powerone solar photovoltaic inverter (home-assistant#24809)
  Sleepiq single sleeper crash (home-assistant#24941)
  Changes as per code review of home-assistant#24646 (home-assistant#24917)
  Upgrade mypy to 0.711, drop no longer needed workarounds (home-assistant#24998)
  Adds Stale Probot for issues (home-assistant#24985)
  Adds Lock Threads Probot (home-assistant#24984)
  Switched from tuyapy to tuyaha as 1st one is not maintained (home-assistant#24821)
  Fix errors if rest source becomes unavailable (home-assistant#24986)
  ...

# Conflicts:
#	homeassistant/components/hive/__init__.py
#	homeassistant/components/hive/climate.py
@balloob balloob referenced this pull request Jul 17, 2019
@Martinvdm

This comment has been minimized.

Copy link

commented Sep 18, 2019

When does this become live?

@home-assistant home-assistant locked as resolved and limited conversation to collaborators Sep 18, 2019

@balloob

This comment has been minimized.

Copy link
Member

commented Sep 18, 2019

Already live.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants
You can’t perform that action at this time.