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

Post Reply
User avatar
Antori91
Posts: 102
Joined: Sunday 12 February 2017 18:12
Target OS: NAS (Synology & others)
Domoticz version: 4.97&3.5
Location: France
Contact:

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

Post by Antori91 » Sunday 11 February 2018 0:18

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 1196 times
Domoticz High Availability Cluster: Synology Dz V3.5877 (Main) - Raspberry Dz V4.97 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation

User avatar
Antori91
Posts: 102
Joined: Sunday 12 February 2017 18:12
Target OS: NAS (Synology & others)
Domoticz version: 4.97&3.5
Location: France
Contact:

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

Post by Antori91 » Thursday 15 February 2018 22:48

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.
Domoticz High Availability Cluster: Synology Dz V3.5877 (Main) - Raspberry Dz V4.97 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests