Python Forum
Can't read virtual pin or use notification on blynk
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't read virtual pin or use notification on blynk
#1
Using the github bylnkkk for raspberry pi 3 (via ethernet) on python3 (https://github.com/blynkkk/lib-python), (0.2.6) it connects okay (using blynk server) and I can set the value of a virtual pin, but I just can't figure
out how to read the value of one or use an interrupt / thread / function to run when its state is changed.
Writing 1 to virtual pin 4 works:
blynk.virtual_write(4, 1)
but neither of these work: (I don't get anything printed when I change the state of V4)
@blynk.handle_event('read V4')
def read_virtual_pin_handler(pin):
    print("po")
    #print(READ_PRINT_MSG.format(pin))
    #print(blynk.virtual_sync(pin))
    #print(sensor_data)
    blynk.notify('Warning critical value')
    #blynk.virtual_write(pin, random.randint(0, 255))
  
@blynk.handle_event('write V4')
def write_virtual_pin_handler(pin, value):
    print(WRITE_EVENT_PRINT_MSG.format(pin, value))
    blynk.notify('bpush') 
Any ideas how I can use python & blynk with my pi? Thanks
Reply
#2
Hi...Blynk application has backing of numerous gadgets. That implies you can allocate any gadget to explicit gadget with own auth token. For instance - you might have button on V1 that controls wi-fi bulb An and one more button on V1 that controls wi-fi bulb B. To do this you wanted more than 1 gadget inside your venture. To accomplish this if it's not too much trouble, go to project settings and snap on "Gadgets" area :
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Sound Sensor With EMail Notification parascand 1 475 Dec-10-2023, 03:10 AM
Last Post: deanhystad
  Error notification after encoding robertje1024 1 1,192 May-29-2022, 04:18 PM
Last Post: Axel_Erfurt
  How to make scraper send email notification just once themech25 0 1,377 Nov-08-2021, 01:51 PM
Last Post: themech25
  running python script showing an icon in the tray notification area chubbychub 1 4,551 Nov-01-2020, 03:52 PM
Last Post: jefsummers
  psutil for monitor a software finish process and notification Pyguys 0 2,854 Mar-27-2020, 11:15 PM
Last Post: Pyguys
  email notification sritsv 2 3,209 Nov-29-2018, 03:10 PM
Last Post: Spendor
  Email Notification mbelfortas 1 2,409 Oct-03-2018, 07:24 AM
Last Post: buran
  need help with Python and Blynk on my RaspPi hotwalk 1 2,562 Nov-25-2017, 06:09 AM
Last Post: heiner55

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020