rudders / homebridge-http

HTTP Plugin for Homebridge
Apache License 2.0
178 stars 110 forks source link

Merge request #9

Closed NovaGL closed 8 years ago

NovaGL commented 8 years ago

Not really sure how GitHub works, but thought I would let you know this way.

I have improved on your plugin in the following ways.

  1. Error Handling, if a url is not present eg an on or off url it won't crash the app it will just ignore it.
  2. Add status handling, if you add "switchHandling" it will poll to see if the status is on or off. Acceptable values are currently only 0 or 1.
  3. Add Brightness handling, if ""brightnesslvl_url" is filled out it will poll that URL to find out what the current brightness level is.
  4. Set non-required fields to default to blank and default HTTP method to GET, if you don't need authentication you shouldn't need to fill out an empty field, now you don't need to.

Extras not currently included in the repo but can be easily added just tell me, I have added a custom characteristic for Volume which is good if you don't want it to say brightness.

If you could have a look here and let me know what you think, that would be great.

rudders commented 8 years ago

If you do a pull request I'll review and maybe take your code. Need to see if it will break anyone's use if they update.

rudders commented 8 years ago

I've tried to merge via the PR and royally screwed up - I've manually changed the code to reflect your changes in the mean while but may have a stray PR gains your repo that you should close out and ignore. #amateur!

NovaGL commented 8 years ago

That's ok, its my first time using GitHub as well. I am guessing you found the changes useful anyway :)