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

Snapshot not happening. #14

Closed
zemerick1 opened this issue Feb 21, 2019 · 33 comments
Closed

Snapshot not happening. #14

zemerick1 opened this issue Feb 21, 2019 · 33 comments
Assignees

Comments

@zemerick1
Copy link

When I call the service camera.aarlo_request_snapshot nothing happens. It says it's taking a screenshot, but there is no update in the UI.

If I click the 'click to update image' icon using your custom picture card. It says 'Taking Screenshot' but nothing ever happens.

here is the output from the logs:

2019-02-21 17:35:14 INFO (EventStream) [custom_components.aarlo.camera] callback:garage:activityState:fullFrameSnapshot
2019-02-21 17:35:16 INFO (EventStream) [pyaarlo] garage CAMERA got one cameras/5EX184SM58F82
2019-02-21 17:35:16 INFO (EventStream) [pyaarlo] garage got cameras/5EX184SM58F82
2019-02-21 17:35:16 INFO (EventStream) [custom_components.aarlo.camera] callback:garage:activityState:idle
@twrecked
Copy link
Owner

Can you tell me what model of camera is this?
Thanks.

@twrecked twrecked self-assigned this Feb 22, 2019
@twrecked
Copy link
Owner

One more question, if you do a screen refresh does the picture ever update?

@zemerick1
Copy link
Author

The model is VMC3030. . it's the original Wire-Free camera.
If I do a refresh via the browser it doesn't update. . just shows last motion event screen shot.

@twrecked
Copy link
Owner

I have a couple of those cameras and I'm seeing the same issue. I'll take a look at it.

@twrecked
Copy link
Owner

I noticed that a few of the fields on the snapshot request were wrong. I checked in a fix.

But here's the weird thing:

  • it only fixes one of my VMC3030 cameras not both of them
  • the Arlo web page has the same issue and it sends exactly the same packet - try the camera positioning option, it doesn't work on one of my cameras and I'm curious if it works for you. Clicking the snapshot button makes no difference.

So I'm going to reboot my base station and my cameras to see if that makes a difference.

@zemerick1
Copy link
Author

From the app camera positioning option works for me. Do you want me to try it from the web or does it matter?

@twrecked
Copy link
Owner

If you could try the website. It seems to work differently from the app and I only see the problem on the website.

The underlying code replicates the website behaviour. You can follow what's happening if you use Chrome by pressing CTRL+SHIFT+I.

@zemerick1
Copy link
Author

@twrecked Two of my cameras it worked fine via the web. However, one of my cameras was stuck in the 'busy' state.

Chrome Dev is spitting out the response: {"success":true} . . I didn't catch the request.

@Swiftnesses
Copy link

Same issue here with the old cameras, new Pro's work fine.

@Swiftnesses
Copy link

Swiftnesses commented Mar 4, 2019

I've also noticed the glance card shows a slightly different image height for snapshot vs newly updated image after a video was recorded / streamed, can this be made equal via options (I realise the aspects are likely different, but it drives my OCD mad!).

@twrecked
Copy link
Owner

twrecked commented Mar 5, 2019

@Swiftnesses I'm struggling with the snapshots on my older cameras and I think the problem is at the Arlo end.

But the height/aspect ratio one is more interesting and I'll take a look at fixing it. The problem, as far as I can tell, is the resolution for Best Quality video and snapshots is 1920x1088 instead of 1920x1080 so it's making those images too tall. If you take a snapshot on a camera with Optimized video quality the image size changes. Take a snapshot on a camera with Best Quality video and it doesn't change. But mixing Best Quality and Optimized quality cameras can cause the images to not align horizontally on the page...

I'll try and force everything down to a 16x9 ratio. I'm ok with Javascript and Python but HTML/CSS is new to me so it might take a few days of playing around to fix it.

@twrecked
Copy link
Owner

twrecked commented Mar 5, 2019

@Swiftnesses ; Can you try this branch: https://github.com/twrecked/hass-aarlo/tree/sixteen-nine

You will need to make sure the web browser cache is cleared, Home Assistant will aggressively cache scripts. Alternatively, add a version number to the module declaration:

- type: module
  url: /local/aarlo-glance.js?v=1`

@Swiftnesses
Copy link

@twrecked That seems to have done it buddy, thank you!

@twrecked
Copy link
Owner

twrecked commented Mar 5, 2019

Excellent. I think there is still a little more tidy up I'll do in the library thumbnails before I check it in.

Can I ask what machine/browser? I've only had chance to test it on Linux/Chrome.

@Swiftnesses
Copy link

OSX Mojave (Dev preview) | Chrome 72.0.3626.119 (Official Build) (64-bit)

@Swiftnesses
Copy link

Some info, I have no issues with snapshots on the older cameras in the day it seems, the issue starts at night when IR is on!?

@twrecked
Copy link
Owner

twrecked commented Mar 6, 2019

I've just rebooted one of my cameras that wasn't taking snapshots - I opened the battery cover and closed it - and now the snapshot is working. @zemerick1 any of these things work for you?

@zemerick1
Copy link
Author

Do I need to re-pull the code or just update the LoveLace module? Because I did the latter and one of my cameras took a screenshot, though it's not consistent.

@twrecked
Copy link
Owner

twrecked commented Mar 6, 2019

The lovelace code has some tweaks to speed up displaying the snapshot if it works, but the underlying code around snapshots hasn't changed. The lovelace code change wasn't enough to fix the issue for me and I was just wondering if physically rebooting a camera would get it to work, it did for me and it fixed the camera on the Arlo app too.

Well, working for now at least, I'll keep trying again tonight.

@zemerick1
Copy link
Author

It doesn't appear to have worked for me. I will try rebooting my other cameras to see if that helps.

Also, I don't know if this is because of the LoveLace change, but I can't playback my most recent clip. The image is no longer a 'link' to play the clip. I know the old Arlo card would allow it, but not 100% that this new one ever did. Don't want to send you down a rabbit hole.

@twrecked
Copy link
Owner

twrecked commented Mar 6, 2019

I honestly don't think the snapshot is my issue but I'll take full responsibility for breaking the video playback!

Can you try updating everything and making sure to refresh the browser - Home Assistant will aggressively cache everything. If that doesn't work can you tell me what browser and OS you're using. I can try most variants except Macs here.

@zemerick1
Copy link
Author

I tried several times using incognito mode without luck. I also pulled in the latest code.

Win 10 1803 / Chrome 72

Let me know how I can continue to help.

@twrecked
Copy link
Owner

twrecked commented Mar 6, 2019

I've got a Windows machine here, I'll take a look in a few minutes.

Can you try adding a version number to the end of the glance card? (See my comment here #14 (comment))

Can you get to the library thumbnail list? By clicking on the 'captured today' icon - the folder with a video camera on it? And do those videos play?

@zemerick1
Copy link
Author

zemerick1 commented Mar 6, 2019

Yup I added the version: url: /local/aarlo-glance.js?v=1

Also, negative on the library thumbnail list. It shows the tool-tip for the captures, but clicking it doesn't do anything.

EDIT: I'm firing up Firefox on a *nix (Windows WSL) box to see if I get different results.

@twrecked
Copy link
Owner

twrecked commented Mar 6, 2019

It worked under Windows for me. Using Chrome.

I'm just reinstalling everything here to make sure I'd got the latest versions of everything.

One more thing to try under Chrome is "CTRL+SHIFT+I" and see if any errors come out if you reload Home Assistant.

@twrecked
Copy link
Owner

twrecked commented Mar 6, 2019

I've tried a reinstall of the custom component and the video stuff is working here - I tried windows, Linux and chrome OS and all using Chrome. It also works on my Android phone. If it still isn't working for you I'd try:

  • updating the code
  • the CTRL+SHIFT+I debug window on Chrome
  • turning on debug for Home Assistant

and hopefully we can get to the bottom of this.

It's getting late here but I'll check in tomorrow.

@zemerick1
Copy link
Author

This is baffling. I've pulled in the latest code -- from HA 89b3, from your repo, and just updated Chrome.
I thought maybe that it was because I'm accessing it over loopback NAT. (External address from internal address). That's not it. I do get a lot of errors, but I believe they're related to polymer, and not your resource. (They link to app-XXX.js)
I've even enabled "Disable Caching" via the dev console. It also doesn't work from Chrome on my Android. . it has to be my config, but I'm not sure where. Do you use a custom ui-lovelace.yaml?
I may remove everything but what is necessary from my yaml to see if that's the cause. The issue definitely seems to live with me

title: Home
resources:
  - url: /local/aarlo-glance.js?v=1
    type: module
  - url: /local/mini-graph-card-bundle.js?v=0.3.0
    type: module
  - url: /local/custom-lovelace/weather-card/weather-card.js
    type: module
  - url: /local/custom-lovelace/compact-custom-header/compact-custom-header.js
    type: module

...

views:
  - cards:
      - type: 'custom:compact-custom-header'
      - entity: camera.aarlo_front_door
        name: Front Door
        show:
          - motion
          - sound
          - snapshot
          - battery_level
          - signal_strength
          - captured_today
        type: 'custom:aarlo-glance'

@twrecked
Copy link
Owner

twrecked commented Mar 6, 2019

One thing, I'm still on 0.87 - I've been concentrating on the component and forgot to upgrade.

I'll try upgrading tomorrow.

And we have pretty much the same custom cards.

@twrecked
Copy link
Owner

twrecked commented Mar 6, 2019

I introduced a bug that might stop videos appearing. Let me look into that.

@twrecked
Copy link
Owner

twrecked commented Mar 6, 2019

I just tested the code all the way up to 0.89 and I can't see the issues you are seeing. The bug I saw might stop videos being updated if a lot of cameras trigger at the same time which I don't believe is what you are seeing - you should still be able to play a video.

And I'm not seeing any errors related to polymer (or anything else).

@zemerick1
Copy link
Author

So I'm getting different results today. I noticed that the service was showing different lines in the log than originally posted. Specifically, the line that says "queing snapshot update". And now, both the card and service appear to be functioning normally.
Still have not had luck with the clip library thing, though. I don't want that to take over this issue. I will start a different issue for that so we can track it.

2019-03-06 15:50:15 INFO (EventStream) [pyaarlo] Front Door got cameras/5EX184SM573C2
2019-03-06 15:50:17 INFO (EventStream) [pyaarlo] Front Door CAMERA got one cameras/5EX184SM573C2
2019-03-06 15:50:17 INFO (EventStream) [pyaarlo] queing snapshot update
2019-03-06 15:50:17 INFO (EventStream) [pyaarlo] Front Door got cameras/5EX184SM573C2
2019-03-06 15:50:17 INFO (ArloBackgroundWorker) [pyaarlo] getting image for Front Door

@zemerick1
Copy link
Author

@twrecked So, as of right now (12:46 CST), both features are working. . the video clips (first time I've ever seen it, very cool), and the snapshot. .

twrecked pushed a commit that referenced this issue Apr 17, 2019
Test new version number for the card
@twrecked
Copy link
Owner

I'm going to close this one for now. Please try the latest builds and open a new bug. I fixed a few issues to do with event handling and one issue around the snapshot handling code.

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

No branches or pull requests

3 participants