lurume84 / bling-desktop

Desktop for Blink Home Security Camera
MIT License
89 stars 20 forks source link

Page 2 display, closes app #3

Closed sutty550e closed 5 years ago

sutty550e commented 5 years ago

Hello lurume84

On trying to view page two, of my listed videos, under activity, the app just unexpectedly closes, whilst trying to retrieve them. I have 12 undeleted videos, so I should retrieve 2 videos on page two.

Also, not sure why it says, showing 1-10 of 500 videos, when I only have 12 undeleted. I know from other work, a script to pull them down, that the deleted ones are still listed on their server. Could this be the reason?

Thanks

Sutty

sutty550e commented 5 years ago

Update: If I select page three, which should have no videos at all, it also closes. I assume this will be the same for any subsequent page, though haven't tested further.

lurume84 commented 5 years ago

Due to huge refactoring by Blink in its API I had to temporary tweak the video list for working. Videos are now retrieved by date and no information of how many videos is given. Because of this, I request all videos since forever ago and pagination is defaulted to 500 pages. This section will be redone using the same date concept as in app.

I think crash is related with the automatic video download feature. It happened also to me and, as you pointed out, it is quite possible to be related to the delete problem. I have uploaded a new desktop version that should solve this problem and add configuration files features so everyone can tweak its own desktop version.

sutty550e commented 5 years ago

Hello Luis

Having just downloaded and installed the new msi, I still get the app close on viewing page 2, 3 etc, after a delay. I never see the two videos that I should have on page 2.

Thanks

Andrew

lurume84 commented 5 years ago

Could you please try the new viewer? I have removed deleted videos just to see if this was the problem. Check if crash happens just by leaving app open as I am not sure it has to do with timers inside desktop. In case this behavior persist let me know and we will have to include traces.

I leave it open until more information is provided.

sutty550e commented 5 years ago

Hello Luis

The issue persist. I just downloaded the latest msi and ran it, but it closed on selecting page 2, after some moments.

Here is a video of it happening, if it helps.

https://youtu.be/sd4rjIDkBiY

Regards

Andrew

lurume84 commented 5 years ago

Sorry I did not explain myself correctly. I solved the issue on bling-viewer by avoiding load of deleted videos in UI. There is no release yet, you need to download bling-viewer sources and copy/paste them in latest desktop application. Go to https://github.com/lurume84/bling-viewer and click in clone or download. Download Zip button and extract in %appdata%/Bling Desktop/Html/viewer.

sutty550e commented 5 years ago

Yes, I did misunderstand. Sorry, I see you said viewer. I am in no real hurry, so I'll await the fix in desktop. Thanks for explaining.

PeteCress commented 5 years ago

Each time I need to re-install Desktop, I am groping around forever trying to find the .MSI file.

Logically, it seems like it would be on the Commits page for that release, e.g. https://github.com/lurume84/bling-desktop/commits/master

But I am not seeing anything.

Can you flip me a link to the .MSI?

lurume84 commented 5 years ago

I have generated a release for both projects. You have to download new msi at

https://github.com/lurume84/bling-desktop/releases

When app starts up it should download viewer v.0.1.5 that contains manual thumbnail updates.

@PeteCress , this version contains automatic thumbnail download every hour but is disabled by default, you have to enable it inside /mydocs/bling.exe/blink.ini. adding following text

[SyncThumbnail] Enabled=1

In addition to enabled, you can also define in this section

Interval=3600 Sleep=5 Retries=10

Interval is in seconds and is used to define the frequency of requests (by default 1 hour) Sleep is the wait time to see if camera has done the snapshot (better don't reduce it) Retries is the number of checks every sleep it will do to check if snapshot is done (so 5*10 is 50 seconds of max wait time)

@sutty550e , I hope this solves the problem of closing the app. Otherwise I will add traces in the next release and request you the output to see which is the problem.

Mind these versions do not have a thorough error control so may have some problems in some scenarios but we will solve them in every version.

PeteCress commented 5 years ago

I have 1.5 installed and running. About does not show anything, but I did nit have to enter credentials and ir restored my session - so I know it is 1.5

But I have a problem with Blink.ini.

Did a search on both C: and D: for blink.ini and, just for good measure bling.ini - but nothing found.

Do I need to create the file?

If so:

I am guessing that MYDOCS is some sort of Windows library name and not an actual folder.

Can you describe the path some other way?

And should I be finding an existing blink.ini?

lurume84 commented 5 years ago

Yes, my documents path is located at

%userprofile%\Documents\Bling.exe

If you open the application it should generate blink.ini file, in case it is not present just create it.

Mine is like following

[SyncVideo] LastUpdate=2019-03-10T12:44:04+00:00 [SyncThumbnail] Enabled=true

You only need to add the text in bold for thumbnails to work.

bling.ini is another config file to handle things not related with blink like the github paths to download bling-viewer and things like that.

These files are only created in case app needs to persist something like the lastupdate time for sync for example. For reading it will use the defaulted values inside the app in case there is no ini with this definition.

PeteCress commented 5 years ago

Got it and it's working like a champ.

I am guessing that overlaying the snapshot with the "LastUpdate" info is a no-go bc it is not supported by the cam's API.

Have I got it right?

If so, I would hope to accomplish almost the same thing by putting some sort of device that displays Date/Time info in the foreground of the view of one of my cams and make that cam the first to show on the Blink app's list of snapshots - maybe even a dedicated cam showing a full-screen view of the el-cheapo $50 Surface tab that found at Micro Age a couple years ago and never figured out a use for...

The idea being to give the those who are checking up on The Old People some reassurance about the currency of the snapshots.

lurume84 commented 5 years ago

Happy to hear that! Adding an overlay with the timestamp can be done but for snapshots already downloaded by bling app. So, during the storage of thumbnails in /downloads/thumbnails we can burn the timestamp when it was done inside the image. If you mean to modify the one that is recorded inside blink servers this cannot be done as image is already generated and cannot be modified. Also, image name already contains timestamp in its name.

If adding timestamp in automatically saved images is ok for you add a new issue with this feature and I will try to add it in the next version

PeteCress commented 5 years ago

I figured that was how it was.

I just pulled the trigger on a dedicated camera that I will put somewhere like the LAN closet - probably aimed at that Surface tab or the laptop that is running Bling.exe 24-7.

With that cam as the 1st in the Blink app's cam list, everybody should have warm fuzzies about the currency of the snapshots and, besides, they still have the options of arming the system, forcing ad-hoc snapshots, and/or doing Live views.

My only remaining task is to work out how often I can achedule the automagic snapshots without draining the batteries too soon.

Maybe I'll start by disconnecting all but one cam, seeing how long it takes to drain the batts with a snapshot every minute - and then extrapolating that number to hours or minutes depending...

Oh yeah... and ordering some more batteries....-)

PeteCress commented 5 years ago

My instance of the app has been abending quite a bit.

Does it generate crasj dimps that I could send you?

Of so, where to look for the dumps, and where tp send them?

lurume84 commented 5 years ago

Crash dumps are not implemented at this time but I will update it during this week to include traces and dump generation. Stay tunned!

PeteCress commented 5 years ago

Thanks... Will look forward to inflicting a few on you...-)

lurume84 commented 5 years ago

There is a new desktop release that adds crash dump support. I also added some redundancy checks so it is possible you no longer have crashes. Some crashes happened because there was an inconsistent JSON coming from blink. Let's see if this solves the problem, otherwise we will check dumps.

In case app crashes again, send me .7z file located at mydocs/Bling.exe/CrashReports. GitHub allows to attach files when creating a new issue.

sutty550e commented 5 years ago

Hello Luis

New version installed, and behaviour is the same. No page 2 view, without app closing. Here is zip file. Not a .7z file but a .zip, it would seem.

25a86af8-c3c6-4b71-afda-68f50d385d0e.zip

Thanks for your continued work on this.

sutty550e commented 5 years ago

Screenshot in the zip is of outlook. Not sure why. I'll try again and have nothing else running, or minimised at least. Editing the original to replace the zip file.

EDIT: Corrected now.

lurume84 commented 5 years ago

Gotcha! As I suspected it was produced during the automatic video download. There are some interruptions in HTTP queries maybe produced by Blink servers. It is now handled and, as this operation is done periodically, it will download videos at the end.

There should be no crash related to this but page 2 not showing must be related to another UI problem. We will solve it with the new videos viewer as pagination is no longer an option after Blink update.

sutty550e commented 5 years ago

Hi Luis, Good stuff. I look forward to the update to view all the videos being made available. Please update in here, so I can grab the new viewer.

lurume84 commented 5 years ago

I have updated viewer with these changes. Let's see if this works for you.

sutty550e commented 5 years ago

Thanks Luis. I can confirm that I can see all videos, with a slider, on a single page, after having invoked a new install of the latest viewer to desktop. I will close this issue now.

Great job.

PeteCress commented 5 years ago

Can you post a link to the latest install?

Somehow, I have been stumbling into new installs (latest for me is 1.5) but it seems like, somewhere, there must be a web page with a link to The Latest And Greatest .msi.

sutty550e commented 5 years ago

Hi Pete, There is no new desktop install msi. In order to get the new viewer code for the current desktop version, you delete the viewer code from your PC, and the desktop app goes to get the new viewer code when you launch it.

There are two things to delete.

The zip file(s) for the viewer in your My documents, and the viewer code in you application data.

Paths are as follows:

all content inside %appdata%\Roaming\Bling Desktop\Html\viewer folder contents and all zips inside %userprofile%/Documents/Bling.exe/Download/Versions folder

PeteCress commented 5 years ago

Got it, thanks!

Sounds to me like there is a small .CMD or .BAT file in my immediate future.