PhilipsHue / HueSDK

Philips Hue Software Development Kit
99 stars 39 forks source link

Update schedule failing because parameter, autodelete, not available #36

Open Marcel-Malus opened 6 years ago

Marcel-Malus commented 6 years ago

Lately my app, that updates schedule, stopped working because of this error:

Clip Error: /schedules/[number]/autodelete - ID - type PARAMETER_NOT_AVAILABLE, parameter, autodelete, not available.

The app worked just fine about a week ago. There seems to be an incompatibility between the current hue software and this SDK.

I never set autodelete on any of my schedules. It seems to be set lately by default. I also tried setting it to true, false and null. Nothing works. It also doesn't matter whether I try to update a custom schedule created by my app or one created with the standard hue app.

Thanks for any advice for a workaround or even better a fix on that in the SDK.

jhvdb87 commented 6 years ago

Which SDK version are you using ? Can you enable debug logging and attach it to the ticket. Debug logging can be enabled in HueLog (java) / PHSLog (obj-c)

Marcel-Malus commented 6 years ago

Sorry for the late response, but the error didn't come up again and I wanted to waited if it was just coincidence. I'm using the current SKD Version 1.21.0. So the changes which fixed it where setting autodelete=null when creating the schedule and again =null when updating, but only when it is set not equal null. Don't know why the bridge sets it to some value != null after it was created with =null. Also when reverting the changes I could not recreate the error. It also didn't came up when I was writing the initial issue immediately, but later. E.g. I was developing on the app and everything worked, but later that day when using the app it had that error. I could try to provoke it like that, but than I would need the Hue SDK File logging. It is set like this: HueLog.setFileLogLevel(DEBUG, NETWORK + CLIENT + WRAPPER); and I have file write permissions allowed, but where is it saved? Can't find the log files on the device...

jhvdb87 commented 6 years ago

The logs are written to the storage location you set initially on configuring the SDK.

Marcel-Malus commented 6 years ago

I have checked that and still cant find them on the device. Logging the storage location gives: /data/user/0/.debug/files. Cannot find this directory hierarchy on my device (Pixel 2, Android 8.1 only internal storage). My App Logs (not SDK) which I setup with logback work fine and log to /Android/data//

jhvdb87 commented 6 years ago

You could also use the normal logger, which logs to console. If you attach your phone to the PC you should be able to get the logging already from Android Studio.