Open maiersoft opened 8 years ago
Hi Joe,
I have just committed HueEmulator-v0.7.jar. Give this a try if you want. In this version I now return the full groups resource (introduced in API 1.4), and I am returning a near full Schedules Resource.
Note however, that Schedules was never fully implemented in the Emulator and has some fields missing (e.g. autodelete, status, starttime, created), so am not sure how valuable this change is without the full schedules implementation. To be honest its a while since I implemented the schedules in the Emulator and can't remember exactly in what state it is, so would be great if you let me know if it works.
Steve
Hi Steve,
Thanks for updating. There are indeed some hickups in the schedule handling. From what i tested i found that when creating a schedule the Emulator returns an error. E.g. With this payload:
{ "name": "Nach Mitternacht", "description": "My Midnight lights", "command": { "address": "/api/a3b6ef5b20810491a1997b25606362b/groups/0/action", "method": "PUT", "body": { "scene": "Mitternacht" } }, "localtime": "2015-12-05T00:05:00", "status": "enabled" }
It get this response with a „Socket closed by peer“ error, so the response is not complete:
HTTP/1.1 200 OK Transfer-encoding: chunked Cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Access-control-allow-credentials: true Content-type: application/json; charset=utf-8 Expires: Mon, 1 Aug 2011 09:00:00 GMT Connection: close Access-control-allow-headers: Content-Type Pragma: no-cache Access-control-allow-origin: * Date: Fri, 04 Dec 2015 16:07:20 GMT Access-control-allow-methods: POST, GET, OPTIONS, PUT, DELETE Access-control-max-age: 0
The „Get all Schedules" command afterwards provides:
{„1":{"description":"My Midnight lights","name":"Nach Mitternacht","command":{"body":{"bri":0,"on":false},"address":"/api/a3b6ef5b20810491a1997b25606362b/groups/0/action","method":"PUT"}}}
So the schedule’s command property isn’t saved as provided in the payload. Also the localtime and status properties are missing.
That’s what i found after s short test of 0.7
Thanks and cheers from Germany, Joe
Von: Steve notifications@github.com<mailto:notifications@github.com> Antworten an: SteveyO/Hue-Emulator reply@reply.github.com<mailto:reply@reply.github.com> Datum: Freitag, 4. Dezember 2015 um 16:44 An: SteveyO/Hue-Emulator Hue-Emulator@noreply.github.com<mailto:Hue-Emulator@noreply.github.com> Cc: Joachim Maier info@maiersoft.de<mailto:info@maiersoft.de> Betreff: Re: [Hue-Emulator] Get all schedules should return the full schedules resource (#22)
Hi Joe,
I have just committed HueEmulator-v0.7.jar. Give this a try if you want. In this version I now return the full groups resource (introduced in API 1.4), and I am returning a near full Schedules Resource.
Note however, that Schedules was never fully implemented in the Emulator and has some fields missing (e.g. autodelete, status, starttime, created), so am not sure how valuable this change is without the full schedules implementation. To be honest its a while since I implemented the schedules in the Emulator and can't remember exactly in what state it is, so would be great if you let me know if it works.
Steve
— Reply to this email directly or view it on GitHubhttps://github.com/SteveyO/Hue-Emulator/issues/22#issuecomment-162000050.
Hi Joe, I have a lot of work issues to deal with this week, so hopefully towards the end of the week I can take a look at this in a bit more detail. I will let you know. Thanks for providing the extra information though, this will be helpful. Thanks Steve
Hi Steve,
No problem. The Emulator has been and still is very helpful. Thanks anyway for providing it for the community.
Looking forward to any updates. Let me know when i can help testing.
Cheers, Joe
— ———————————————— maiersoft internet & mobile solutions Joachim Maier Reiherweg 9 71336 Waiblingen www.maiersoft.de info@maiersoft.de
Von: Steve notifications@github.com<mailto:notifications@github.com> Antworten an: SteveyO/Hue-Emulator reply@reply.github.com<mailto:reply@reply.github.com> Datum: Montag, 7. Dezember 2015 um 14:14 An: SteveyO/Hue-Emulator Hue-Emulator@noreply.github.com<mailto:Hue-Emulator@noreply.github.com> Cc: Joachim Maier info@maiersoft.de<mailto:info@maiersoft.de> Betreff: Re: [Hue-Emulator] Get all schedules should return the full schedules resource (#22)
Hi Joe, I have a lot of work issues to deal with this week, so hopefully towards the end of the week I can take a look at this in a bit more detail. I will let you know. Thanks for providing the extra information though, this will be helpful. Thanks Steve
— Reply to this email directly or view it on GitHubhttps://github.com/SteveyO/Hue-Emulator/issues/22#issuecomment-162520806.
Hi Stevey, as of bridge version 1.3 the full schedules resource is returned from the bridge. Currently the Emulator just returns the name of the schedule. It would be great if the Emulator could be updated to reflect this.
Thanks, Joe