Skip to content
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

Notification when status of light changes #17

Open
sanderisbestok opened this issue Apr 6, 2020 · 3 comments
Open

Notification when status of light changes #17

sanderisbestok opened this issue Apr 6, 2020 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@sanderisbestok
Copy link

Hi,

Is there a way to get "notified" when the status (scene, on/of, dimmer) of a lightbulb change. Or is it necessary to constantly ask the endpoint what the status is?

Want to use this on my smart mirror to display the light status, I have seen some apps where it updates almost immediately after you press the hardware IKEA button.

@glenndehaan glenndehaan self-assigned this Apr 7, 2020
@glenndehaan glenndehaan added the question Further information is requested label Apr 7, 2020
@glenndehaan
Copy link
Owner

Hi @sanderisbestok,

As far as I know the CoAP protocol isn't a protocol for providing a realtime connection. What I mean by that is that when you do a request a connection gets setup between you and the gateway, a message is send to the gateway and after that a response is send back over the same connection. At this point the connection will close since that completes the call.

When looking at de decompiled app from IKEA I can't find any reference to a sort of 'live' connection between the app and the gateway. No it is possible i'm missing something since the decompiling process isn't great and searching for code is sometimes impossible.

I think that polling or pinging the gateway is at this moment the best sollution. Of course if anyone finds something useful that could implement a way of getting real time data i'm always up for suggestions.

@sanderisbestok
Copy link
Author

Hi @glenndehaan,

Thanks, I will try to decompile the app I used to see if anything interesting happens over there. Is there a maximum of pings you can do to the tradfri device in a certain amount of time?

@glenndehaan
Copy link
Owner

I don't believe there is any sort of request limit or at least I have not run into one yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants