PrIoT Database¶
Note
Install all the prerequisites before using PrIoT-CLI, see Prerequisites
PrIoT database management¶
- class priot_database.PrIoT_DB_Mangodb(database_name='priot_mango_db', host='localhost', port=27017)[source]¶
- priot_database.insert_board()¶
Parameters: - database_name – PrIoT mangoDB database name
- json_filename – JSON file name for the board (eg. [path_to_json_file]/board.json)
- priot_database.insert_sensor()¶
Parameters: - database_name – PrIoT mangoDB database name
- json_filename – List of JSON file names for the sensors (eg [ “[path_to_json_file]/sensor_1.json”, “[path_to_json_file]/sensor_2.json” )
- priot_database.insert_actuator()¶
Parameters: - database_name – PrIoT mangoDB database name
- json_filename – List of JSON file names for the actuator (eg [ “[path_to_json_file]/actuator_1.json”, “[path_to_json_file]/actuator_2.json”)
- priot_database.insert_transceiver()¶
- class priot_database.sensor¶
- This class defines the structure of **sensor** information inside database. Use by the python module - *mangoengine*.
- component_type¶
- String field restricted to one of the following component type - Sensor, Actuator, Transciver, HMI, MCU.
- category¶
- List of string field which specifies the category of actuator - For eg : ["Relay"].
- unique_id¶
- Component ID to access it uniquely inside the database.
- interface¶
- List of string field restricted to the following interface type - GPIO, SPI, I2C, UART, etc.
- manufacturer¶
- String field - Name of manufacturer.
- demo_board_url¶
- URL field - URL for demo board.