cproctor / scratch_hue

A helper app to control Philips Hue lights with Scratch
MIT License
5 stars 1 forks source link

Not detecting all lights? #1

Closed karatebuilderboy closed 6 years ago

karatebuilderboy commented 7 years ago

Wow! Great extension. This is incredibly fun to play with, but I am having one problem.

I currently have 3 bulbs, a light strip, and a bloom lamp set up with my Hue system, but the extension only allows me to control the bulbs. Is this a purposeful cap at three, or should it be detecting and allowing control over the light strip and lamp as well? I would really love to tweak the state of all my Hue products. Thanks!

cproctor commented 7 years ago

Hi--thanks! I'm glad you're enjoying the extension. My 7th grade CS students certainly did. There is no cap on the number of lights you can control--assuming you're importing the copy of scratch_hue_extension.s2e generated on your Desktop (by the function on line 24 in scratch_hue_helper), the light index is not a drop-down menu; it's just a number input where you can put any light index. I had ten bulbs in my classroom and they worked great. You mentioned that you're seeing a cap of light indices at three; I guess you're using the scratch_hue_extension.s2e that comes with the repo. This is an old version; I should uncommit it. In that version, I implemented the light index as a drop-down menu, which is less flexible in exactly the manner you discovered.

Now about the light strip and the bloom lamp--I don't know. I'm relying on the phue library, and it doesn't mention different kinds of lamps. As far as I know, Hue hasn't published their API. But we can hope that those lights follow the same API, and just have a different form factor. If this is the case, you should be able to control them by sending commands to lights indexed 1-5. I would love to know what you find out!