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

Fails with Home assistant 2023.3 beta #462

Closed
jscherry opened this issue Feb 23, 2023 · 50 comments · Fixed by SecKatie/wyzeapy#67
Closed

Fails with Home assistant 2023.3 beta #462

jscherry opened this issue Feb 23, 2023 · 50 comments · Fixed by SecKatie/wyzeapy#67
Assignees
Labels
bug Something isn't working

Comments

@jscherry
Copy link

Describe the bug
Won't load integration
To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

System configuration
System: Home assistant os on odroid (home assistant blue)
HA Version: 2023.3 beta
WyzeApi Version: Newest beta and version .17

home-assistant.log
Logger: homeassistant.setup
Source: setup.py:205
First occurred: 7:34:47 PM (1 occurrences)
Last logged: 7:34:47 PM

Setup failed for custom integration wyzeapi: Requirements for wyzeapi not found: ['wyzeapy==0.5.18'].

For additional information see the readme: https://github.com/JoshuaMulliken/ha-wyzeapi#reporting-an-issue
-->

Logger: homeassistant.setup
Source: setup.py:205
First occurred: 7:34:47 PM (1 occurrences)
Last logged: 7:34:47 PM

Setup failed for custom integration wyzeapi: Requirements for wyzeapi not found: ['wyzeapy==0.5.18'].
@jscherry jscherry added the bug Something isn't working label Feb 23, 2023
@jscherry
Copy link
Author

I even tried to uninstall, removed from hacs, redownloaded, rebooted, and reinstall but it says this when trying to install
Error
Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble

@chrisvball
Copy link

same here. I can post error, but identical.

@jbrown9100
Copy link

Same for me.

@JoeSchubert
Copy link
Collaborator

Is this still a problem?

The error is saying that it can't find that version of the wyzeapy library, which should have been pulled from pypi when you installed/upgraded.

You can see that it's available here: https://pypi.org/project/wyzeapy/ with that version number... So I would venture a guess that this was an issue with pypi not serving it for some limited period of time.

@jscherry
Copy link
Author

How do we fix this?

@CenterInYou
Copy link

@jscherry an update was just pushed out if you have it enabled to see beta versions but doesn't seem to have fixed it :(

@jscherry
Copy link
Author

I've tried the beta's and regular version. Neither work? Does anyone know how we can fix this until it's corrected in the integration?

@chrisvball
Copy link

@jscherry I rolled back HA 2023.3 beta back to the prod version 2023.2.5 and 1.17 with Wyze HACS. And everything loaded.
For "fun" I took a backup of the VM and joined the beta and then it goes back to the original issue. So restored it and back to working. If I didn't have ~25 Wyze lights and ~20 cams I would just get away from the Wyze ecosystem, I just have so much, but nothing new.. I now just buy Zigbee or anything that isn't WiFi only, even my tuya lights are solid. But honestly if I did it all over I would have just Hue lights, the 20 or so that i have running z2m work flawlessly. Such a superior product, but 3x as much..
I see HA as a way not to be limited by the cloud/internet i just didn't know about it soon enough..

@jscherry
Copy link
Author

@chrisvball I'm now restoring the backup also. I just hope someone can fix this issue before 3/1/23 when the regular 2023.3 version gets released. I've been using this integration since it was released and think it's great.

@chrisvball
Copy link

My frustration lies with WYZE. I understand they are in the money making business, but they should give you some local access if you have the product licensed. It would be a win win with everyone. I have the unlimited that gives me all the cloud features, but I don't use it, I did it to support their business model. Hoping one day they could give us the rtsp firmware back and at least let a yearly subscriber go local.
Good luck!

@brg468
Copy link
Collaborator

brg468 commented Feb 24, 2023

I think the issue is here. There was an update to the HA package constraints that no longer allows the wyzeapy requirements to be met.
These are our requirements:

install_requires = \
['aiodns>=3.0.0,<4.0.0',
 'aiohttp>=3.7,<4.0',
 'cchardet>=2.1.7,<3.0.0',
 'pycryptodome>=3.12.0,<4.0.0']

@JoshuaMulliken or @JoeSchubert can you see what can be done to update or remove this requirement? HA is now requiring faust-cchardet>=2.1.18

@JoeSchubert
Copy link
Collaborator

I think the issue is here. There was an update to the HA package constraints that no longer allows the wyzeapy requirements to be met. These are our requirements:

install_requires = \
['aiodns>=3.0.0,<4.0.0',
 'aiohttp>=3.7,<4.0',
 'cchardet>=2.1.7,<3.0.0',
 'pycryptodome>=3.12.0,<4.0.0']

@JoshuaMulliken or @JoeSchubert can you see what can be done to update or remove this requirement? HA is now requiring faust-cchardet>=2.1.18

I'd be willing to bet it's a 1for1 swap based on the way that they're commit blocks that one and says that it's been replaced with faust-cchardet>=2.1.18

@jscherry
Copy link
Author

I've been looking through the cose trying to find where 'cchardet>=2.1.7,<3.0.0', is in hopes to edit it to faust-cchardet>=2.1.18 to see if that would fix the problem. Can someone please tell me where to find this piece of code so I can try it? The regular home assistant 2023.3 will be released this coming Wednesday and I'd like to be able to upgrade. Thanks, Jeff.

@brg468
Copy link
Collaborator

brg468 commented Feb 27, 2023

That won’t work, it’s part of the wyzeapy library that’s published to PyPi. The best you could try is find the package-constraints.txt file in HA and comment out the line that blocks cchardet, which I linked to in the comment above. It does fix the issue, but the wyzeapy requirements need to be updated to correctly fix it.

@JoeSchubert JoeSchubert linked a pull request Feb 28, 2023 that will close this issue
@dnestico
Copy link

dnestico commented Mar 1, 2023

Happening on full release too

@brg468
Copy link
Collaborator

brg468 commented Mar 1, 2023

This probably goes without saying but don’t upgrade to 2023.3 until the fix is merged.

@tm24fan8
Copy link

tm24fan8 commented Mar 1, 2023

Wish I had seen this before updating. Thankfully I only have 2 Wyze lights...bad news is, they're the ones by my wife's desk. I'm gonna have some splainin to do LOL

@brg468
Copy link
Collaborator

brg468 commented Mar 1, 2023

Anyone that already upgraded, you can try editing your manifest.json file found in config->custom_components->wyzeapi and replacing the current requirements block with this and restart:

  "requirements": [
    "git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19"
  ],

You may have to delete and reload the integration but I don’t think so. When a new version is available in HACS it will overwrite this. Obviously do this at your own risk, worst case redownload the integration from HACS.

@jdeath
Copy link
Contributor

jdeath commented Mar 1, 2023

git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19

Thanks. That worked. I first tried just removing the version number and it didn't work!

@wildoracle
Copy link

Anyone that already upgraded, you can try editing your manifest.json file found in config->custom_components->wyzeapi and replacing the current requirements block with this and restart:

  "requirements": [
    "git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19"
  ],

You may have to delete and reload the integration but I don’t think so. When a new version is available in HACS it will overwrite this. Obviously do this at your own risk, worst case redownload the integration from HACS.

I tried this but got the following error:

Logger: homeassistant.util.package
Source: util/package.py:107
First occurred: 3:03:32 PM (15 occurrences)
Last logged: 3:29:49 PM

Unable to install package wyzeapy==0.5.16: ERROR: Cannot install wyzeapy==0.5.16 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts [notice] A new release of pip is available: 23.0 -> 23.0.1 [notice] To update, run: pip install --upgrade pip

@brg468
Copy link
Collaborator

brg468 commented Mar 1, 2023

That’s the original error. Double check your manifest.json file that it’s exactly as above.

@CenterInYou
Copy link

CenterInYou commented Mar 1, 2023

Thanks so much @brg468 !!! If you lived in the Twin Cities I'd take you out for a beer!

@azsparks
Copy link

azsparks commented Mar 2, 2023

Thanks @brg468 The manifest.json edit worked perfectly!

@brg468
Copy link
Collaborator

brg468 commented Mar 2, 2023

Glad it worked everyone! Hopefully have the official fix out soon.

@wildoracle
Copy link

wildoracle commented Mar 2, 2023

That’s the original error. Double check your manifest.json file that it’s exactly as above.

I must not understand, but I'll wait for the official fix. Here's the entire contents of my manifest.json file including the edit you posted:

{
  "domain": "wyzeapi",
  "version": "0.1.18b1",
  "name": "Wyze",
  "config_flow": true,
  "iot_class": "cloud_polling",
  "documentation": "https://github.com/JoshuaMulliken/ha-wyzeapi#readme",
  "issue_tracker": "https://github.com/JoshuaMulliken/ha-wyzeapi/issues",
  "requirements": [
    "git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19"
  ],
  "codeowners": [
    "@JoshuaMulliken"
  ]
}

@brg468
Copy link
Collaborator

brg468 commented Mar 2, 2023

That’s the original error. Double check your manifest.json file that it’s exactly as above.

I must not understand, but I'll wait for the official fix. Here's the entire contents of my manifest.json file including the edit you posted:

{
  "domain": "wyzeapi",
  "version": "0.1.18b1",
  "name": "Wyze",
  "config_flow": true,
  "iot_class": "cloud_polling",
  "documentation": "https://github.com/JoshuaMulliken/ha-wyzeapi#readme",
  "issue_tracker": "https://github.com/JoshuaMulliken/ha-wyzeapi/issues",
  "requirements": [
    "git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19"
  ],
  "codeowners": [
    "@JoshuaMulliken"
  ]
}

Hmm based on the error you posted, something seems off. It seems like it’s trying to install a wyzeapy from a few versions ago. You don’t have a wyzeapy folder in your config folder do you?

@scottjl
Copy link

scottjl commented Mar 2, 2023

Anyone that already upgraded, you can try editing your manifest.json file found in config->custom_components->wyzeapi and replacing the current requirements block with this and restart:

  "requirements": [
    "git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19"
  ],

You may have to delete and reload the integration but I don’t think so. When a new version is available in HACS it will overwrite this. Obviously do this at your own risk, worst case redownload the integration from HACS.

just changed out the one line, rebooted my yellow, wyze is working again. didn't have to re-install or change any configs, thankfully.

@jason1980p
Copy link

Anyone that already upgraded, you can try editing your manifest.json file found in config->custom_components->wyzeapi and replacing the current requirements block with this and restart:

  "requirements": [
    "git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19"
  ],

You may have to delete and reload the integration but I don’t think so. When a new version is available in HACS it will overwrite this. Obviously do this at your own risk, worst case redownload the integration from HACS.

Thank you! Thank you! Thank you!!! This worked!

@wildoracle
Copy link

That’s the original error. Double check your manifest.json file that it’s exactly as above.

I must not understand, but I'll wait for the official fix. Here's the entire contents of my manifest.json file including the edit you posted:

{
  "domain": "wyzeapi",
  "version": "0.1.18b1",
  "name": "Wyze",
  "config_flow": true,
  "iot_class": "cloud_polling",
  "documentation": "https://github.com/JoshuaMulliken/ha-wyzeapi#readme",
  "issue_tracker": "https://github.com/JoshuaMulliken/ha-wyzeapi/issues",
  "requirements": [
    "git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19"
  ],
  "codeowners": [
    "@JoshuaMulliken"
  ]
}

Hmm based on the error you posted, something seems off. It seems like it’s trying to install a wyzeapy from a few versions ago. You don’t have a wyzeapy folder in your config folder do you?

No, I have a wyze_config.ini file in the config folder though...

@Cl3tus
Copy link

Cl3tus commented Mar 2, 2023

Anyone that already upgraded, you can try editing your manifest.json file found in config->custom_components->wyzeapi and replacing the current requirements block with this and restart:

  "requirements": [
    "git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19"
  ],

You may have to delete and reload the integration but I don’t think so. When a new version is available in HACS it will overwrite this. Obviously do this at your own risk, worst case redownload the integration from HACS.

This is exactly the comment that helped me out getting it to work again. Thanks!

@wildoracle
Copy link

wildoracle commented Mar 2, 2023

That’s the original error. Double check your manifest.json file that it’s exactly as above.

I must not understand, but I'll wait for the official fix. Here's the entire contents of my manifest.json file including the edit you posted:

{
  "domain": "wyzeapi",
  "version": "0.1.18b1",
  "name": "Wyze",
  "config_flow": true,
  "iot_class": "cloud_polling",
  "documentation": "https://github.com/JoshuaMulliken/ha-wyzeapi#readme",
  "issue_tracker": "https://github.com/JoshuaMulliken/ha-wyzeapi/issues",
  "requirements": [
    "git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19"
  ],
  "codeowners": [
    "@JoshuaMulliken"
  ]
}

Hmm based on the error you posted, something seems off. It seems like it’s trying to install a wyzeapy from a few versions ago. You don’t have a wyzeapy folder in your config folder do you?

I seem to have a bigger issue than Wyze - I can no longer restart Home Assistant?!
I don't know how to fix this but I submitted an issue to Home Assistant Core about it... do you have any quick fix for this?
The system cannot restart because the configuration is not valid: Integration error: config_editor - Integration 'config_editor' not found.

@brg468 makes sense now why I was still seeing the original error in my logs... because HA wasn't actually restarting! :)

UPDATE: I had to go into Settings>Restart Home Assistant>Advanced Options>REBOOT system in order to clear out the junk from "config_editor"! Now I've made the 'requirements' code adjustment to the manifest.json and can finally reboot. I wonder why Home Assistant says it can't restart, but that's not entirely true, since forcing it to REBOOT clears up the issue?

@bbushelle
Copy link

Made the change posted by brg468 to manifest.json and did a full reboot but am getting the following error:

Failed to call service light/turn_on. BulbService.turn_on() missing 1 required position argument: 'local_control'

Still trying to troubleshoot/resolve but wondering if anyone else encountered this as well?

@brg468
Copy link
Collaborator

brg468 commented Mar 3, 2023

@bbushelle I’m not seeing that error, is this when you turn a light on/off? Just tried turning several on and off with no issues. What version of the Wyze integration are you running?

@bbushelle
Copy link

@brg468 - yes when toggling on/off

"version": "2021.11.1"

I'm wondering if that is my problem since I'm seeing "version": "0.1.18b1" as current now.

HACS isn't telling me there is an update available so will try manually doing that

@brg468
Copy link
Collaborator

brg468 commented Mar 3, 2023

2021.11.1 is the Wyze version? That’s really old! 😛 (over 2 years based on the numbering) I’m guessing your Wyze integration is missing local control for bulbs which is what the newer dependency is looking for.

@run1fast
Copy link

run1fast commented Mar 3, 2023

I'm on that same Wyze version "version": "2021.11.1". Its always worked OK for me, until this recent HA update. So I did the update brg468 recommended which fixed the integration. But now getting the same error as bbushelle.
Just pulled the "version": "0.1.18b1", updated, restarted HA.
The error message is gone and I can now control my wyze lights. At least they work, but there is a LONG delay. From when I turn on a bulb in HA, it takes nearly 8-10 secs for the bulb to turn on. When I try to turn it off, I click the slider in HA, 2 secs later, the slider automatically goes back to on. Then I try it again, wait 8sec and the bulb turns off.

@bbushelle
Copy link

@brg468 lol yup. I guess when things don't yell at me to be updated they get forgotten as long as they're still working.

Lights are working again and no delay like @run1fast is experiencing. I upgraded my version to 0.1.17

@JAudi23
Copy link

JAudi23 commented Mar 3, 2023

Anyone that already upgraded, you can try editing your manifest.json file found in config->custom_components->wyzeapi and replacing the current requirements block with this and restart:

  "requirements": [
    "git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19"
  ],

You may have to delete and reload the integration but I don’t think so. When a new version is available in HACS it will overwrite this. Obviously do this at your own risk, worst case redownload the integration from HACS.

This fixed it for me as well.

@christophermichaelshaw
Copy link

@JAudi23 Thank you for the clear instructions for a fix!

@JoshuaMulliken Any idea when this PR will be merged/approved?

@gmitchell3
Copy link

Anyone that already upgraded, you can try editing your manifest.json file found in config->custom_components->wyzeapi and replacing the current requirements block with this and restart:

  "requirements": [
    "git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19"
  ],

You may have to delete and reload the integration but I don’t think so. When a new version is available in HACS it will overwrite this. Obviously do this at your own risk, worst case redownload the integration from HACS.

@brg468 Thank you so much for this easy to follow and apply fix. It worked great. Much appreciated.

@PaPaTheGMan
Copy link

Anyone that already upgraded, you can try editing your manifest.json file found in config->custom_components->wyzeapi and replacing the current requirements block with this and restart:

  "requirements": [
    "git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19"
  ],

You may have to delete and reload the integration but I don’t think so. When a new version is available in HACS it will overwrite this. Obviously do this at your own risk, worst case redownload the integration from HACS.

Thanks - this worked for me. Very much appreciated, I have multiple camera turn-on/off automations based on presence and this brings everything back online!

@1PlusN
Copy link

1PlusN commented Mar 3, 2023

Anyone that already upgraded, you can try editing your manifest.json file found in config->custom_components->wyzeapi and replacing the current requirements block with this and restart:

  "requirements": [
    "git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19"
  ],

You may have to delete and reload the integration but I don’t think so. When a new version is available in HACS it will overwrite this. Obviously do this at your own risk, worst case redownload the integration from HACS.

works like a charm!

@dorgan
Copy link

dorgan commented Mar 3, 2023

wish i had known about this before upgrading....Trying to update manifest.json now but it seems to not be working....

@brg468
Copy link
Collaborator

brg468 commented Mar 3, 2023

@dorgan I'm happy to help but you'll have to be more specific than 'not working'

@dorgan
Copy link

dorgan commented Mar 3, 2023

@brg468 a full restart and I am good now. Thanks!

@bl232
Copy link

bl232 commented Mar 3, 2023

Anyone that already upgraded, you can try editing your manifest.json file found in config->custom_components->wyzeapi and replacing the current requirements block with this and restart:

  "requirements": [
    "git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19"
  ],

You may have to delete and reload the integration but I don’t think so. When a new version is available in HACS it will overwrite this. Obviously do this at your own risk, worst case redownload the integration from HACS.

I encountered this issue (the fix worked for me) and just wanted to say thanks for all the time and effort put into fixing these kinds of things. The reading lights in my bedroom are now working again :)

@jayste4
Copy link

jayste4 commented Mar 3, 2023

Anyone that already upgraded, you can try editing your manifest.json file found in config->custom_components->wyzeapi and replacing the current requirements block with this and restart:

  "requirements": [
    "git+https://github.com/brg468/wyzeapy.git@update-deps#wyzeapy==0.5.19"
  ],

You may have to delete and reload the integration but I don’t think so. When a new version is available in HACS it will overwrite this. Obviously do this at your own risk, worst case redownload the integration from HACS.

I encountered this issue (the fix worked for me) and just wanted to say thanks for all the time and effort put into fixing these kinds of things. The reading lights in my bedroom are now working again :)

I modified the manifest.json then updated to 2023.3.1 and the Wyze intergration is working.

@droptopgokart
Copy link

@brg468 lol yup. I guess when things don't yell at me to be updated they get forgotten as long as they're still working.

Lights are working again and no delay like @run1fast is experiencing. I upgraded my version to 0.1.17

How do you upgrade without the HACS prompt? I'm getting the same error.

@brg468
Copy link
Collaborator

brg468 commented Mar 8, 2023

@brg468 lol yup. I guess when things don't yell at me to be updated they get forgotten as long as they're still working.
Lights are working again and no delay like @run1fast is experiencing. I upgraded my version to 0.1.17

How do you upgrade without the HACS prompt? I'm getting the same error.

Find the integration in HACS->three dots upper right->redownload button.

@rnlascano
Copy link

Tks!. That worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.