• ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
The HP Community is where owners of HP products, like you, volunteer to help each other find solutions.
HP Recommended

Hello !

 

I would like to do a script to reboot the eagleeye director, I found one for X50/G7500... that works perfectly so i changed it a little, but it has no effect on camera.

Could you confirm?

#BEGIN POWERSHELL SCRIPT FOR POLY EagleEye Director REST command
$password = "1234567" #your password
$IP = "10.35.114.88" #IP of unit

#URL to make new session
$sessionURL = ("https://" + $IP + "/api/restartSystem");
#Command to make new session
$sessionBody = "{`"user`": `"admin`",`"password`": `"" + $password + "`"}"

#URL to issue reboot
$rebootURL = ("https://" + $IP + "/api/restartSystem");
#Command to issue reboot
$rebootBody = "{`"action`": `"reboot`"}"


# disable self signed certificate check
if (-not ([System.Management.Automation.PSTypeName]'ServerCertificateValidationCallback').Type)
{
$certCallback = @"
using System;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
public class ServerCertificateValidationCallback
{
public static void Ignore()
{
if(ServicePointManager.ServerCertificateValidationCallback ==null)
{
ServicePointManager.ServerCertificateValidationCallback +=
delegate
(
Object obj,
X509Certificate certificate,
X509Chain chain,
SslPolicyErrors errors
)
{
return true;
};
}
}
}
"@
Add-Type $certCallback
}
[ServerCertificateValidationCallback]::Ignore()
# End self signed certificate commands

Invoke-WebRequest $sessionURL -ContentType "application/json" -Method Post -body $sessionBody -SessionVariable sess;
Invoke-WebRequest $rebootURL -ContentType "application/json" -Method Post -WebSession $sess -Body $rebootBody

regards

3 REPLIES 3
HP Recommended

Hello @lotfi 

 

welcome back to the Poly community,

 

I do not believe there is a documented REST API for the EagleEye director camera

 

Best Regads

 

Steffen Baier

------------------------------------------------
Notice: I am an HP Poly employee but all replies within the community are done as a volunteer outside of my day role. This community forum is not an official HP Poly support resource, thus responses from HP Poly employees, partners, and customers alike are best-effort in attempts to share learned knowledge.
If you need immediate and/or official assistance for former Poly\Plantronics\Polycom please open a service ticket through your support channels
For HP products please check HP Support.

Please also ensure you always check the General VoIP , Video Endpoint , UC Platform (Microsoft) , PSTN
HP Recommended

Hi Steffen

 

There is a doc API for this but i do not understand it:

 

https://support.polycom.com/content/dam/polycom-support/products/peripherals/eagle-eye-director-ii/u...

 

I found the script for Poly X in this community. But nothing for camera

 

regards

HP Recommended

Hello @lotfi 

 

Welcome back to the Poly community and for correcting me on the REST API for EagelEye Director.

 

Is this an EagleEye Director II ?

 

Looking at your script you are not using the correct API to log in first to the unit. You are also not using a SHA1 encrypted Password.

 

A working script with a hardcoded password 789 converted into SHA1 is:

#BEGIN POWERSHELL SCRIPT FOR REBOOTING Poly EagleEye Director II camera command

#The password needs to be SHA1 encrypted http://www.sha1-online.com/
#The HASH must be all lower case
#In this test script we encoded 789 into SHA1

$password = "fc1200c7a7aa52109d762a9f005b149abef01479" #your password
$IP = "192.168.0.147" #IP of unit

#URL to make new session
$sessionURL = ("https://" + $IP + "/api/login");
#Command to make new session
$sessionBody = "{`"username`": `"admin`",`"password`": `"" + $password + "`"}"

#URL to issue reboot
$rebootURL = ("https://" + $IP + "/api/restartSystem");



# disable self signed certificate check
if (-not ([System.Management.Automation.PSTypeName]'ServerCertificateValidationCallback').Type)
{
$certCallback = @"
    using System;
    using System.Net;
    using System.Net.Security;
    using System.Security.Cryptography.X509Certificates;
    public class ServerCertificateValidationCallback
    {
        public static void Ignore()
        {
            if(ServicePointManager.ServerCertificateValidationCallback ==null)
            {
                ServicePointManager.ServerCertificateValidationCallback += 
                    delegate
                    (
                        Object obj, 
                        X509Certificate certificate, 
                        X509Chain chain, 
                        SslPolicyErrors errors
                    )
                    {
                        return true;
                    };
            }
        }
    }
"@
    Add-Type $certCallback
 }
[ServerCertificateValidationCallback]::Ignore()
# End self signed certificate commands

Invoke-WebRequest -UseBasicParsing $sessionURL -ContentType "application/json" -Method Post -body $sessionBody -SessionVariable sess;
Invoke-WebRequest -UseBasicParsing $rebootURL -ContentType "application/json" -Method Post -WebSession $sess -Body $rebootBody

 

 A much simpler CURL example:

curl -b cookies.txt -c cookies.txt -X POST -d "{\"username\": \"admin\",\"password\": \"fc1200c7a7aa52109d762a9f005b149abef01479\"}" -H "Content-Type: application/json" -k https://192.168.0.147/api/login
curl -b cookies.txt -c cookies.txt -X POST -H "Content-Type: application/json" -k https://192.168.0.147/api/restartSystem

 

Best Regards

 

Steffen Baier

------------------------------------------------
Notice: I am an HP Poly employee but all replies within the community are done as a volunteer outside of my day role. This community forum is not an official HP Poly support resource, thus responses from HP Poly employees, partners, and customers alike are best-effort in attempts to share learned knowledge.
If you need immediate and/or official assistance for former Poly\Plantronics\Polycom please open a service ticket through your support channels
For HP products please check HP Support.

Please also ensure you always check the General VoIP , Video Endpoint , UC Platform (Microsoft) , PSTN
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.