Connect to to the gateway with python3 -i -m pytradfri IP
Enter Security Code of the gateway
You can now find the generated Identity in the first lines. It looks like DEBUG:pytradfri.api.libcoap_api:Executing $GATEWAY_IP post ['15011', '9063']: {'9090': 'xxx-your-identity'}
The new pre shared key is a line after and looks like DEBUG:pytradfri.api.libcoap_api:Received: {"9091":"xxx-your-preshared-key","9029":"1.8.0025"}
With that info you can now connect to the gateway again via the Paper UI in Openhab Things.
Add a new Tradfri Gateway
Enter Security Code
Click on ‘Show More’
Enter Identity and PSK
Save
When the gateway is back online again go to all relating things, click edit and update the selected gateway there.
Gateway was offline when I got home from my Easter vacation. I got it Online several times, but it did not stick. I wonder if it could be related to the Gateway trying to update my 10+ 5 button remotes. Noticed now that several has run out of battery because of the update …
So at the moment, no manual backup either. Must go shopping for CR2032s.
If it keeps bugging me, I have both a HUE and Conbee gateway I can move the lights to.
Yes it’s possible the updates are causing an issue.
If you have not done so, ping gateway ip from a computer make sure it responds then.
I would try deleting the gateway thing from openhab.
Shutdown openhab
Cycle power on gateway
Clear cache
Start openhab.
Add gateway in paper ui
In all the changes I did not clear cache once and had an error. May or may not have been related but a cache clear then start fixed if.
Thanks for pitching in.
I have done som more testing, and it looks like the Ikea Gateway partially hangs.
I can always ping it.
After I manage to get it Online after numerous bundle:restart in karaf, it only stays online for a couple of minutes, 30min max.
Strange thing is that when it goes Offline, I’m not even able to connect with the Ikea Android App.
After power cycling the gateway, it comes Online again for a while.
I have 9 remotes with status Update pending …
Strange behaviour.
Think I will try stopping the bundle while the gateway is Updating the remotes.
Maybe I am missing something but I too am having issues with the Tradfri binding after the update. I have followed the suggestions in this thread and done the following:
comment out Things file entries for Tradfri
add gateway via inbox of PaperUI
entered the code from gateway into Thing configuration
restarted services
expanded show more to retreive the identity and pre-shared key
This is where things get messy. The pre-shared key is just **********.
Where can I get the actual key?
I have tried with just “” for key but it still isn’t working.
Actually, I simply copied and pasted the ******** from the pre-shared key field in PaperUI into my Things file; it “magically” transformed from the series of dots into the plain ASCII sequence (which in my case is the code from the gateway anyway)
I tried stopping OH, clearing tmp and cache, restarting gateway, starting OH. Gateway was not autodiscovered and “adding manually” security and pre-shared key got pre-filled.
I downloaded pip for python 3.5:
sudo curl -O https://bootstrap.pypa.io/get-pip.py
sudo python3.5 get-pip.py
installed pytradfri:
sudo pip3.5 install pytradfri
Ran:
python3 -i -m pytradfri (192.mygateway-IP)
Found a line:
DEBUG:pytradfri.api.libcoap_api:Executing myip post ['150XX', '90XX']: {'90XX': 'eff3079481a24f1f9b9f8XXXXXXXXXX'}
Typing eff3079481a24f1f9b9f8XXXXXXXXXX’ as identity got the Gateway online in no-time
Today’s report. (not config file related, using paperUI only).
After stopping the bundle through the night, the gateway survived, but no remotes were updated when I checked this morning.
I then gathered my 9 remotes within 1m from the gateway, power cycled it and left for work.
(I also pulled the power on a HUE bridge 1m away ensuring it was not interfering on another channel).
Arriving home some 9hrs later, none of the remotes had received any update, all still pending.
Now, this is what did the trick. Remove and re-insert the battery on each remote.
Within 15-20min one by one (~15min each) they got updated until only 3 remained.
I measured the battery voltage on the ones that was still pending, and they were all just 2.9V. (they still controlled their lights OK)
After inserting fresh batteries (starting at 3.2V, but ended at 3.1/3.0 after being inserted in the remote), the 3 remaining ones was updated within 30min as well.
I then started the Ikea bundle and the Ikea items came Online at once, only to go Offline some minutes later.
I then power cycled the gateway (first power-cycle after it had updated the 9 remotes) and it looks good now after more than 1hr. Lets see what happens during the night…
Edit: still OK this morning …
Edit2: still OK in the evening.
This proves that coap communication during firmware update of remotes can kill the gateway.
I manage a second site with fever lamps and remotes, and the only thing I needed to do there was restart the bundle after the gateway updated and restarted. The new gateway firmware did not help with this issue. Still flaky.
Final report.
The 1.8.25 firmware update totally wrecked my gateway connection.
After trying all in my previous post, I had to find a pin and reset the whole thing.
Took the opportunity to transfer the majority of my devices to my conbee/deconz setup, so after the hard reset, I now have only the gateway, one remote and one E27 CT bulb.