Closed marcusklaas closed 8 years ago
I've checked that I'm on the latest master, by the way.
It seems active
is a property of an anonymous object stored in the scene object. Why'd you choose for that solution instead of making active
a property of the scene object?
Most of the interface for the main objects uses get/is prefixed accessors. Keeping the original attribute names from the bridge in a separate object within the main models makes it easier to pass back to the bridge without mapping/translations.
The active field is now deprecated/removed from scenes on latest bridge versions. My node.js client supports the latest bridge versions (https://github.com/sqmk/huejay/blob/master/lib/Model/Scene.js) and doesn't appear to allow modifying/retrieving the active field, so we should be safe to remove isActive completely from Scene management in Phue.
Assuming you have an account on the Hue Developer Program, "active" is no longer available in v1.11 of the bridge api: http://www.developers.meethue.com/documentation/scenes-api
Definitely safe to remove from Phue. You are welcome to submit the changes to remove any methods/tests for that field, or I can get to it in the evening.
Thanks for the quick reply! Some other functionality seems broken too, such as setting a light's brightness etc.
I'm just playing around with this though, not sure I can contribute... Would you recommend switching to your node client?
edit: huejay seems super dope, definitely switching!
Awesome. I would definitely switch. I've been trying to abandon most of my PHP projects in favor of JS. As a result, Phue hasn't been getting any love and is a bit behind on the API. I'll correct any immediate issues (like this one) that get reported.
If I had more time, I'd release Phue v2 to follow the interface for the node.js lib.
This fix is going in with v1.6.0.
Ran the following snippet from the README on php 5.4:
and got the notices