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](https://global.discourse-cdn.com/business6/uploads/nodered/original/3X/6/7/671f769cf19775d7c17a140009ea2e2d65d4d665.png)
![grafik](https://global.discourse-cdn.com/business6/uploads/nodered/original/3X/3/3/334b0b3026c4ce1d2cbc5ab15a02756309b3b60d.png)
the pin setup is verified by the Python code, which works...
![2024-06-23 17_14_37-Window](https://global.discourse-cdn.com/business6/uploads/nodered/original/3X/0/4/04d0d84006ab8697ce37aad190429da922b905da.png)
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: :confused:](https://emoji.discourse-cdn.com/twitter/confused.png?v=12)
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: :star_struck:](https://emoji.discourse-cdn.com/twitter/star_struck.png?v=12)
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: :slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=12)
no more information with a catch node.
![2024-06-23 20_54_48-Window](https://global.discourse-cdn.com/business6/uploads/nodered/original/3X/6/5/65c219d6a2c3a1430f08d31e6d3b73144e100190.png)
@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?