dump_devinfo improvements (#657)

* dump_devinfo improvements

* Scrub only the last three bytes for mac addresses
* Add --target to allow creating fixtures based on discovery
* Save fixtures directly to correct location, add --basedir to allow defining the location of repository root
* Add --autosave to disable prompting for saving

* Update fixtures for devices I have

* Add fixture for HS110 hw 4.0 fw 1.0.4

* Improve help strings

* Fix tests

* Update devtools README

* Default to discovery if no host/target given
This commit is contained in:
Teemu R
2024-01-20 14:20:08 +01:00
committed by GitHub
parent 49cfef087c
commit f77e87dc5d
11 changed files with 307 additions and 165 deletions

View File

@@ -86,7 +86,7 @@
"factory_default": false,
"ip": "127.0.0.123",
"is_support_iot_cloud": true,
"mac": "00-00-00-00-00-00",
"mac": "48-22-54-00-00-00",
"mgt_encrypt_schm": {
"encrypt_type": "AES",
"http_port": 80,
@@ -140,7 +140,7 @@
"lang": "en_US",
"latitude": 0,
"longitude": 0,
"mac": "00-00-00-00-00-00",
"mac": "48-22-54-00-00-00",
"model": "P110",
"nickname": "I01BU0tFRF9OQU1FIw==",
"oem_id": "00000000000000000000000000000000",
@@ -158,23 +158,23 @@
"get_device_time": {
"region": "Europe/Berlin",
"time_diff": 60,
"timestamp": 1704212614
"timestamp": 1705699998
},
"get_device_usage": {
"power_usage": {
"past30": 896,
"past7": 259,
"today": 0
"past30": 1010,
"past7": 368,
"today": 46
},
"saved_power": {
"past30": 23138,
"past7": 6684,
"today": 0
"past30": 26144,
"past7": 9536,
"today": 1218
},
"time_usage": {
"past30": 24034,
"past7": 6943,
"today": 0
"past30": 27154,
"past7": 9904,
"today": 1264
}
},
"get_electricity_price_config": {
@@ -316,11 +316,11 @@
0,
0
],
"local_time": "2024-01-02 17:23:34",
"month_energy": 0,
"month_runtime": 0,
"today_energy": 0,
"today_runtime": 0
"local_time": "2024-01-19 22:33:18",
"month_energy": 430,
"month_runtime": 11571,
"today_energy": 46,
"today_runtime": 1264
},
"get_fw_download_state": {
"auto_upgrade": false,
@@ -341,7 +341,7 @@
}
},
"get_max_power": {
"max_power": 3847
"max_power": 3904
},
"get_next_event": {},
"get_protection_power": {
@@ -356,7 +356,16 @@
"sum": 0
},
"get_wireless_scan_info": {
"ap_list": [],
"ap_list": [
{
"bssid": "000000000000",
"channel": 0,
"cipher_type": 2,
"key_type": "wpa_psk",
"signal_level": 3,
"ssid": "I01BU0tFRF9TU0lEIw=="
}
],
"wep_supported": false
},
"qs_component_nego": {