BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Blynk + RPI issue

I followed this guide to setup blynk-library on my RPI2. However, when I start the blynk server and try to access the GPIO pins via the mobile App, I get the following error. It was working fine a day ago. What is going wrong?

pi@raspberrypi:/ $ sudo NODE_PATH=/usr/local/lib/node_modules node /home/pi/blynkScript.js
Connecting to SSL: cloud.blynk.cc 8441
Connected
Disconnect blynk
Connecting to SSL: cloud.blynk.cc 8441
Connected
Authorized
No direct pin operations available.
Maybe you need to install mraa or onoff modules?
1 Like

FYI, I’ve already done the following:

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install build-essential
sudo npm install -g npm
sudo npm install -g onoff
sudo npm install -g blynk-library

Here are some additional info:

pi@raspberrypi:/ $ node --version
v0.12.6
pi@raspberrypi:/ $ npm --version
node3.5.3
pi@raspberrypi:/ $ nodejs --version
v0.10.29

pi@raspberrypi:/ $ which node
/usr/local/bin/node
1 Like

Looks like you have 2 separate versions of node.js installed!

i’m facing same problem. what should i do please.

thank you.

1 Like

BUMP!

Seems I’ve run into this issue. It’s really weird because one day the on/off button widget works, the next it doesn’t.

I have a 2-channel relay hooked up to my RPi 3 B+, with the third and fifth pin as data transfer, and the fourth and sixth gpio as power (5V) and ground. The on/off button widgets were the first success that I had with the Blynk program, so it’s strange to come back to test something out, only to not hear the relay click on when you hit the on/off button widget.

I ran the WiringPi GPIO pintest through the linux directory, with all pins checking out good. I figured perhaps the pins were loose or that one of the existing pins that had worked previously mysteriously crapped out on me, so I replaced them all. Still no signal. Then I decided to run the blynk.js “token” script manually and while I was connected, pressed the on/off widget buttons during play and the message “maybe you need to install mraa or onoff modules?” came up while pushing those buttons. I haven’t seen that message before, so I’m baffled.

I can confirm the relay is getting power, as when I reboot the RPi, the build-in LEDs of the relay briefly flicker on/off. Also if I connect a IN1 or IN2 gpio pin to the ground pin of the RPi, the corresponding LED for that channel turns on. I accidentally found that out while not paying attention.

I even tried using different devices (android, tablet) and nothing changed.

@vshymanskyy

:melon:

PS, I only have node installed, got rid of nodejs.

Dunno what changed. I came back to the RPi today and it had frozen during my absence, which seems to happen more and more as time progresses, and decided to manually reboot it. After it started up and the interface showed, I choose to hit the play button on the Blynk app and toggle the on/off switch widgets and both relays sounded off.

:hamburger:

I am having the same issue. I am on RPi 3. I tried node 0.10.x before, and have upgraded to 6.5, installed onoff and mraa modules, but still getting:

No direct pin operations available.
Maybe you need to install mraa or onoff modules?

Hey there, I’m having the same problem. All up to date versions of node, working on a Raspi with app running on iphone. Connects just fine and then I end up with

No direct pin operations available.
Maybe you need to install mraa or onoff modules?

Everytime I push a button on my phone I get that message, so they are connected, just not working.

Any ideas would be helpful!

could you check that you can do require(“onoff”) from you node script?
if not, maybe your NODE_PATH is wrong?

Facing the same issue.

Sir i too having same issue
No direct pin operations available.
Maybe you need to install mraa or onoff modules?

Waiting for reply
installed all the mraa and onoff libraries but same

@Eshwar44 https://www.youtube.com/watch?v=LJ3ic8C8CcA