Giter VIP home page Giter VIP logo

phue's People

Contributors

garrettw avatar johnnymast avatar jonofe avatar karimgeiger avatar kasperhartwich avatar kgeiger-godaddy avatar matthewbaggett avatar mbarbey avatar mkerix avatar sqmk avatar triplepoint avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phue's Issues

Add setAlert on Light object

Create setAlert method on Light object that will fire SetLightAlert command.

Light objects should now accept Client as argument in constructor to run commands. Light objects really should only be generated by commands, as there is no need to build them manually.

Create unit test for this as well.

Add ability to modify schedules

Per the Hue documentation, it is possible to modify schedules. This didn't work before when I tried, but perhaps that may be because I was doing something wrong via the API.

Allow batch updates on a light

Currently, one API call is made per attribute change on a light. Allow changing attributes on a light, then saving those attributes in one API call.

Clean up Transport\Http

Switch path and method parameters in sendRequest, and rely on constants for method types. Default method type to get.

Update all commands to work with the updates.

Add setName on Light

Add in the ability to set the name of the Light from itself. Also, add a command to support it.

Rename and add any missing error codes

Rename exceptions to match closely to that from the Hue documentation. There is also one more missing error code that is not included in the Phue client.

Http Transport assumes cURL extension is present

If the PHP environment does not have the cURL extension available, the HTTP transport call errors out.

The composer.json file should be updated to require or recommend this extension, and the transport class should check for the library's availability before it attempts the curl_init() call.

Cleanup

Additional cleanup on the client before tagging.

Add ability to delete users

Per Hue documentation, it is possible to delete existing users. Create a new command to handle this, and possibly new convenience methods and objects to retrieve and delete users.

Create GetLightsById command

Create command GetLightsById, that will accept an id and attempt to retrieve light from API. If light isn't found, should throw the proper resource exception.

Default transport adapter to curl

Most PHP installations have curl included. Since this adapter can be used by nearly every PHP environment, AND is much faster than the streaming adapter, use it by default. Those who don't have curl installed will have to pass streaming adapter instance to the client to get it to work.

Light __toString should return light's id, commands to accept id

Phue\Light __toString should return the light's Id.

Commands that require a Light should accept now any value, and typecast to get Id. This is so that Lights do not have to be built from other commands prior to interacting with the light driven commands.

Create group commands

New commands are needed for managing groups:

  • GetGroups
  • GetGroupById
  • CreateGroup
  • DeleteGroup
  • SetGroupConfig
  • SetGroupAction

A \Phue\Group object might also be handy. Convenience methods to set it's name, lights, and single actions might be handy.

Also, create unit tests for all as well.

Remove PhueTest from composer

It was pointed out to me that tests for composer packages should be manually modifying the autoloader namespace/class map to point to tests, rather than clutter up the map in the composer file with that location.

Thanks @triplepoint.

Simplify ping command

Experimenting with the bridge API, it appears that passing in an invalid username to config method will still yield the name of the bridge as well as software version.

Call "/none/config" for pinging the bridge.

Create Schedule commands

There is a scheduling API available.

The list of commands are needed:

  • CreateSchedule
  • DeleteSchedule

A schedule object that is NOT updatable may be useful.

Set up PHPUnit

Set up tests directory with phpunit config and initial Client test.

Set up config for Travis

Set up CI with Travis.

This will require adding appropriate travis config, and status images in the readme.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.