"Search" and how good it is/n't. I'm stuck

Folks, I nearly posted the other day and didn't because I nearly shot myself in the foot with the question I was about to ask.

This is (maybe) a better worded version.

Though I am not 100% sure there seems to be something happening at 05:00 (within a minute) daily.

This problem was not quite at the level of needing to be fixed but was annoying.

I would get a report that at 05:00 (local) the WAP would go down then come back.

ITMT, I had other problems and was working on them.
Progress on those was made and this problem seemed to stop. (Weird)

So going further down the track of the other problem I got things fixed. Not sure about that, but....

So last night was the first time all the other problem's problems should have been fixed.
I got up and the problem (the one on which I was working later on) did seem to now be working.

But it was indicating the first (bigger) problem of the WAP going down.

I looked at the logs (mine, not system) and though the WAP hadn't gone down, there were reports shown at 05:00 (within a couple of minutes) a problem had happened.
(Edit) Sorry, it supposedly did.)

SOMEWHERE I know (or am very suspicious) I have a delay node that delays a message by 5 hours.

How can I find this node easily?

Searching for 5 is just painful. As is searching for delay.

If I was 5 hours 25 minutes it would be a lot easier - as I discovered yesterday.
As the node doesn't support that in that way, I have to make it .... 325 minutes.
325 is a bit easier to find than 5.

Any tricks I can use to find this delay node?

Try searching for type:delay 5

1 Like

Thanks.

That reduced the results shown, but it still seems open to ambiguity.

But it did help find said node.

Ok, not shown in that list, I found the node.

But picking another one which was shown....

I'm not sure where the 5 comes into the equation.

NR 1.3.5 (Sorry)

You could use a flow to find all delay nodes set to 5 hours:

[
    {
        "id": "a531e868a7ed264e",
        "type": "tab",
        "label": "Flow 4",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "12779a7f48341b48",
        "type": "file in",
        "z": "a531e868a7ed264e",
        "name": "",
        "filename": "/home/pi/.node-red/flows_GlassPi.json",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 330,
        "y": 80,
        "wires": [
            [
                "33f178bf3eb192bb"
            ]
        ]
    },
    {
        "id": "33f178bf3eb192bb",
        "type": "json",
        "z": "a531e868a7ed264e",
        "name": "",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 550,
        "y": 80,
        "wires": [
            [
                "4493558531e4c276"
            ]
        ]
    },
    {
        "id": "e88685b22d44162a",
        "type": "inject",
        "z": "a531e868a7ed264e",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 100,
        "y": 80,
        "wires": [
            [
                "12779a7f48341b48"
            ]
        ]
    },
    {
        "id": "09e583bb417767c1",
        "type": "debug",
        "z": "a531e868a7ed264e",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 830,
        "y": 80,
        "wires": []
    },
    {
        "id": "4493558531e4c276",
        "type": "function",
        "z": "a531e868a7ed264e",
        "name": "",
        "func": "var msg1 = {};\nfor (var i = 0; i < msg.payload.length; i++) {\n    if (msg.payload[i].type == \"delay\" & msg.payload[i].timeout == \"5\" & msg.payload[i].timeoutUnits == \"hours\"){\n        msg1.payload = msg.payload[i];\n        node.send(msg1);\n    }\n}\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 680,
        "y": 80,
        "wires": [
            [
                "09e583bb417767c1"
            ]
        ]
    }
]
1 Like

That is cute.

Thanks.

I have saved that and may use it in the future if/when I need to do such tricky searches.

I'll just have to learn the syntax for the searching. But it works. :wink:

As a guess, the node's id has a 5 in it

You are probably right.

It is just that fact blurs the line between useful searching and not useful.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.