Control camera IR

Posted on
Fri Nov 02, 2018 3:58 am
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Control camera IR

Hi,
Is there a way to control G3 cameras IR leds with the plugin? I am not very happy with the cameras own light detection and would like to control it from Indigo instead.
Thanks!

Posted on
Fri Nov 02, 2018 7:27 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Control camera IR

Yes in action and through the menu.

How is your nvr setup?




Sent from my iPhone using Tapatalk

Posted on
Fri Nov 02, 2018 1:44 pm
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Control camera IR

Thats's great!

I have some different models of G3 managed by a Ubiquiti NVR. The main NVR is a Blue Iris server pulling rtsp from the Ubi NVR but also a backup JPEG stream directly from the camera as backup in case that the Ubi NVR fails.

Posted on
Fri Nov 02, 2018 3:01 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Control camera IR

You can get snapshots ... streams w the plugin from the nvr, direct path access, or directly form the camera.


Sent from my iPhone using Tapatalk

Posted on
Fri Nov 02, 2018 3:32 pm
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Control camera IR

I can't get it to work, I must be missing something. Any thoughts?

Code: Select all
Started plugin "uniFiAP 7.24.135"
   uniFiAP                         initializing  ... variables
...deleted
   uniFiAP                         initialized
Attachments
videoconfig.jpeg
videoconfig.jpeg (354.54 KiB) Viewed 2500 times
Last edited by lochnesz on Wed Nov 14, 2018 12:34 pm, edited 1 time in total.

Posted on
Fri Nov 02, 2018 4:05 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Control camera IR

I will post a new version with some more debug options..
could you download this and run it .. also switch on debug for VIDEO(6) and ssh(7)
https://www.dropbox.com/s/lrbkt6hvh3qbokz/uniFiAP.indigoPlugin.zip?dl=0

Karl

Posted on
Fri Nov 02, 2018 4:54 pm
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Control camera IR

Will do and get back with the result.

Peter

Posted on
Sat Nov 03, 2018 10:57 am
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Control camera IR

Okay, here is the result from the plugin start. I disabled the AP and Switch sections. When I try to control the IR for a camera with an action nothing happens, no log entry either.
Code: Select all
 Starting plugin "uniFiAP 7.25.139" (pid 33389)
   uniFiAP                         setting parameters for indigo version: >>7<<
   Started plugin "uniFiAP 7.25.139"
   uniFiAP                         initializing    ... variables
deleted...
Last edited by lochnesz on Wed Nov 14, 2018 4:17 pm, edited 2 times in total.

Posted on
Sat Nov 03, 2018 1:24 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Control camera IR

>> in Line '1680' has error=''apiKey'' <<
indicates that the data returned is not complete .. apiKey is missing . that might mean that remote access is disabled on the NVR, enable in user setting
Screen Shot 2018-11-03 at 13.26.45.png
Screen Shot 2018-11-03 at 13.26.45.png (11.97 KiB) Viewed 2394 times


>> checkInListSwitch in Line '6515' has error='u'inListSwitch_6'' <<
indicates that there is a switch that was defined / existed, but anymore, or something like that. is fixed in attached

here a version that checks for both:
https://www.dropbox.com/s/lrbkt6hvh3qbokz/uniFiAP.indigoPlugin.zip?dl=1

Karl

Posted on
Sat Nov 03, 2018 1:46 pm
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Control camera IR

The API access have been enabled during all tests. Here is the output with the new release.
Code: Select all
Started plugin "uniFiAP 7.25.140"
   uniFiAP                         initializing    ... variables
  deleted...

Attachments
config.jpg
config.jpg (180.03 KiB) Viewed 2390 times
indigo_user.jpeg
indigo_user.jpeg (75.78 KiB) Viewed 2390 times
Last edited by lochnesz on Wed Nov 14, 2018 4:17 pm, edited 1 time in total.

Posted on
Sat Nov 03, 2018 4:04 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Control camera IR

ok, this one should have "everything" fixed:
https://www.dropbox.com/s/lrbkt6hvh3qbokz/uniFiAP.indigoPlugin.zip?dl=1

took some time

Karl

Posted on
Sat Nov 03, 2018 4:21 pm
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Control camera IR

Thanks, the API key is now pulled from the NVR to the plugin. However the action isn't working. Here is the plugin start log and after that the action group execution.

Code: Select all
   Starting plugin "uniFiAP 7.25.141" (pid 35929)
   uniFiAP                         setting parameters for indigo version: >>7<<
   Started plugin "uniFiAP 7.25.141"
   uniFiAP                         initializing    ... variables
deleted...   
   UNIFI Video error               executeCMDonNVR has error, no json object returned: ('', '  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\ncurl: (35) error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure\n')
Last edited by lochnesz on Wed Nov 14, 2018 4:18 pm, edited 3 times in total.

Posted on
Sat Nov 03, 2018 5:31 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Control camera IR


Posted on
Sun Nov 04, 2018 2:06 am
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Control camera IR

Hi, there is still something wrong when I try to control the IR led.

Code: Select all
   Starting plugin "uniFiAP 7.25.142" (pid 39805)
   uniFiAP                         setting parameters for indigo version: >>7<<
   Started plugin "uniFiAP 7.25.142"
   uniFiAP                         initializing    ... variables
deleted...
curl: (35) error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

Last edited by lochnesz on Wed Nov 14, 2018 4:19 pm, edited 1 time in total.

Posted on
Sun Nov 04, 2018 8:20 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Control camera IR

this error:
curl: (35) error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

indicates that this is a unix / ssl / setup issue.

if this
Code: Select all
/usr/bin/curl --insecure -c /tmp/nvrCookie --data '{"username": "xxx", "password": "xxx"}' https://192.168.9.35:7443/api/login
does not work, there must be something else wrong ... don't know what. It's a simple login ... What unix system is hosting the NVR?

could you try to use "request" instead of "curl" ( switch in config) the plugin offers both ways to connect to the unifi systems -- older MACs osx do not support the required ssl standards in the python lib . Thats why curl is offered.


Karl

Who is online

Users browsing this forum: No registered users and 9 guests