
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
node-red-contrib-gira-rest
Advanced tools
Node-RED node for Gira X1/Gira HomeServer REST API
To install the stable version use the Menu - Manage palette - Install
option and search for node-red-contrib-gira-rest, or run the following
command in your Node-RED user directory, typically ~/.node-red
npm install node-red-contrib-gira-rest
This project is highly beta at the moment. The basic functionality is implemented. No heavy quirks in sight and basic error checking is implemented, too. Help and description in the editor is missing at the moment, but on the list!
Details about the Gira RESTful API are available here. For the interaction with node-red-contrib-gira-rest it's important to know that the Gira API implements the concept of unique identifiers (UIDs). UIDs are four-chars long strings representing one (or a set of) datapoints of the Gira X1/Gira HomeServer.
The API function 'GiraAPI_GetUIconfig' is used to get the whole user interface configuraton from the device. This function is implemented in the gira-host (configuration) node for the use in future versions. At the moment can get the whole UIconfiguration as a JSON-object by using the gira-get node (see below).
As an example for this documentation I use the UID a00v. The example UIconfig look like:
{
"functions": [
{
"channelType": "de.gira.schema.channels.KNX.Dimmer",
"dataPoints": [
{
"canEvent": true,
"canRead": true,
"canWrite": true,
"name": "OnOff",
"uid": "a00t"
},
{
"canEvent": true,
"canRead": true,
"canWrite": true,
"name": "Shift",
"uid": "a00u"
},
{
"canEvent": true,
"canRead": true,
"canWrite": true,
"name": "Brightness",
"uid": "a00v"
}
],
"displayName": "LED Fette",
"functionType": "de.gira.schema.functions.KNX.Light",
"parameters": [
{
"key": "ButtonTimeout",
"set": "Visu",
"value": "0.4"
},
{
"key": "DefaultShift",
"set": "Visu",
"value": "10"
},
{
"key": "OffText",
"set": "Visu",
"value": "Aus"
},
{
"key": "OnText",
"set": "Visu",
"value": "Ein"
},
{
"key": "ShowOnHomeScreen",
"set": "Visu",
"value": "False"
},
{
"key": "ShowStatus",
"set": "Visu",
"value": "True"
},
{
"key": "ShowTimer",
"set": "Visu",
"value": "True"
}
],
"uid": "a00s"
}
],
"uid": "a08k"
}
All nodes share a common configuration node (gira-host) with the following properties:
RED.httpNode. To avoid conflicts with other nodes, it's using an URL path like /node-red-contrib-gira-rest/{ ID of the gira-host node }/service'. For security reasons the callback service expects the token issued by the Gira REST API after first registration of the client in the JSON-object in the body of the request.With the gira-get node it's possible to get a value from the API. There are two ways to tell the node which UIDs to request from the API and to emit as a message:
You can set the UID in the configuration dialog.
You can set the UID in msg.payload, if it's not set in the configuration dialog.
The node may return something like:
{
"values":
[
{"uid":"a00v","value":"0"}
]
}
If you request UIDs with multiple datapoints (e.g. a00s in the example configuration above), the response would be populated with multiple uids and the corresponding values.
With the gira-set node it's possible to set one or multiple values using the API. There are three ways to tell the node which UIDs to set:
msg.payload as follows:{
"values":
[
{
"uid": "a00v",
"value": 0
}
]
}
If you emit a JSON-object with the primary key values, the UID in the configuration dialog of the node is overruled.
You can set the UID as msg.topic. If it's set to a four-character long string, the UID in the configuration dialog of the node is overruled.
You can set the UID in the configuration dialog. In this case you can set the value in msg.payload.
The gira-event node is simple to use. It emits all events received by the Gira REST API service callback & value callback. A usual msg.payload looks like:
{
"events":
[
{
"uid":"a05d",
"value":"22"
}
],
"failures":0
}
There are some special events desrcibed in chapter 4.6 of the Gira REST API documentation. Most notably is the event uiConfigChanged. This event notifies the API client about a change of the internal user interface configuration of the Gira X1/Gira HomeServer. If this event gets fired, the gira-host node updates it's internal uiconfig object.
node.debug and node.trace debuggingrequest to something other...uiconfig object for the configuration of the node (TreeView, Dropdowns, et al.)uiconfig for the gira-event and gira-get output to msg.payloadnode-red-contrib-gira-rest is licensed under GNU General Public License v3.
I developed this set of nodes for my personal learning experience and use in my smart home. They are probably far from being perfect and probably are not even good examples of how to develop custom nodes for Node-Red. Therefore, I do not ask for money, but I hope that others will contribute and remove my mistakes. But if you absolutely want to send an attention to me, then I do like an invite for a coffee (or mostly tea at the moment)...
FAQs
Node-RED node for Gira REST API
We found that node-red-contrib-gira-rest 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.