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

Problem with Raspberry Pi 3 blynk for python

I have problem trying to connect to Blynk using Raspberry Pi 3 in python.
I have installed the library using

pip install blynk-library-python

and I ran the same example provided here using

sudo python b.py

Blynk app is connecting fine… but when I give it any command, ex: press a button to turn led on, it just disconnects and an error is shown in the SSH console (Putty 0.70).

Error is :

TCP: Connecting to blynk-cloud.com:8442
Blynk connection successful, authenticating...
Access granted, happy Blynking!
Traceback (most recent call last):
  File "b.py", line 20, in <module>
    blynk.run()
  File "/usr/local/lib/python2.7/dist-packages/BlynkLib.py", line 375, in run
    self._handle_hw(data)
  File "/usr/local/lib/python2.7/dist-packages/BlynkLib.py", line 160, in _handle_hw
    raise ValueError("Unknown message cmd: %s" % cmd)
ValueError: Unknown message cmd: dw
pi@raspberrypi:~ $

I also have the same problem, i see no blynk personal is viewing this issue…

Hi
DId you ever figure out an answer to this problem?. I’m new to Blynk with Python and ran into this right away.

There are a couple of versions of Python… depending on which one seems to be the one you need you either run it with the python or python2.7 command… how you install it seems to also matter… all as mentioned in this post…

Basicly Python for Blynk is in Alpha and while the developer is aware of the topics, he is busy and we the users are the best ones to contribute, figure it out, and assist others as able :slight_smile:

Thanks for the response. I will battle on and report back if I solve it.

A post was split to a new topic: Unable to get the print statement on when the value is 1