GPIO is showing OK not the pin state

I have 4 GPIO pins that node red on my RPi 3B+ is reading. Three of them show green and '0' a second after deploy. One reads 'ok' in yellow.

I can press a test button on my sensor, which rf communicates to a base station. The base station correctly raises its output, the GPIO input. I can watch this happening in terminal with 'watch raspi-gpio get 2-25'. So I know the Rpi is properly connected to the sensor and the RPi OS is correct.

I can move the sensor to a different GPIO pin and the problem follows.

The GPIO node does not send a message when the pin changes state. It just shows 'ok' in yellow.

I tested one of the other sensor inputs and the base station to RPi to node red works properly.

As far as I know, on my previous automation system, which used to run on this Rpi, all of the sensor and base station worked properly.

Any idea what this is?

  1. What version of node-red and node.js are you running (see the startup log to find out)
  2. What OS are you running on your pi?
  3. What sensor are you using?
  4. What GPIO pins are you using?
  5. Can you provide a sketch of your setup?

I'm confused about your description You say you have a sensor that communicated to a base station (the pi?) using RF but then you say you can move the sensor to another GPIO pin so I can't understand what your setup is,

Also can you export your flow and attach it to a reply.

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

You can edit and correct your post by clicking the pencil :pencil2: icon.

See this post for more details - How to share code or flow json

Also what does it show if the wire to the pin is disconnected? Do the other pins do the same?
Show us how you have configured the pin in node-red.

System information:
Node-RED v4.0.8
Node.js v20.18.2
Linux 6.6.51+rpt-rpi-v8 arm64 LE
Debian GNU/Linux 12 (bookworm)

The sensor is a Guardline.

I am using GPIO 27 (pin 13), 17 (pin 11), 22 (pin 15), 23 (pin 16). Also tried 18 (pin 12).

Also, the setup will work for at least 1 of the other 3 pins. The sensors connected to GPIO 22 pin 15 turned on its corresponding light.

@Colin
If I disconnect the wire, the GPIO input acts the same. It momentarily goes green, then goes yellow with 'ok'.

Pic of the page with all 4 flows

zone3 is the one that is not working. The other 3 work.

System graphic:

I copied the subflow that has the trouble pin onto another flow tab. I can post everything on the full tab, but there is some work in progress - none that is related to the trouble GPIO (no GPIO nodes anywhere else.

[
    {
        "id": "9306ae3430374912",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "6a7d692f8b46c4d6",
        "type": "time-range-switch",
        "z": "9306ae3430374912",
        "name": "Dark hours only",
        "lat": "34.829073",
        "lon": "-82.333088",
        "startTime": "sunsetStart",
        "endTime": "sunrise",
        "startOffset": 0,
        "endOffset": 0,
        "x": 440,
        "y": 160,
        "wires": [
            [
                "0c6ed4261dc5b054"
            ],
            []
        ]
    },
    {
        "id": "ab811ad1bbde8892",
        "type": "switch",
        "z": "9306ae3430374912",
        "name": "If motion",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "1",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 260,
        "y": 160,
        "wires": [
            [
                "6a7d692f8b46c4d6"
            ]
        ]
    },
    {
        "id": "0c6ed4261dc5b054",
        "type": "trigger",
        "z": "9306ae3430374912",
        "name": "Motion No-motion",
        "op1": "on",
        "op2": "off",
        "op1type": "str",
        "op2type": "str",
        "duration": "2",
        "extend": true,
        "overrideDelay": true,
        "units": "min",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 690,
        "y": 160,
        "wires": [
            [
                "2a88ef66466af4a2"
            ]
        ]
    },
    {
        "id": "71f10fbaf7f54942",
        "type": "rpi-gpio in",
        "z": "9306ae3430374912",
        "name": "zone3",
        "pin": "23",
        "intype": "tri",
        "debounce": "25",
        "read": false,
        "bcm": true,
        "x": 90,
        "y": 160,
        "wires": [
            [
                "ab811ad1bbde8892"
            ]
        ]
    },
    {
        "id": "2a88ef66466af4a2",
        "type": "debug",
        "z": "9306ae3430374912",
        "name": "to mqtt node",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 930,
        "y": 160,
        "wires": []
    }
]

Are you sure about the pin numbers ?

I thought so, but please explain.
I watched them change as I punched a test button on my sensors. The bad one was on 18/12 when I tested it. I switched to 27 later.

Have you tried swapping one of the sensors that work to the one that doesn't work to see if it reads correctly?

What happens if you swap the wires on the faiiling pin with a working pin? If the problem follows the wire then it is a hardware problem.

I suspect that you need to specify pull up or pull down with the resistor setting, and it is just down to the circuits in the sensor that it works with one wire and not another.

I have moved the corresponding base station wire to a different GPIO pin and the problem followed.
I have moved a known working wire to a previously not working pin and it works fine.

I measured with an o-scope the voltages on the problem pin and a good one. They behave the same. They are at 0 volts until my motion sensor base station sends voltage, at which time they go to 3V. The amount and type of noise on both appears the same, though I could be missing something.

Also, GPIO 23 is already configured with a pull down resistor.

And Rpi terminal shows correct operation (GPIO 23 here). I would hope node-red is taking its information from some variable in RPi's operating memory, which means it should work.

The problem pin is not being used, but I would like to use it in the future. I am missing what is different.

Did you swap two wires, one working and one not, without changing anything else, and see what happens? That will tell you whether the problem is something to do with the signal on the wire, or something on the pi.

The wires are soldered onto the base station, so those cannot move.

I suppose it is an issue at the base station, so I will spend time on that.

Node-Red is seeing something that the RPi is not showing.

Swap them over at the pi.