Vaskivskyi / ha-chroma

Control your Chroma-enabled devices from Home Assistant
Apache License 2.0
23 stars 0 forks source link

[Bug] Failing to Start stuck at initialization. #11

Closed KyleStilkey closed 2 years ago

KyleStilkey commented 2 years ago

The problem

Not sure the issue of this, but I have installed this and it found my devices. I got all the way to the step where it asks me if I want to rename my device or leave blank to use default names. I left blank and then it just endlessly kept trying to load. Let it sit for 20 minute and nothing, did a reboot and it's just stuck at initialization.

Your device(s) with a problem

No response

Firmware version

Unknown

Integration version with the issue

0.10

Method of the integration installation

HACS

What version and type of Home Assistant installation do you use

2022.9.5

Is there anything useful in the logs?

No response

Additional information

No response

Vaskivskyi commented 2 years ago

Hello, @KyleStilkey,

Thanks for your feedback! :+1:

Does the Home Assistant log show any errors from the Chroma integration or AIOCroma library?

Did you try restarting the device with Razer Synapse, which you are trying to control?

KyleStilkey commented 2 years ago

image It's just stuck doing this and no logs show, I will have to enable the advanced logging methods to see if something shows up on why it's stuck.

Also yes I did restart my set up to make sure.

KyleStilkey commented 2 years ago

image I did just finally get a log entry in the logs claiming it's failing to find my host, that is my PC's IP, not sure if something is causing a communication error.

I'm also running off from a DuckDNS and I'm not sure if it's possible that's causing a communication issue, but just throwing out what I can to help better track this.

Vaskivskyi commented 2 years ago

Oh. Could be that your device firewall is not allowing connection on the ChromaSDK port. In this case, the initial discovery (1 step of the integration setup) will go well without any errors, but the connection itself might fail.

You can check whether the port is opened on the device using nmap:

nmap IP_ADDRESS -p 54236 -Pn

If the state is open - it's not the reason for the problem. But if it is not, you would need to allow connection to port 54236 on your PC. You need to do the following:

After opening the port, you will probably need to configure the integration in HA again. Just delete the old one and add a new one.

Let me know, what you will find out.

KyleStilkey commented 2 years ago

Yup that was it, it's now connected and turned all my colors to Yellow on all my devices. It does work now at least :)

Vaskivskyi commented 2 years ago

Great! Yellow is just a default initialization colour. It's more to notify that HA has connected and taken control over the ChromaSDK.

At some point, there will be a possibility to choose what colour (or effect or no effect) to show on the connection. Unfortunately, there is no way to get the state of RGB before the connection was made - the API is quite limited.

Since this issue we have solved, I will close it. If you will have any troubles or suggestions for the integration, please open a new issue.

P.S. I will also add to the Readme info on the need to open the port through the firewall.

KyleStilkey commented 2 years ago

Oh I know the limitation of the SDK and thanks for the help, anything I can think of I will open a new one. Thanks!