# New MCP23017 PCF8574 All-In-One node

**URL:** <https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087>\
**Category:** Developing Nodes\
**Created:** [19 March 2022 19:43 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087 "2022-03-19T19:43:30Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [9 June 2022 09:00 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/21 "2022-06-09T09:00:56Z")

</div>

For JavaScript, it is more that you shouldn't start with an upper case letter because common convention uses that for Class names.

I used to use type prefixes but it can get in the way, especially when needing to refactor. These days I make better use of JSDoc comments and VScode's clever capabilities for using those along with tslint to make sense of object types.

---

<div class="post-metadata">

**Author:** ![PizzaProgram](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pizzaprogram/32/19431_2.png) [@PizzaProgram](https://discourse.nodered.org/u/PizzaProgram)\
**Post date:** [7 September 2022 10:43 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/22 "2022-09-07T10:43:36Z")

</div>

New version is available on NPM.  
_(Interrupt problems were reported, so changed initialization.)_  
Interrupt is still experimental, testing needed.

---

<div class="post-metadata">

**Author:** ![PizzaProgram](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pizzaprogram/32/19431_2.png) [@PizzaProgram](https://discourse.nodered.org/u/PizzaProgram)\
**Post date:** [10 April 2023 16:24 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/23 "2023-04-10T16:24:35Z")

</div>

If anyone interested on testing an upgraded version (because I don't have time currently)  
Joe has made an extended AIO to support even more chip types + reworked the whole html part of the node to prevent choosing same port for other chips:  
[Github link...](https://github.com/Joe-ab1do/MCP23017-PCF8574-AIO)

I do not know, if it has an NPM or not yet,  
but I think it is necessary to download and install it from Github directly.

## Important discovery is that:

MCP23017 chip has a construction error, which makes it **unsafe to use the last 2 ports for inputs!**  
(maybe it was 7. + 15. ports ? ) please check the new upgraded manual for the chip!

---

<div class="post-metadata">

**Author:** ![Joe-AB1DO](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@Joe-AB1DO](https://discourse.nodered.org/u/Joe-AB1DO)\
**Post date:** [7 September 2023 17:53 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/24 "2023-09-07T17:53:38Z")

</div>

Thanks to the patience and many fruitful discussions this past year with @PizzaProgram I have been able to significantly enhance and streamline his code. What set me on this path is:

- I have a relay board with two MCP23008 chips that I needed to drive. Most if not all nodes that I found for this chip use a compiled library to set up and communicate with the chip itself. Although this works it theory, I found many to no longer work, or compiled on a 32 bit operating system. Without access to the source code it is impossible to change anything.

- This code uses a config node, which makes it easily accessible and as such an integrated part of NR. Whereas the compiled libraries were all setup to poll inputs, the config node allowed for polling only, interrupts only, or a combination of both.

- By directly selecting the chip type I was able to expand the node to use MCP23008, MCP23017, PCF8574(A) and PCF8575 i2c port expanders. Further details on the many changes and enhancements can be found in the change log section of the README.md file.

I have now published the node to npm. It does not show up in the palette manager yet, but in the mean time can be found [here](https://www.npmjs.com/package/@joe-ab1do/mcp-pcf-aio). The node has been extensively tested on all chip types using polling and/or interrupts. Interrupts are rock solid - tested on each chip type with a combination of input and output pins on a chip.

Finally I'd like to thank all on this forum who helped me along the way, without whom I would have still been fumbling in the dark. It's been quite the learning experience!

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [8 September 2023 00:03 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/25 "2023-09-08T00:03:19Z")

</div>

- Read values by regularly polling them.
- Read values when an interrupt occurs. Interrupts will occur when an input value changes from its previous value.
- Read values using a combination of both polling and interrupts.

To me at least the middle option seems to be the obvious choice, what is the use case for the other two please ?

---

<div class="post-metadata">

**Author:** ![Joe-AB1DO](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@Joe-AB1DO](https://discourse.nodered.org/u/Joe-AB1DO)\
**Post date:** [8 September 2023 15:40 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/26 "2023-09-08T15:40:17Z")

</div>

I agree and I like using interrupts only as well. Depending on the use case (and I certainly don't profess awareness of all use cases) polling might be preferable, e.g. saves you having to run an extra wire to a GPIO port. Or all GPIO ports may already be in use, or you want to make absolutely sure an input change was indeed captured, or....

Also, when using interrupts you cannot software debounce a switch/relay contact. This does not seem to be an issue and if it is you can add a trigger node to the output of the `mcp pcf in` node connected to the pin the switch is connected to.

The key is the user has the option to choose the best scenario for their situation.

---

<div class="post-metadata">

**Author:** ![PizzaProgram](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pizzaprogram/32/19431_2.png) [@PizzaProgram](https://discourse.nodered.org/u/PizzaProgram)\
**Post date:** [8 September 2023 16:10 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/27 "2023-09-08T16:10:27Z")

</div>

^ totally agree with @Joe-AB1DO

Also it is wise to use a timer with "long period" (for example every 1000ms) as safety next to interrupt, so if anything is wrong with:

- the interrupt system
- the wiring (no dampener resistors present)
- sparking, lightning, etc.

There is still a "delayed correction" to read the final state of the pin.

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [8 September 2023 23:19 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/28 "2023-09-08T23:19:52Z")

</div>

GPA7 and GPB7 are for output only

[https://www.microchip.com/mymicrochip/filehandler.aspx?documentid=390b641b-9f77-4421-80f7-7b13266491de](https://www.microchip.com/mymicrochip/filehandler.aspx?documentid=390b641b-9f77-4421-80f7-7b13266491de)

---

<div class="post-metadata">

**Author:** ![Joe-AB1DO](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@Joe-AB1DO](https://discourse.nodered.org/u/Joe-AB1DO)\
**Post date:** [9 September 2023 16:00 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/29 "2023-09-09T16:00:58Z")

</div>

Well that was Microchip's way of dealing with the issue that was raised by a customer of theirs, but it turns out that the specific issue occurred in pretty rare situations only. See the [discussion](https://forum.microchip.com/s/topic/a5C3l000000MS5oEAG/t338048) on their forum for the details. Anyway, Microchip's response was to modify the specsheet (rev D) by adding a note to that effect on page 18. Earlier versions of the specsheet do not have this note.

However, that being said, it turns out that in most cases GPA7 and GPB7 can actually be used successfully as inputs without issue. Either way, the node's chip configuration panel defaults to not allowing these ports as inputs to comply with the specsheet, but at the same time gives the user the option to override this restriction. So again, it is up to you. A quick search shows that over the years the ports have been used successfully as inputs without fail.

---

<div class="post-metadata">

**Author:** ![hafizjafri](https://avatars.discourse-cdn.com/v4/letter/h/22d042/32.png) [@hafizjafri](https://discourse.nodered.org/u/hafizjafri)\
**Post date:** [13 September 2023 08:14 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/30 "2023-09-13T08:14:40Z")

</div>

Good day, fellow members. I am seeking assistance with a particular node testing scenario. It appears that I can only activate one output at a time for the node. If I activate another output, the previous one turns off. I am using the MCP23017. Is this behavior intended as a feature, or could it be a potential bug?

---

<div class="post-metadata">

**Author:** ![Joe-AB1DO](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@Joe-AB1DO](https://discourse.nodered.org/u/Joe-AB1DO)\
**Post date:** [13 September 2023 15:46 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/31 "2023-09-13T15:46:05Z")

</div>

It is certainly not intended and in all my testing of this node I have never come across that kind of behavior. Can you describe in some more detail how you have set everything up? Specifically:

- What hardware are you running the node on, version of nodejs, version of node-red, version of npm, etc.

- Ideally send a json export of your flow. I still have my test bench set up here, so could import and double check. FYI, I am using a Raspberry Pi.

- Otherwise images of the flow, the configuration panels of the output nodes as well as the configuration panel of the chip. Are you polling or using interrupts?

---

<div class="post-metadata">

**Author:** ![hafizjafri](https://avatars.discourse-cdn.com/v4/letter/h/22d042/32.png) [@hafizjafri](https://discourse.nodered.org/u/hafizjafri)\
**Post date:** [13 September 2023 17:07 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/32 "2023-09-13T17:07:05Z")

</div>

I'm running the node on a Banana Pi M64 with the following system specifications:

- Operating System: Ubuntu 22.04.3 LTS
- Kernel Version: 4.4.89
- Node.js Version: v20.6.1
- npm Version: 10.1.0
- Node-RED Version: 3.1.0

Regarding the node, I can confirm that the "node-red-contrib-mcp23017chip" from WillHey is working perfectly for my setup. If you have any further questions or need more details, please feel free to ask.

```auto
[
    {
        "id": "8be4f97c44d81f4c",
        "type": "tab",
        "label": "test",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "4b2f28abdf25c766",
        "type": "mcp pcf chip",
        "chipType": "MCP23017",
        "busNum": "1",
        "addr": "0X20",
        "mcpInputOverride": true,
        "interval": "100",
        "startAllHIGH": false
    },
    {
        "id": "ffc5d87038a814b5",
        "type": "mcp pcf out",
        "z": "8be4f97c44d81f4c",
        "name": "relay_00",
        "chip": "4b2f28abdf25c766",
        "bitNum": "0",
        "invert": false,
        "legacy": false,
        "x": 440,
        "y": 80,
        "wires": []
    },
    {
        "id": "2aafa068b494d3e8",
        "type": "mcp pcf out",
        "z": "8be4f97c44d81f4c",
        "name": "relay_01",
        "chip": "4b2f28abdf25c766",
        "bitNum": "1",
        "invert": false,
        "legacy": false,
        "x": 440,
        "y": 120,
        "wires": []
    },
    {
        "id": "896f2b37003e192e",
        "type": "inject",
        "z": "8be4f97c44d81f4c",
        "name": "on_relay_00",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 150,
        "y": 80,
        "wires": [
            [
                "77f0a5fe2e7e547e"
            ]
        ]
    },
    {
        "id": "f5f152ce9b21d8f1",
        "type": "inject",
        "z": "8be4f97c44d81f4c",
        "name": "off_relay_00",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "false",
        "payloadType": "bool",
        "x": 150,
        "y": 120,
        "wires": [
            [
                "68a8b15105aed91e"
            ]
        ]
    },
    {
        "id": "68a545d60ab4f464",
        "type": "inject",
        "z": "8be4f97c44d81f4c",
        "name": "on_relay_01",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 150,
        "y": 180,
        "wires": [
            [
                "f79d083d88911e7d"
            ]
        ]
    },
    {
        "id": "0d39391d1c479958",
        "type": "inject",
        "z": "8be4f97c44d81f4c",
        "name": "off_relay_01",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "false",
        "payloadType": "bool",
        "x": 150,
        "y": 220,
        "wires": [
            [
                "44b01d0b0392d001"
            ]
        ]
    },
    {
        "id": "77f0a5fe2e7e547e",
        "type": "link out",
        "z": "8be4f97c44d81f4c",
        "name": "relay_00",
        "mode": "link",
        "links": [
            "9068ab90c322961f"
        ],
        "x": 255,
        "y": 80,
        "wires": []
    },
    {
        "id": "9068ab90c322961f",
        "type": "link in",
        "z": "8be4f97c44d81f4c",
        "name": "relay_01",
        "links": [
            "68a8b15105aed91e",
            "77f0a5fe2e7e547e"
        ],
        "x": 345,
        "y": 80,
        "wires": [
            [
                "ffc5d87038a814b5"
            ]
        ]
    },
    {
        "id": "68a8b15105aed91e",
        "type": "link out",
        "z": "8be4f97c44d81f4c",
        "name": "relay_00",
        "mode": "link",
        "links": [
            "9068ab90c322961f"
        ],
        "x": 255,
        "y": 120,
        "wires": []
    },
    {
        "id": "f79d083d88911e7d",
        "type": "link out",
        "z": "8be4f97c44d81f4c",
        "name": "relay_01",
        "mode": "link",
        "links": [
            "01bea90b9fa4d014"
        ],
        "x": 255,
        "y": 180,
        "wires": []
    },
    {
        "id": "01bea90b9fa4d014",
        "type": "link in",
        "z": "8be4f97c44d81f4c",
        "name": "relay_01",
        "links": [
            "f79d083d88911e7d",
            "44b01d0b0392d001"
        ],
        "x": 345,
        "y": 120,
        "wires": [
            [
                "2aafa068b494d3e8"
            ]
        ]
    },
    {
        "id": "44b01d0b0392d001",
        "type": "link out",
        "z": "8be4f97c44d81f4c",
        "name": "relay_01",
        "mode": "link",
        "links": [
            "01bea90b9fa4d014"
        ],
        "x": 255,
        "y": 220,
        "wires": []
    }
]

```

---

<div class="post-metadata">

**Author:** ![Joe-AB1DO](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@Joe-AB1DO](https://discourse.nodered.org/u/Joe-AB1DO)\
**Post date:** [13 September 2023 18:16 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/33 "2023-09-13T18:16:34Z")

</div>

I imported your flow (thanks for sending) and it works as intended. My MCP23017 is on i2c-3, so all I did was change the bus number and it works perfectly:

If I click on **on\_relay\_00** inject node and then on **on\_relay\_01** inject node, both **relay\_00** and **relay\_01** output nodes are on, as indicated by the status indicator:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/8/88e8d5989ff23d6f7e6c5d23882a864fd816b608.png)

So you are saying if you first turn **relay\_00** on, then **relay\_01** , **relay\_00** turns off? If so, that's not what I'm seeing here. As mentioned, I am running RPi 4B:

- OS: raspios Bullseye 64-bit
- Node.js version: v18.17.1
- npm version: v9.6.7
- node-RED Version: 3.1.0

So other than the actual hardware and linux version, not too different. One other thing you could try:

- Open a terminal, go to the directory where you have node-red installed (usually ~/.node-red) and enter **node-red-restart** to restart the server. Then refresh the browser window.
- In the same node-red directory enter **node-red-log** : this is where the nodes output a detailed log. Starting with both output nodes off, when you click on the 2 inject nodes to turn the two output nodes on you should see something like this:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/0/50e9836c2533aec3d1942ec5989336c75fdb8502.png)

This shows that the two LSBs of **ip16** (pins 0 and 1) go from 00 to 01 to 11. Do you see anything different? If so, what?

BTW, in the terminal enter `^c` to exit the log.

---

<div class="post-metadata">

**Author:** ![Joe-AB1DO](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@Joe-AB1DO](https://discourse.nodered.org/u/Joe-AB1DO)\
**Post date:** [14 September 2023 15:07 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/34 "2023-09-14T15:07:48Z")

</div>

One more thing: you mentioned you were using "node-red-contrib-mcp23017chip" from WillHey  
before. Did you first remove that node (including the config node), node-red-restart and refresh the browser before installing @joe-ab1do/mcp\_pcf\_aio? If not, they might be interfering with each other. Just a thought...

If everything is working, can you please let me know and what you changed?

---

<div class="post-metadata">

**Author:** ![Joe-AB1DO](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@Joe-AB1DO](https://discourse.nodered.org/u/Joe-AB1DO)\
**Post date:** [3 October 2023 19:27 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/35 "2023-10-03T19:27:10Z")

</div>

Just published an updated version 3.1.2. See change log in ReadMe file for details.

If you experience an problem, please open an issue on github.

---

<div class="post-metadata">

**Author:** ![Joe-AB1DO](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@Joe-AB1DO](https://discourse.nodered.org/u/Joe-AB1DO)\
**Post date:** [23 October 2023 19:24 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/36 "2023-10-23T19:24:36Z")

</div>

Updated to version 3.2.0, which expands functionality of `msg.topic="any"` by allowing `msg.pin` to equal either a number identifying which port to set, or an array of numbers to set several ports simultaneously.

Includes updated help files and ReadMe file describing this increased functionality.

See change log in ReadMe file for more details.

---

<div class="post-metadata">

**Author:** ![range4200](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/range4200/32/77815_2.png) [@range4200](https://discourse.nodered.org/u/range4200)\
**Post date:** [19 May 2026 04:03 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/37 "2026-05-19T04:03:25Z")

</div>

Hello, I will check the Input state of all ports from a MCP23017 after deploying or restart. But I've noticed that the status isn't being read correctly. What could be causing this?  
I'm using a Raspberry Pi 4

---

<div class="post-metadata">

**Author:** ![PizzaProgram](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pizzaprogram/32/19431_2.png) [@PizzaProgram](https://discourse.nodered.org/u/PizzaProgram)\
**Post date:** [20 May 2026 00:16 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/38 "2026-05-20T00:16:29Z")

</div>

@range4200 Welcome to the forum. 🙂

I do not fully understand this part of your sentence:

> [@range4200](#):
>
> I will check the ...

Are You saying that:

1. Whenever you are starting or re-deploying the flow,
2. the status of the node is not showing immediately "green" ?

Questions:

- Is it normalising after a while?
- Do you get proper readings from the device?
- Is it set to continuous reading?

### Logs:

It would help a lot, if you export + copy your flow here, properly formatted.  
_(Or at least the selected MCP nodes)_

Also please enable "More Logs" checkbox, and copy the log here from your consol. (running `> node-red-log` if you have installed from script.)

---

<div class="post-metadata">

**Author:** ![range4200](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/range4200/32/77815_2.png) [@range4200](https://discourse.nodered.org/u/range4200)\
**Post date:** [20 May 2026 05:54 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/39 "2026-05-20T05:54:28Z")

</div>

Yes, exactly. I expect the input ports to be read automatically after a restart, not only when the input status changes.

Attached is an example flow. Currently, the “Door Locked” status is ON, but it isn't being read. It's only read when the status actually changes.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/a/aa75cee0f219ad28812edb343aec0a077cf39d0e.png)

```auto
[{"id":"3ddc0a611af2819b","type":"MCP PCF In","z":"ki_io_in_tab_v1","name":"22PB5 Tür verriegelt","chip":"87b553240fabf2a2","bitNum":"13","invert":false,"pullUp":true,"debounce":0,"onMsg":true,"offMsg":true,"x":1520,"y":1460,"wires":[["94852ffe09c6e580"]]},{"id":"61f287a5062704db","type":"MCP PCF In","z":"ki_io_in_tab_v1","name":"22PB7 Tür offen","chip":"87b553240fabf2a2","bitNum":"7","invert":false,"pullUp":true,"debounce":0,"onMsg":true,"offMsg":true,"x":1510,"y":1520,"wires":[["e7f878a0ba3a9b48"]]},{"id":"94852ffe09c6e580","type":"change","z":"ki_io_in_tab_v1","rules":[{"t":"set","p":"topic","to":"door_locked","tot":"str"}],"x":1740,"y":1460,"wires":[["c956f0fc45bf7105"]]},{"id":"e7f878a0ba3a9b48","type":"change","z":"ki_io_in_tab_v1","rules":[{"t":"set","p":"topic","to":"door_open","tot":"str"}],"x":1740,"y":1520,"wires":[["c956f0fc45bf7105"]]},{"id":"87b553240fabf2a2","type":"mcp_pcf_chip","busNum":"1","addr":"0x22","interval":"100","startAllHIGH":true}]

```

## LOG: MCP/PCF Timer is already running MCP/PCF This timer interval is already set. There is nothing to do. 20 May 07:49:00 - [error] [mcp23017chip:882646509be98fec] Error: EIO, Input/output error

> > > Initializing PCF8574 or MPC23017 Input node \>\> bitNum=13 pullUp=true invert=false id=3ddc0a611af2819b  
> > > MCP/PCF init-Bit started... Addr=34 bitNum=13 isInput=true pullUp=true startAllHigh=false LastState=-2  
> > > MCP First READ OK. A=10111100 B=1001111100000000 allStates=40892  
> > > MCP Input pullups=8320  
> > > OK. MCP/PCF Bit-initialization finished. Bus closed.  
> > > ...state update \>\> \_onOffState: 0 globalState= 1 Node\_id=3ddc0a611af2819b  
> > > MCP/PCF startChipTimer = 0100 ms  
> > > MCP/PCF Timer is already running  
> > > MCP/PCF This timer interval is already set. There is nothing to do.

* * *

> > > Initializing PCF8574 or MPC23017 Input node \>\> bitNum=7 pullUp=true invert=false id=61f287a5062704db  
> > > MCP/PCF init-Bit started... Addr=34 bitNum=7 isInput=true pullUp=true startAllHigh=false LastState=-2  
> > > MCP First READ OK. A=1000000 B=1001111100000000 allStates=40768  
> > > MCP Input pullups=8320  
> > > OK. MCP/PCF Bit-initialization finished. Bus closed.  
> > > ...state update \>\> \_onOffState: 0 globalState= 1 Node\_id=61f287a5062704db  
> > > MCP/PCF startChipTimer = 0100 ms  
> > > MCP/PCF Timer is already running  
> > > MCP/PCF This timer interval is already set. There is nothing to do.  
> > > 20 May 07:49:14 - [error] [function:search PID] TypeError: Cannot read properties of undefined (reading 'substring')  
> > > 20 May 07:49:14 - [error] [function:Check H Values] TypeError: Cannot read properties of undefined (reading 'substring')

---

<div class="post-metadata">

**Author:** ![PizzaProgram](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pizzaprogram/32/19431_2.png) [@PizzaProgram](https://discourse.nodered.org/u/PizzaProgram)\
**Post date:** [20 May 2026 10:33 UTC](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087/40 "2026-05-20T10:33:08Z")

</div>

> [@range4200](#):
>
> 20 May 07:49:14 - [error] [function:search PID] TypeError: Cannot read properties of undefined (reading 'substring')

It you are sending wrong PIN number to the MCP node, it can cause problems.  
You did not copy this function of yours, which is causing this error.

Also I must ask:

- Who's module did you install from these 3 ?

 ![kép](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/3/730df0f43d21939935104962cc6f2e5e0fc84a07.png)

I can talk only about my 2.3.8 version.  
@Joe-AB1DO rewrote the whole thing to his liking.

[Previous page](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087.md?page=1)

[Next page](https://discourse.nodered.org/t/new-mcp23017-pcf8574-all-in-one-node/60087.md?page=3)
