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

Support geofence_client for aiohue compatibility #962

Merged
merged 3 commits into from
Nov 29, 2023

Conversation

jamesremuscat
Copy link
Contributor

Fixes #897 by adding just enough functionality to support aiohue's (ab)use of a geofence_client resource - creating one with a POST and periodically updating it with a PUT, generating an event for the event stream each time.

In testing I've found that the event stream isn't very reliable at passing messages through to the client - I'm not sure if that's an artefact of my dev environment, but it does eventually settle down if left running for a few minutes.

One addition I'm not sure about is returning an HTTP 500 error to clients when presented with resources through POST or PUT that diyHue doesn't support, rather than either silently failing or (as was happening in #897) dumping stack traces to the logs. Experience tells me that's usually a better way to handle it, but if any current diyHue clients are relying on the existing behaviour this might cause problems. Happy to back out that part of these changes if you'd prefer.

@mariusmotea
Copy link
Member

Super, thanks!

@mariusmotea mariusmotea merged commit d5d7fc4 into diyhue:master Nov 29, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

geofence_client missing id_v2
2 participants