Raspberry and virtual ports

I’m trying to get my raspberry Pi 2 send data to app. Here is the list of steps that I did:

  1. Setup local blynk server (it works, I was able to connect from android app, added value displays)
  2. Installed blynk-library, and it ables to connect using ./blynk with parameters
  3. Customised https://github.com/blynkkk/blynk-library/blob/master/scripts/blynk_ctrl.py and configured there my local server and port
  4. Added ‘Value display’ in the android app, attached it to the virtual pin 1, set update interval to ‘PUSH’
  5. Run script python “python blynk_ctrl.py --token=mytoken -vw 1 100”

After that I see log records in blynk.log on my server:
04:57:24.186 TRACE - Incoming LoginMessage{id=2, command=LOGIN, length=32, body=‘my_token’}
04:57:24.188 INFO - vadim.kirilyuk@gmail.com hardware joined.
04:57:24.242 TRACE - Incoming BridgeMessage{id=3, command=BRIDGE, length=37, body=‘64i4e77afc0a157417588d9eb88ba45e323’}
04:57:24.245 TRACE - Incoming BridgeMessage{id=4, command=BRIDGE, length=11, body=‘64vw1100’}
04:57:24.249 TRACE - Hardware channel disconnect.
04:57:24.250 TRACE - Sending ResponseMessage{id=0, command=RESPONSE, responseCode=DEVICE_WENT_OFFLINE} to [id: 0x6f4013b1, /client_ip:37971 => /server_ip:11443]

On the android app value display was’t changed, only see message in the bottom of screen “Your raspberry 2 was disconect” when run script on raspberry.

Where is my fault there?

First of all, please use master branch, as we had an issue with raspberry:

Also I see that your script sends invalid token…

I cloned few hours ago https://github.com/blynkkk/blynk-library.git I believe it’s master branch?
also in “body=‘my_token’” I mean that there I use my real generated token from android app. Or did you mean invalid token about something else?

Okay, I see :wink:
Please checkout it again (just to be sure). Tell us how it goes.
BTW:
Blynk_ctrl is designed to control the HW part… so vw 1 100 calls BLYNK_WRITE(V1) on HW side.

Thanks, I got it. Attached led to a GPIO pin, mapped button in application to the selected GPIO pin. Started blynk with needed parameters. And it works good, turns led on and off.
Is it possible to pass any data to virtual port to get it in the application, except reading GPIO value?
In the ‘Value Display’ setting, possible to get data only from virtual pin. So how I can make any data running to a virtual port on raspberry side?

Sure. Just read the basics documentation :wink:

nevermind, found that