Versions Compared

Key

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

...

A csv and json with matching names (eg. example123.json, example123.csv) should be placed in the Imports folder. Then run ImportScript.py using python 3. In Windows, this can be done by entering cmd in the start menu, then using cd commands to navigate to the folder that holds the import script. From the command line, run:

Code Block
python ImportScript.py

It will connect to each device in order, import the provided configuration json, and restart all currently running apps. Note that this process may take several minutes per device.

MQTT and eACM will be started at the end of the process if they weren’t previously running.

For further details on running scripts in different environments, see Client Scripts

JSON Formatting

The import script expects json files as generated by the Export process, either of the full device (node level export) or an individual app (app level export). At this time, folder level exports and csv exports are not recognized by the import script.

...

If you experience a timeout durring the process, there are 3 variables at the top of ImportScript.py that can be adjusted. The script can be edited in any text editing software, eg. notepad or notepad++.

Code Block
#Shared timeout and retry parameters to tune if network is difficult
timeOut=40
importTimeOut=1200
retries=Retry(
    total=3, 
    status_forcelist=[429, 500, 502, 503, 504], 
    method_whitelist=["HEAD", "GET", "POST"]
)

...