2021-05-04, 01:41 AM
(2021-05-03, 09:37 PM)tkurki Wrote: Try setting the source in both send and subscribe.
PS I find unformatted node-red flow JSON really hard to read. Consider pretty printing/formatting it when posting it.
Hi,
yeah IT WORKS.
Probably nodered needs a different source from his name.
If I don't insert any Source, Nodered put itself as source.
Code:
[
{
"id": "3332bda9.e31492",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "8fb41530.5ab9d8",
"type": "change",
"z": "3332bda9.e31492",
"name": "Test",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "test",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "101",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 390,
"y": 80,
"wires": [
[
"bed36ea1.85c9d"
]
]
},
{
"id": "bed36ea1.85c9d",
"type": "signalk-send-pathvalue",
"z": "3332bda9.e31492",
"name": "",
"source": "Y2K-Anchor-Alarm",
"meta": "",
"x": 650,
"y": 80,
"wires": []
},
{
"id": "2821b233.65808e",
"type": "inject",
"z": "3332bda9.e31492",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "5",
"crontab": "",
"once": false,
"onceDelay": "1",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 170,
"y": 80,
"wires": [
[
"8fb41530.5ab9d8"
]
]
},
{
"id": "b7be7b4d.1f36a8",
"type": "signalk-subscribe",
"z": "3332bda9.e31492",
"name": "",
"mode": "sendAll",
"flatten": true,
"context": "vessels.self",
"path": "test",
"source": "",
"period": 1000,
"x": 160,
"y": 160,
"wires": [
[
"8a090f94.4a5bc"
]
]
},
{
"id": "f362dc99.127a6",
"type": "debug",
"z": "3332bda9.e31492",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 610,
"y": 240,
"wires": []
},
{
"id": "f6a5a98c.f877f8",
"type": "switch",
"z": "3332bda9.e31492",
"name": "TopicSelect",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "test",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 390,
"y": 240,
"wires": [
[
"f362dc99.127a6"
]
]
},
{
"id": "aa246c17.01a46",
"type": "signalk-on-delta",
"z": "3332bda9.e31492",
"name": "",
"context": "vessels.self",
"flatten": true,
"x": 160,
"y": 240,
"wires": [
[
"f6a5a98c.f877f8"
]
]
},
{
"id": "8a090f94.4a5bc",
"type": "debug",
"z": "3332bda9.e31492",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 610,
"y": 160,
"wires": []
}
]
Thanks a lot.
Max