Giter VIP home page Giter VIP logo

discord-hue's Introduction

discord-hue's People

Contributors

dependabot[bot] avatar nsbrianward avatar yoannfleurydev avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

discord-hue's Issues

HueRLGenerator should be key value rather than index

In HurRLGenerator.ts on line 16:

I think there might be an issue where the object key should be used instead of the index as if it were an array. I've probably deleted lights before on my hue, which is probably why I have some gaps. I notice when querying my hue that the light keys start at 3 instead of 1 or 0. I have a light at index 6, but it's named 9 in my status object (at http://hueip/api/user) if I query my base station. I noticed when I tried to turn on and off the light named Entryway, the light named 6 would toggle itself on and off. I temporarily got around this by directly adding 3 to the index value to prove the concept to myself.

Screen Shot 2019-06-29 at 6 15 23 PM

BUT I don't think that will always work. For example, as you can see, I don't have a light named "13" here. So the "index" offset would keep changing. Is there a way to pass the object key here instead of the index?

Screen Shot 2019-06-29 at 6 22 54 PM

Thanks!

`help` | `help me` | `what can you do`

This command will respond with all the commands of the bot.
It could be great to have a way to list all the available command and not hardcode this.

  1. The command should have an help message in its declaration
  2. Only if the command is registered, it should give the help message

For example, the help messages for hue turn and hue status could be:

  • hue turn [light name] [on|off]: command to turn on/off the light identified by light name
  • hue status: list the light statuses (on, off, unreachable)

HueRLGenerator.lightsIndexState hardcoded to a value of 2

In src/action/message/HueTurn.ts, round about line 25 there's some indication that we're only able to manipulate lights at index 2 right now. Is that correct?

I've verified via direct PUT requests that the URL works, but I'm not able to change a light at say index 9 without directly changing the index that's hardcoded in. I verified that also and was able to then make hue turn on work via Discord.

I'm assuming that additional work is still needed to gather the index specified from the message based on the name and then pass that into the URL that's getting constructed.

Cool project!

`hue turn 1 [on|off]`

will turn on/off the light with identifier 1

If a light has a name 1 this will turn on this light in priority.

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.