Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Table of Contents

Install dependencies

Code Block
pip3 install requests
Code Block
pip3 install requests-hawk


Gather data from GRAPE

Gather API key

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


Copy 1: Access Key ID (API_KEY)


Copy 2: Access Key Secret (API_SECRET)

Create a Provisioning Profile


We have created 2 Provisioning Profiles.

  • For the DECT systems Desktop devices with the Provisioning URL
    • Name: ProfileDesktopProvURL
    For the Desktop devices
  • 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 !!!

Image Removed

Image Removed

Setting:

N610/N670/N870(E)


Image Added

Image AddedKEY_UUID:


Python script

Download the following python script: add_device_profiles.py

Code Block
python add_device.py 
usage: add_device_profiles.py [-h] --api-key API_KEY --api-secret API_SECRET --device-mac DEVICE_MAC --productprovisioning-codeprofile PRODUCT_CODE --key-uuid KEY_UUID --value VALUEProvisioning_Profile_UUID

Example:

  • N610/N670/N870 device
  • With MAC address: 589EC60D8C73
  • Provisioning parameter: Provisioning.global.ProvisioningServer in GRAPE: "Provisioning URL: http://192.168.2.200/dectprovisioningProfile ProfileDECTProvURL UUID a73e6b04f8874c3eb2522c249f2360cf

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

Code Block
titleN610/N670/N870 example
python add_device_profiles.py --api-key xxxxxxxxxxxxxxxxxxxxxxxxxxx --api-secret  xxxxxxxxxxxxxxxxxxxxxxxxxxxxx --device-mac 589EC60D8C73 --keyprovisioning-uuid 094c8a73a08644a1aaba837c33dfb528 --value http://192.168.2.200/dectprovisioningprofile a73e6b04f8874c3eb2522c249f2360cf

Example:

  • P850W device
  • With MAC address: 000413E41F3F
  • Provisioning parameter: setting_server in GRAPE: "Provisioning URL: http://192.168.2.200/P850provisioningProfile ProfileDesktopProvURL UUID 5bd7345119c248018d39e503bcd30ae5

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

Code Block
titleP850W example
python add_device_profiles.py --api-key xxxxxxxxxxxxxxxxxxxxxxxxxxx --api-secret xxxxxxxxxxxxxxxxxxxxxxxxxxxxx --device-mac 000413E41F3F --keyprovisioning-uuid 50a400560eec4dc0b96b026094e06562 --value http://192.168.2.200/P850provisioningprofile 5bd7345119c248018d39e503bcd30ae5