Posts: 599
Threads: 31
Joined: May 2009
I'm just experimenting trying to figure out the best way to have a security camera widget template load into one of 3 overlays I use in my IV and then disappear after a set time.  The idea is that it displays a camera display and then is replaced with my standard template on its' own after a template timeout triggers. 
Now, I already have an inactivity timeout set on my main overlay which fires up a screensaver if certain conditions are met.  This works fine at the moment.  I am trying to have this timeout now also load an overlay as part of my testing but I can't get it to work.  Eventually I will do this a bit different, but need to figure out why I can't update templates on timeout.  So far I have:
on load timeout value set on the overlay (20 secs at present for testing)
on timeout I am targeting one of 3 overlays and trying to load a template:
Main_Overlay::LoadOverlay
    P1=/User/Clear1/AlarmV2
The above just doesn't seem to want to work for me.  In the Action Trace window I can see the timeout occur and the commands to change the template are shown without error, but the template never actually changes.  Would you have an explanation of what I may be doing wrong here and/or how to accomplish this?  This is tricky to explain so if more details are needed let me know and I can use some pictures to better explain.
I also tried load sibling overlay but that errors out.
Posts: 40,483
Threads: 491
Joined: Aug 2002
I'm guessing that it ignores the load overlay command because it's happening during a timeout. If that's so it shouldn't have let you configure the command to begin with, though you could have cut and pasted in in instead of configuring it I guess.
I can look at that. Of course if there's any popup up it probably wouldn't do it either, because that could cause a lot of weirdness if a widget in the overlay is waiting for the popup to complete.
One way to do this is to actually just control an overlay's visibility and re-hide it. That is always doable.
Dean Roddey
Explorans limites defectum
Posts: 599
Threads: 31
Joined: May 2009
OK, yeah I don't think I cut and pasted it. I'd sure like to find a good way to have a camera view load up in part of my interface when the doorbell goes or motion is detected and then just disappear and be replaced by something else after a set time. I'm trying to get away from the camera widget always displaying in a small windows like I have it now as I think it causes some grief over time and not just with CQC but the camera system too.
Would hiding the overlay actually stop the feed or I think it's still connected/streaming just not visible right?
Posts: 1,505
Threads: 143
Joined: May 2007
(03-30-2019, 09:23 PM)Shaky Wrote: OK, yeah I don't think I cut and pasted it.  I'd sure like to find a good way to have a camera view load up in part of my interface when the doorbell goes or motion is detected and then just disappear and be replaced by something else after a set time.  I'm trying to get away from the camera widget always displaying in a small windows like I have it now as I think it causes some grief over time and not just with CQC but the camera system too.  
Would hiding the overlay actually stop the feed or I think it's still connected/streaming just not visible right?
Not sure if this will help, but....
On my main template, I do this in the OnLoad Tab - to make the screen go back to the main screen after 5 minutes:
IntfViewer::SetTimeout
    P1=300
    P2=True
And then I do this on the OnTimeout Tab:
IntfViewer::LoadNewTemplate
    P1=/User/BL/1280x768/@BL-Main
This works about 95% of the time.  If the computer loses connection with the MS, you will get an error that the timeout has been disabled, so I have to restart the IV to make it work again.
Posts: 599
Threads: 31
Joined: May 2009
(03-30-2019, 10:22 PM)kblagron Wrote: Not sure if this will help, but....
On my main template, I do this in the OnLoad Tab - to make the screen go back to the main screen after 5 minutes:
IntfViewer::SetTimeout
    P1=300
    P2=True
And then I do this on the OnTimeout Tab:
IntfViewer::LoadNewTemplate
    P1=/User/BL/1280x768/@BL-Main
This works about 95% of the time.  If the computer loses connection with the MS, you will get an error that the timeout has been disabled, so I have to restart the IV to make it work again.
Yeah that's helpful and I just tried it and works for me too.  Unfortunately it won't quite work for what I'm trying to accomplish as I'm trying to keep the main template loaded and just cycle an overlay area within that template.
That does help me articulate my issue further too.  The LoadNewTemplate function works like the above with the timeout but it seems loadOverlay does not.  I would like to have the LoadOverlay function work as well just like you have above.  If I could get the timeout to work then I'll beg Dean to also make it so we can target an overlay within an event. That's somewhat dangerous to do as you could impact an active IV user, but if done with some thought I think it's safe enough.  Popping up a camera, light control or other things in a small overlay based on what's happening around you would make the system appear smarter and a big benefit in my opinion.  
As further background. I actually have one template with three overlay areas in it.  One being kind of an interactive dashboard.  That dashboard area/overlay is where I want the templates to load into "magically" based on events/timeouts/time of day etc.  I do a little bit of stuff like this today with an external program call to autohotkey and tiny hidden buttons on the IV that it clicks for me when called... a hack but works fairly well to load up overlays with button on event triggers.  I want to get a bit more sophisticated now and hope to use CQC 100% vs autohotkey.
Posts: 40,483
Threads: 491
Joined: Aug 2002
Hiding the overlay wouldn't stop the feed, no. It just wouldn't be visible. Most likely the VLC engine doesn't bother actually processing the video if the window it is embedded in isn't visible. But it would still likely be doing the streaming.
Dean Roddey
Explorans limites defectum
Posts: 1,505
Threads: 143
Joined: May 2007
03-31-2019, 08:38 AM
(This post was last modified: 03-31-2019, 08:40 AM by kblagron.)
(03-31-2019, 07:21 AM)Shaky Wrote: Yeah that's helpful and I just tried it and works for me too.  Unfortunately it won't quite work for what I'm trying to accomplish as I'm trying to keep the main template loaded and just cycle an overlay area within that template.
That was what I originally wanted as I have two overlays on my main screen - i.e. after 5 minutes go back to the main screen by loading an overlay that doesn't contain any key press action buttons in the middle of the screen.  That way if the screen is asleep, you can touch the middle of the screen and not worry about possibly selecting something that was left up before.  I didn't like Blanker as most of the time the first keypress would start the process of turning the screen on, then the user would press it again, and press something that was left up before.  This was the only way I could get it to work, but has its problems.  If the timeout becomes disabled, you have to restart the IV to get it to work like that again.  I am not sure that if a user was using the IV that it would interfere, as from what I remember, the timeout starts over with any user keypress. The ability to load an overlay in the timeout section would be a nice feature to have.
Posts: 1,505
Threads: 143
Joined: May 2007
Did you ever find out any other way to do what you wanted?
Posts: 599
Threads: 31
Joined: May 2009
(04-21-2019, 09:11 PM)kblagron Wrote: Did you ever find out any other way to do what you wanted?
Unfortunately not yet but to do this properly I think we need some of the CQC additions made around targeting different overlays in templates and timeouts etc.  I'm having some other issues with my cameras that I have to sort out first unfortunately so haven't had time to play with this much.  Too many projects and not enough time. 

  
I used to do this a different way and found an old post about it... I may go back to a hidden overlay showing/hiding or something although my IV is so much more complex now I don't know if my old way would work.  https://www.charmedquark.com/vb_forum/showthread.php?tid=8290
Posts: 1,505
Threads: 143
Joined: May 2007
+1 on adding an option to load another overlay (rather than a new template) on the OnTimeOut() tab.