Skip to content

Commit

Permalink
Merge pull request #2 from felix-reck/dev
Browse files Browse the repository at this point in the history
Example for Worplace
  • Loading branch information
felix-reck authored Oct 3, 2024
2 parents 597cc96 + 36f0ca6 commit 337ad53
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 5 deletions.
100 changes: 100 additions & 0 deletions examples/set_workplace_status.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
[
{
"id": "f5a88dbae5a3f392",
"type": "inject",
"z": "1f10f95b8958d7c6",
"name": "Status 1",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "21380301",
"payload": "1",
"payloadType": "num",
"x": 120,
"y": 80,
"wires": [
[
"bc566379ec52d852"
]
]
},
{
"id": "64fadbcc31b5a5a9",
"type": "debug",
"z": "1f10f95b8958d7c6",
"name": "debug 18",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 550,
"y": 80,
"wires": []
},
{
"id": "bc566379ec52d852",
"type": "mip-wp-status",
"z": "1f10f95b8958d7c6",
"name": "",
"server": "9a941b9de9acbc70",
"format": "modified",
"x": 340,
"y": 80,
"wires": [
[
"64fadbcc31b5a5a9"
]
]
},
{
"id": "169762198eff0ede",
"type": "inject",
"z": "1f10f95b8958d7c6",
"name": "Status 11",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "21380301",
"payload": "11",
"payloadType": "num",
"x": 120,
"y": 140,
"wires": [
[
"bc566379ec52d852"
]
]
},
{
"id": "9a941b9de9acbc70",
"type": "mip-server",
"name": "Testserver",
"url": "https://localhost:8080",
"user": "12345",
"accessId": "12345",
"sslVerify": "false"
}
]
1 change: 1 addition & 0 deletions lib/mip-node.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
inputs: 1, // Number of inputs to the node
outputs: 1, // Number of outputs from the node
icon: 'font-awesome/fa-exchange', // Icon for the node
paletteLabel: 'mip',
label: function () {
return this.name || this.url || 'mip node';
}
Expand Down
7 changes: 4 additions & 3 deletions lib/mip-workplace.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script type="text/javascript">
RED.nodes.registerType('mip wp status', {
RED.nodes.registerType('mip-wp-status', {
category: 'network',
color: '#E3ECDF',
defaults: {
Expand All @@ -10,13 +10,14 @@
inputs: 1, // Number of inputs to the node
outputs: 1, // Number of outputs from the node
icon: 'font-awesome/fa-exchange', // Icon for the node
paletteLabel: 'mip wp status',
label: function () {
return this.name || this.url || 'mip workplace';
}
});
</script>

<script type="text/html" data-template-name="mip wp status">
<script type="text/html" data-template-name="mip-wp-status">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
Expand All @@ -38,7 +39,7 @@

</script>

<script type="text/markdown" data-help-name="mip wp status">
<script type="text/markdown" data-help-name="mip-wp-status">
Connects to the workplace and changes its status.

### Inputs
Expand Down
2 changes: 1 addition & 1 deletion lib/mip-workplace.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ module.exports = function (RED) {
});
}

RED.nodes.registerType('mip wp status', setWorkplaceState);
RED.nodes.registerType('mip-wp-status', setWorkplaceState);
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@felix-reck/node-red-mip",
"version": "0.1.0",
"version": "0.1.1",
"description": "A custom Node-RED node to interact with MPDV MIP HydraX API",
"repository": {
"type": "git",
Expand Down

0 comments on commit 337ad53

Please sign in to comment.