Open zc-jone opened 3 months ago
一样的问题,
我也一样,大佬可以解决吗?
Unexpected exception
Traceback (most recent call last): File "/config/custom_components/china_southern_power_grid_stat/config_flow.py", line 116, in async_step_user session_data = await validate_input(self.hass, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/china_southern_power_grid_stat/config_flow.py", line 72, in validate_input client = await hass.async_add_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/china_southern_power_grid_stat/config_flow.py", line 58, in authenticate_csg client.authenticate(username, password) File "/config/custom_components/china_southern_power_grid_stat/csg_client/init.py", line 517, in authenticate auth_token = self.api_login_with_password(phone_no, password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/china_southern_power_grid_stat/csg_client/init.py", line 320, in api_login_with_password self._handle_unsuccessful_response(path, resp_data) File "/config/custom_components/china_southern_power_grid_stat/csg_client/init.py", line 262, in _handle_unsuccessful_response raise CSGAPIError( custom_components.china_southern_power_grid_stat.csg_client.CSGAPIError: CSGAPIError sta=02 message=无效的验证码!
一样的问题,求大佬解决一下。
日志如下:
日志记录器: custom_components.china_southern_power_grid_stat.config_flow
来源: custom_components/china_southern_power_grid_stat/config_flow.py:116
集成: China Southern Power Grid Statistics ([文档](https://github.com/CubicPill/china_southern_power_grid_stat/), [问题](https://github.com/CubicPill/china_southern_power_grid_stat/issues))
首次出现: 2024年8月25日 13:45:40 (8 次总计出现)
上次记录: 21:50:00
Unexpected exception
Traceback (most recent call last):
File "/config/custom_components/china_southern_power_grid_stat/config_flow.py", line 116, in async_step_user
session_data = await validate_input(self.hass, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/china_southern_power_grid_stat/config_flow.py", line 72, in validate_input
client = await hass.async_add_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/china_southern_power_grid_stat/config_flow.py", line 58, in authenticate_csg
client.authenticate(username, password)
File "/config/custom_components/china_southern_power_grid_stat/csg_client/__init__.py", line 517, in authenticate
auth_token = self.api_login_with_password(phone_no, password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/china_southern_power_grid_stat/csg_client/__init__.py", line 320, in api_login_with_password
self._handle_unsuccessful_response(path, resp_data)
File "/config/custom_components/china_southern_power_grid_stat/csg_client/__init__.py", line 262, in _handle_unsuccessful_response
raise CSGAPIError(
custom_components.china_southern_power_grid_stat.csg_client.CSGAPIError: <CSGAPIError sta=02 message=无效的验证码!>
可能要更新登录的接口了
Traceback (most recent call last):
File "/config/custom_components/china_southern_power_grid_stat/config_flow.py", line 116, in async_step_user
session_data = await validate_input(self.hass, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/china_southern_power_grid_stat/config_flow.py", line 72, in validate_input
client = await hass.async_add_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/china_southern_power_grid_stat/config_flow.py", line 58, in authenticate_csg
client.authenticate(username, password)
File "/config/custom_components/china_southern_power_grid_stat/csg_client/__init__.py", line 517, in authenticate
auth_token = self.api_login_with_password(phone_no, password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/china_southern_power_grid_stat/csg_client/__init__.py", line 320, in api_login_with_password
self._handle_unsuccessful_response(path, resp_data)
File "/config/custom_components/china_southern_power_grid_stat/csg_client/__init__.py", line 262, in _handle_unsuccessful_response
raise CSGAPIError(
custom_components.china_southern_power_grid_stat.csg_client.CSGAPIError: <CSGAPIError sta=40318 message=密码登录功能进行了安全升级,请升级为最新的版本>
这个好像没有密码登录了吧,密码登录都要短信验证码了。
这个好像没有密码登录了吧,密码登录都要短信验证码了。
今天你说完我登录上去看一下,确实刚刚修改了接口,似乎都需要短信验证码了。(上次尝试的时候还是图形验证码)
这个好像每次都要otp登录,看着像有token,1个月有效期。
Account customer number: , unsuccessful response while calling center/login: {'sta': '40318', 'message': '密码登录功能进行了安全升级,请升级为最新的版本', 'data': None}
所以现在是没办法使用了吗?有大佬可以更新一下吗?
在修了😂
在修了😂
大神,慢慢来,明天能修好不
最新release已经增加了短信验证码和扫码登录,图形验证码目前没有看到,如果出现的话后续会更新
最新release已经增加了短信验证码和扫码登录,图形验证码目前没有看到,如果出现的话后续会更新
非常感谢大佬修复,一直忙着今天才实测,使用短信验证码登录成功并已获取实体数据,非常感谢!此单可以close了。 @CubicPill
日志记录器: custom_components.china_southern_power_grid_stat.config_flow 来源: custom_components/china_southern_power_grid_stat/config_flow.py:116 集成: china_southern_power_grid_stat (文档, 问题) 首次出现: 21:15:30 (9 次总计出现) 上次记录: 21:22:53
Unexpected exception Traceback (most recent call last): File "/config/custom_components/china_southern_power_grid_stat/config_flow.py", line 116, in async_step_user session_data = await validate_input(self.hass, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/china_southern_power_grid_stat/config_flow.py", line 72, in validate_input client = await hass.async_add_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/china_southern_power_grid_stat/config_flow.py", line 58, in authenticate_csg client.authenticate(username, password) File "/config/custom_components/china_southern_power_grid_stat/csg_client/init.py", line 517, in authenticate auth_token = self.api_login_with_password(phone_no, password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/china_southern_power_grid_stat/csg_client/init.py", line 320, in api_login_with_password self._handle_unsuccessful_response(path, resp_data) File "/config/custom_components/china_southern_power_grid_stat/csg_client/init.py", line 262, in _handle_unsuccessful_response raise CSGAPIError( custom_components.china_southern_power_grid_stat.csg_client.CSGAPIError: