# PCF8574P Chip via i2C

**URL:** https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449
**Category:** General
**Created:** [10 May 2020 21:10 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449 "2020-05-10T21:10:25Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![Askjerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/askjerry/32/19611_2.png) [@Askjerry](https://discourse.nodered.org/u/Askjerry)
#### Post date: [10 May 2020 21:10 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/1 "2020-05-10T21:10:25Z")

</div>

I have several **PCF8574P** interface chips, this is an i2c to 8 I/O pins. You can use them for input or output and I have had great success with them when I was programming in python.

I wanted to use them with Node Red, but I cannot seem to get a functional addition to the palette. I found: **node-red-contrib-pcf8574-cluster** but when I attempt to load it, it fails. I've tried by doing both the direct install and via the terminal... just doesn't work.

These are not part of an LCD, so those routines that send text won't help... I just want to be able to specify the address and then ideally... for the pins...

1. Read the whole 8-bits.
2. Write the whole 8-bits.
3. Read any single bit.
4. Write any single bit.

Unfortunately... I don't know how to turn my python into a palette object. Can anyone out there assist me??

If there is a generic i2C that you specify the chip parameters to... that would also be helpful and I could start there as I also use these..

**ADS1115** and/or **ADS1015** A/D converter -\> Found a module that works exclusively for that chip... and I was able to connect it to an SVG graphic gauge... so I have the ability to use that series.

**MCP23017** a 16-bit I/O chip. -\> I found an LCD object... but it appears that it can also address pins directly... so I'll experiment with that as well.

Obviously a generic i2c would be helpful as in theory I could use any chip.

Thanks!  
Jerry

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [10 May 2020 22:16 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/2 "2020-05-10T22:16:05Z")

</div>

Did you look at [these](https://flows.nodered.org/search?term=I2c&type=node&type=flow&page=2)?

---

<div class="post-metadata">

### Author: ![Askjerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/askjerry/32/19611_2.png) [@Askjerry](https://discourse.nodered.org/u/Askjerry)
#### Post date: [10 May 2020 23:10 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/3 "2020-05-10T23:10:27Z")

</div>

This one looked promising... failed to load.  
**# node-red-contrib-i2c**

It looks like it would have done exactly want I wanted too. ☹

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [10 May 2020 23:37 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/4 "2020-05-10T23:37:40Z")

</div>

Check permissions - also check out Peter Scargills blog - i am pretty sure a while ago there was lots on there about issues with i2c and RPi (and clones) and issues with permissions etc

Craig

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [10 May 2020 23:58 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/5 "2020-05-10T23:58:15Z")

</div>

> [@Askjerry](#):
>
> failed to load

What is the error? Did you raise an issue on the repo - could be a bug the Dev can fix.

---

<div class="post-metadata">

### Author: ![Askjerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/askjerry/32/19611_2.png) [@Askjerry](https://discourse.nodered.org/u/Askjerry)
#### Post date: [11 May 2020 01:10 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/6 "2020-05-11T01:10:29Z")

</div>

Still new here... not sure what a REPO is nor how to raise an issue.

The Raspberry Pi is a fresh install on a microSD card, i2c, serial, 1-wire, have been enabled. I successfully installed other palette objects, so that's not the problem.

As for the error... here is the ERROR LOG.  
[Error-Log.txt](https://discourse.nodered.org/uploads/short-url/4CTTFSbHIAMx3hdYyvuGhvOzQZk.txt) (49.0 KB)

I hope that helps.  
Jerry

---

<div class="post-metadata">

### Author: ![I\_iam](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/i_iam/32/21808_2.png) [@I\_iam](https://discourse.nodered.org/u/I_iam)
#### Post date: [13 May 2020 01:10 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/7 "2020-05-13T01:10:48Z")

</div>

Maybe this may help?

> [@Node-red-contrib-i2c fails to install](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/63):
>
> Have you checked the more detailed install debug log? Certainly that error doesn't really tell us much. What version of Rasbian are you using?

---

<div class="post-metadata">

### Author: ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)
#### Post date: [13 May 2020 01:21 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/8 "2020-05-13T01:21:21Z")

</div>

I have tried to install the I2C node as well, read the fails to install directions and never did get it in. Finally came to the decision if it was that much trouble I didn't want to use it as my application is fairly important and if that pi failed didn't want to jump through all the hoops to get another one running. And no didn't raise an issue as I went another direction.

---

<div class="post-metadata">

### Author: ![I\_iam](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/i_iam/32/21808_2.png) [@I\_iam](https://discourse.nodered.org/u/I_iam)
#### Post date: [13 May 2020 02:11 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/9 "2020-05-13T02:11:44Z")

</div>

I maybe going the same direction also!

---

<div class="post-metadata">

### Author: ![Askjerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/askjerry/32/19611_2.png) [@Askjerry](https://discourse.nodered.org/u/Askjerry)
#### Post date: [13 May 2020 02:42 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/10 "2020-05-13T02:42:11Z")

</div>

It looks like I will need to learn (or try to) how to create a palette object from some python code that I have which works. I was using wxGlade and/or an editor and Glade to write code before I discovered Node Red... so I have communicated with the chips.

I guess my next step is to see to to create a palette object.

If someone gets one working... please do let me know.

Thanks!

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [13 May 2020 08:16 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/11 "2020-05-13T08:16:09Z")

</div>

Or maybe post an issue/question on the repo? It would be good for the community if that node was fixed.

---

<div class="post-metadata">

### Author: ![Askjerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/askjerry/32/19611_2.png) [@Askjerry](https://discourse.nodered.org/u/Askjerry)
#### Post date: [13 May 2020 12:08 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/12 "2020-05-13T12:08:42Z")

</div>

Sorry to be such a nube... where is the repo?  
On the forum? from the Node page? Someplace else?  
**NODE:**

> **[node-red-contrib-pcf8574-cluster](https://flows.nodered.org/node/node-red-contrib-pcf8574-cluster)**
>
> Control each pin of a PCF8574/PCF8574A/PCF8574P I2C port expander IC with Node-RED ( ).

  
**CONTRIB:**  

> **[node-red-contrib-pcf8574-cluster](https://www.npmjs.com/package/node-red-contrib-pcf8574-cluster)**
>
> Control each pin of a PCF8574/PCF8574A/PCF8574P I2C port expander IC with Node-RED ( ).

I don't see any reference to "REPO" other than your comment.

I do see the author: [https://flows.nodered.org/user/dave.kasparov](https://flows.nodered.org/user/dave.kasparov)

I will see if there is a message link or email.

Thanks for the help.  
Jerry

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [13 May 2020 12:13 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/13 "2020-05-13T12:13:27Z")

</div>

REPO = repository = the GitHub repository ([https://github.com/david-kasparov/node-red-contrib-pcf8574-cluster](https://github.com/david-kasparov/node-red-contrib-pcf8574-cluster))

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [13 May 2020 12:14 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/14 "2020-05-13T12:14:32Z")

</div>

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

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/4/14063f1d343b809df620529b7b402d8726b243ec.png)

My apologies for not being clearer. As @zenofmud said - repo = repository.

---

<div class="post-metadata">

### Author: ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)
#### Post date: [13 May 2020 12:21 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/15 "2020-05-13T12:21:09Z")

</div>

Tried to raise issue and the site wouldn't let me log in or create a new account. Did read through the issues list though and it seems the install fail was raised a couple of times and his solution was to check a directory and if these folders weren't there create them, blah blah blah. Basically, their answer to install failed was to write out the details listed in the install fails snippet and let it go at that. Doesn't seem like they were interested in fixing the code just providing work arounds. I will try to raise the issue again but it feels like they are done with the node. Talking about the contrib-i2c-node here as there seems to be two different nodes being discussed.

---

<div class="post-metadata">

### Author: ![Askjerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/askjerry/32/19611_2.png) [@Askjerry](https://discourse.nodered.org/u/Askjerry)
#### Post date: [13 May 2020 12:34 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/16 "2020-05-13T12:34:27Z")

</div>

Now that I know where to go... I was able to open a ticket...

> <https://github.com/david-kasparov/node-red-contrib-pcf8574-cluster/issues/9>
>
> I have a very stock install from here: https://www.raspberrypi.org/downloads/
> I installed Node Red and I also installed an ADS1115 Node without issue.
> When...

So we will see if a fix comes from it.  
Thanks,  
Jerry

---

<div class="post-metadata">

### Author: ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)
#### Post date: [13 May 2020 13:26 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/17 "2020-05-13T13:26:50Z")

</div>

You raised the issue on a different node than I was looking at. But that's ok.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [12 July 2020 13:26 UTC](https://discourse.nodered.org/t/pcf8574p-chip-via-i2c/26449/18 "2020-07-12T13:26:52Z")

</div>

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