![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
node-red-contrib-ikea-tradfri
Advanced tools
Node-RED nodes to get updates from and control devices connected to an IKEA TRADFRI gateway
Node-RED nodes to get updates from and control devices connected to an IKEA TRÅDFRI gateway. This project is based on AlCalzone's excellent node-tradfri-client module, which does not utilize any compiled binaries.
npm install node-red-contrib-ikea-tradfri
Alternatively, you can install this module through the editor UI palette.
This module contains 5 nodes:
This node is responsible for connecting to an IKEA TRÅDFRI gateway on your network. An attempt is made to automatically discover a gateway on the network. If this is unsuccessful a valid hostname or ip-address has to be entered. You also need to enter the gateways security code, as printed on the sticker on the bottom of the gateway. As per IKEA's guidelines, this code is not stored in Node-RED, instead, only the identity and pre-shared key returned after successful authentication are stored within the node.
This node is able to control on/off capable devices connected to the gateway. It can do so in 2 different ways:
If both are specified, the node will pick the action (on or off) from the message, but execute that action on all devices and groups given in both the node configuration and the input message. Any combination of these input message and configuration properties is also possible.
{
"topic": [1, 2],
"payload": "on"
}
{
"topic": 1,
"payload": "off"
}
{
"topic": 1,
}
{
"payload": "on",
}
{}
This node will send messages when a device or group is updated or removed. The message will contain all available details for the device or group. Due to how this system works these update messages are also sent when reconnecting to the gateway after a flow deploy.
Depending on the type of event, payload.event
will have a different value.
In case of the "device updated"
event, depending on the type of the updated device one of the blind
, lightbulb
, sensor
, or plug
properties will be set and the others will be undefined
.
{
"topic": 1,
"payload": {
"event": "device updated",
"type": "device type (lightbulb, plug, motionSensor, etc.)",
"instanceId": 1,
"name": "the human friendly device name",
"alive": true,
"lastSeen": "ISO8601 date when the device was last seen",
"deviceInfo": {
"battery": 100,
"firmwareVersion": "version",
"manufacturer": "device manufacturer",
"modelNumber": "model number if available",
"power": "power source (Battery, ACPower, Solar, etc.)",
"serialNumber": "device serial number if available (numeric)"
},
"blind": {
"position": 50,
},
"lightbulb": {
"color": "hexadecimal rgb color string",
"colorTemperature": 65,
"dimmer": 50,
"hue": 0,
"isDimmable": true,
"isOn": true,
"saturation": 0,
"spectrum": "bulb color spectrum (none, white, or rgb)"
},
"sensor": {
"sensorType": "sensor type (motionSensor)",
"minRangeValue": 0,
"minMeasuredValue": 10,
"maxMeasuredValue": 90,
"maxRangeValue": 100,
"sensorValue": 25
},
"plug": {
"isOn": true,
"isSwitchable": true
}
}
}
{
"topic": 1,
"payload": {
"event": "device removed",
"instanceId": 1
}
}
{
"topic": 1,
"payload": {
"event": "group updated",
"instanceId": 1,
"name": "the human friendly group name",
"deviceIds": [2],
"isOn": true,
"dimmer": 65,
"position": 0,
"transitionTime": 500,
"createdAt": "2021-01-01T12:00:00Z"
}
}
This node will retrieve the current state of one or more devices and/or groups. The output message will contain all available details for the devices and/or groups.
In case of device state, depending on the type of the updated device one of the blind
, lightbulb
, sensor
, or plug
properties will be set and the others will be undefined
.
{
"topic": [1, 2]
}
{
"topic": 1
}
{}
{
"topic": [1, 2],
"payload": {
"1": {
"type": "device type (lightbulb, plug, motionSensor, etc.)",
"instanceId": 1,
"name": "the human friendly device name",
"alive": true,
"lastSeen": "ISO8601 date when the device was last seen",
"deviceInfo": {
"battery": 100,
"firmwareVersion": "version",
"manufacturer": "device manufacturer",
"modelNumber": "model number if available",
"power": "power source (Battery, ACPower, Solar, etc.)",
"serialNumber": "device serial number if available"
},
"blind": {
"position": 50,
},
"lightbulb": {
"color": "hexadecimal rgb color string",
"colorTemperature": 65,
"dimmer": 50,
"hue": 0,
"isDimmable": true,
"isOn": true,
"saturation": 0,
"spectrum": "bulb color spectrum (none, white, or rgb)"
},
"sensor": {
"sensorType": "sensor type (motionSensor)",
"minRangeValue": 0,
"minMeasuredValue": 10,
"maxMeasuredValue": 90,
"maxRangeValue": 100,
"sensorValue": 25
},
"plug": {
"isOn": true,
"isSwitchable": true
}
},
"2": {
"type": "group",
"instanceId": 2,
"name": "the human friendly device name",
"deviceIds": [3],
"isOn": true,
"dimmer": 65,
"position": 0,
"transitionTime": 500,
"createdAt": "2021-01-01T12:00:00Z"
}
}
}
This node is able to control lights connected to the gateway. It can do so in 2 different ways:
If both are specified, the node will pick the action (on or off) from the message, but execute that action on all devices and groups given in both the node configuration and the input message. Any combination of these input message and configuration properties is also possible.
The node is able to control dimmable lights, white spectrum lights, and RGB lights.
{
"topic": [1, 2],
"payload": {
"onOff": true,
"brightness": 50
}
}
{
"topic": 1,
"payload": {
"colorTemperature": 75,
"brightness": 75
}
}
{
"topic": 1,
}
{
"payload": {
"color": "#ff0000",
"brightness": 75
},
}
{}
This node is able to control blinds connected to the gateway. It can do so in 2 different ways:
If both are specified, the node will pick the operation from the message, but execute that action on all devices and groups given in both the node configuration and the input message. Any combination of these input message and configuration properties is also possible.
The node is able to control smart blinds.
{
"topic": [1, 2],
"payload": {
"operation": "setPosition",
"position": 50
}
}
{
"topic": 1,
"payload": {
"operation": "stop"
}
}
{
"topic": 1,
}
{
"payload": {
"operation": "setPosition"
},
}
{}
Array.prototype.flat
payload
and topic
Promise.allSettled
polyfillFAQs
Node-RED nodes to get updates from and control devices connected to an IKEA TRADFRI gateway
The npm package node-red-contrib-ikea-tradfri receives a total of 7 weekly downloads. As such, node-red-contrib-ikea-tradfri popularity was classified as not popular.
We found that node-red-contrib-ikea-tradfri demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.