utils
importing.utils
¤
Attributes¤
MAX_FILE_SIZE = settings.MAX_LAYER_FILE_SIZE_MB
module-attribute
¤
logger = logging.getLogger(__name__)
module-attribute
¤
Functions¤
create_default_origins(apps, schema_editor)
¤
Creates the default origins for data import.
Source code in importing/utils.py
13 14 15 16 17 18 19 | |
remove_default_origins(apps, schema_editor)
¤
Removes the default origins for data import.
Source code in importing/utils.py
22 23 24 25 26 27 28 | |
retrieve_thingsboard_data(token, customer_id, tb_device_name, variable, start_ts, end_ts)
¤
Retrieves data from ThingsBoard for a given device and variable.
Saves the response to a JSON file in the media directory.
Source code in importing/utils.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |
retrieve_thingsboard_device_id(token, customer_id, device_name)
¤
Retrieve ThingsBoard device ID for a given device name.
Source code in importing/utils.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
validate_layer_file_size(file)
¤
Source code in importing/utils.py
102 103 104 105 106 107 | |