MisterWil / skybellpy

A thin Python wrapper for the Skybell alarm API
MIT License
9 stars 7 forks source link

Fix avatar image url, add ability to continue to get last activity image url #8

Closed nhorvath closed 5 years ago

nhorvath commented 5 years ago

I was able to fix the avatar url (thanks @thoukydides) and restore that to the device.image property. I exposed the last activity image url via device.activity_image.

I'm working on a HA change to add a config to skybell camera to support including the image of your choosing (or both). The default will be avatar image like it used to be.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 7fb3cf45f12119c9f88d7b8360078088c7cd66d6 on nhorvath:master into 19bc8ca6a4a6ff97629f3af16b8b25ea3acdabfe on MisterWil:master.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 7fb3cf45f12119c9f88d7b8360078088c7cd66d6 on nhorvath:master into 19bc8ca6a4a6ff97629f3af16b8b25ea3acdabfe on MisterWil:master.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 7fb3cf45f12119c9f88d7b8360078088c7cd66d6 on nhorvath:master into 19bc8ca6a4a6ff97629f3af16b8b25ea3acdabfe on MisterWil:master.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 7fb3cf45f12119c9f88d7b8360078088c7cd66d6 on nhorvath:master into 19bc8ca6a4a6ff97629f3af16b8b25ea3acdabfe on MisterWil:master.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 7fb3cf45f12119c9f88d7b8360078088c7cd66d6 on nhorvath:master into 19bc8ca6a4a6ff97629f3af16b8b25ea3acdabfe on MisterWil:master.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 7fb3cf45f12119c9f88d7b8360078088c7cd66d6 on nhorvath:master into 19bc8ca6a4a6ff97629f3af16b8b25ea3acdabfe on MisterWil:master.

nhorvath commented 5 years ago

@MisterWil as soon as you publish the new version I can submit the PR to home assistant. I got it working with my local build but I'd rather keep it on yours.

New config is going to look something like this pending HA code review:

camera:
  - platform: skybell
    monitored_conditions:
    - avatar
    - activity
    activity_name: "Last Activity"
    avatar_name: ""

All new things are optional, names are optional and if set will be appended to device name. The default is just to monitor the avatar url.

MisterWil commented 5 years ago

Awesome! I saw that @thoukydides mentioned the avatar endpoint so I'm glad you quickly fixed that and kept the last activity one as well. Thank you so much!

Released 0.3.0 with this PR. :-)

GaryOkie commented 5 years ago

This is indeed great news! Love the options to have it both ways. Just one question - why is the default monitored conditioned named "avatar"?

I realize that name was in the path of the underlying Skybell URL that fetches the image, but shouldn't the configuration option be named something that better represents the most recent live/captured image?

nhorvath commented 5 years ago

@GaryOkie mostly because that's what skybell calls it, but it's not a bad name. It's an avatar in that it's a digital representation of the camera. The updated homeassistant documentation explains what the options are, so I don't see this being a big deal.

GaryOkie commented 5 years ago

Thanks Nick - certainly not a big deal. Indeed, my avatar appears to be laughing at me not understanding what an avatar is. :-)