Skip to content

增加开关在其他客户端的同步问题 #19

@yuling0320

Description

@yuling0320

由于ls增加了服务器,对wss的地址进行了分流,所以需要增加一个rgn参数,开发者默认是cn,我这里是cn2,故加变量进行自动同步。

编辑 init.py

第253行,def lifesmart_doAuth(userid,token,appkey): 改为 def lifesmart_doAuth(userid,token,appkey,rgn):
第259行,"rgn": "cn" 改为 "rgn": rgn
第279行下方增加一行,param['rgn'] = res_login['rgn']
第510行,ws = websocket.WebSocketApp("wss://api.ilifesmart.com:8443/wsapp/", 改为 ws = websocket.WebSocketApp(f"wss://api.{param['rgn']}.ilifesmart.com:8443/wsapp/",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions