[FEAT] extend scripts env or answer option in Auto Responder
Hi Yeraze, thank you very much for the excellent product !
Is there any future plan of add answer option or extended env variables in Auto Responder? Something like SHORT_NODE_NAME and LONG_NODE_NAME :) FROM_NODE looks like very hard in message body
Thank you, Serge
Can you elaborate or share screenshots of what you're talking about? I thought these variables were already supported.
Hi, he's talking about these variables. https://meshmonitor.org/user-scripts.html#environment-variables
Yes, and some of these variables are already exposed to Auto-Respond scripts as documented here : https://meshmonitor.org/user-scripts.html#environment-variables
FROM_NODE returns the numeric node ID. For convenience, it would be nice to have variables like SHORT_NODE_NAME and LONG_NODE_NAME that would return values from the ShortName and LongName. Perhaps these could be retrieved using PARAM_* ?
On example if I need to add to answer in bash script something like this
FRENLY_NAME=$(curl -H "Accept: application/json" \
-H "Authorization: Bearer $API_TOKEN" \
"http://localhost:8080/api/v1/nodes/\!$FROM_NODE" | jq -r '.data | "\(.longName)(\(.shortName))"')
but i don't see jq inside docker container and need to add API_TOKEN
may be you can add all info from api/v1/nodes/!$FROM_NODE as env variables ?
FROM_NODE_INFO_NODENUM,
FROM_NODE_INFO_LONGNAME,
FROM_NODE_INFO_SHORTNAME,
...etc