node-red-contrib-sun-position
node-red-contrib-sun-position copied to clipboard
lastDayofMonth
I would like to have some help how to configure the $getLastDayOfMonth(param1,[param2], [param3]) helper with the current year and the current month.
Naturally not with fixed values.
Since I am not that familiar with JSONATA Functions, I would appreciate some help!
Thanks
any idea?
I have tried this:
[
{
"id": "707224b2daa2c32b",
"type": "debug",
"z": "33667947.7eff86",
"name": "debug 16",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1020,
"y": 1100,
"wires": []
},
{
"id": "fd6d5145b176d824",
"type": "time-inject",
"z": "33667947.7eff86",
"name": "",
"nameInt": "jsonata Ausdr.",
"positionConfig": "a4ed43d2.4f5588",
"props": [
{
"p": "",
"pt": "msgPayload",
"v": "$getLastDayOfMonth(2023, 10, 1)",
"vt": "jsonata",
"o": "",
"oT": "none",
"oM": "60000",
"f": 0,
"fS": 0,
"fT": "Millisekunden UNIX-Zeit",
"fI": "0",
"next": true,
"days": "",
"months": "",
"onlyOddDays": false,
"onlyEvenDays": false
},
{
"p": "",
"pt": "msgTopic",
"v": "",
"vt": "str",
"o": "",
"oT": "none",
"oM": "60000",
"f": 0,
"fS": 0,
"fT": "Millisekunden UNIX-Zeit",
"fI": "0",
"next": false,
"days": "",
"months": "",
"onlyOddDays": false,
"onlyEvenDays": false
}
],
"injectTypeSelect": "none",
"intervalCount": 1,
"intervalCountType": "num",
"intervalCountMultiplier": 60000,
"time": "",
"timeType": "entered",
"offset": 0,
"offsetType": "none",
"offsetMultiplier": 60000,
"timeEnd": "",
"timeEndType": "entered",
"timeEndOffset": 0,
"timeEndOffsetType": "none",
"timeEndOffsetMultiplier": 60000,
"timeDays": "*",
"timeOnlyOddDays": false,
"timeOnlyEvenDays": false,
"timeMonths": "*",
"timedatestart": "",
"timedateend": "",
"property": "",
"propertyType": "none",
"propertyCompare": "true",
"propertyThreshold": "",
"propertyThresholdType": "num",
"timeAlt": "",
"timeAltType": "entered",
"timeAltDays": "*",
"timeAltOnlyOddDays": false,
"timeAltOnlyEvenDays": false,
"timeAltMonths": "*",
"timeAltOffset": 0,
"timeAltOffsetType": "none",
"timeAltOffsetMultiplier": 60000,
"once": false,
"onceDelay": 0.1,
"recalcTime": 2,
"x": 730,
"y": 1140,
"wires": [
[
"707224b2daa2c32b"
]
]
},
{
"id": "a4ed43d2.4f5588",
"type": "position-config",
"name": "Home",
"isValide": "true",
"longitude": "0",
"latitude": "0",
"angleType": "deg",
"timeZoneOffset": 99,
"timeZoneDST": 0,
"stateTimeFormat": "3",
"stateDateFormat": "12"
}
]
The debug view shows this:
"Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback. This will not be optional in Node-RED 4.0. Please identify the node from the following stack and check for an update on npm. If none is available, please notify the node author."
and
Error
at Object.evaluateJSONataExpression (/usr/local/addons/redmatic/lib/node_modules/node-red/node_modules/@node-red/util/lib/util.js:775:18)
at positionConfigurationNode.getPropValue (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-sun-position/nodes/position-config.js:1258:39)
at positionConfigurationNode.getOutDataProp (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-sun-position/nodes/position-config.js:845:25)
at timeInjectNode.node.prepOutMsg (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-sun-position/nodes/time-inject.js:603:49)
at timeInjectNode._inputCallback (/usr/local/addons/redmatic/var/node_modules/node-red-contrib-sun-position/nodes/time-inject.js:880:27)
at /usr/local/addons/redmatic/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26
at Object.trigger (/usr/local/addons/redmatic/lib/node_modules/node-red/node_modules/@node-red/util/lib/hooks.js:166:13)
at timeInject...
and the debug-node shows im msg.payload:
Mon Nov 27 2023 00:00:00 GMT+0100 (GMT+01:00)
Any idea?