I am using IOS BLynk app. Hardware is Raspberry pi. Software is Python 3.5.
The test code to highlight the problem is very simple: it’s just two VP events handlers: one for VP0 and one for VP1. The two of them do the same very simple thing: display a random number on a “display value” widget on the app. The two “display value” widgets have a refresh interval of 1s.
It’s impossible to have the two widget display their respective random number. One doesn’t display any thing.
Any idea ?
The debug output confirms that “read V0”…“read V32” handlers are registered.
No matter how many “display value” widgets I add in the blynk app (for V1, V2…etc pins), only one of them actually get displayed. If I delete the widget which displays the value, another widget becomes active and so on, but never more than one of them. Again, the debug output from the python script confirms that only one pin’s value actually gets requested.
The piece of code above assumes that rsp_data always contains a single message, but if there are multiple “display value” widgets, the server sends multiple messages simultaneously, and this code only processes the first message disregarding the rest, which results in only one widget’s value being updated.