Philips Hue - "method, PUT, not available for resource, /scenes" (Java SDK)

1.2k views Asked by At

I want to create a scene using the Hue Java SDK. This is the code I am using:

mHueSDK.getSelectedBridge().saveScene(scene, ...);

It does not work, it gives an error. This is the output in onError(...):

method, PUT, not available for resource, /scenes

Why doesn't this work?

Thanks for any help.

1

There are 1 answers

1
Ron Reuter On BEST ANSWER

PUT is for updating an existing scene. POST is for creating a new scene.

Since saveScene(...) is used to both create new scenes AND to update existing scenes, my guess is that since you got a PUT error, the scene you created is missing some required data, so its trying to do an update PUT instead of a create POST.