qqaatw / LibJciHitachi

A library for controlling Jci-Hitachi devices 台灣日立雲端模組 裝置控制
Apache License 2.0
43 stars 10 forks source link

Failed to login API #14

Closed seanyan1994 closed 10 months ago

seanyan1994 commented 10 months ago

My integration suddenly failed to start up. I attempted to reinstall the integration, but upon logging in, I received the following error. "Failed to login API: An error occurred when connecting to MQTT endpoint." "MQTT connection failed with exception AWS_ERROR_MQTT_UNEXPECTED_HANGUP: The connection was closed unexpectedly."

WaynezProg commented 10 months ago

I also encountered this error. It started appearing around the same time.

2023-12-27 00:16:16.178 ERROR (SyncWorker_4) [JciHitachi.aws_connection] MQTT connection failed with exception AWS_ERROR_MQTT_UNEXPECTED_HANGUP: The connection was closed unexpectedly.

2023-12-27 00:16:16.620 ERROR (MainThread) [custom_components.jcihitachi_tw] Failed to login API: An error occurred when connecting to MQTT endpoint.

2023-12-27 00:16:16.701 INFO (MainThread) [homeassistant.setup] Setup of domain jcihitachi_tw took 3.9 seconds

2023-12-27 00:16:16.701 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration jcihitachi_tw: Integration failed to #initialize.

stu85010 commented 10 months ago

I got this issue also, I'm on the tag 1.0.0:

Exception ignored in: <function JciHitachiAWSAPI.login.<locals>.get_credential_callable at 0x7f17311b7010>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/awscrt/auth.py", line 722, in aws_sign_request
    _awscrt.sign_request_aws(http_request, signing_config, _on_complete)
TypeError: Expected 'AwsCredentials', received 'NoneType'

When I attached to the console of the Home Assistant core, the log is keep printing very fast. The iss gone after restart the Home Assistant instance

pccr10001 commented 10 months ago

I got the same issue too, after sniffed traffic from this library to AWS ,I got Close response directly from the AWSIoT MQTT server.

Lib to AWS 圖片

Android App to AWS 圖片

qqaatw commented 10 months ago

Fixed. See https://github.com/qqaatw/LibJciHitachi/releases/tag/1.4.0.