node-red-contrib-sun-position
node-red-contrib-sun-position copied to clipboard
How does Time Span work?
Describe the Problem Time Span not working as expected.
Expected behavior My interpretation of this node is that it'll pass a message if the time difference between two inputs meets the condition(s) set up in the node
Screenshots
[
{
"id": "94be75232aa288fc",
"type": "inject",
"z": "4a63be853b0e1366",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "str",
"x": 130,
"y": 140,
"wires": [
[
"1685fd5ef3a7d2b8"
]
]
},
{
"id": "122dcbe0c724054d",
"type": "debug",
"z": "4a63be853b0e1366",
"name": "debug 3",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 640,
"y": 140,
"wires": []
},
{
"id": "1685fd5ef3a7d2b8",
"type": "time-span",
"z": "4a63be853b0e1366",
"outputs": 2,
"name": "",
"positionConfig": "9ed354dbe9ad13b2",
"operand1": "",
"operand1Type": "msgPayload",
"operand1Format": "0",
"operand1Offset": 0,
"operand1OffsetType": "none",
"operand1OffsetMultiplier": 60000,
"operand2": "",
"operand2Type": "msgPayload",
"operand2Format": "0",
"operand2Offset": 0,
"operand2OffsetType": "none",
"operand2OffsetMultiplier": 60000,
"rules": [
{
"operator": "3",
"operatorText": "> (greater)",
"operandType": "num",
"operandValue": "1",
"multiplier": "1000"
}
],
"checkall": "true",
"results": [
{
"p": "",
"pt": "msgPayload",
"v": "",
"vt": "timespan",
"o": "",
"oT": "none",
"oM": "60000",
"fTs": 1,
"fTsS": 1,
"fTsT": "seconds",
"fTsI": "1",
"f": 0,
"fS": 0,
"fT": "UNIX timestamp (ms)",
"fI": "0",
"next": false,
"days": "*",
"months": "*",
"onlyEvenDays": false,
"onlyOddDays": false,
"onlyEvenWeeks": false,
"onlyOddWeeks": false
}
],
"x": 380,
"y": 140,
"wires": [
[
"122dcbe0c724054d"
],
[]
]
},
{
"id": "9ed354dbe9ad13b2",
"type": "position-config",
"name": "Home",
"isValide": "true",
"longitude": "0",
"latitude": "0",
"angleType": "deg",
"timeZoneOffset": "99",
"timeZoneDST": "0",
"stateTimeFormat": "3",
"stateDateFormat": "12",
"contextStore": ""
}
]
My expectation is that this node will output a message if two injections are more than one second apart, this does not seem to be the case
System information (please complete the following information):
- Version 2.1.1
- Node-Red Version 3.0.2