frudawski

huenew

The huenew function creates a new connection to a Philips HUE bridge. The new connection will be appended to already existing connections, which allows controlling several bridges independently.

The function will try to establish a secure https connection by retrieving the bridge certificate. If that does not work, a dialogue will open, giving you some options:

1.) Try the standard certificate.

2.) Some bridges still use self-signed certificates, which means the certificate must be retrieved first. On systems that have openssl installed, that should happen automatically, otherwise you have to download the certificate yourself.

3.) If the above do not work, you have the option to establish an insecure http connection, which is not recommended.

Note: All hue function use curl commands to communicate with the HUE bridge. Please make sure it is installed. Curl is available for all major operating systems.

See also: huecon, huelampshuesearch, hueaddhueset, huename

Usage:

c = huenew(ip)

Where:

ParameterDescription
cReturns the new connection cell array.
ip
(optional)
Specifies the new bridge’s IP address. If not specified, the function will search for new bridges in the local network.

Examples

Search and add new HUE bridge:

c = huenew

Note: Some windows might open.

Exemplary result:

{
  [1,1] =

    scalar structure containing the fields:

      ip = 192.168.XXX.XXX
      user = ABCDEFGHIJKLMN-abcdefghijklmn-1234567890
      id = 0123456789abcdef
      cer = hue_cacert_0123456789abcdef.pem

}

Search and add new HUE bridge with specific IP address:

c = huenew('192.168.XXX.XXX')

Reference

Signify Netherlands B.V.: Philips HUE API version 1. High Tech Campus 48, Eindhoven; Netherlands, 2014.

Leave a comment

* I accept the use of cookies as well as the terms in the privacy policy. I accept that data provided by me is processed and saved. I know that comments are saved and published after review.