[
{
"id": "b76bac04bae58859",
"type": "tibber-data",
"z": "916e1a31b235314f",
"name": "",
"active": true,
"apiEndpointRef": "8a80f84f.0cbd98",
"queryName": "getCurrentEnergyPrice",
"homeId": "",
"energyResolution": "HOURLY",
"lastCount": 10,
"x": 710,
"y": 200,
"wires": [
[
"527c76b98e64bd93"
]
]
},
{
"id": "527c76b98e64bd93",
"type": "change",
"z": "916e1a31b235314f",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.total",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 900,
"y": 200,
"wires": [
[
"19d6db953848fe43"
]
]
},
{
"id": "ff8fe8efde48e044",
"type": "debug",
"z": "916e1a31b235314f",
"name": "Timepris ",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1520,
"y": 360,
"wires": []
},
{
"id": "19d6db953848fe43",
"type": "calculator",
"z": "916e1a31b235314f",
"name": "",
"inputMsgField": "payload",
"outputMsgField": "payload",
"operation": "mult",
"constant": "100",
"round": false,
"decimals": 0,
"x": 1080,
"y": 200,
"wires": [
[
"fb673cbd43be0041"
]
]
},
{
"id": "fb673cbd43be0041",
"type": "join",
"z": "916e1a31b235314f",
"name": "",
"mode": "custom",
"build": "array",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "3",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 610,
"y": 360,
"wires": [
[
"df3839bb8411426e"
]
]
},
{
"id": "df3839bb8411426e",
"type": "calculator",
"z": "916e1a31b235314f",
"name": "",
"inputMsgField": "payload",
"outputMsgField": "payload",
"operation": "sum",
"constant": "",
"round": false,
"decimals": 0,
"x": 730,
"y": 360,
"wires": [
[
"ab0fa8af9b21ba6e"
]
]
},
{
"id": "ab0fa8af9b21ba6e",
"type": "calculator",
"z": "916e1a31b235314f",
"name": "",
"inputMsgField": "payload",
"outputMsgField": "payload",
"operation": "round",
"constant": "",
"round": true,
"decimals": 0,
"x": 920,
"y": 360,
"wires": [
[
"3ba0492845fb143d"
]
]
},
{
"id": "bb7c54c590d49062",
"type": "cronplus",
"z": "916e1a31b235314f",
"name": "Effektledd/fastpris jan-mars/april-des",
"outputField": "payload",
"timeZone": "",
"persistDynamic": false,
"commandResponseMsgOutput": "output2",
"outputs": 2,
"options": [
{
"name": "Januar til mars",
"topic": "schedule1",
"payloadType": "num",
"payload": "9.91",
"expressionType": "cron",
"expression": "0 1/1 0-23 * 1-3 * *",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
},
{
"name": "April til desember",
"topic": "schedule2",
"payloadType": "num",
"payload": "16.41",
"expressionType": "cron",
"expression": "0 1/1 0-23 * 4-12 *",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 490,
"y": 540,
"wires": [
[
"fb673cbd43be0041"
],
[]
]
},
{
"id": "1a8371d7bfb189bc",
"type": "cronplus",
"z": "916e1a31b235314f",
"name": "Timepris",
"outputField": "payload",
"timeZone": "",
"persistDynamic": false,
"commandResponseMsgOutput": "output1",
"outputs": 1,
"options": [
{
"name": "schedule1",
"topic": "schedule1",
"payloadType": "default",
"payload": "",
"expressionType": "cron",
"expression": "0 * * * * * *",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 260,
"y": 200,
"wires": [
[
"b76bac04bae58859"
]
]
},
{
"id": "1a26cd6e33e1ba42",
"type": "cronplus",
"z": "916e1a31b235314f",
"name": "Nettleie hverdag 6-22",
"outputField": "payload",
"timeZone": "",
"persistDynamic": false,
"commandResponseMsgOutput": "output1",
"outputs": 1,
"options": [
{
"name": "schedule1",
"topic": "schedule1",
"payloadType": "num",
"payload": "20",
"expressionType": "cron",
"expression": "0 0/1 6-21 * * 1-5 * ",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 540,
"y": 240,
"wires": [
[
"fb673cbd43be0041"
]
]
},
{
"id": "c70faf7abb290bb8",
"type": "cronplus",
"z": "916e1a31b235314f",
"name": "Nettleie kveld",
"outputField": "payload",
"timeZone": "",
"persistDynamic": false,
"commandResponseMsgOutput": "output1",
"outputs": 1,
"options": [
{
"name": "schedule1",
"topic": "schedule1",
"payloadType": "num",
"payload": "11.2",
"expressionType": "cron",
"expression": "0 * 22-23 * * 1-5 *",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 440,
"y": 300,
"wires": [
[
"fb673cbd43be0041"
]
]
},
{
"id": "5d731bad5486400f",
"type": "cronplus",
"z": "916e1a31b235314f",
"name": "Nettleie natt",
"outputField": "payload",
"timeZone": "",
"persistDynamic": false,
"commandResponseMsgOutput": "output1",
"outputs": 1,
"options": [
{
"name": "schedule1",
"topic": "schedule1",
"payloadType": "num",
"payload": "11.2",
"expressionType": "cron",
"expression": "0 * 0-05 * * 1-5 *",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 430,
"y": 360,
"wires": [
[
"fb673cbd43be0041"
]
]
},
{
"id": "5b77f39cf1f5fe36",
"type": "cronplus",
"z": "916e1a31b235314f",
"name": "Nettleie helg",
"outputField": "payload",
"timeZone": "",
"persistDynamic": false,
"commandResponseMsgOutput": "output1",
"outputs": 1,
"options": [
{
"name": "schedule1",
"topic": "schedule1",
"payloadType": "num",
"payload": "11.2",
"expressionType": "cron",
"expression": "0 * 0-23 * * 6-7 *",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 430,
"y": 420,
"wires": [
[
"fb673cbd43be0041"
]
]
},
{
"id": "4034386af776a54d",
"type": "cronplus",
"z": "916e1a31b235314f",
"name": "Nettleie Holidays",
"outputField": "payload",
"timeZone": "",
"persistDynamic": false,
"commandResponseMsgOutput": "output1",
"outputs": 1,
"options": [
{
"name": "schedule1",
"topic": "topic1",
"payloadType": "num",
"payload": "11.2",
"expressionType": "cron",
"expression": "0 * * * * * *",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 450,
"y": 480,
"wires": [
[
"fb673cbd43be0041"
]
]
},
{
"id": "64f5552a704760b2",
"type": "modbus-write",
"z": "916e1a31b235314f",
"name": "",
"showStatusActivities": false,
"showErrors": false,
"unitid": "",
"dataType": "MHoldingRegisters",
"adr": "1020",
"quantity": "2",
"server": "99dc7536a319fb39",
"emptyMsgOnFail": false,
"keepMsgProperties": false,
"x": 1320,
"y": 360,
"wires": [
[
"ff8fe8efde48e044"
],
[]
]
},
{
"id": "137cd1765b45900a",
"type": "debug",
"z": "916e1a31b235314f",
"name": "Timepris med desimaler kroner",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 870,
"y": 540,
"wires": []
},
{
"id": "3ba0492845fb143d",
"type": "join",
"z": "916e1a31b235314f",
"name": "",
"mode": "custom",
"build": "array",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "2",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 1130,
"y": 360,
"wires": [
[
"64f5552a704760b2"
]
]
},
{
"id": "58902c1d819c1cea",
"type": "cronplus",
"z": "916e1a31b235314f",
"name": "Faste avgifter i dag",
"outputField": "payload",
"timeZone": "",
"persistDynamic": false,
"commandResponseMsgOutput": "output1",
"outputs": 1,
"options": [
{
"name": "schedule 1",
"topic": "topic1",
"payloadType": "num",
"payload": "10.2328767",
"expressionType": "cron",
"expression": "0 0/1 * * * * ",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 710,
"y": 620,
"wires": [
[
"9a982dd6adf64ac0"
]
]
},
{
"id": "9a982dd6adf64ac0",
"type": "change",
"z": "916e1a31b235314f",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "fasteavgifter",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 950,
"y": 620,
"wires": [
[
"c4d85df240c3dc66",
"3ba0492845fb143d"
]
]
},
{
"id": "c4d85df240c3dc66",
"type": "time-range-switch",
"z": "916e1a31b235314f",
"name": "",
"lat": "",
"lon": "",
"startTime": "00:00",
"endTime": "00:02",
"startOffset": 0,
"endOffset": 0,
"x": 1130,
"y": 620,
"wires": [
[],
[]
]
},
{
"id": "8a80f84f.0cbd98",
"type": "tibber-api-endpoint",
"feedUrl": "wss://api.tibber.com/v1-beta/gql/subscriptions",
"queryUrl": "https://api.tibber.com/v1-beta/gql",
"name": "Demo"
},
{
"id": "99dc7536a319fb39",
"type": "modbus-client",
"name": "",
"clienttype": "tcp",
"bufferCommands": true,
"stateLogEnabled": false,
"queueLogEnabled": false,
"tcpHost": "10.0.0.45",
"tcpPort": "1502",
"tcpType": "DEFAULT",
"serialPort": "/dev/ttyUSB",
"serialType": "RTU-BUFFERD",
"serialBaudrate": "9600",
"serialDatabits": "8",
"serialStopbits": "1",
"serialParity": "none",
"serialConnectionDelay": "100",
"unit_id": 2,
"commandDelay": 1,
"clientTimeout": 1000,
"reconnectOnTimeout": true,
"reconnectTimeout": 2000,
"parallelUnitIdsAllowed": true
}
]
So I have made this and put two values into a modbus node. It is important that these values do come in the same order each time. What can I do to get it right?
The values from the array now looks like this:
fasteavgifter : msg.payload : Object
object
value: array[2]
0: 30
1: 10.2328767
unitid: ""
fc: 16
address: 1020
quantity: "2"
messageId: "62cf3ca003dda59ee62a6954"