New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ikea smart blinds #242
Comments
That’s correct and I don’t reckon any of us devs have one. Fingers crossed someone submits a PR here! |
To maybe move things forward a little bit, can anyone who owns a blind please submit the JSON-string from the blind. To do that, run the this script (choice 3 and 4): https://github.com/ggravlingen/pytradfri/blob/master/examples/debug_info.py Please please paste the output in this issue. |
I'm trying to run the script, but I get an error, first it complained that the debian didn't have libcoap, so I installed that, and now I get: python3 debug_info.php x.x.x.x
|
Were you prompted for a key and typed in the text on the back of your gateway? Also, your logs references a PHP-file. Are you running a PHP-file? |
I tried entering the key with the -K and also by being prompted, it's a py file, just a typo, I changed it, but got the same result. |
In that case, I’d recommend using the docket script, it’s normally easier. |
Ok, I'm more or less a virgin with docker, so what's the container name? |
I think I'm going to set up an RPI3 for this, the debian vm I have here, also fails on finding the Dockerfile in the script :-( |
Ok, made a brandnew RPi3 with buster, and installed docker. |
Did you do this?
|
No, but that gave a success. And when I run the debug_info.py I get this During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Looks like you maybe have non-English names in your devices but other than that, I’m out of clues. The docker works on my computer. |
Yes, I do have quite a few danish device names. |
I tried doing a raspbian stretch install, just to make sure that it wasn't a factor that buster doens't have it's own docker image. |
Ok, so I renamed all the devices to items without danish letters. What information about your Tradfri network do you need?
|
Please don't be rude, this is an open source project where we spend some of our free time building the code that makes up pytradfri. The person who contributed that script probably don't live in a country where special characters are a problem. Anyways, thanks for submitting the output. I stripped out the unnecessary bits. |
Having looked at this a bit, I believe I need the output from |
Rude??? I beg your pardon, how is it rude that I point out that a programmer of today makes the same mistakes as we did in the 80's (yes I'm that old, and worked with assembler back then) ? I had hoped that people had learned something in the last 30 years, so Yes, I feel it is embarrasing, I'm not namecalling, it's just a statement. |
Output of '2': What information about your Tradfri network do you need?
Printing information about endpoints in the Gateway
Please let me know within an hour if you need others, otherwise I will rename the items back to their proper names. |
Can the blinds be controlled from IKEA's own app? Looking at the data returned from the gateway, it doesn't quite follow the usual pattern for the devices that are controllable. |
Btw. The blinds require a 'repeater' to be installed close to them, that could be the reason for it looking different? |
Thanks for the confirmation that it works in the app! Then it should somehow be possible to reverse engineer. Putting a longer version of your extract back here:
|
OK, this will be a bumpy ride as I controlling the blind doesn't work exactly as the lights. I've created a new branch with some changes in it that I'd like you to checkout. Please.run this command: Then please run the debug-command again, as you did above. I've updated the code so that it (hopefully) works with non-English letters so you don't have to rename. Let's get that decoding working before we do anything else here. Following that code working, I'd like you to extract the part that references your bedroom blind (as in the abbreviated version of your post above) with the blinds fully up, fully down and then set at half way. I need to understand what values the command takes. Thank you |
To clarify part two in my post above, I'm really only interested in the value in
|
The value 5536 ranges from 0 (open) to 100 (closed). I have no clue yet what the 9003 is |
@vdaele thank you! Can you please try running the |
Sorry, I don't have your branch |
Thank you! I've added a few debug printouts, can you please try again? |
Sure, here you go
|
@sthorsen! Thanks again! Looks like I was sending the command to |
Hehe, no problem
I think the payload should be something like this:?
|
You're absolutely right, I need to remember how to change the path to |
I've made some changes now that should send the payload to |
Hi @ggravlingen, I just tried your update. The blind is not moving but here are the output :)
|
@ggravlingen Oh, thank you. I missed that :) But I'm here to test it :) |
Oh, and as you can see. I have 2 blinds connected now :) |
I don't use pytradfri. But If I understand the comments above correctly, you are sending a weird payload like
while it should be (no need anymore to repeat the 65538)
|
The command we're sending to the gateway at the moment is |
You have to send |
@sthorsen as per @vdaele's recommendation, I'm now sending the Can you please pull the latest version of the branch and give it another go? |
@ggravlingen I finally found some time, and I just pulled the latest build, and it's moving the blind to around 50%, looking good :-) |
Great news! Then I'll wrap up the code and ask for a review. Thank you all for your patience and for testing! |
Hey @ggravlingen Do you have any idea when it will appear in the IKEA integration in Home Assistant? |
@fribse the short answer is one you don't want to hear: I don't know. The long answer is that this is what's required for that to happen:
|
Thankyou @ggravlingen, it's good to know the procedure, then there is a way to influence the proces 😉 |
Support for blinds have now been added. I will publish to pypi later on. For support to work in Home Assistanf, the process above has to be followed. |
I've now proposed a change to the HA code which, when approved, will add support for the devices: Please test the code if you can (I can't, as I still don't have the device.) |
I'm reopening this as I need testers of observing the blind. I'll make another post in a few minus with instructions. |
Can someone please fork this branch: And then run the example-script while also changing the blind in the app. I'm trying to find out if it works to get a live feed (observe) the blind. Thanks |
You can observe the blinds. In one of my earlier comments, I wrote that you get coap notifications like (note the occasional back jump from 41 to 24!) |
@vdae your comment lead you to the solution so I remeber! But I assmumed you were using the CoAP stand alone lib to extract that and not pytradfri? Just want to make sure Ivre made a correct implementation. |
I see. I indeed use libcoap directly. |
Closing this, just got a report that it works correctly. |
Where are you using pytradfri (eg stand-alone, Home Assistant etc)
Home Assistant
Version of pytradfri
6.0.1
Expected behaviour
The integration supports all Ikea Smart things, like controlling the new Ikea Fyrtur and Kadrilj blinds.
Actual behaviour
It looks like this library doesn't support those yet (and as a result HA neither).
The text was updated successfully, but these errors were encountered: