All Apps and Add-ons

Philips Hue Alert Action: How to manually specify Hue Bridge IP?

alexlomas
Path Finder

At the moment, I guess the Philips Hue Alert Action app is trying to do a local subnet discovery via UPnP. Is there any way to force the IP of a bridge in circumstances where the client browser, Splunk server, and Hue Bridge are on different subnets?

0 Karma
1 Solution

alexlomas
Path Finder

OK, so, after a bit of tinkering, this is what you need to do:

In hue_alerts\bin\hue.py:

Comment out the existing discover_bridges_nupnp() function and add a new one in as below:

#def discover_bridges_nupnp():
    #req = urllib2.Request('https://www.meethue.com/api/nupnp')
    #res = urllib2.urlopen(req)
    #data = json.loads(res.read())
    #return [dict(id=b['id'], ip=b['internalipaddress']) for b in data]

def discover_bridges_nupnp():
    bridgeip = 'the IP of your bridge'
    bridgeid = 'the bridge ID'
    return [dict(id=bridgeid, ip=bridgeip)]

You can find the bridge ID through the API, or if you have the Hue App up and running, if you go to sign in to the hue online account you'll find it in the URL it posts. It will contain the MAC address of the bridge which is also printed on it on a label.

View solution in original post

0 Karma

alexlomas
Path Finder

OK, so, after a bit of tinkering, this is what you need to do:

In hue_alerts\bin\hue.py:

Comment out the existing discover_bridges_nupnp() function and add a new one in as below:

#def discover_bridges_nupnp():
    #req = urllib2.Request('https://www.meethue.com/api/nupnp')
    #res = urllib2.urlopen(req)
    #data = json.loads(res.read())
    #return [dict(id=b['id'], ip=b['internalipaddress']) for b in data]

def discover_bridges_nupnp():
    bridgeip = 'the IP of your bridge'
    bridgeid = 'the bridge ID'
    return [dict(id=bridgeid, ip=bridgeip)]

You can find the bridge ID through the API, or if you have the Hue App up and running, if you go to sign in to the hue online account you'll find it in the URL it posts. It will contain the MAC address of the bridge which is also printed on it on a label.

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...