Table of contents

On this page we have an example python script to:

  • Add a device with MAC address ...
  • Assign a provisioning profile

In this example, we used a windows PC where we installed Python

Install dependencies

pip3 install requests
pip3 install requests-hawk


Gather data from GRAPE

Gather API key

You need to create the API key if not already available.


Copy : Access Key ID (API_KEY)


Copy : Access Key Secret (API_SECRET)

Create a Provisioning Profile


We have created 2 Provisioning Profiles.

  • For the Desktop devices with the Provisioning URL
    • Name: ProfileDesktopProvURL
    • Company: Your Company
    • Product Family: P-Series
    • Redirection - Settings Server: http://192.168.2.200/DesktopProv
    • Copy : The Provisioning Profile UUID
  • For the DECT systems with the Provisioning URL
    • Name: ProfileDECTProvURL
    • Company: Your Company
    • Product Family: N610/N670/N870(E)
    • Redirection - Provisioning server URL: http://192.168.2.200/DECTProv
    • Copy : The Provisioning Profile UUID

Provisioning Profiles can have more then 1 parameter !!!



Python script

Download the following python script: add_device_profiles.py

python add_device.py 
usage: add_device_profiles.py [-h] --api-key API_KEY --api-secret API_SECRET --device-mac DEVICE_MAC --provisioning-profile Provisioning_Profile_UUID

Example:

  • N610/N670/N870 device
  • With MAC address: 589EC60D8C73
  • Provisioning Profile ProfileDECTProvURL UUID a73e6b04f8874c3eb2522c249f2360cf

If the device already exists, the value will be overwritten.

N610/N670/N870 example
python add_device_profiles.py --api-key xxxxxxxxxxxxxxxxxxxxxxxxxxx--api-secret  xxxxxxxxxxxxxxxxxxxxxxxxxxxxx --device-mac 589EC60D8C73 --provisioning-profile a73e6b04f8874c3eb2522c249f2360cf

Example:

  • P850W device
  • With MAC address: 000413E41F3F
  • Provisioning Profile ProfileDesktopProvURL UUID 5bd7345119c248018d39e503bcd30ae5

If the device already exists, the value will be overwritten.

P850W example
python add_device_profiles.py --api-key xxxxxxxxxxxxxxxxxxxxxxxxxxx --api-secret xxxxxxxxxxxxxxxxxxxxxxxxxxxxx --device-mac 000413E41F3F --provisioning-profile 5bd7345119c248018d39e503bcd30ae5