I have this issue too (getting “Timeout validating the code” when trying to input the Security Code). I’m on 0.110.5, and I am putting in the correct string (it’s the Security Code, not the 8-digit number that it needs). I even tried restarting the Trådfri Gateway as mentioned here, but to no avail.
The Trådfri integration was working so so, but I had some defunct devices that I couldn’t get rid of, so I deleted it and tried to configure it from scratch and I started getting this error.
In the logs under Developer Tools, I see several instances of the following error:
2020-06-06 22:54:07 ERROR (MainThread) [coap] Exception CancelledError() can not be represented as errno, setting -1.
2020-06-06 22:54:10 ERROR (SyncWorker_2) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiocoap/transports/tinydtls.py", line 157, in _run
yield from self._connecting
concurrent.futures._base.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiocoap/transports/tinydtls.py", line 169, in _run
self.coaptransport.new_error_callback(-1, self)
File "/usr/local/lib/python3.7/site-packages/aiocoap/protocol.py", line 192, in _dispatch_error
request.response.set_exception(OSError(errno, os.strerror(errno)))
asyncio.base_futures.InvalidStateError: invalid state
EDIT: Never mind, adding the integration manually works (but I have to also input the IP).
Hi, finally it worked for me. I scanned the QR code to see if the security code under the gateway matches the one scanned and it turned out that I was confusing a “1” with capital “I”
Hi,
Did you manage to solve this?
I have the same problem and have also tried everything .
Do you have Zigbee installed? Just wondering if it could be a conflict.
The problem disappeared with 110.2 but now I have the same problem again. I get a time out when trying to add my new tradfri gateway to Home Assistant. I suspect the problem is in the tradfri firmware.
When it responds timeout validating … just hit cancel and than I found a new integration registered but without security code. After that from the main integration panel if you open it it asks for the code again and it works this time !!!
Didn’t work for me, I don’t get any “new integration”. However do I have an old tradfri integration that I have removed. Maybe some code is left somewhere? anybody?
I found my problem, a bit embarrassing . I tried all fixes and also to add it via “discovery” and via IP etc. in configuration.yaml with no success. As I mentioned it worked fine before but then I did some tessting and removed the IKEA intergration.
Now to the thing…I hade “hidden” under the menu “Ignored devices” the IKEA intergarion . When removed an restart everything works fine again.
I had the same problem with the “Timeout validating the code” but then I tried the @maxton trick (scan the gateway QR code with your phone camera, then copy/paste resulting link into a text file, and then finally copy that into the Integration dialog) and it worked! Very clever!
Just so I could see the problem for myself, I copy/pasted my gateway’s Security Code into a text editor and changed the font to Courier where I could more clearly see that I was confusing a capital “I” (eye) for a lower case “l” (ell).
Thank you. I got error message before when tying to connect with 2 O’s in the password so I thought I couldn´t use O in the password. After you answer, I tried again an now it works!