Skip to content

Commit

Permalink
Cleanup device dumps (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindwe authored Jul 13, 2024
1 parent c9f513b commit bb1178c
Show file tree
Hide file tree
Showing 34 changed files with 1,763 additions and 1,773 deletions.
15 changes: 13 additions & 2 deletions connectlife/dump.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import argparse

import asyncio
import logging
import json
import sys

from .api import ConnectLifeApi

Expand All @@ -26,7 +27,17 @@ async def main():
appliance["deviceId"] = "<redacted>"
appliance["puid"] = "<redacted>"
appliance["wifiId"] = "<redacted>"
print(json.dumps([order_dict(a) for a in appliances], indent=2))
for a in appliances:
with open(f'{a["deviceTypeCode"]}-{a["deviceFeatureCode"]}.json', 'w') as f:
json.dump(a, f, indent=2)

if __name__ == "__main__":
logger = logging.getLogger("connectlife")
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler(sys.stderr)
handler.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
logger.addHandler(handler)

asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"wifiId": "<redacted>",
"deviceId": "<redacted>",
"puid": "<redacted>",
"deviceNickName": "wm Andrej",
"deviceNickName": "ASKO professional washing machine",
"deviceFeatureCode": "000",
"deviceFeatureName": "ASKO Pro Washing Machine",
"deviceTypeCode": "003",
Expand Down
422 changes: 211 additions & 211 deletions dumps/003.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"deviceFeatureCode": "000",
"deviceFeatureName": "ASKO Pro Dryer",
"deviceId": "<redacted>",
"deviceNickName": "TD Aandrej",
"deviceNickName": "ASKO professional tumble dryer",
"deviceTypeCode": "004",
"deviceTypeName": "ASKO Pro Dryer",
"puid": "<redacted>",
Expand Down
306 changes: 153 additions & 153 deletions dumps/004.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dumps/airCondDumpHisense.json → dumps/009-104.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"deviceFeatureCode": "104",
"deviceFeatureName": "104\u51b7\u6696\u8282\u80fd\u65e0\u529f\u7387",
"deviceId": "<redacted>",
"deviceNickName": "Klimatyzator",
"deviceNickName": "Hisense Aircondition",
"deviceTypeCode": "009",
"deviceTypeName": "",
"offlineState": 1,
Expand Down
68 changes: 68 additions & 0 deletions dumps/009-106.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"wifiId": "<redacted>",
"deviceId": "<redacted>",
"puid": "<redacted>",
"deviceNickName": "Aircondition",
"deviceFeatureCode": "106",
"deviceFeatureName": "106\u51b7\u6696\u65e0\u8282\u80fd\u65e0\u529f\u7387",
"deviceTypeCode": "009",
"deviceTypeName": "",
"bindTime": 1718777576682,
"role": 2,
"roomId": 1044364,
"roomName": "default_room",
"statusList": {
"t_sleep": "0",
"t_power": "1",
"t_work_mode": "3",
"t_fan_speed": "0",
"t_fan_speed_s": "0",
"t_fan_mute": "0",
"t_super": "0",
"t_eco": "0",
"t_temp": "20",
"t_temp_type": "0",
"t_up_down": "0",
"t_swing_follow": "0",
"t_swing_direction": "0",
"t_swing_angle": "1",
"t_fanspeedcv": "0",
"t_tms": "0",
"t_temp_compensate": "0",
"f_humidity": "128",
"f_temp_in": "24",
"f_electricity": "0",
"f_votage": "220",
"f_e_intemp": "0",
"f_e_incoiltemp": "0",
"f_e_inhumidity": "0",
"f_e_infanmotor": "0",
"f_e_arkgrille": "0",
"f_e_invzero": "0",
"f_e_incom": "0",
"f_e_indisplay": "0",
"f_e_inkeys": "0",
"f_e_inwifi": "0",
"f_e_inele": "0",
"f_e_ineeprom": "0",
"f_e_outeeprom": "0",
"f_e_outcoiltemp": "0",
"f_e_outgastemp": "0",
"f_e_outtemp": "0",
"f_e_waterfull": "0",
"f_e_upmachine": "0",
"f_e_dwmachine": "0",
"f_e_over_cold": "0",
"f_e_over_hot": "0",
"f_e_push": "0",
"t_demand_response": "0",
"t_dal": "0",
"t_talr": "0",
"f-filter": "0",
"daily_energy_kwh": 0
},
"useTime": 1718777576660,
"offlineState": 1,
"seq": 0,
"createTime": 0
}
68 changes: 68 additions & 0 deletions dumps/009-109.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"wifiId": "<redacted>",
"deviceId": "<redacted>",
"puid": "<redacted>",
"deviceNickName": "Aircondition",
"deviceFeatureCode": "109",
"deviceFeatureName": "109AI\u666e\u901a\u98ce\u65e0\u98ce\u5411\u8ddf\u968f\u65e0\u516b\u5b57\u9001\u98ce\u51b7\u6696\u8282\u80fd\u65e0\u7535\u529f\u7387",
"deviceTypeCode": "009",
"deviceTypeName": "",
"bindTime": 1716981074782,
"role": 2,
"roomId": 1044364,
"roomName": "default_room",
"statusList": {
"t_sleep": "0",
"t_power": "0",
"t_work_mode": "2",
"t_fan_speed": "0",
"t_fan_speed_s": "0",
"t_fan_mute": "0",
"t_super": "0",
"t_eco": "1",
"t_temp": "23",
"t_temp_type": "0",
"t_up_down": "0",
"t_swing_follow": "0",
"t_swing_direction": "2",
"t_swing_angle": "3",
"t_fanspeedcv": "0",
"t_tms": "0",
"t_temp_compensate": "0",
"f_humidity": "128",
"f_temp_in": "26",
"f_electricity": "0",
"f_votage": "230",
"f_e_intemp": "0",
"f_e_incoiltemp": "0",
"f_e_inhumidity": "0",
"f_e_infanmotor": "0",
"f_e_arkgrille": "0",
"f_e_invzero": "0",
"f_e_incom": "0",
"f_e_indisplay": "0",
"f_e_inkeys": "0",
"f_e_inwifi": "0",
"f_e_inele": "0",
"f_e_ineeprom": "0",
"f_e_outeeprom": "0",
"f_e_outcoiltemp": "0",
"f_e_outgastemp": "0",
"f_e_outtemp": "0",
"f_e_waterfull": "0",
"f_e_upmachine": "0",
"f_e_dwmachine": "0",
"f_e_over_cold": "0",
"f_e_over_hot": "0",
"f_e_push": "0",
"t_demand_response": "0",
"t_dal": "0",
"t_talr": "0",
"f-filter": "0",
"daily_energy_kwh": 0
},
"useTime": 1716981074759,
"offlineState": 1,
"seq": 0,
"createTime": 0
}
136 changes: 69 additions & 67 deletions dumps/009.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,74 @@
# 009

| | airCondDumpHisense |
|:-----------------------------|:---------------------|
| bindTime | 1715959596828 |
| createTime | 0 |
| deviceFeatureCode | 104 |
| deviceFeatureName | 104冷暖节能无功率 |
| deviceId | <redacted> |
| deviceNickName | Klimatyzator |
| deviceTypeCode | 009 |
| deviceTypeName | |
| offlineState | 1 |
| puid | <redacted> |
| role | 1 |
| roomId | 4349167 |
| roomName | Living Room |
| seq | 0 |
| statusList.daily_energy_kwh | 0 |
| statusList.f-filter | 0 |
| statusList.f_e_arkgrille | 0 |
| statusList.f_e_dwmachine | 0 |
| statusList.f_e_incoiltemp | 0 |
| statusList.f_e_incom | 0 |
| statusList.f_e_indisplay | 0 |
| statusList.f_e_ineeprom | 0 |
| statusList.f_e_inele | 0 |
| statusList.f_e_infanmotor | 0 |
| statusList.f_e_inhumidity | 0 |
| statusList.f_e_inkeys | 0 |
| statusList.f_e_intemp | 0 |
| statusList.f_e_invzero | 0 |
| statusList.f_e_inwifi | 0 |
| statusList.f_e_outcoiltemp | 0 |
| statusList.f_e_outeeprom | 0 |
| statusList.f_e_outgastemp | 0 |
| statusList.f_e_outtemp | 0 |
| statusList.f_e_over_cold | 0 |
| statusList.f_e_over_hot | 0 |
| statusList.f_e_push | 0 |
| statusList.f_e_upmachine | 0 |
| statusList.f_e_waterfull | 0 |
| statusList.f_electricity | 0 |
| statusList.f_humidity | 128 |
| statusList.f_temp_in | 26 |
| statusList.f_votage | 228 |
| statusList.t_dal | 1 |
| statusList.t_demand_response | 0 |
| statusList.t_eco | 0 |
| statusList.t_fan_mute | 0 |
| statusList.t_fan_speed | 0 |
| statusList.t_fan_speed_s | 0 |
| statusList.t_fanspeedcv | 0 |
| statusList.t_power | 1 |
| statusList.t_sleep | 0 |
| statusList.t_super | 0 |
| statusList.t_swing_angle | 0 |
| statusList.t_swing_direction | 5 |
| statusList.t_swing_follow | 3 |
| statusList.t_talr | 1 |
| statusList.t_temp | 23 |
| statusList.t_temp_compensate | 7 |
| statusList.t_temp_type | 0 |
| statusList.t_tms | 1 |
| statusList.t_up_down | 0 |
| statusList.t_work_mode | 2 |
| useTime | 1715959596807 |
| wifiId | <redacted> |
| | 009-106 | 009-109 | 009-104 |
|:-----------------------------|:--------------|:---------------------------|:---------------------|
| bindTime | 1718777576682 | 1716981074782 | 1715959596828 |
| createTime | 0 | 0 | 0 |
| deviceFeatureCode | 106 | 109 | 104 |
| deviceFeatureName | 106冷暖无节能无功率 | 109AI普通风无风向跟随无八字送风冷暖节能无电功率 | 104冷暖节能无功率 |
| deviceId | <redacted> | <redacted> | <redacted> |
| deviceNickName | Aircondition | Aircondition | Hisense Aircondition |
| deviceTypeCode | 009 | 009 | 009 |
| deviceTypeName | | | |
| offlineState | 1 | 1 | 1 |
| puid | <redacted> | <redacted> | <redacted> |
| role | 2 | 2 | 1 |
| roomId | 1044364 | 1044364 | 4349167 |
| roomName | default_room | default_room | Living Room |
| seq | 0 | 0 | 0 |
| statusList.daily_energy_kwh | 0 | 0 | 0 |
| statusList.f-filter | 0 | 0 | 0 |
| statusList.f_e_arkgrille | 0 | 0 | 0 |
| statusList.f_e_dwmachine | 0 | 0 | 0 |
| statusList.f_e_incoiltemp | 0 | 0 | 0 |
| statusList.f_e_incom | 0 | 0 | 0 |
| statusList.f_e_indisplay | 0 | 0 | 0 |
| statusList.f_e_ineeprom | 0 | 0 | 0 |
| statusList.f_e_inele | 0 | 0 | 0 |
| statusList.f_e_infanmotor | 0 | 0 | 0 |
| statusList.f_e_inhumidity | 0 | 0 | 0 |
| statusList.f_e_inkeys | 0 | 0 | 0 |
| statusList.f_e_intemp | 0 | 0 | 0 |
| statusList.f_e_invzero | 0 | 0 | 0 |
| statusList.f_e_inwifi | 0 | 0 | 0 |
| statusList.f_e_outcoiltemp | 0 | 0 | 0 |
| statusList.f_e_outeeprom | 0 | 0 | 0 |
| statusList.f_e_outgastemp | 0 | 0 | 0 |
| statusList.f_e_outtemp | 0 | 0 | 0 |
| statusList.f_e_over_cold | 0 | 0 | 0 |
| statusList.f_e_over_hot | 0 | 0 | 0 |
| statusList.f_e_push | 0 | 0 | 0 |
| statusList.f_e_upmachine | 0 | 0 | 0 |
| statusList.f_e_waterfull | 0 | 0 | 0 |
| statusList.f_electricity | 0 | 0 | 0 |
| statusList.f_humidity | 128 | 128 | 128 |
| statusList.f_temp_in | 24 | 26 | 26 |
| statusList.f_votage | 220 | 230 | 228 |
| statusList.t_dal | 0 | 0 | 1 |
| statusList.t_demand_response | 0 | 0 | 0 |
| statusList.t_eco | 0 | 1 | 0 |
| statusList.t_fan_mute | 0 | 0 | 0 |
| statusList.t_fan_speed | 0 | 0 | 0 |
| statusList.t_fan_speed_s | 0 | 0 | 0 |
| statusList.t_fanspeedcv | 0 | 0 | 0 |
| statusList.t_power | 1 | 0 | 1 |
| statusList.t_sleep | 0 | 0 | 0 |
| statusList.t_super | 0 | 0 | 0 |
| statusList.t_swing_angle | 1 | 3 | 0 |
| statusList.t_swing_direction | 0 | 2 | 5 |
| statusList.t_swing_follow | 0 | 0 | 3 |
| statusList.t_talr | 0 | 0 | 1 |
| statusList.t_temp | 20 | 23 | 23 |
| statusList.t_temp_compensate | 0 | 0 | 7 |
| statusList.t_temp_type | 0 | 0 | 0 |
| statusList.t_tms | 0 | 0 | 1 |
| statusList.t_up_down | 0 | 0 | 0 |
| statusList.t_work_mode | 3 | 2 | 2 |
| useTime | 1718777576660 | 1716981074759 | 1715959596807 |
| wifiId | <redacted> | <redacted> | <redacted> |

## Generated from

- [`airCondDumpHisense.json`](airCondDumpHisense.json)
- [`009`](009-106.json)
- [`009`](009-109.json)
- [`009`](009-104.json)
2 changes: 1 addition & 1 deletion dumps/Asko_induction_hob_1.json → dumps/010-000.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"wifiId": "<redacted>",
"deviceId": "<redacted>",
"puid": "<redacted>",
"deviceNickName": "pind",
"deviceNickName": "ASKO induction hob",
"deviceFeatureCode": "000",
"deviceFeatureName": "H-PIND-18",
"deviceTypeCode": "010",
Expand Down
Loading

0 comments on commit bb1178c

Please sign in to comment.