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

Improvements to SSDP discovery and associated tests #58

Merged
merged 5 commits into from
Jul 9, 2019

Conversation

bjmc
Copy link
Contributor

@bjmc bjmc commented Mar 3, 2019

I was running into some errors using the SSDP discovery ControlPoint() with my camera, so this is an attempt to clean up and improve the SSDP discovery logic.

The two main changes in pysony.py are:

  • Don't break out of the loop early in _listen_for_discover() -- I think this was the source of my bug, because it wasn't listening long enough to get the response from my camera.
  • Use XML libraries to parse the device definition file, instead of regex. I think this should be a lot easier to maintain and more reliable across different camera models.

I've also added tests for SSDP discovery, including some dummy services to test against, and updated the README to include docs on running tests.

There's some minor overlap with #57, but I think the conflicts will be easy to resolve.

@bjmc
Copy link
Contributor Author

bjmc commented Mar 3, 2019

This might help with #33 if their issue is the same timeout problem as mine.

@bjmc
Copy link
Contributor Author

bjmc commented Mar 3, 2019

This might also fix #23 since one of the comments theorizes the issue is with the regular expression parsing.

yeaji.shin and others added 5 commits March 12, 2019 17:14
  - minor version
  - python3
* Py3-compatibility changes

Don't require six to check version

* Version increment

* Move examples

* Adds tox.ini for multi-python testing

* Update travis.yaml

* Travis doesn't support Py3.7 yet.

See travis-ci/travis-ci#9815
Discovery refactor

Discovery tests

Configure broadcast address for testing

Allow testing against live camera

Adds tox.ini for multi-python testing

Update travis.yaml
TravisCI's Py3.4 environment already has six 1.10 installed.
@bjmc bjmc changed the base branch from master to develop April 13, 2019 17:18
@bjmc
Copy link
Contributor Author

bjmc commented Apr 13, 2019

Changed base branch to develop -- is that right @Bloodevil?

@Bloodevil
Copy link
Owner

Changed base branch to develop -- is that right @Bloodevil?

yep it is right. thanks!

@Bloodevil Bloodevil merged commit 8dd8474 into Bloodevil:develop Jul 9, 2019
@Bloodevil
Copy link
Owner

I merge it to develop.

@bjmc bjmc deleted the discovery branch August 7, 2019 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants