node-red-contrib-huemagic
Version:
Philips Hue node to control bridges, lights, groups, scenes, rules, taps, switches, buttons, motion sensors, temperature sensors and Lux sensors using Node-RED.
93 lines (65 loc) • 6.01 kB
HTML
<script type="text/markdown" data-help-name="hue-bridge-node">
The "Hue Bridge" node is a universal node that can output all settings of the bridge and status messages from other nodes.
### Setup
First select the desired Hue Bridge. You can optionally deactivate all automatic status messages for this node by clicking the setting “Skip global device updates / messages on this node”. The node will then no longer issue device updates.
Alternatively, you can also choose whether the initialization messages of all nodes should not be suppressed when Node-RED is started. If you activate this setting, you will receive a status message from all resources connected to the bridge after each deployment.
### Get settings / status
Outputs the current status / settings of the bridge as soon as the following message has been sent to the node. Alternatively, you can also press the button in the Node-RED interface without having to pass a message to the node beforehand.
: payload (boolean): Returns the current status of the bridge
### Trigger TouchLink scan
You can couple new or old devices to the bridge using a "TouchLink scan" (e.g. after a reset). To do this, transfer the object `msg.payload` with the following content:
: touchLink (boolean): Couples old or new devices with the bridge
### Get all devices and resources
With the "fetch" command you can output a list of specific devices that are currently connected to the bridge. To do this, transfer the object `msg.payload` with the following content:
: fetch (string | array [string, ...]): Can accept `light`, `group`, `button`, `motion`, `temperature`, `light_level` or `rule` as value(s)
### Change Hue Bridge settings
You can use the following command to change specific settings on the bridge. Please note that changing the network settings requires reconfiguring the bridge on HueMagic. Transfer the object `msg.payload.settings` with the following setting options to the node:
: name (string): Changes the name of the bridge and must contain at least 4 to a maximum of 16 characters
: zigbeeChannel (int): Changes the current ZigBee channel (either `11`, `15`, `20`, `25` or `0`)
: ipAddress (string): Changes the IP address in the network settings
: dhcpEnabled (boolean): `true`, activates DHCP in the network settings, `false`, deactivates the setting
: netmask (string): Changes the network mask in the network settings
: gateway (string): Specifies the gateway in the network settings
: proxyAddress (string): Sets a proxy address in the network settings
: proxyPort (string | int): Specifies the port of the proxy in the network settings
: timeZone (string): Changes the currently set time zone on the bridge
### Status messages from the node
The status reports of the "Hue Bridge" node are dynamic. Although they follow a certain pattern, their output can vary depending on what action has just been carried out on the node.
#### Status object under `msg.payload`
: id (string): Unique ID of the Hue Bridge
: name (string): Currently set name
: factoryNew (boolean): Indicator whether the bridge is brand new
: replacesBridgeId (string | boolean): Outputs the old bridge ID (if a migration was carried out) or outputs `false`
: dataStoreVersion (string): Version of the data store
: starterKitId (string | boolean): Name of the starter kit created in the factory or `false`
: softwareVersion (string): Software version of the bridge
: apiVersion (string): API version of the bridge
: zigbeeChannel (int): Currently used ZigBee channel
: macAddress (string): MAC address of the bridge
: ipAddress (string): IP address of the bridge
: dhcpEnabled (boolean): Indicates whether DHCP is enabled
: netmask (string): Netmask of the bridge
: gateway (string): Gateway of the bridge
: proxyAddress (string | boolean): Currently used proxy address or `false`
: proxyPort (string): Currently used proxy port
: utcTime (string): UTC time on the bridge
: timeZone (string): Currently set time zone on the bridge
: localTime (string): Local time zone
: portalServicesEnabled (boolean): Indicates whether portal services are enabled
: portalConnected (boolean): Indicates whether the bridge is connected to the portal
: linkButtonEnabled (boolean): Indicates whether the link button is enabled
: touchlinkEnabled (boolean): Indicates whether TouchLink is enabled
: autoUpdatesEnabled (boolean): Indicates whether the HueMagic will automatically check for updates
: users (array [object, ...]): List of all users on the bridge (array with objects)
: updated (string): Time of the last update of the resource by HueMagic (ISO 8601)
: model (object): Contains the model information of the bridge under `id`, `manufacturer` and `name`
#### Fetch results under `msg.results` (optional)
If the "fetch" command has been used on the node, the bridge outputs the corresponding results under the `msg.results` object. The object contains the queried resource groups, which in turn contain all the corresponding resources in the form of an array.
#### Global status messages under `msg.updated` (optional)
Unless deactivated, the node outputs an updated status message for each resource on the bridge. The status message under `msg.updated` follows the pattern of the respective resource and varies depending on the type of device that was last updated.
#### Last command under `msg.command` (optional)
If the status of the node has changed via a certain command, the entire command that was executed is also output. Otherwise this object will not be output by the node.
### Examples from HueMagic
HueMagic provides some sample configurations for this node. To import a full featured example into your Node-RED interface, click on the Node-RED menu icon, then select "Import" and navigate to "Examples" in the sidebar of the popup. Then select the HueMagic folder and your desired node to import a sample flow.

</script>