{ "code_name": "adguard_import", "unique_prefix": "ADGUARDIMP", "plugin_type": "device_scanner", "execution_order" : "Layer_0", "enabled": true, "data_source": "script", "mapped_to_table": "CurrentScan", "data_filters": [ { "compare_column": "Object_PrimaryID", "compare_operator": "==", "compare_field_id": "txtMacFilter", "compare_js_template": "'{value}'.toString()", "compare_use_quotes": true } ], "show_ui": true, "localized": ["display_name", "description", "icon"], "display_name": [ { "language_code": "en_us", "string": "AdGuard (Device import)" } ], "description": [ { "language_code": "en_us", "string": "Plugin to ..." } ], "icon": [ { "language_code": "en_us", "string": "" } ], "params": [], "settings": [ { "function": "RUN", "events": ["run"], "type": { "dataType": "string", "elements": [ { "elementType": "select", "elementOptions": [], "transformers": [] } ] }, "default_value": "disabled", "options": [ "disabled", "before_name_updates", "on_new_device", "once", "schedule", "always_after_scan" ], "localized": ["name", "description"], "name": [ { "language_code": "en_us", "string": "When to run" } ], "description": [ { "language_code": "en_us", "string": "When the plugin should run. A good option is schedule for device scanners." } ] }, { "function": "RUN_SCHD", "type": { "dataType": "string", "elements": [ { "elementType": "span", "elementOptions": [ { "cssClasses": "input-group-addon validityCheck" }, { "getStringKey": "Gen_ValidIcon" } ], "transformers": [] }, { "elementType": "input", "elementOptions": [ { "focusout": "validateRegex(this)" }, { "base64Regex": "Xig/OlwqfCg/OlswLTldfFsxLTVdWzAtOV18WzAtOV0rLVswLTldK3xcKi9bMC05XSspKVxzKyg/OlwqfCg/OlswLTldfDFbMC05XXwyWzAtM118WzAtOV0rLVswLTldK3xcKi9bMC05XSspKVxzKyg/OlwqfCg/OlsxLTldfFsxMl1bMC05XXwzWzAxXXxbMC05XSstWzAtOV0rfFwqL1swLTldKykpXHMrKD86XCp8KD86WzEtOV18MVswLTJdfFswLTldKy1bMC05XSt8XCovWzAtOV0rKSlccysoPzpcKnwoPzpbMC02XXxbMC02XS1bMC02XXxcKi9bMC05XSspKSQ=" } ], "transformers": [] } ] }, "default_value": "*/5 * * * *", "options": [], "localized": ["name", "description"], "name": [ { "language_code": "en_us", "string": "Schedule" } ], "description": [ { "language_code": "en_us", "string": "Only enabled if you select schedule in the SYNC_RUN setting. Make sure you enter the schedule in the correct cron-like format (e.g. validate at crontab.guru). For example entering 0 4 * * * will run the scan after 4 am in the TIMEZONE you set above. Will be run NEXT time the time passes." } ] }, { "function": "CMD", "type": { "dataType": "string", "elements": [ { "elementType": "input", "elementOptions": [{ "readonly": "true" }], "transformers": [] } ] }, "default_value": "python3 /app/front/plugins/adguard_import/adguard_import.py", "options": [], "localized": ["name", "description"], "name": [ { "language_code": "en_us", "string": "Command" } ], "description": [ { "language_code": "en_us", "string": "Command to run. This can not be changed" } ] }, { "function": "RUN_TIMEOUT", "type": { "dataType": "integer", "elements": [ { "elementType": "input", "elementOptions": [{ "type": "number" }], "transformers": [] } ] }, "default_value": 30, "options": [], "localized": ["name", "description"], "name": [ { "language_code": "en_us", "string": "Run timeout" } ], "description": [ { "language_code": "en_us", "string": "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted." } ] }, { "function": "SERVER", "type": { "dataType": "string", "elements": [ { "elementType": "input", "elementOptions": [], "transformers": [] } ] }, "maxLength": 200, "default_value": "", "localized": ["name", "description"], "name": [ { "language_code": "en_us", "string": "AdGuard Home Server" } ], "description": [ { "language_code": "en_us", "string": "Hostname or IP of your AdGuard Home server.
Example: 192.168.1.10 or adguard.local" } ] }, { "function": "PORT", "type": { "dataType": "integer", "elements": [ { "elementType": "input", "elementOptions": [{ "type": "number" }], "transformers": [] } ] }, "default_value": 3000, "localized": ["name", "description"], "name": [ { "language_code": "en_us", "string": "Port" } ], "description": [ { "language_code": "en_us", "string": "Port used by AdGuard Home API. Default is normally 3000." } ] }, { "function": "PROTOCOL", "type": { "dataType": "string", "elements": [ { "elementType": "select", "elementOptions": [], "transformers": [] } ] }, "default_value": "http", "options": ["http", "https"], "localized": ["name", "description"], "name": [ { "language_code": "en_us", "string": "Protocol" } ], "description": [ { "language_code": "en_us", "string": "Choose whether to use HTTP or HTTPS to connect to the AdGuard Home API." } ] }, { "function": "USER", "type": { "dataType": "string", "elements": [ { "elementType": "input", "elementOptions": [], "transformers": [] } ] }, "maxLength": 200, "default_value": "", "localized": ["name", "description"], "name": [ { "language_code": "en_us", "string": "Username" } ], "description": [ { "language_code": "en_us", "string": "API username for AdGuard Home. Leave empty if your API does not require login." } ] }, { "function": "PASS", "type": { "dataType": "string", "elements": [ { "elementType": "input", "elementOptions": [{ "type": "password" }], "transformers": [] } ] }, "maxLength": 200, "default_value": "", "localized": ["name", "description"], "name": [ { "language_code": "en_us", "string": "Password" } ], "description": [ { "language_code": "en_us", "string": "API password for AdGuard Home. Leave empty if authentication is disabled." } ] }, { "function": "FAKE_MAC", "type": { "dataType": "boolean", "elements": [ { "elementType": "input", "elementOptions": [{ "type": "checkbox" }], "transformers": [] } ] }, "default_value": false, "localized": ["name", "description"], "name": [ { "language_code": "en_us", "string": "Generate Fake MACs" } ], "description": [ { "language_code": "en_us", "string": "Some devices don't have a MAC assigned. Enabling the FAKE_MAC setting generates a fake MAC address from the IP address to track devices, but it may cause inconsistencies if IPs change or devices are re-discovered with a different MAC. Static IPs are recommended. Device type and icon might not be detected correctly and some plugins might fail if they depend on a valid MAC address. When unchecked, devices with empty MAC addresses are skipped." } ] }, { "function": "SET_ALWAYS", "type": { "dataType": "array", "elements": [ { "elementType": "select", "elementOptions": [{ "multiple": "true", "ordeable": "true" }], "transformers": [] } ] }, "default_value": ["devMac", "devLastIP"], "options": [ "devMac", "devLastIP", "devType", "devName" ], "localized": ["name", "description"], "name": [ { "language_code": "en_us", "string": "Set always columns" } ], "description": [ { "language_code": "en_us", "string": "These columns are treated as authoritative and will overwrite existing values, including those set by other plugins, unless the current value was explicitly set by the user (Source = USER or Source = LOCKED)." } ] }, { "function": "SET_EMPTY", "type": { "dataType": "array", "elements": [ { "elementType": "select", "elementOptions": [{ "multiple": "true", "ordeable": "true" }], "transformers": [] } ] }, "default_value": [], "options": [ "devMac", "devLastIP", "devName", "devType", "devSourcePlugin" ], "localized": ["name", "description"], "name": [ { "language_code": "en_us", "string": "Set empty columns" } ], "description": [ { "language_code": "en_us", "string": "These columns are only overwritten if they are empty (NULL / empty string) or if their Source is set to NEWDEV" } ] } ], "database_column_definitions": [ { "column": "Index", "css_classes": "col-sm-2", "show": true, "type": "none", "default_value": "", "options": [], "localized": ["name"], "name": [ { "language_code": "en_us", "string": "Index" } ] }, { "column": "Object_PrimaryID", "mapped_to_column": "scanMac", "css_classes": "col-sm-3", "show": true, "type": "device_name_mac", "default_value": "", "options": [], "localized": ["name"], "name": [ { "language_code": "en_us", "string": "MAC (name)" } ] }, { "column": "Object_SecondaryID", "mapped_to_column": "scanLastIP", "css_classes": "col-sm-2", "show": true, "type": "device_ip", "default_value": "", "options": [], "localized": ["name"], "name": [ { "language_code": "en_us", "string": "IP" } ] }, { "column": "Watched_Value1", "mapped_to_column": "scanName", "css_classes": "col-sm-2", "show": true, "type": "label", "default_value": "", "options": [], "localized": ["name"], "name": [ { "language_code": "en_us", "string": "Name" } ] }, { "column": "Watched_Value2", "mapped_to_column": "scanType", "css_classes": "col-sm-2", "show": true, "type": "label", "default_value": "", "options": [], "localized": ["name"], "name": [ { "language_code": "en_us", "string": "Device Type" } ] }, { "column": "Watched_Value3", "css_classes": "col-sm-2", "show": false, "type": "label", "default_value": "", "options": [], "localized": ["name"], "name": [ { "language_code": "en_us", "string": "N/A" } ] }, { "column": "Watched_Value4", "css_classes": "col-sm-2", "show": false, "type": "label", "default_value": "", "options": [], "localized": ["name"], "name": [ { "language_code": "en_us", "string": "N/A" } ] }, { "column": "Dummy", "mapped_to_column": "scanSourcePlugin", "mapped_to_column_data": { "value": "Example Plugin" }, "css_classes": "col-sm-2", "show": false, "type": "label", "default_value": "", "options": [], "localized": ["name"], "name": [ { "language_code": "en_us", "string": "ADGUARDIMP" } ] }, { "column": "DateTimeCreated", "css_classes": "col-sm-2", "show": true, "type": "label", "default_value": "", "options": [], "localized": ["name"], "name": [ { "language_code": "en_us", "string": "Created" } ] }, { "column": "DateTimeChanged", "css_classes": "col-sm-2", "show": true, "type": "label", "default_value": "", "options": [], "localized": ["name"], "name": [ { "language_code": "en_us", "string": "Changed" } ] }, { "column": "Status", "css_classes": "col-sm-1", "show": true, "type": "replace", "default_value": "", "options": [ { "equals": "watched-not-changed", "replacement": "
" }, { "equals": "watched-changed", "replacement": "
" }, { "equals": "new", "replacement": "
" }, { "equals": "missing-in-last-scan", "replacement": "
" } ], "localized": ["name"], "name": [ { "language_code": "en_us", "string": "Status" } ] } ] }