Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yuling0320 opened this issue Oct 30, 2023 · 1 comment
Open

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

yuling0320 opened this issue Oct 30, 2023 · 1 comment

Comments

@yuling0320
Copy link

由于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/",

@hellojazy
Copy link

感谢,试试看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants