Problem/ how to debug Pi-LCD

Hi all,
i am using the module "node-red-node-pilcd"
[node-red-node-pilcd (node) - Node-RED]
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:

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()

@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.

Hi Zenofmud,
thank you.Here are pictures (hopefully) of what i did:
2024-06-23 16_24_49-Window

grafik

the pin setup is verified by the Python code, which works...
2024-06-23 17_14_37-Window

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.

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")

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 :confused:

thanks
Kristian

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.

cool, i didn't know that :star_struck:

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 :slight_smile:

no more information with a catch node.
2024-06-23 20_54_48-Window

@dceejay Dave any thoughts about this?

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

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

Dave, do you want an issue raised on GitHub?

Yes please

done:
https://github.com/node-red/node-red-nodes/issues/1073

thank you
Kristian

1 Like

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