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

Bump onvif-zeep-async to 1.2.11 #91472

Merged
merged 5 commits into from
Apr 16, 2023
Merged

Bump onvif-zeep-async to 1.2.11 #91472

merged 5 commits into from
Apr 16, 2023

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Apr 15, 2023

Proposed change

reverts a change to the wsdl document creation that broke tplink c110s and fixes more I/O in the event loop

sets a minimum version of zeep to ensure upstream fixes are included

changelog: openvideolibs/python-onvif-zeep-async@v1.2.7...v1.2.11

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

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

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

reverts a change to the wsdl document creation that broke tplink c100s

changelog: openvideolibs/python-onvif-zeep-async@v1.2.7...v1.2.8
@bdraco bdraco added this to the 2023.4.5 milestone Apr 15, 2023
@bdraco bdraco requested a review from hunterjm as a code owner April 15, 2023 19:57
@home-assistant
Copy link

Hey there @hunterjm, mind taking a look at this pull request as it has been labeled with an integration (onvif) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of onvif can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign onvif Removes the current integration label and assignees on the pull request, add the integration domain after the command.

@bdraco bdraco closed this Apr 15, 2023
@bdraco bdraco reopened this Apr 15, 2023
@bdraco bdraco closed this Apr 15, 2023
@bdraco bdraco reopened this Apr 15, 2023
@bdraco bdraco changed the title Bump onvif-zeep-async to 1.2.8 Bump onvif-zeep-async to 1.2.9 Apr 15, 2023
@bdraco bdraco closed this Apr 15, 2023
@bdraco bdraco reopened this Apr 15, 2023
@bdraco
Copy link
Member Author

bdraco commented Apr 15, 2023

I think I can iterate on this one more time and make it simpler

Will do another pass after lunch

@bdraco
Copy link
Member Author

bdraco commented Apr 15, 2023

No reason to not merge this though as it can happen in another pass and the fixes are still good here

@bdraco bdraco marked this pull request as draft April 15, 2023 23:47
@bdraco bdraco changed the title Bump onvif-zeep-async to 1.2.9 Bump onvif-zeep-async to 1.2.8 Apr 16, 2023
@bdraco
Copy link
Member Author

bdraco commented Apr 16, 2023

I'm going to do the revert for now and than work through the I/O in the event loop in another PR

@bdraco bdraco marked this pull request as ready for review April 16, 2023 00:11
@bdraco
Copy link
Member Author

bdraco commented Apr 16, 2023

Still working on the I/O
2023-04-15 14:26:29.140 WARNING (MainThread) [asyncio] Executing <Task pending name='config entry setup LC - 00:11:11:11:11:91 onvif 9185c96eef011edc1ddbc33c084b252c' coro=<ConfigEntry.async_setup() running at /Users/bdraco/home-assistant/homeassistant/config_entries.py:383> cb=[gather.<locals>._done_callback() at /opt/homebrew/Cellar/[email protected]/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/tasks.py:720] created at /opt/homebrew/Cellar/[email protected]/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/tasks.py:337> took 0.248 seconds

@bdraco
Copy link
Member Author

bdraco commented Apr 16, 2023

2023-04-15 14:26:25.620 WARNING (MainThread) [asyncio] Executing <Task pending name='config entry setup e1 192.168.107.103 - b8:ab:62:af:d1:ee onvif 18b01db4bcc1956ee419853a61713b3e' coro=<ConfigEntry.async_setup() running at /Users/bdraco/home-assistant/homeassistant/config_entries.py:383> cb=[gather.<locals>._done_callback() at /opt/homebrew/Cellar/[email protected]/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/tasks.py:720] created at /opt/homebrew/Cellar/[email protected]/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/tasks.py:337> took 0.174 seconds

@bdraco
Copy link
Member Author

bdraco commented Apr 16, 2023

The reason the other fix can't move forward yet is because its actually relying on the event loop being blocked for a moment since we don't have mvantellingen/python-zeep#1369 Otherwise we ask too quickly if the camera supports events and sometimes we don't get a reply in time. 🤦

@bdraco
Copy link
Member Author

bdraco commented Apr 16, 2023

so its flakey with every version because sometimes creating a subscription has transient failures 😢

@bdraco
Copy link
Member Author

bdraco commented Apr 16, 2023

So lets do the bump to 1.2.10 and see if we can make event startup more reliable in another PR

@bdraco bdraco changed the title Bump onvif-zeep-async to 1.2.8 Bump onvif-zeep-async to 1.2.10 Apr 16, 2023
@bdraco bdraco closed this Apr 16, 2023
@bdraco bdraco reopened this Apr 16, 2023
@bdraco
Copy link
Member Author

bdraco commented Apr 16, 2023

The reason it was flakey was the old subscriptions were never being removed because of #91482

@bdraco
Copy link
Member Author

bdraco commented Apr 16, 2023

So the reason its flakey is most cameras only allow 3 subscriptions and we set the subscription time to 24 hours.

If you restart 3 times you run out of slots and have to wait for a free one.

#91485 will adjust that to resub every 5 minutes so we don't ever run out of slots

@bdraco bdraco changed the title Bump onvif-zeep-async to 1.2.10 Bump onvif-zeep-async to 1.2.11 Apr 16, 2023
@bdraco bdraco closed this Apr 16, 2023
@bdraco bdraco reopened this Apr 16, 2023
Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @bdraco 👍

Failing test seems unrelated, going to merge this one in.

../Frenck

@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft April 16, 2023 11:55
Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong button

@frenck frenck marked this pull request as ready for review April 16, 2023 11:56
@home-assistant home-assistant bot requested a review from frenck April 16, 2023 11:56
@frenck frenck merged commit 24538a4 into dev Apr 16, 2023
@frenck frenck deleted the onvif_128 branch April 16, 2023 11:56
@github-actions github-actions bot locked and limited conversation to collaborators Apr 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants