Giter Club home page Giter Club logo

touchdesigner-huecontrol's Introduction

TouchDesigner Hue Control

a tox for controlling phillips hue devices
matthew ragan
zoe sandoval

TouchDesigner Version

  • 099 2023.32660

OS Support

  • Windows 10
  • macOS (currently untested)

Summary

Philips Hue smart lights are intended to be used in homes / studios. The devices come in many varieties - individual lamps, outdoor lights, LED strip lights, etc. These are synchronized by communicating with an additional device called a Bridge. A single Bridge can control up to 50 lights. There are many stand alone applications to drive Hue Lights, and this repo aims to provide some additional control by exposing those controls through TouchDesigner. Previously this was addressed by using the phue library - this caused number of challenges for TouchDesigner users looking to install a 3rd party library. In this most recent update, the control mechanics have been changed to work with the latest hue api, and have moved to using just the requests library that ships with TouchDesigner.

This TOX provides global control for all lights, or individual control for single lights.

Use and Installation

The steps below cover a typical installation and use of the hueControl TOX.

  1. Download the hueControl TOX file from the releases page of this repository. Be sure to download the TDHueControl.tox . Drop the TOX into your network.
  2. Locate and add your bridge IP address - input this IP address into the Bridgeip parameter for the TOX.
  3. Click the Link to Bridge parameter on the TOX. This will prompt you to click the link button on your bridge before clicking Continue in TouchDesigner.
  4. Click Initialize Lights to fetch a list of all of the lights currently configured with your Hue Bridge.
  5. Update and control your Hue Lights.

Connecting to the Hue Bridge

Before being able to control lights you'll need to ensure that you can connect to your Hue Bridge. You'll need to know the IP address for your Hue Bridge. You can locate this IP address by looking at the Hue app on your phone, or by setting your Bridge to have an assigned IP on your router.

You'll need to enter the IP address of your Hue Bridge in the Bridge IP custom parameter. After entering this address. You'll next click on Initialize Lights. This will begin the process of linking to your Bridge - a TouchDesigner pop up window will appear with additional Instructions:

admin-page

Parameters

admin-page

Initialize Lights - this parameter will retrieve the dictionary of lights that are currently configured on the Hue Bridge. This will then loop through all of the lights provided by the Bridge and create unique parameters for each light. Specifically it will create pars for:

  • Color
  • Brightness
  • Power

This gives the user the ability to control each light individual - constructing parameters for each light currently configured on a given bridge.

Link to Bridge - this parameter will begin the process of linking TouchDesigner to your Hue Bridge. This process requires that you Bridge IP is entered into the corresponding custom parameter. When you link to your Hue Bridge, the Device User Name is fetched and stored in a read-only custom parameter, as well as a unique Client Key that is only used by TouchDesigner to control your lights. If these parameters are not set, you need to pulse the Link to Bridge parameter.

Bridge IP - The IP address for your Hue Bridge.

Device User Name - A user name generated by the Hue api for connecting to the Hue Bridge. This is generated when linking to the Hue Bridge.

Client Key - A client key generated by the Hue api for connecting to the Hue Bridge. This is generated when linking to the Hue Bridge.

Known Issues

mac OS

  • none... yet

Windows

  • none... yet

Credits

Inspired by the work of:

zoe sandoval
lightnotes
forum inspiration

Icons

Material Design Icons by Google

touchdesigner-huecontrol's People

Contributors

raganmd 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

touchdesigner-huecontrol's Issues

Threaded performance

Send commands for execution into another thread in python.

  • create a worker method
  • move calls where appropriate to the worker approach

pull python bits - check comments / check code

Make sure the mac bits are commented out when the file is created.

Consider just sending this command to the terminal rather than doing this in Touch?

Consider just adding a python file that's an executable?

Missing script files for install

Is there a new process for installing dependencies? There are no longer script files inside of dev/dep. I was able to get it working by installing phue manually but would love to use this for a beginner class and want to iron out the install issues. Thank you for creating this!

add dev branch

Experimental features should go into a dev branch please.

(mac user) Initialize lights no respond

Hello! I have no coding background and I'm trying to use this TOX on touchdesigner.

The Link to Bridge process worked where the DeviceUserName and ClientKey appeared after linking, but after clicking initialize lights nothing happen and so the control doesn't work at all.

Things I think that might have caused the problem:

  1. Mac M3 Pro?
  2. I uses two lightbulbs: a philips hue white light/innr colour bulb that can be used on philips hue
  3. An updated was installed while setting up the philips hue bridge

Thank you for this code, I really wish it could work for me as it is so porwerful and I would benefit greatly using this for my bachelor degree show!!! Wondering if anyone might know what happened? Thank you, once again

http://derivative.ca/Forum/viewtopic.php?f=4&t=6131

Fix up documentation

http://derivative.ca/Forum/viewtopic.php?f=4&t=6131

Ahhh - I think I need to update some of the documentation.

First, make sure that you're starting with a toe file you've already saved to a location on your computer. Next use the TOX from the directory called "release". When you drop that TOX into your project it should do a little house keeping and run some python scripts.

Next, are you pressing the button on your hue bridge before you pulse the "Set-up Individual Lights" parameter? That's the bit that should handshake with the hue and make sure you're able to retrieve the dictionary of lights.

no module name 'phue'

I am getting an error on the TOX: no module name 'phue'

Touchdesigner 2021.15800
MacOs 10.15.7

I believe I followed the instructions for installing phue correctly. I couldn't find the script "\dev\dep\update-dep-python-mac.sh". I may be out of my depth.

Can you offer any guidance? thanks much

Screen Shot 2022-01-23 at 8 32 41 PM

h

light by expression

driving pars with expressions not working - ensure the value captured is evaluated

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.