Motion Capture Video Link in iOS Notification and/or AppleScript Args
  • I've noticed that when motion is detected, a Motion Capture video file is created straight away (with a .unf extension). I am able to watch this video as soon as it starts, both on my phone, SS app on the computer, and via the SS webpage. If I refresh the captured list on my phone, I see the file size increasing as it still records, and if I keep closing the video and press it again to watch, the total time keeps increasing. I realise you know all this, but it helps explain my reasoning behind the feature requests below.

    1. Would it be possible to have the option to link an iOS notification to its associated motion capture video within the SS app please (instead of the live video feed)? I know that not all actions will have a linked motion capture video, but if it does I'd really like the ability to go straight to the relevant recording for the push notification I'm reviewing, either as soon as it happens or many minutes/hours later.

    2. Could you have the option to pass the Motion Capture video file name (and path as seen below) within the CSV list of reasons please (3rd arg)? I'm basing this on the fact that a motion video file is started as soon as motion is detected, so we would know the filename straight away which could be passed onto the script. If there is no associated video file for that action, the relevant CSV field could be left empty. I know there is a ProcessCapturedFile script that is called for every file that is created, but this would only be called after my motion capture video finishes recording which is too late, even though I do have the ability to watch it before it finishes.

    A good example for #2 is that I can use the following direct video link to view the current live Motion Capture video whilst it is still being written. The benefit is I can watch what caused the trigger from the beginning, rather than the current live video, which also would help with #1.

    https://(my external DNS name)/++getfilehb/4/2020-04-30/30-04-2020+12-00-37+M+doorcam.unf?auth=(authcode)

    Interestingly, even though the video filename is .unf in the link, I can still use it to watch the video even after the file has been renamed to .m4v, so the link would still be valid both during and after recording.

    Following on from this, is there a way to provide a clickable link that if used on an iOS device, opens the installed app and takes you to the associated video, rather than my external webpage please?

    Thanks!
    Paul.
  • Hi Paul,

    These are good suggestions, and we do like to add features that help users do interesting things with SecuritySpy via AppleScript and other methods, but implementing what you describe is not as simple as it might seem.

    The first issue is that there is not a 1:1 relationship between actions being triggered and captured files being generated. There can be an action triggered but not a motion-capture file recorded, or vice versa, as these two functions are independent and depend on various settings and states (e.g. action reset time, motion-capture type, and whether each mode is armed or disarmed).

    Secondly, while the file is being captured, it is an unfinished file with an ".unf" extension, and cannot be played outside of SecuritySpy (it can only be played in SecuritySpy's Browser and via its web interface - it won't play if you try to open it in any other app). Due to this, having the file name or path to the unfinished file in the triggered script seems to me to be of limited utility. Plus the fact that once the file has finished, the file extension will change, which means that the file name passed into the triggered script is only valid for a short time.

    The web server links work for unfinished files, so we could conceivably pass a URL to the captured file into the script - perhaps this is what you mean, rather than a path to the file on the local file system. I think this is the only thing that would work, although this depends on having even more things in place (access to the web server, on top of the right recording settings and the right schedules).

    In terms of links that open the SecuritySpy iOS app, this can be achieved using the URL Scheme we have made available. However, while this URL scheme can open the list of captured files, it does not (currently) have the facility to open a particular file. Maybe this is something that we can add in the future.
  • Hi Ben,

    Thank you for taking the time to respond and explaining the situation.

    Regarding #1, perhaps it could just be a user option to only link push notifications to a video if there's an active continuous capture video at the time of the notification, or if no video is being recorded, the live view instead? This would then cover those scenarios where there's no 1:1 relationship, but allow the user to choose linking if there is one? I'd be happy if this was an advanced feature that was set outside the GUI, along with a load of warnings to say it only works with an associated CC video if there was one?

    I'm sorry go on about it, but the reason is it takes 8 taps to find a view a particular motion video that I was notified about, which can be annoying after a while. e.g.

    1. Tap notification
    2. Done to leave live view
    3. Captures
    4. Camera menu
    5. Camera I had the notification for
    6. Video type menu
    7. Motion Capture Movies (as I might have previously been looking at another option)
    8. Tap the video I want to watch

    Regarding #2, it's useful to know that .unf can't be played outside of SecuritySpy which could indeed confuse some people if it was included in AppleScript args. My intention was to only view the video within the SecuritySpy ecosystem (either via the app or web page), and also be an alternative way to view videos linked to a notification if #1 couldn't be implemented.

    "*The web server links work for unfinished files, so we could conceivably pass a URL to the captured file into the script - perhaps this is what you mean, rather than a path to the file on the local file system.*"
    - Yes this is what I was thinking, but just the following part so I can add my own domain name and auth details within the script:

    ""/++getfilehb/4/2020-04-30/30-04-2020+12-00-37+M+doorcam.unf"

    Thank you,
    Paul.
  • Could the linking of iOS notifications to motion capture videos be conditional? e.g. if motion capture is armed, and if actions is armed, send a link to the recorded video embedded in the push notification, else just send the usual live preview link?

    I realise that it's probably far more complicated than that, and if so I apologise and will accept your decision. The video surveillance software you have created already far surpasses many that I have tried in terms of features and usability, and once my 30 day trial ends I'll be buying the 8 camera license now that I can link Raspberry Pi cameras to this too. (I automate internal cameras to turn on/off using presence detection, hence the need for 8) :)
  • I understand the problem you want to solve, but I don't think that there is a clean solution. I agree that going to the captured file (if it exists) is the best thing to do if you are tapping the notification some time after the event (because there will be nothing interesting on the live video). However, if I tap the notification as soon as it comes in, it seems to me that the most useful thing is in fact the live video. For example, I can see if the postman is still at the door etc.

    So, if we were to change the behaviour of this, it should probably be dependent on the timing of the tap, in addition to whether a captured files is in fact produced, of course. The upshot would be that the same action (tapping on a notification) does different things at different times and in different circumstances, which could be confusing.

    Also, getting to a camera's captured footage doesn't have to be as convoluted as your sequence of steps! You can do it like this:

    1. Tap the notification
    2. Tap the icon in top right of that screen (the box with horizontal lines) - this takes you straight to the Captures panel for this particular camera
    3. Tap the video you want to watch

    I'll have a look at what we can provide to the AppleScript in terms of captured file.
  • How about the iOS notification takes you to the recorded tab instead of live view ?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!