Howto for Raspberry Pi

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 blynk_ctrl.py --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 pseudo-library.py --token TOKEN and it is updating values in IOS app successfully. So i don’t understand why blynk_ctrl.py is not updating values in the app but pseudo-library.py is doing that. Can somebody help?

Hi manusovich,

I too see the Blynk app going offline when running the Python command blynk_ctrl.py 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
https://github.com/blynkkk/blynk-library/blob/master/docs/Platforms.md#linux-raspberry-pi

This link appears to be broken too

Just check the docs: http://docs.blynk.cc/#hardware-set-ups-raspberry-pi

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

@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 http://www.instructables.com/id/Raspberry-Pi-Nodejs-Blynk-App-DHT11DHT22AM2302/step2/Scancreate-Blynk-Project/

Also a few other notes at https://github.com/momenso/node-dht-sensor/blob/master/README.md

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?
Thx

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 https://github.com/vshymanskyy/blynk-library-js/tree/master/examples/nodejs and this one indicates format for local server includes this line:

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

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

filename.js token

Hi,
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 https://github.com/blynkkk/blynk-library.git
cd blynk-library/linux
make clean all target=raspberry - errors occured and then I have used the script ./build.sh 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: https://github.com/vshymanskyy/blynk-library-js/blob/master/examples/nodejs/client-ssl-local.js
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?
Thx

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.

I guess it will be an invalid token if you have created it from your local server but you are accessing the cloud server. Might be worth creating a project on the cloud server to be sure the Pi can connect with a valid token.

Did you install WiringPi before you tried to the git clone?

If you have Wiring Pi installed then the command you need if your Pi is at 192.168.10.145.

sudo ./blynk --server=192.168.10.145 --token=xxxxxxxx

There is a port option with --port=xxxx but it will default to 8442. Tested as working here.