Page 1 of 1

[SOLVED]Camera: How to launch ShowCameraLiveStream from a script

Posted: Saturday 10 February 2018 23:18
by Antori91
Hello,

I've started to use cameras, I have for a long time for some, with Domoticz. I use now in particular a Selector Switch to send commands to position / manage a motorized camera. It works well! Using the Android app in addition, it's like having a remote control.

Now, I would like to be able to manage the camera stream window opening and closing. Can we launch the script "javascript:ShowCameraLiveStream" (the one that Domoticz launches when we click on the camera icon of a switch) from another user script (whatever the script and API used)?

if possible via a SCRIPT to open and close this ShowCameraLiveStream window of a camera, my idea is to have ONLY ONE Selector Switch to manage all my cameras. For example, I will select "Zone XX" and Domoticz will open the window of the camera of that zone (by launching ShowCameraLiveStream with the idx of the corresponding camera). If this zone is covered by a motorized camera, Domoticz will first send the command to ask the camera to go to that view zone (this works already).
CaptureCam.JPG
CaptureCam.JPG (72.93 KiB) Viewed 2044 times

Re: [SOLVED]Camera: How to launch ShowCameraLiveStream from a script

Posted: Thursday 15 February 2018 21:48
by Antori91
Via the following trick: The url of a "generic" camera within Domoticz corresponds to a symbolic link pointing to snapshots generated by avconv, this symbolic link is changed on the fly by a script called on the Levels Actions of a selector switch.