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

Contact Sensors issues #71

Closed
TheGreatSkeeve opened this issue Apr 19, 2022 · 5 comments · Fixed by #79
Closed

Contact Sensors issues #71

TheGreatSkeeve opened this issue Apr 19, 2022 · 5 comments · Fixed by #79
Labels
bug Something isn't working

Comments

@TheGreatSkeeve
Copy link

Hello!

I'm able to pull contact sensors from my Wyze account, I can see nicknames, macs, rssi, etc, but all of them are showing as closed when this is not the case. sensor.is_open returns False for everything.

Additionally, it looks like the wiki might be mislabeled - It's got Contact Sensors and Entry Sensors, but the only thing under Entry Sensors is Motion Sensors.

I did try client.entry_sensors.info(device_mac=mac) but that returned nothing. Interestingly without device_mac=, that statement errors out. TypeError: ContactSensorsClient.info() takes 1 positional argument but 2 were given

Thanks!

@shauntarves
Copy link
Owner

Hey @TheGreatSkeeve,

Thanks for your interest in this library. I'm doing my best to maintain it but often lack the time. So, a few things about your specific issue(s):

  1. The wiki is definitely confusing. I tried to name things in a way that didn't break my brain, but wyze calls the contact sensors "entry" sensors in their app. That's the reason both of those terms are used. But I agree with you that there's a mistake in the docs and the MotionSensorClient heading is wrong. I will fix that.
  2. I don't actually have any contact/entry sensors at the moment. Someone was nice enough to share theirs with my account temporarily while I developed this and I no longer have them in my account.
  3. If you'd like to debug this issue further, please try the following:
wyze_sdk.set_stream_logger('wyze_sdk', level=logging.DEBUG)

for contact in client.entry_sensors.list():
    print(contact.to_dict())

If you can paste the result of that here, I'll take a look. Hopefully just a simple bug somewhere.

@TheGreatSkeeve
Copy link
Author

So, nothing actually gets returned when I run that command - entry_sensors is empty. Is it possible the newer ones aren't classified the same way?

I can send over the output via email, it essentially looks like a full dump of my Wyze config and even if I sanitize it I'll probably miss something I don't want public. I can also share entry sensors with you if that would be helpful.

Thanks again!

@shauntarves
Copy link
Owner

shauntarves commented May 1, 2022 via email

@shauntarves shauntarves added the bug Something isn't working label May 21, 2022
@shauntarves
Copy link
Owner

Looks like that was the issue - there are new model numbers for the entry and contact sensors. I don't have any of these newer ones to try out, but feel free to check out https://github.com/shauntarves/wyze-sdk/tree/71-contact-sensors-issues and let me know if it works for you.

I'll merge it into the main code base if I don't hear from you in a few days and we can investigate more if it doesn't work.

@TheGreatSkeeve
Copy link
Author

Hey man-

That was it - the link your sent works for me. Thanks again, sorry for the late reply, been busy.

Take care!

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.

2 participants