mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Update dump_devinfo for raw discovery json and common redactors (#1358)
Some checks failed
CI / Perform linting checks (3.13) (push) Waiting to run
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.13) (push) Blocked by required conditions
CodeQL checks / Analyze (python) (push) Has been cancelled
Some checks failed
CI / Perform linting checks (3.13) (push) Waiting to run
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.13) (push) Blocked by required conditions
CodeQL checks / Analyze (python) (push) Has been cancelled
This PR does a few related things to dump_devinfo: - Store the raw discovery result in the fixture. - Consolidate redaction logic so it's not duplicated in dump_devinfo. - Update existing fixtures to: - Store raw discovery result under `result` - Use `SCRUBBED_CHILD_DEVICE_ID` everywhere - Have correct values as per the consolidated redactors.
This commit is contained in:
63
tests/fixtures/smartcam/C210(EU)_2.0_1.4.2.json
vendored
63
tests/fixtures/smartcam/C210(EU)_2.0_1.4.2.json
vendored
@@ -1,35 +1,38 @@
|
||||
{
|
||||
"discovery_result": {
|
||||
"decrypted_data": {
|
||||
"connect_ssid": "0000000000",
|
||||
"connect_type": "wireless",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"http_port": 443,
|
||||
"last_alarm_time": "1729264456",
|
||||
"last_alarm_type": "motion",
|
||||
"owner": "00000000000000000000000000000000",
|
||||
"sd_status": "offline"
|
||||
},
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "C210",
|
||||
"device_name": "#MASKED_NAME#",
|
||||
"device_type": "SMART.IPCAMERA",
|
||||
"encrypt_info": {
|
||||
"data": "",
|
||||
"key": "",
|
||||
"sym_schm": "AES"
|
||||
},
|
||||
"encrypt_type": [
|
||||
"3"
|
||||
],
|
||||
"factory_default": false,
|
||||
"firmware_version": "1.4.2 Build 240829 Rel.54953n",
|
||||
"hardware_version": "2.0",
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "40-AE-30-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"is_support_https": true
|
||||
"error_code": 0,
|
||||
"result": {
|
||||
"decrypted_data": {
|
||||
"connect_ssid": "#MASKED_SSID#",
|
||||
"connect_type": "wireless",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"http_port": 443,
|
||||
"last_alarm_time": "1729264456",
|
||||
"last_alarm_type": "motion",
|
||||
"owner": "00000000000000000000000000000000",
|
||||
"sd_status": "offline"
|
||||
},
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "C210",
|
||||
"device_name": "#MASKED_NAME#",
|
||||
"device_type": "SMART.IPCAMERA",
|
||||
"encrypt_info": {
|
||||
"data": "",
|
||||
"key": "",
|
||||
"sym_schm": "AES"
|
||||
},
|
||||
"encrypt_type": [
|
||||
"3"
|
||||
],
|
||||
"factory_default": false,
|
||||
"firmware_version": "1.4.2 Build 240829 Rel.54953n",
|
||||
"hardware_version": "2.0",
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "40-AE-30-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"is_support_https": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"getAlertConfig": {
|
||||
|
63
tests/fixtures/smartcam/C210(EU)_2.0_1.4.3.json
vendored
63
tests/fixtures/smartcam/C210(EU)_2.0_1.4.3.json
vendored
@@ -1,35 +1,38 @@
|
||||
{
|
||||
"discovery_result": {
|
||||
"decrypted_data": {
|
||||
"connect_ssid": "0000000000",
|
||||
"connect_type": "wireless",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"http_port": 443,
|
||||
"last_alarm_time": "0",
|
||||
"last_alarm_type": "",
|
||||
"owner": "00000000000000000000000000000000",
|
||||
"sd_status": "offline"
|
||||
},
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "C210",
|
||||
"device_name": "#MASKED_NAME#",
|
||||
"device_type": "SMART.IPCAMERA",
|
||||
"encrypt_info": {
|
||||
"data": "",
|
||||
"key": "",
|
||||
"sym_schm": "AES"
|
||||
},
|
||||
"encrypt_type": [
|
||||
"3"
|
||||
],
|
||||
"factory_default": false,
|
||||
"firmware_version": "1.4.3 Build 241010 Rel.33858n",
|
||||
"hardware_version": "2.0",
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "40-AE-30-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"is_support_https": true
|
||||
"error_code": 0,
|
||||
"result": {
|
||||
"decrypted_data": {
|
||||
"connect_ssid": "#MASKED_SSID#",
|
||||
"connect_type": "wireless",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"http_port": 443,
|
||||
"last_alarm_time": "0",
|
||||
"last_alarm_type": "",
|
||||
"owner": "00000000000000000000000000000000",
|
||||
"sd_status": "offline"
|
||||
},
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "C210",
|
||||
"device_name": "#MASKED_NAME#",
|
||||
"device_type": "SMART.IPCAMERA",
|
||||
"encrypt_info": {
|
||||
"data": "",
|
||||
"key": "",
|
||||
"sym_schm": "AES"
|
||||
},
|
||||
"encrypt_type": [
|
||||
"3"
|
||||
],
|
||||
"factory_default": false,
|
||||
"firmware_version": "1.4.3 Build 241010 Rel.33858n",
|
||||
"hardware_version": "2.0",
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "40-AE-30-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"is_support_https": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"getAlertConfig": {
|
||||
|
@@ -1,36 +1,39 @@
|
||||
{
|
||||
"discovery_result": {
|
||||
"decrypted_data": {
|
||||
"connect_ssid": "000 000000 0000000000",
|
||||
"connect_type": "wireless",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"http_port": 443,
|
||||
"last_alarm_time": "0",
|
||||
"last_alarm_type": "",
|
||||
"owner": "00000000000000000000000000000000",
|
||||
"sd_status": "offline"
|
||||
},
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "C520WS",
|
||||
"device_name": "#MASKED_NAME#",
|
||||
"device_type": "SMART.IPCAMERA",
|
||||
"encrypt_info": {
|
||||
"data": "",
|
||||
"key": "",
|
||||
"sym_schm": "AES"
|
||||
},
|
||||
"encrypt_type": [
|
||||
"3"
|
||||
],
|
||||
"factory_default": false,
|
||||
"firmware_version": "1.2.8 Build 240606 Rel.39146n",
|
||||
"hardware_version": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"isResetWiFi": false,
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "F0-A7-31-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"is_support_https": true
|
||||
"error_code": 0,
|
||||
"result": {
|
||||
"decrypted_data": {
|
||||
"connect_ssid": "#MASKED_SSID#",
|
||||
"connect_type": "wireless",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"http_port": 443,
|
||||
"last_alarm_time": "0",
|
||||
"last_alarm_type": "",
|
||||
"owner": "00000000000000000000000000000000",
|
||||
"sd_status": "offline"
|
||||
},
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "C520WS",
|
||||
"device_name": "#MASKED_NAME#",
|
||||
"device_type": "SMART.IPCAMERA",
|
||||
"encrypt_info": {
|
||||
"data": "",
|
||||
"key": "",
|
||||
"sym_schm": "AES"
|
||||
},
|
||||
"encrypt_type": [
|
||||
"3"
|
||||
],
|
||||
"factory_default": false,
|
||||
"firmware_version": "1.2.8 Build 240606 Rel.39146n",
|
||||
"hardware_version": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"isResetWiFi": false,
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "F0-A7-31-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"is_support_https": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"getAlertConfig": {
|
||||
|
59
tests/fixtures/smartcam/H200(EU)_1.0_1.3.2.json
vendored
59
tests/fixtures/smartcam/H200(EU)_1.0_1.3.2.json
vendored
@@ -1,33 +1,36 @@
|
||||
{
|
||||
"discovery_result": {
|
||||
"decrypted_data": {
|
||||
"connect_ssid": "",
|
||||
"connect_type": "wired",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"http_port": 443,
|
||||
"owner": "00000000000000000000000000000000",
|
||||
"sd_status": "offline"
|
||||
},
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "H200",
|
||||
"device_name": "#MASKED_NAME#",
|
||||
"device_type": "SMART.TAPOHUB",
|
||||
"encrypt_info": {
|
||||
"data": "",
|
||||
"key": "",
|
||||
"sym_schm": "AES"
|
||||
},
|
||||
"encrypt_type": [
|
||||
"3"
|
||||
],
|
||||
"factory_default": false,
|
||||
"firmware_version": "1.3.2 Build 20240424 rel.75425",
|
||||
"hardware_version": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "A8-6E-84-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"is_support_https": true
|
||||
"error_code": 0,
|
||||
"result": {
|
||||
"decrypted_data": {
|
||||
"connect_ssid": "",
|
||||
"connect_type": "wired",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"http_port": 443,
|
||||
"owner": "00000000000000000000000000000000",
|
||||
"sd_status": "offline"
|
||||
},
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "H200",
|
||||
"device_name": "#MASKED_NAME#",
|
||||
"device_type": "SMART.TAPOHUB",
|
||||
"encrypt_info": {
|
||||
"data": "",
|
||||
"key": "",
|
||||
"sym_schm": "AES"
|
||||
},
|
||||
"encrypt_type": [
|
||||
"3"
|
||||
],
|
||||
"factory_default": false,
|
||||
"firmware_version": "1.3.2 Build 20240424 rel.75425",
|
||||
"hardware_version": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "A8-6E-84-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"is_support_https": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"getAlertConfig": {},
|
||||
|
61
tests/fixtures/smartcam/H200(US)_1.0_1.3.6.json
vendored
61
tests/fixtures/smartcam/H200(US)_1.0_1.3.6.json
vendored
@@ -1,34 +1,37 @@
|
||||
{
|
||||
"discovery_result": {
|
||||
"decrypted_data": {
|
||||
"connect_ssid": "",
|
||||
"connect_type": "wired",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"http_port": 443,
|
||||
"owner": "00000000000000000000000000000000",
|
||||
"sd_status": "offline"
|
||||
},
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "H200",
|
||||
"device_name": "#MASKED_NAME#",
|
||||
"device_type": "SMART.TAPOHUB",
|
||||
"encrypt_info": {
|
||||
"data": "",
|
||||
"key": "",
|
||||
"sym_schm": "AES"
|
||||
},
|
||||
"encrypt_type": [
|
||||
"3"
|
||||
],
|
||||
"factory_default": false,
|
||||
"firmware_version": "1.3.6 Build 20240829 rel.71119",
|
||||
"hardware_version": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"isResetWiFi": false,
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "24-2F-D0-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"is_support_https": true
|
||||
"error_code": 0,
|
||||
"result": {
|
||||
"decrypted_data": {
|
||||
"connect_ssid": "",
|
||||
"connect_type": "wired",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"http_port": 443,
|
||||
"owner": "00000000000000000000000000000000",
|
||||
"sd_status": "offline"
|
||||
},
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "H200",
|
||||
"device_name": "#MASKED_NAME#",
|
||||
"device_type": "SMART.TAPOHUB",
|
||||
"encrypt_info": {
|
||||
"data": "",
|
||||
"key": "",
|
||||
"sym_schm": "AES"
|
||||
},
|
||||
"encrypt_type": [
|
||||
"3"
|
||||
],
|
||||
"factory_default": false,
|
||||
"firmware_version": "1.3.6 Build 20240829 rel.71119",
|
||||
"hardware_version": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"isResetWiFi": false,
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "24-2F-D0-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"is_support_https": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"getAlertConfig": {},
|
||||
|
63
tests/fixtures/smartcam/TC65_1.0_1.3.9.json
vendored
63
tests/fixtures/smartcam/TC65_1.0_1.3.9.json
vendored
@@ -1,35 +1,38 @@
|
||||
{
|
||||
"discovery_result": {
|
||||
"decrypted_data": {
|
||||
"connect_ssid": "0000000",
|
||||
"connect_type": "wireless",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"http_port": 443,
|
||||
"last_alarm_time": "1698149810",
|
||||
"last_alarm_type": "motion",
|
||||
"owner": "00000000000000000000000000000000",
|
||||
"sd_status": "offline"
|
||||
},
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "TC65",
|
||||
"device_name": "#MASKED_NAME#",
|
||||
"device_type": "SMART.IPCAMERA",
|
||||
"encrypt_info": {
|
||||
"data": "",
|
||||
"key": "",
|
||||
"sym_schm": "AES"
|
||||
},
|
||||
"encrypt_type": [
|
||||
"3"
|
||||
],
|
||||
"factory_default": false,
|
||||
"firmware_version": "1.3.9 Build 231024 Rel.72919n(4555)",
|
||||
"hardware_version": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "A8-6E-84-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"is_support_https": true
|
||||
"error_code": 0,
|
||||
"result": {
|
||||
"decrypted_data": {
|
||||
"connect_ssid": "#MASKED_SSID#",
|
||||
"connect_type": "wireless",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"http_port": 443,
|
||||
"last_alarm_time": "1698149810",
|
||||
"last_alarm_type": "motion",
|
||||
"owner": "00000000000000000000000000000000",
|
||||
"sd_status": "offline"
|
||||
},
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "TC65",
|
||||
"device_name": "#MASKED_NAME#",
|
||||
"device_type": "SMART.IPCAMERA",
|
||||
"encrypt_info": {
|
||||
"data": "",
|
||||
"key": "",
|
||||
"sym_schm": "AES"
|
||||
},
|
||||
"encrypt_type": [
|
||||
"3"
|
||||
],
|
||||
"factory_default": false,
|
||||
"firmware_version": "1.3.9 Build 231024 Rel.72919n(4555)",
|
||||
"hardware_version": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "A8-6E-84-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"is_support_https": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"getAlertPlan": {
|
||||
|
Reference in New Issue
Block a user