node-red-node-arduino and i got it working, two nodes in my nodered nodes palette,
but after it i installed Johnny 5 by npm install node-red-contrib-gpio but i could not get Johnny5 node in my nodered nodes palette
i also tried to install npm install johnny-five but no luck
i checked my pc and i got johnny-five folder in C:\Users\MIPSECDeptt\.node-red\node_modules
pls help me
thanks in advance sudo apt-get install npm but at the end it could not fetch some packages and broken.
pls help me thanks
sudo apt-get install npm
sudo npm install -g npm@2.x
hash -r
cd ~/.node-red
npm install node-red-{example node name}update-nodejs-and-noderedIf your were using the preinstalled version of nodered you can follow the instructions on the RaspberryPi page in the documentation to install the correct version of npm (see the part on adding nodes http://nodered.org/docs/hardware/raspberrypi)
node-red-node-arduino) and i got it working too, two nodes in my nodered nodes palette
i also installed node-red-contrib-gpio and all yellow - two called gpio and one called johnny 5 nodes are comming in my nodered nodes palette
i also tested johnny5 node with a blink function and my arduino -------- working well
but now i want to learn node-red from scratch, suppose if i want to connect inject node to johnny5 and control my led, i am really in complete dark on "how to write functions in nodered"
is there any book or some resource pls suggest
and using nodered in my Rasp pi board is still pending, should i remove the pre-installed nodered completely and install a fresh and latest one? pls guide me how
thanks reply soon
thanks
But now I want to use serial node to receive serial string from arduino, so I refreshed my arduino with my custom sketch which sends our a string (firmata erased)
Now always when I plug my board/or not plug-i.e., without board connected to my pc and start nodered it says firmware error check your board firmware and nodered stops not start even
Pls helps to resolve this eror
Thanks
The arduino nodes ONLY talk firmata. So wiping it out means it won't talk to those nodes. Instead just use the standard serial nodes to talk to the serial data coming out of your sketch.
I am using nodered on Raspberry pi and using httpRequest node
We use internet behind a proxy in our college, i have added the following
export http_proxy="http://192.168.1.1:3128/"
export https_proxy="http://192.168.1.1:3128/"
export ftp_proxy="http://192.168.1.1:3128/"
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
export HTTP_PROXY="http://192.168.1.1:3128/"
export HTTPS_PROXY="http://192.168.1.1:3128/"
export FTP_PROXY="http://192.168.1.1:3128/"
export NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"
to the following files,
/etc/bash.bashrc
~/.bashrc
~/.profile
added the following
http_proxy="http://192.168.1.1:3128/"
https_proxy="http://192.168.1.1:3128/"
ftp_proxy="http://192.168.1.1:3128/"
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
HTTP_PROXY="http://192.168.1.1:3128/"
HTTPS_PROXY="http://192.168.1.1:3128/"
FTP_PROXY="http://192.168.1.1:3128/"
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"
to /etc/environment
added the following
Acquire::http::proxy "http://192.168.1.1:3128/";
Acquire::ftp::proxy "ftp://192.168.1.1:3128/";
Acquire::https::proxy "https://192.168.1.1:3128/";
to /etc/apt/apt.conf.d/00proxies
and added the following,
static ip_address=192.168.0.121/22
static routers=192.168.1.1
static domain_name_servers=8.8.8.8 8.8.4.4
to /etc/dhcpcd.conf
everything is working fine, like web browsing, email etc
but when i use my flow containing httpRequest it don't connect, it says Error: getaddrinfo ENOTFOUND
on Ubuntu PC i only added the following
http_proxy="http://192.168.1.1:3128/"
https_proxy="http://192.168.1.1:3128/"
ftp_proxy="http://192.168.1.1:3128/"
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
HTTP_PROXY="http://192.168.1.1:3128/"
HTTPS_PROXY="http://192.168.1.1:3128/"
FTP_PROXY="http://192.168.1.1:3128/"
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"
to /etc/environment
and added the following
Acquire::http::proxy "http://192.168.1.1:3128/";
Acquire::ftp::proxy "ftp://192.168.1.1:3128/";
Acquire::https::proxy "https://192.168.1.1:3128/";
to /etc/apt/apt.conf.d/00proxies
and my same flow containing httpRequest works fine
I am unable to resolve the problem pls help meI also tried in terminal by 'whereis 21-httprequest.js' but it ended no results.
Thanks
pls take a look of the flow here : [https://drive.google.com/open?id=0B5NYQC3oiHcHN200YjdjMFhlMWM]Start Node-RED
Once Node-RED has started, point a browser at http://192.168.0.121:1880
On Pi Node-RED works better with the Firefox browser
Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot
To find more nodes and example flows - go to http://flows.nodered.org
You may also need to install and upgrade npm
sudo apt-get install npm
sudo npm i -g npm@2.x
Started Node-RED graphical event wiring tool..
Welcome to Node-RED
===================
5 Oct 12:01:47 - [info] Node-RED version: v0.14.6
5 Oct 12:01:47 - [info] Node.js version: v0.10.29
5 Oct 12:01:47 - [info] Linux 4.4.21+ arm LE
5 Oct 12:01:47 - [info] Loading palette nodes
pi : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/python -u /usr/lib/node_modules/node-red/nodes/core/hardware/nrgpio.py info
pam_unix(sudo:session): session opened for user root by (uid=0)
pam_unix(sudo:session): session closed for user root
5 Oct 12:02:23 - [info] Settings file : /usr/lib/node_modules/node-red/settings.js
5 Oct 12:02:23 - [info] User directory : /home/pi/.node-red
5 Oct 12:02:24 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
5 Oct 12:02:24 - [info] Server now running at http://127.0.0.1:1880/
5 Oct 12:02:24 - [info] Starting flows
5 Oct 12:02:25 - [info] Started flows
5 Oct 12:03:57 - [info] Stopping flows
5 Oct 12:03:57 - [info] Stopped flows
5 Oct 12:03:57 - [info] Starting flows
5 Oct 12:03:58 - [info] Started flows
OPTS { protocol: 'http:',
slashes: true,
auth: null,
host: 'ashutestweb.netai.net',
port: null,
hostname: 'ashutestweb.netai.net',
hash: null,
search: null,
query: null,
pathname: '/testWAN/read.php',
path: '/testWAN/read.php',
href: 'http://ashutestweb.netai.net/testWAN/read.php',
method: 'GET',
headers: {} }
5 Oct 12:04:44 - [error] [http request:61402810.9ebfd8] Error: getaddrinfo ENOTFOUNDOPTS { protocol: 'http:',
slashes: true,
auth: null,
host: 'ashutestweb.netai.net',
port: null,
hostname: 'ashutestweb.netai.net',
hash: null,
search: null,
query: null,
pathname: '/testWAN/read.php',
path: '/testWAN/read.php',
href: 'http://ashutestweb.netai.net/testWAN/read.php',
method: 'GET',
headers: {} }
prox undefined noprox undefined noproxy undefined
7 Oct 10:21:47 - [error] [http request:61402810.9ebfd8] Error: getaddrinfo ENOTFOUND
/etc/bash.bashrc
~/.bashrc
~/.profile
/etc/environment
/etc/apt/apt.conf.d/00proxies
Nice=5
Environment="NODE_OPTIONS=--max-old-space-size=128"
#Environment="NODE_RED_OPTIONS=-v"
add
Environment="HTTP_PROXY=your_proxy_address"
then stop Node-RED - then run ... sudo systemctl daemon-reload ... to reload the new config file
then restart Node-RED... finger crossed.
Very sorry Dave C-J for my late reply, actually i was busy for my mid-semester exams.
Any very very great thanks, your trick works like a charm,
but still I have problem with the twitter and email nodes ---- they are still not working.
I think I have to add https and ftp proxys also ---- then they work, i will check it and let you know
mean while great thanks pls suggest me what do you thanks may be happing with the twitter and email nodes ---- they are still not working. 'Environment=' lines# systemd service file to start Node-RED
[Unit]
Description=Node-RED graphical event wiring tool.
Wants=network.target
Documentation=http://nodered.org/docs/hardware/raspberrypi.html
[Service]
Type=simple
# Run as normal pi user - feel free to change...
User=pi
Group=pi
Nice=5
Environment="NODE_OPTIONS=--max-old-space-size=128"
#Environment="NODE_RED_OPTIONS=-v"
Environment="http_proxy=http://192.168.1.1:3128/"
Environment="https_proxy=http://192.168.1.1:3128/"
Environment="ftp_proxy=http://192.168.1.1:3128/"
Environment="no_proxy=localhost,127.0.0.1,localaddress,.localdomain.com"
Environment="HTTP_PROXY=http://192.168.1.1:3128/"
Environment="HTTPS_PROXY=http://192.168.1.1:3128/"
Environment="FTP_PROXY=http://192.168.1.1:3128/"
Environment="NO_PROXY=localhost,127.0.0.1,localaddress,.localdomain.com"
#WorkingDirectory=/usr/lib/node_modules/node-red/
#ExecStart=/usr/bin/env node $NODE_OPTIONS red.js $NODE_RED_OPTIONS
ExecStart=/usr/bin/env node-red-pi $NODE_OPTIONS $NODE_RED_OPTIONS
# Use SIGINT to stop
KillSignal=SIGINT
# Auto restart on crash
Restart=on-failure
# Tag things in the log
SyslogIdentifier=Node-RED
#StandardOutput=syslog
[Install]
WantedBy=multi-user.target
24 Oct 10:57:29 - [error] [e-mail:acadamic.mips@gmail.com] Error: getaddrinfo ENOTFOUNDYou mean I can not use Twitter and email nodes with proxy, pls clarify
Thanks
Sir pls tell me the loc and file name of twitter and email nodes as you told me for the httprequest node .
Thanks