Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triplicates messages for Text input widgets/ #45

Open
kindmartin opened this issue May 4, 2020 · 1 comment
Open

Triplicates messages for Text input widgets/ #45

kindmartin opened this issue May 4, 2020 · 1 comment

Comments

@kindmartin
Copy link

Hi all here in this uPy Blynk community. I was doing a lot of debugging for one home automation project and finally, the conclusion is I found something estrange in this lib BlinkLib v0.2.1 running in ESP32 board.
I found that if I use a text input widget, (i.e to enter a secret code to open a door in my project) this widget create 3 updates, when all other widget not. even using same virtual port for other widget, text input triplicates whereas let say button not.

running the script with log=print I get this when I just use a button

0 32 | 200
0 33 | 200
0 34 | 200
20 16892 | vw,63,1
Event: V63 -> ['1']
Event: V* -> 63 ['1']
20 16893 | vw,63,0
Event: V63 -> ['0']
Event: V* -> 63 ['0']

that is ok as I press the button (v63 ->1) and then realease it (v63 -> 0)
but entering a value in text input widget same virtual, I got this>

20 16895 | vw,63,1
Event: V63 -> ['1']
Event: V* -> 63 ['1']
20 16896 | vw,63,1
Event: V63 -> ['1']
Event: V* -> 63 ['1']
20 16897 | vw,63,1
Event: V63 -> ['1']
Event: V* -> 63 ['1']

< 6 35 |
0 35 | 200
< 6 36 |
0 36 | 200

in my code understanding this I had to block subsequent updates /messages after first. as a workaround.
any hints to clean up?

thanks, greeting from an in-quarentine home.

<M

@kindmartin
Copy link
Author

doing some lib protocol / connect debug I saw one normal message when button at v63 and a triplicate long message from server when the updates comes not from a button widget but from a text input widget also on v63

button:
self.bin -->>> b'\x14\x13\xb7\x00\x07vw\x0063\x001'

20 5047 | vw,63,1
Event Emit: V63 -> ['1']

text input:

self.bin -->>> b'\x14\x13\xc8\x00\x07vw\x0063\x001\x14\x13\xc9\x00\x07vw\x0063\x001\x14\x13\xca\x00\x07vw\x0063\x001'

20 5064 | vw,63,1
Event Emit: V63 -> ['1']
20 5064 | vw,63,1
Event Emit: V63 -> ['1']
20 5064 | vw,63,1
Event Emit: V63 -> ['1']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant