![]() |
Increment web image widget - Printable Version +- Charmed Quark Systems, Ltd. - Support Forums and Community (https://www.charmedquark.com/vb_forums) +-- Forum: General Discussion (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=3) +--- Forum: CQC Support (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=9) +--- Thread: Increment web image widget (/showthread.php?tid=10943) |
Increment web image widget - NishanF - 10-23-2019 Looking for some suggestions on how to accomplish something. I have a number of cameras, and on my interface homepage, I'd like to have a single web image that automatically increments between the six cameras, perhaps once ever 2 seconds ...there isn't enough space on the home page to display all the cameras simultaneously. A few ideas I had: 1. Use a field based web image widget, and write another driver whose only task is to update a field with the URL every few seconds. 2. Use a timer to accomplish the same thing. Both seem wasteful, as I don't see a way to reliably start the then stop the events triggering...starting the event triggering is easy on loading the interface viewer, but I don't see a way to reliably stop it. 3. Have another small lightweight external webserver gather and increment the images and then provide a single URL to serve to CQC. Other ideas? thanks NF RE: Increment web image widget - Dean Roddey - 10-23-2019 You definitely wouldn't want a streaming thingie changing ever few seconds. That would be a lot of overhead. Or do you really mean just an image, snapshot type thing? If the latter you could do a simple driver that supports the Driver Image widget. https://www.charmedquark.com/Web2/CQCDocs/CQCDocs.html?topic=/Reference/IntfWidgets&page=/DriverImage Just have the driver load the images on some schedule, changing the trigger field every time it does, which makes the widget grab the new image. Keeping in mind that this will be constantly sucking over images, so I wouldn't make it change really quickly, though it depends somewhat on the size of the images. You would have to be able to get the images somewhere under [cqc]\CQCData\MacroFileRoot, or have the driver pull them over via HTTP or some such. RE: Increment web image widget - NishanF - 10-23-2019 Yup...it's just a snapshot from each camera (a small jpeg file). I didn't know about the driver image widget...that could work. On the other hand, it just seems wasteful to have a driver pulling images from the cameras around the clock, when I would only want the driver doing that if there was a widget that needed the images...any ideas to deal with that issue. RE: Increment web image widget - Dean Roddey - 10-23-2019 You would be writing the driver, so you can use whatever you want to trigger it to start and stop doing its thing. When some field is true or at some particular times of the data or whatever it is. RE: Increment web image widget - NishanF - 10-24-2019 In my mind, the issue was stopping the driver. It's easy to start the driver when the interface viewer loads. But is there a way to know when the viewer has lost connection...with the webriva, instead of exiting out of the viewer, I suspect you would normally just close the browser window...is there a way to track that? RE: Increment web image widget - Dean Roddey - 10-24-2019 Not really. You could of course do some sort of dead man switch. I.e. the client periodically sets a variable driver field. The driver periodically clears it. If it stays clear from some period of time, the driver stops doing images until it is set again. Something like that. |