Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Add methods to start and stop detection #14

Merged
merged 8 commits into from
Dec 10, 2019

Conversation

nonsleepr
Copy link
Contributor

Add methods async_stop_detection and async_start_detection to the camera object.

Copy link
Collaborator

@bachya bachya left a comment

Choose a reason for hiding this comment

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

Thanks! Just a few comments. I assume you've tested this on your own cameras?

eufy_security/camera.py Outdated Show resolved Hide resolved
eufy_security/camera.py Outdated Show resolved Hide resolved
eufy_security/camera.py Outdated Show resolved Hide resolved
eufy_security/camera.py Outdated Show resolved Hide resolved
@nonsleepr
Copy link
Contributor Author

Tested it with my doorbell. I bet the cameras would return different properties.

Also, one interesting thing, switching to Home/Away in the app under one user wouldn't affect any properties as seen by another user (haven't checked with the same user).

@bachya bachya merged commit 1e4334f into FuzzyMistborn:master Dec 10, 2019
@FuzzyMistborn
Copy link
Owner

Also, one interesting thing, switching to Home/Away in the app under one user wouldn't affect any properties as seen by another user (haven't checked with the same user).

You're referring to the "schedule" tab? I can confirm it does update for the other user.

Thanks for the PR!

@nonsleepr
Copy link
Contributor Author

So, the arm/disarm feature is per user, not per device?

Any ETA as to when to expect the change in PyPI?

@FuzzyMistborn
Copy link
Owner

I'm not sure to be honest. All I know is i have one doorbell and 2 accounts. I currently enable/disable the motion sensing using the security tab. I switch between "home" and "disarmed." I don't know how this would play if i had accounts with different cameras on it, but with 2 accounts and a single shared camera when I change the setting on one it affects the other. I don't know how the enable/disable the actual motion detection setting would work.

@FuzzyMistborn
Copy link
Owner

And in terms of PyPI, that's @bachya 's domain. If he's busy I can give it a whirl tonight but no promises.

@nonsleepr
Copy link
Contributor Author

My current understanding is that the motion detection is the camera setting and affects all users, while Security tab in the app (with Home/Away/Disarmed/Schedule options) is per user.

@FuzzyMistborn
Copy link
Owner

Hmm, that's not my experience but again I'm just dealing with a single camera so my results may be different
Also looks like PyPi should be pushed soon https://github.com/FuzzyMistborn/python-eufy-security/releases/tag/0.2.0

@bachya
Copy link
Collaborator

bachya commented Dec 10, 2019

@nonsleepr I neglected to notice this, but there aren't tests for your new code. I'm okay pushing 0.2.0 without them, but should you get the time, perhaps you could write some?

@bachya
Copy link
Collaborator

bachya commented Dec 10, 2019

Okay, 0.2.0 is published.

@nonsleepr
Copy link
Contributor Author

My bad with the tests. Would spend more time on that in other PRs.

@nonsleepr
Copy link
Contributor Author

Is 0.2.0 published to PyPI as well? I don't see it there.

@bachya
Copy link
Collaborator

bachya commented Dec 10, 2019

Yes: https://pypi.org/project/python-eufy-security/ – I accidentally published to a different name.

@rpitera
Copy link

rpitera commented Dec 11, 2019

Will the HA PR be updated or can we simply alter the requirements in manifest.json and restart? Would like to help test and have another cam coming on Friday. :)

@nonsleepr
Copy link
Contributor Author

I'm not sure about PR, I personally feel it's quite far from the state where it could have been merged into HA.

You can use my version compatible with HACS though: https://github.com/nonsleepr/ha-eufy-security.

@bachya
Copy link
Collaborator

bachya commented Dec 11, 2019

FWIW, I have a draft HASS PR (home-assistant/core#28443), but I agree with @nonsleepr: we have a ways to go before this is ready to be un-drafted.

@rpitera, FYI, your idea about adjusting manifest.json should work fine.

@nonsleepr
Copy link
Contributor Author

It's adjusted in my repo. @Bacha, do you want to take ownership of it? Or maybe we could create a team?

@rpitera
Copy link

rpitera commented Dec 11, 2019

@nonsleepr - I've been using your repo manually; had no idea it was HACS compatible. I'll add the repo in HACS and use that.
@bachya - Thanks.

BTW guys, thanks for your hard work on this. I'm pretty happy with the results so far. Enough that I went out and ordered a third camera.

@bachya
Copy link
Collaborator

bachya commented Dec 11, 2019

@nonsleepr We shouldn’t have separate, disparate repos attacking the same problem. I’d be open to an organization if this repo and yours do fundamentally different things.

@FuzzyMistborn
Copy link
Owner

I think for now while we're still ironing out issues, having @nonsleepr 's separate repo is convenient to easily update via HACS. Once we get it merged to HASS officially I think the repo won't be needed, but until then it might get more people testing as it's more convenient/easy.

@nonsleepr
Copy link
Contributor Author

It's not the same problem: we have a client library and an integration library.
I thought a bit more and now I don't think we're ready for an organization, not at that stage.
Merging HA integration and the client package into one isn't recommended either, that would have helped with pre-releases though.

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 this pull request may close these issues.

None yet

4 participants