Howto for Raspberry Pi

I have tried it with and without the -fpermissive line, but with no luck.

I get this error:

pi@raspberrypi ~/blynk-library/linux $ make clean all target=raspberry
rm main.o BlynkDebug.o …/utility/BlynkHandlers.o blynk
rm: cannot remove main.o': No such file or directory rm: cannot removeBlynkDebug.o’: No such file or directory
rm: cannot remove ../utility/BlynkHandlers.o': No such file or directory rm: cannot removeblynk’: No such file or directory
Makefile:62: recipe for target ‘clean’ failed
make: [clean] Error 1 (ignored)
g++ -I …/ -I ./ -DLINUX -c -O3 -w -DRASPBERRY -fpermissive main.cpp -o main.o
In file included from main.cpp:13:0:
./BlynkApiWiringPi.h: In member function ‘void
BlynkApi::processCmd(const void*, size_t)’:
./BlynkApiWiringPi.h:40:18: error: ‘BLYNK_HW_IN’ was not declared in this scope
Makefile:68: recipe for target ‘main.o’ failed
make: *** [main.o] Error 1
pi@raspberrypi ~/blynk-library/linux $

The only suggestion I’ve seen for dealing with it is the -fpermissive thing, and it hasn’t helped here. Any idea how to get Blynk running on a Raspberry Pi?

Working on the fix…

Fixed it on the latest master.

Can somebody help me to figure out what is magic is happening here… I have raspberry pi B rev2. I followed instruction and installed everything. So now when i am making python --token TOKEN -vw 1 23 it is execute without errors and even i see that message Device offline is gone in Blink IOS app. But i don’t see any updates on my listeners in the ios app. I started troubleshoot this and found this topic and @rabe69 message about some scripts in test folder. I tried to run python --token TOKEN and it is updating values in IOS app successfully. So i don’t understand why is not updating values in the app but is doing that. Can somebody help?

Hi manusovich,

I too see the Blynk app going offline when running the Python command on the Raspberry Pi. For me it is with Android rather than iOS. When I run the same command on a Windows machine it all seems to work ok. Any thoughts from the Blynk guys?

manusovich do you have anything connected to the Raspberry Pi? Just LED’s or perhaps an Arduino.

See also the thread I staerted at Python Gateway for Openelec on Raspberry Pi

I have display connected (extension board) to pi. Also Bluetooth, wifi dongle and relay.

Can you pls repost the link? as the the link provided gives a 404 error

1 Like

This link from above is dead

This link appears to be broken too

Just check the docs:

Hello guys, thanks for sharing these infos; I have a question: how do I setup Raspberry Pi to connect to my local Blynk server?

@cricri19top have you already set up the local server and is it on a Pi or some other device?

This is one of @vshymanskyy’s instructables for obtaining temperature sensor data from your Pi to your Smartphone

Also a few other notes at

This is currently one area of weakness on the forum and not nearly as well covered as the equivalent for Arduino’s. Maybe when you get into it you can provide your working scripts for other Blynkers to work with.

Hy, I have local Blynk server running on Raspberry Pi 2 (A) and works ok with devices like ESP8266. Now I just want to add another Raspberry Pi (B) to be used as ESP8266 and to be connected to my local Blynk server. Where I can do the configuration for that (on B) ? In all the tutorials I’ve seen, Raspberry(B) is connecting to official Blynk server.

@cricri19top in the instructable there is this line:

var blynk = new blynkLib.Blynk(AUTH);

I am guessing here but if it is anything like Arduino this line says connect to Blynk’s cloud server (default).
For Arduino connections to local server the AUTH would become AUTH, IPAddress(x,x,x,x).
Commas not dots between each of the x’s.

Worth trying the change until a java techie turns up. @Lichtsignaal @Dmitriy @vshymanskyy

Just noticed that this is a well read thread, 21,700 views.

Pi must be popular. I have used them for a few years and I got my first Zero last week.
I already had mini HDMI adapters but it runs headless now in any case. Also had micro usb adapter for the WiFi dongle.
Whilst I was waiting for the Zero to arrive from the UK I configured an SD card with the WiFi dongle and one of my Pi B’s. Plugged the SD card into the Zero and it worked first time.

As I already had the “extras” in the house total outlay was just £8 (£4 plus £4 international delivery).
Shame you can’t order dozens at a time.

still not clear…can you be more specific what I havfe to do to conenct raspberry pi to local Blynk server running also on raspberry pi?

Did you study the instructable and the links from it?

Basically you create a *.js file on the Pi and run the file.

Some sample js files at and this one indicates format for local server includes this line:

var blynk = new Blynk.Blynk(AUTH,
  options= { addr:"", port:8441 }

Once you have created the *.js file and obtained a token you run it on the Pi with:

filename.js token

I have followed the steps described on docs blynk page - I got errors when namp is used.
I have also followed the steps from this post:
git clone
cd blynk-library/linux
make clean all target=raspberry - errors occured and then I have used the script ./ raspberry.

After executing this script I was able to run:
sudo ./blynk --token=YourAuthToken

and it seems to work since it says that the token is invalid, so I assume it talks with blynk-cloud.
What I did next was to create the file test.js by putting the token I have and pointing to my local blynk server as per your reply:
It seems I dont do somethnig righr because when I run: test.js 320c0dea043f4aca9acf8ed6c3716450
it does not work:
-bash: test.js: command not found
Is there a specific path to put this test.js file?
What should I do?

You need to get a valid token for sudo ./blynk --token before moving on to test.js.

Create a new project and send the token to yourself and try the sudo … again.