Closed camatthew closed 5 years ago
But why you use the shell for this operation? Jut open in browser /tradfri page and ensure the details are correct.
yes i know they are correct because i copied and pasted it from the psk on the qr code.
i was in the shell to get the log
Can you paste here entire error output to see on what line it happen?
Ok, i will debug today with my gateway. I believe the output was changed with new firmware updates
Hi,
I did not manage to replicate the issue.
192.168.10.51 - - [16/Nov/2018 19:11:54] "GET /tradfri?ip=192.168.10.12&code=4Rk rHCWYKUzADBaE HTTP/1.1" 200 -
2018-11-16 19:11:54,373 - root - DEBUG - []
2018-11-16 19:11:55,601 - root - DEBUG - Sending M-Search response to 192.168.10.51
Can you paste the output of the following command here?
./coap-client-linux -m post -u "Client_identity" -k "{code}" -e '{"9090\":"hue-emulatorxxx"}' "coaps://192.168.x.x:5684/15011/9063"
replace the {code} with the security key and correct the ip with the real one.
mystery@Bag-of-Mystery:/opt/hue-emulator$ ./coap-client-linux -m post -u "Client_identity" -k "AX33pBP3PUZ3D3xh" -e '{"9090\":"hue-emulatorxxx"}' "coaps://192.168.0.18:5684/15011/9063" v:1 t:CON c:POST i:75e6 {} [ ] 4.00
OK, this show no output from your Tradfri Gateway. I provide here the output from my device:
With invalid key:
pi@raspberrypi:/opt/hue-emulator $ ./coap-client-linux -m post -u "Client_identity" -k "AX33pBP3PUZ3D3xh" -e '{"9090":"hue-emulatorxxx"}' "coaps://192.168.10.12:5684/15011/9063"
v:1 t:CON c:POST i:7d38 {} [ ]
Nov 17 12:26:10 ALRT 20 invalidate peer
Nov 17 12:26:10 WARN received alert, peer has been invalidated
with valid key:
pi@raspberrypi:/opt/hue-emulator $ ./coap-client-linux -m post -u "Client_identity" -k "4RkrHCWYKUzADBaE" -e '{"9090":"hue-emulatorxxx"}' "coaps://192.168.10.12:5684/15011/9063"
v:1 t:CON c:POST i:c33c {} [ ]
decrypt_verify(): found 24 bytes cleartext
decrypt_verify(): found 50 bytes cleartext
{"9091":"aQF27OSDFGNlsf7a","9029":"1.4.0015"}
to different ip with no coap server the output is like your, so very likely the ip is wrong or a firewall is blocking this traffic.
pi@raspberrypi:/opt/hue-emulator $ ./coap-client-linux -m post -u "Client_identity" -k "{code}" -e '{"9090\":"hue-emulatorxxx"}' "coaps://192.168.10.110:5684/15011/9063"
v:1 t:CON c:POST i:2ea5 {} [ ]
Important, you must not use same username twice, this is the reason i put there hue-emulatorxxx
, after successful pair you need to replace xxx with something else.
mystery@Bag-of-Mystery:/opt/hue-emulator$ ./coap-client-linux -m post -u "Client_identity" -k "AX33pBP3PUZ3D3xh" -e '{"9090":"hue-emulatorq4793"}' "coaps://192.168.0.18:5684/15011/9063" v:1 t:CON c:POST i:9664 {} [ ] {"9091":"DtcmCmNxuRnQJhQS","9029":"1.4.0015"}
ok, so the issue is clear now for me, you have less lines in output. What device/OS are you using? If you want a quick fix you need to search in HueEmulator3.py for coap-client-linux and at the end of every line there is .decode('utf-8').split("\n")[3])
. Instead of 3
you must put 1
.
Missing lines are:
decrypt_verify(): found 24 bytes cleartext
decrypt_verify(): found 50 bytes cleartext
i made an update to address this problem, please check it .
``
that fixed it however the lights only show in apps, not the dashboard
Yes, there only the groups and the lights inside the groups are displayed.
Describe the bug i get index out of range in the terminql and pqge reset in the browser
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Logs If applicable, provide output logs. These can be obtained via manually running HueEmulator3.py with
python3 HueEmulator3.py
.Additional context Add any other context about the problem here.