-
Notifications
You must be signed in to change notification settings - Fork 4
No longer working #7
Copy link
Copy link
Open
Description
The script seems no longer to work since I updated to the latest SW for the WiNet-S module on my SH10RT. Anyone else having problems? @damolp ?
async with websockets.client.connect(
f"ws://{self.host}:{self.port}/ws/home/overview"
) as websocket:
await websocket.send(
json.dumps(
{"lang": self.locale, "token": "", "service": "connect"}
)
)
d: Result = json.loads(await websocket.recv())
if d["result_code"] != 1 or d["result_msg"] != "success":
return data
token: str = d["result_data"]["token"]
print(d)
await websocket.send(
json.dumps(
{
"lang": self.locale,
"token": token,
"service": "devicelist",
"type": "0",
"is_check_token": "0",
}
)
)
d = json.loads(await websocket.recv())
print(d)
returns
{'result_code': 1, 'result_msg': 'success', 'result_data': {'service': 'connect', 'token': '****redacted****', 'uid': 1, 'tips_disable': 0, 'virgin_flag': 0, 'isFirstLogin': 0, 'forceModifyPasswd': 0}}
{'result_code': 401, 'result_msg': 'I18N_COMMON_INTER_ABNORMAL', 'result_data': {'service': 'devicelist'}}
{"Body": {}}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels