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
Schedule no longer works #1022
Comments
Yes looks like auth handling needs more careful testing, had similar issue today. |
Can you please provide the schedule content, looking at the code it should still work since the auth checks are not done at this level. |
Oops, sorry... before the changes the schedules node wasn’t checked for auth at all. That was one of the reasons to move it to the top level, so it not so easy to forget one. So basically this fixed a bug. If you change your rule to use an authorised api key it should work again. ? |
I think so. Will see tomorrow morning... |
No joy, schedule didn't fire this morning either. Good thing that I did set a backup alarm... Here's the schedule (with the updated API key):
|
By checking the code it should work even with non existing/invalid apikey. https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/rest_schedules.cpp#L1034 |
Did some more digging in the logs. I'm seeing the same messages for the schedule:
But I no longer see the web socket notification, nor a message for the rule that should be triggered.
As my backup alarm, I set the status from HomeKit - that did issue the web socket notification and did trigger the rule alright. So it would seem that a schedule command no longer triggers the event? |
I'm a bit confused this looks like the rule is triggered based on the event? |
Yeah, that's the old log (Dec 6) from 2.05.49. These messages are missing from the 2.05.50, Dec 11 log. |
Ah ok sorry missed that :) I'll try to recreate similar setup and see where it hangs. |
It tries to handle the |
And that's because the check for the right request type has been removed from
Oh, and indeed, the api key isn't checked ;-) |
Unexpected behavior ;) |
Indeed, especially since the check wasn’t just with lights, groups and sensors, but also with e.g. resourcelinks. I could create a PR, but that might have to wait until this weekend. |
I removed the check because it 's also done at top level. Is handleLightsApi called directly when the schedule triggers? If so, factoring out the top level API handling and calling that from both places would be better? |
Then we’d lose the check that the command should only be for lights, groups, or sensors. Also, this would introduce checking the username/api key. |
Fixed in v2.05.52. |
I overslept this morning, since my wakeup schedule didn't fire. Upon inspection, it's
action
contains a username (api key) in theaddress
that I deleted months, if not years, ago. I suspect the changes in the API handling (9e9d092) now block the action.The text was updated successfully, but these errors were encountered: