Giter VIP home page Giter VIP logo

Comments (2)

SturmB avatar SturmB commented on June 1, 2024 1

This is pretty awesome. I'll have to explore the API and maybe customize the alert to do something different, like a quick color cycle, ending on a random color or something. Thanks!

from extralife-helper.

breadweb avatar breadweb commented on June 1, 2024

Hey @SturmB. I have my Hue lights flash by making a direct request to my light bridge. Assuming you are running the Helper on a computer that is connected to the same network as your light bridge, it is really easy if you use the Helper's onNewDonation function in ExtraLifeHelper.html. Here's what mine looks like:

    // If you would like additional things to happen when a new donation is 
    // received, put them in this function.
    function onNewDonation(donorName, donationAmount, message, avatarImageURL, createdOn)
    {
		$.ajax({
			url: 'http://IP-ADDRESS/api/USERNAME/groups/1/action',
			type: 'PUT',
			data: '{ "alert": "lselect" }',
			dataType: 'json',
			cache: false
		});
    }

IP-ADDRESS = The IP address of your light bridge
USERNAME = The username you created when connecting to your light bridge as explained here: https://www.developers.meethue.com/documentation/getting-started

from extralife-helper.

Related Issues (10)

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.