# Problem/ how to debug Pi-LCD

**URL:** <https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886>\
**Category:** General\
**Created:** [23 June 2024 13:41 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886 "2024-06-23T13:41:53Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kristian.240623](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kristian.240623/32/92157_2.png) [@Kristian.240623](https://discourse.nodered.org/u/Kristian.240623)\
**Post date:** [23 June 2024 13:41 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/1 "2024-06-23T13:41:54Z")

</div>

Hi all,  
i am using the module "node-red-node-pilcd"  
[[node-red-node-pilcd (node) - Node-RED](https://flows.nodered.org/node/node-red-node-pilcd)]  
which does not work. Under the node in the flow chart is a gray rectangle and the text "not available". Sending any text has no effect. The node needs a python library "RPi.GPIO python" \>= 0.5.8. to work. My version is 0.7.1. Also, i can use the display with Python, using the code below. This means, the Python side should be all right (?)

My problem is that i am complete Newbie. I set log level to "debug" in settings.js, but see nothing. How can i debug what happens in the node?

Thanks  
Kristian

Python code working:

```auto
import time
import RPi.GPIO as GPIO
from RPLCD.gpio import CharLCD
lcd = CharLCD(pin_rs=11, pin_rw=None, pin_e=13, pins_data=[29, 31, 33, 35],
              numbering_mode=GPIO.BOARD,cols=16,rows=2, dotsize=8,
              charmap='A02',
              auto_linebreaks=True)
lcd.write_string('Hello world! my Friend')
time.sleep(5)
lcd.clear()
GPIO.cleanup()

```

---

<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:** [23 June 2024 14:16 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/2 "2024-06-23T14:16:33Z")

</div>

@Kristian.240623 welcome to the forum!

What do you have connected to the input of the node? And what to the output? Add a debug node (set to display the complete msg) to the output of the function node  
Add a status node and connect it to a debug node (displaying the complete msg) to see if it outputs anything.

---

<div class="post-metadata">

**Author:** ![Kristian.240623](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kristian.240623/32/92157_2.png) [@Kristian.240623](https://discourse.nodered.org/u/Kristian.240623)\
**Post date:** [23 June 2024 14:24 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/3 "2024-06-23T14:24:20Z")

</div>

Hi Zenofmud,  
thank you.Here are pictures (hopefully) of what i did:  
 ![2024-06-23 16_24_49-Window](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/7/671f769cf19775d7c17a140009ea2e2d65d4d665.png)

![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/3/334b0b3026c4ce1d2cbc5ab15a02756309b3b60d.png)

---

<div class="post-metadata">

**Author:** ![Kristian.240623](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kristian.240623/32/92157_2.png) [@Kristian.240623](https://discourse.nodered.org/u/Kristian.240623)\
**Post date:** [23 June 2024 15:15 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/4 "2024-06-23T15:15:21Z")

</div>

the pin setup is verified by the Python code, which works...  
 ![2024-06-23 17_14_37-Window](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/4/04d0d84006ab8697ce37aad190429da922b905da.png)

---

<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:** [23 June 2024 15:24 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/5 "2024-06-23T15:24:57Z")

</div>

What device are you using?  
What OS and version?  
What version of NR and node.js? (You can get this from the NR startup log)

Also

> Requires the RPi.GPIO python library version 0.5.8 (or better) in order to work.

What version are you running.

---

<div class="post-metadata">

**Author:** ![Kristian.240623](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kristian.240623/32/92157_2.png) [@Kristian.240623](https://discourse.nodered.org/u/Kristian.240623)\
**Post date:** [23 June 2024 16:23 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/6 "2024-06-23T16:23:55Z")

</div>

Sorry, i forgot this.  
I am using a Raspberry Pi 4 B with 4 GB RAM, Raspbian 12  
Node red Version 3.1.9, Python 3.11  
I did an apt-get upgrade a few days ago, so it should all be the latest versions.

For node.js: I did not find a startup log. I am getting mad with the logging in general because all google hits seem to be deprecated.  
So i tried (to see something like "already version xy installed")

```auto
ks@raspi4:~ $ npm install node-js
added 65 packages in 11s
12 packages are looking for funding
 run `npm fund` for details

```

which says that i didn't have node.js before? (LCD still not working)

RPi.GPIO: Version 0.7.1

When i don't get further, i will try to only use one (any) GPIO Pin from NodeRed 😕

thanks  
Kristian

---

<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:** [23 June 2024 18:02 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/7 "2024-06-23T18:02:53Z")

</div>

Please stop Node-RED then start it again from a terminal window. You should see the Node-red startup log. Copy and paste it to a reply.

And forgive me, I should have said to add a `catch` node connected to a `debug` node earlier.

---

<div class="post-metadata">

**Author:** ![Kristian.240623](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kristian.240623/32/92157_2.png) [@Kristian.240623](https://discourse.nodered.org/u/Kristian.240623)\
**Post date:** [23 June 2024 18:21 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/8 "2024-06-23T18:21:44Z")

</div>

cool, i didn't know that 🤩

```auto
ks@raspi4:~/.node-red $ sudo service nodered stop
ks@raspi4:~/.node-red $ node-red
23 Jun 20:14:19 - [info] 

Welcome to Node-RED
===================

23 Jun 20:14:19 - [info] Node-RED version: v3.1.9
23 Jun 20:14:19 - [info] Node.js version: v18.19.0
23 Jun 20:14:19 - [info] Linux 6.6.28+rpt-rpi-v8 arm64 LE
23 Jun 20:14:21 - [info] Loading palette nodes
23 Jun 20:14:21 - [debug] Module: node-red-node-pi-gpio 2.0.6 /home/ks/.node-red/node_modules/node-red-node-pi-gpio
23 Jun 20:14:21 - [debug] Module: node-red-node-pilcd 0.3.1 /home/ks/.node-red/node_modules/node-red-node-pilcd
23 Jun 20:14:21 - [debug] Module: nrlint 1.2.0 /home/ks/.node-red/node_modules/nrlint
23 Jun 20:14:23 - [warn] rpi-lcd : Raspberry Pi specific node set inactive
23 Jun 20:14:23 - [info] Settings file : /home/ks/.node-red/settings.js
23 Jun 20:14:23 - [info] Context store : 'default' [module=memory]
23 Jun 20:14:23 - [info] User directory : /home/ks/.node-red
23 Jun 20:14:23 - [warn] Projects disabled : editorTheme.projects.enabled=false
23 Jun 20:14:23 - [info] Flows file : /home/ks/.node-red/flows.json
23 Jun 20:14:23 - [info] Creating new flow file
23 Jun 20:14:23 - [debug] loaded flow revision: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
23 Jun 20:14:23 - [debug] red/runtime/nodes/credentials.load : no user key present
23 Jun 20:14:23 - [debug] red/runtime/nodes/credentials.load : using default key
23 Jun 20:14:23 - [debug] red/runtime/nodes/credentials.load : keyType=system
23 Jun 20:14:23 - [warn] 

---------------------------------------------------------------------

```

I also see the warning now "node set inactive" which i can follow.  
Thank you very much for your help. I need to read briefly what a catch node is 🙂

---

<div class="post-metadata">

**Author:** ![Kristian.240623](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kristian.240623/32/92157_2.png) [@Kristian.240623](https://discourse.nodered.org/u/Kristian.240623)\
**Post date:** [23 June 2024 18:57 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/9 "2024-06-23T18:57:14Z")

</div>

no more information with a catch node.  
 ![2024-06-23 20_54_48-Window](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/5/65c219d6a2c3a1430f08d31e6d3b73144e100190.png)

---

<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:** [24 June 2024 01:13 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/10 "2024-06-24T01:13:39Z")

</div>

@dceejay Dave any thoughts about this?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [24 June 2024 07:02 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/11 "2024-06-24T07:02:23Z")

</div>

There have been changes to gpio on 64 bit os. So yes will need investigation and fixing.

---

<div class="post-metadata">

**Author:** ![Kristian.240623](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kristian.240623/32/92157_2.png) [@Kristian.240623](https://discourse.nodered.org/u/Kristian.240623)\
**Post date:** [24 June 2024 07:49 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/12 "2024-06-24T07:49:57Z")

</div>

I see you are one of the maintainers. Thank you for your attention.  
Can i contribute anything?

---

<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:** [24 June 2024 09:46 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/13 "2024-06-24T09:46:49Z")

</div>

Dave, do you want an issue raised on GitHub?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [24 June 2024 12:14 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/14 "2024-06-24T12:14:01Z")

</div>

Yes please

---

<div class="post-metadata">

**Author:** ![Kristian.240623](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kristian.240623/32/92157_2.png) [@Kristian.240623](https://discourse.nodered.org/u/Kristian.240623)\
**Post date:** [24 June 2024 17:42 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/15 "2024-06-24T17:42:50Z")

</div>

done:  
[https://github.com/node-red/node-red-nodes/issues/1073](https://github.com/node-red/node-red-nodes/issues/1073)

thank you  
Kristian

---

<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:** [22 September 2024 17:42 UTC](https://discourse.nodered.org/t/problem-how-to-debug-pi-lcd/88886/16 "2024-09-22T17:42:59Z")

</div>

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