What does this command show?
which python
/usr/bin/python
Alan
I formatted the OS (before that I made a copy). Brand new Rasberrian OS without any modification: node-red GPIO is not available....... I did not even install the node-red-node-pi-gpio. It was there and it is not working.
After
sudo apt update
sudo apt full-upgrade
it still can not reach the GPIOs
By Node-RED... And whit shell?
If anyone can teach me, I'would like to try to move some GPIOs by Pyhton script, for test GPIOs in general environment and not only by N-R...
Alan
[EDIT]
in my case by shell I can reach the GPIOs
I have a beta version that may help...
can someone try
cd ~/.node-red
npm i node-red-node-pi-gpio@2.0.0-beta4
ok, thanks.... Now I try!
After taking the latest update with this script, it still not available:
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
the result is:
pi@raspberrypi:~/.node-red $ npm i node-red-node-pi-gpio@2.0.0-beta4
changed 1 package, and audited 514 packages in 17s
37 packages are looking for funding
run `npm fund` for details
21 vulnerabilities (3 low, 2 moderate, 15 high, 1 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
so I don't konw how to do!
Alan
It's working for me !!!!!!!!!!!
Super cool
I will try not with the original settings.
For me it was different:
pi@zeus:~ $ cd ~/.node-red
pi@zeus:~/.node-red $ npm i node-red-node-pi-gpio@2.0.0-beta4changed 1 package, and audited 81 packages in 4s
17 packages are looking for funding
runnpm fund
for detailsfound 0 vulnerabilities
pi@zeus:~/.node-red $
OK GUYS, it's working also for me!!!
Another question, the result of this command npm i node-red-node-pi-gpio@2.0.0-beta4
is problematic?
Now the question is: reasons for this issue? Why a beta version work and the original not?
Thanks for your time and your help
Alan
Did you initiate a injection on the inject node?
Before Inject
After Inject
This is on a AWS EC2 instance, so after an inject I will go N/A as it's not a PI
[
{
"id": "2e9035f469bc6dcf",
"type": "inject",
"z": "be9dbca190ca4687",
"name": "az - 1",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "1",
"payloadType": "str",
"x": 290,
"y": 460,
"wires": [
[
"dec6e848eae9089f"
]
]
},
{
"id": "dec6e848eae9089f",
"type": "rpi-gpio out",
"z": "be9dbca190ca4687",
"name": "",
"pin": "33",
"set": "",
"level": "0",
"freq": "",
"out": "out",
"x": 480,
"y": 480,
"wires": []
},
{
"id": "467a15a56d3f08d3",
"type": "inject",
"z": "be9dbca190ca4687",
"name": "0-9 - 1",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "1",
"payloadType": "num",
"x": 290,
"y": 500,
"wires": [
[
"dec6e848eae9089f"
]
]
},
{
"id": "08ac18c6595b09d9",
"type": "inject",
"z": "be9dbca190ca4687",
"name": "0-9 -0",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "0",
"payloadType": "num",
"x": 290,
"y": 540,
"wires": [
[
"dec6e848eae9089f"
]
]
},
{
"id": "d8673c67f613977e",
"type": "inject",
"z": "be9dbca190ca4687",
"name": "az - 0",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "0",
"payloadType": "str",
"x": 290,
"y": 420,
"wires": [
[
"dec6e848eae9089f"
]
]
}
]
I don't understand the question here. I think I did injection. As your picture shows.
When you deploy the flow the GPIO shows "not available", as soon as you inject a value (0 or 1) the state changes.
Yes, I'm sure that I've done an injection, before nodes were connected to an MQTT-out node, so they got at least one message
ok, but the "N/A" is not normal as we have now!
Alan
[edit]
and I've got 4 LEDs physically connected to GPIOs and they were not working!
Not normal as my node-red is running on a AWS EC2 and not a PI
Yes, but I'm not working in AWS but in a Pi! And, as I just saw, the GPIOs were broken!!
Inject a 1 into the GPIO
The bottom should show 1 for the pin to go high