Skip to content

Commit

Permalink
Update to v4.0.0
Browse files Browse the repository at this point in the history
> **Attention!** HueMagic v4 + has been almost completely rewritten under the hood and requires at least the (square-shaped) Philips Hue Bridge firmware 1948086000+ from November 1st, 2021 ([Upgrade instructions](https://www.lighting.philips.com/content/B2C/en_US/microsites/meethue/marketing-catalog/huewireless_ca/support/security-advisory/general/where-and-how-can-i-update-my-hue-system-with-the-latest-software.html)) and Node-RED v1 + ([Upgrade instructions](https://nodered.org/docs/getting-started/local#upgrading-node-red)). If you are upgrading from a previous HueMagic version to the v4, you will have to reconfigure (not completely rebuild) all nodes by clicking them and selecting the appropriate device from the list. This also applies to nodes / functions that are operated in universal mode, as the numeric identifiers of the latest Philips Hue API version have been replaced in UUIDs. The nodes "Hue Switch", "Hue Button" & "Hue Tap" have been replaced in v4 by the universal and uniform node "Hue Buttons", which works with all button / switch devices that are connected to the Hue Bridge (please note here also the new API in the documentation). The request and return objects of the individual nodes are largely compatible with older HueMagic versions - with the exception of the nodes "Hue Bridge", "Hue Buttons", "Hue Scene" & "Hue Group". These need to be adjusted in the v4. Make sure that you meet the minimum technical requirements and have a quiet minute for the migration before upgrading to the v4.

* HueMagic speaks now directly with the bridge without any submodules *(huejay dependency removed)*
* Migrated to the newest CLIP/v2 API version from the Philips Hue bridge
* Nodes are now updated via push notifications (SSE) from the bridge instead of periodic polling
* Instant "current status" queries on each node with no loading time
* "Hue Buttons" node supports all new Philips Hue buttons/switches (e.g. Dimmer Switch v2, Hue Wall Switch…)
* All nodes provide additional property information in the output (check docs)
* New universal node "Hue Buttons" replaces the following nodes: "Hue Switch", "Hue Button", "Hue Tap"
* New "updated" object for all nodes, which only contains the properties that have been updated since the last state
* New configuration option to suppress first message after node initialization (for all nodes)
* New gradient color setting for compatible light sources (in "Hue Light node)
* New inject button for almost all nodes, which triggers the current status of a node
* New "universal mode" support for "Hue Rule" nodes
* New SVG-version of each node icon for higher quality rendering in the Node-RED UI
* New and full featured examples for each node right inside Node-RED
* New color mix feature in "Hue Light" nodes with the ability to mix the current light color with another
* New automatic brightness support based on the current time for "Hue Light" & "Hue Group" nodes
* New "Superhero", "Neon City" & "Christmas" (for next year, sorry) animations in "Hue Magic" node
* The custom alert effect on "Hue Light" & "Hue Group" nodes can now also be configured in brightness
* All nodes will now also forward the last command that has been applied ([#249](#249))
* "Hue Temperature" & "Hue Brightness" nodes can now also be activated & deactivated
* "Hue Light" & "Hue Group" nodes can now also receive XY color settings
* "Hue Light" & "Hue Group" can now also receive a named color temperature setting
* "Hue Light" & "Hue Group" nodes can now receive future brightness states in "turned off" mode ([#244](#244))
* Automatic light temperature setting outputs now values from 153 (coldest) to 500 (warmest)
* Automatic color correction based on the light´s capabilities for more accurate color settings
* Optimized node editor configuration UI to better match the current Node-RED´s UI
* The option for "automatic firmware updates" on the bridge moved to the bridge configuration node
* "Hue Group" node does no longer contain the "msg.info.model" & "msg.info.class" property
* Fixed timeout connection issues to the bridge
* Fixed an issue with non stopping custom animations ([#222](#222)), ([#224](#224)) & ([#226](#226)) (thx)
* Node-RED will no longer crash if there is no active connection to the bridge ([#237](#237))
* Fixed an issue that prevented the light / group from not reporting its own status when queried & node events were deactivated ([#248](#248))
* Fixed an issue with nodes in universal mode ([#245](#245))
* A possible attack target has been fixed ([#217](#217))
* Moved away from "moment.js" to "Day.js" for date/time formatting inside the nodes
* Updated README and help section on each node
* Updated dependencies to the latest version
  • Loading branch information
Foddy committed Jan 9, 2022
1 parent 090386b commit 7d45a64
Show file tree
Hide file tree
Showing 139 changed files with 9,310 additions and 7,207 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/node_modules
/npm-debug.log
/package-lock.json
/yarn-lock.json
/helper
.DS_Store
*.icloud
*.icloud
*.paw
1,367 changes: 764 additions & 603 deletions README.md

Large diffs are not rendered by default.

224 changes: 189 additions & 35 deletions examples/Hue Bridge.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,26 @@
"type": "inject",
"z": "bf04a073.be4428",
"name": "TouchLink",
"topic": "",
"payload": "{\"touchLink\":true}",
"payloadType": "json",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 200,
"y": 60,
"wires": [
[
"ea4668e7.fac4f"
]
],
"icon": "font-awesome/fa-hand-o-right"
},
{
"id": "b9a63d91.47a5e8",
"type": "inject",
"z": "bf04a073.be4428",
"name": "Fetch users",
"topic": "",
"payload": "{\"fetch\":\"users\"}",
"payload": "{\"touchLink\":true}",
"payloadType": "json",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 190,
"y": 120,
"x": 120,
"y": 260,
"wires": [
[
"ea4668e7.fac4f"
]
],
"icon": "font-awesome/fa-user-circle-o"
"icon": "font-awesome/fa-hand-o-right"
},
{
"id": "effb4d48.e09bb8",
Expand All @@ -57,21 +41,24 @@
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"x": 630,
"y": 120,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 730,
"y": 160,
"wires": [],
"icon": "font-awesome/fa-info-circle"
},
{
"id": "ea4668e7.fac4f",
"type": "hue-bridge-node",
"z": "bf04a073.be4428",
"name": "",
"autoupdates": true,
"x": 410,
"y": 120,
"skipglobalevents": false,
"initevents": false,
"x": 550,
"y": 160,
"wires": [
[
"effb4d48.e09bb8"
Expand All @@ -83,20 +70,187 @@
"type": "inject",
"z": "bf04a073.be4428",
"name": "Change bridge name",
"props": [
{
"p": "payload",
"v": "{\"settings\":{\"name\":\"HueMagic Bridge\"}}",
"vt": "json"
},
{
"p": "topic",
"v": "",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"settings\":{\"name\":\"HueMagic Bridge\"}}",
"payloadType": "json",
"x": 160,
"y": 360,
"wires": [
[
"ea4668e7.fac4f"
]
],
"icon": "font-awesome/fa-toggle-on"
},
{
"id": "808fb3ba34d8d872",
"type": "comment",
"z": "bf04a073.be4428",
"name": "Change the bridge settings",
"info": "",
"x": 130,
"y": 320,
"wires": []
},
{
"id": "6a2d7cbb05fc38a8",
"type": "comment",
"z": "bf04a073.be4428",
"name": "Press bridge button remotely",
"info": "",
"x": 140,
"y": 220,
"wires": []
},
{
"id": "a1d6fdeca2c9c014",
"type": "comment",
"z": "bf04a073.be4428",
"name": "Fetch specific bridge ressources",
"info": "",
"x": 150,
"y": 420,
"wires": []
},
{
"id": "5829dc7c634e6674",
"type": "inject",
"z": "bf04a073.be4428",
"name": "Fetch all lights",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 160,
"y": 180,
"topic": "",
"payload": "{\"fetch\":\"light\"}",
"payloadType": "json",
"x": 130,
"y": 460,
"wires": [
[
"ea4668e7.fac4f"
]
],
"icon": "font-awesome/fa-toggle-on"
"icon": "node-red-contrib-huemagic/hue-light.svg"
},
{
"id": "09d15741c0c484b7",
"type": "inject",
"z": "bf04a073.be4428",
"name": "Fetch all motion sensors",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"fetch\":\"motion\"}",
"payloadType": "json",
"x": 170,
"y": 500,
"wires": [
[
"ea4668e7.fac4f"
]
],
"icon": "node-red-contrib-huemagic/hue-motion.svg"
},
{
"id": "fec4a7abbeecac4b",
"type": "inject",
"z": "bf04a073.be4428",
"name": "Fetch all motion sensors & lights",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"fetch\":[\"motion\", \"light\"]}",
"payloadType": "json",
"x": 190,
"y": 540,
"wires": [
[
"ea4668e7.fac4f"
]
],
"icon": "font-awesome/fa-clone"
},
{
"id": "35bf62bc11c94830",
"type": "comment",
"z": "bf04a073.be4428",
"name": "FIRST STEPS (double click me)",
"info": "Click on the \"Hue Bridge\" node and select your bridge. If you have not yet set up a bridge, you will be asked to set one up before you can finish configuring the node.\n\nAs soon as the node is connected to your bridge and you have deployed the changes in Node-RED, the status of the node should change to \"connected\". The node can then receive and execute your commands. The \"Hue Bridge\" node also automatically outputs a message each time as soon as the status of a certain resource on the bridge has been updated. You can get the updated status and all of its information in the \"updated\" property of the output message.\n\nYou can also query the current status of the node in the Node-RED interface at any time by clicking on the button of the node next to the icon.\n\nIf you would like to receive further information on this node, the possible commands and output values, then click on it once in your flow and navigate to the Node-RED book icon (top right corner).",
"x": 150,
"y": 40,
"wires": [],
"icon": "font-awesome/fa-question-circle"
},
{
"id": "150fa3da0eea6bce",
"type": "comment",
"z": "bf04a073.be4428",
"name": "Get the current status",
"info": "",
"x": 120,
"y": 120,
"wires": []
},
{
"id": "474d44e13140d4a8",
"type": "inject",
"z": "bf04a073.be4428",
"name": "Status",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"status\":true}",
"payloadType": "json",
"x": 110,
"y": 160,
"wires": [
[
"ea4668e7.fac4f"
]
],
"icon": "node-red/alert.svg"
}
]
Loading

0 comments on commit 7d45a64

Please sign in to comment.