Get event on live feed request
AnsweredHi,
I'm wondering wether it's possible or not to create an event rule that triggers when a live feed is requested i.e. via API URLs or client software?
The scenario:
1. A software requests a cameras live stream via http://<server ip>:<port>/media/12AB42FD5912.mpjpeg or the camera live stream is requested in the client software.
2. An event rule is triggered which then runs a "Do HTTP Request" to do something on another server, for example turn on a light.
Edit:
It would also be good to have an event on "Live stream stop", so the light in my example gets turned off.
Best regards,
Marcus Gustafsson
-
Hello Marcus Gustafsson ,
0. You can configure "Generic Event" with the "Do HTTP Request" action
1. A software requests a cameras live stream via http://<server ip>:<port>/media/12AB42FD5912.mpjpeg or the camera live stream is requested in the client software.
Before or after this step, your software can invoke the /api/createEvent API to trigger the "Generic Event" configured in step 0.
2. An event rule is triggered which then runs a "Do HTTP Request" to do something on another server, for example turn on a light.
The "Generic event" triggers the specified HTTP request.
0 -
Hello Andrey,
Thank you for the very much working concept of my question. Although, in this case, I do not have control over the software doing the live stream requests, so I'm unable to add the "Generic Event" to trigger my HTTP request.
By your answer I'm guessing there is no built-in solution for my particular problem?
Many thanks for your quick and valid answer!
0 -
@...
we don't have specifically what you ask, you are right. There is no built-in solution. But when the live stream is accessed, obviously, it is recorded in the audit log, which can be obtained via /api/auditLog
Also, there will be probably some transaction between servers when that will happen, and you can catch it, see /ec2/transactionBus/websocket
But for the latter, you'll need to find out what transaction comes in that case by yourself (and make sure it does not generate false positives).
Keep in mind though, that all this is undocumented and I can't say if it will work reliably in the next versions of our product. But probably some approaches that you can apply to solve the problem.0
Please sign in to leave a comment.
Comments
3 comments