I’ve got several lights switched with gpio2 on esp8266. The problem is that since the last two versions whenever I switch something on the button (switch not push button) in Blynk it behaves correctly and is “on” (white in my case) . However when I exit the app and open it again the button has gone back to looking like it is off.
I’ve got a tablet with the older version and that doesn’t have the problem.
Edit:
After doing some testing with older versions, the problem starts from version 2.17.6.
You should improve your code a little bit. Set initial relay state and assign virtual pin for a button, you can then use syncvirtual or Blynk.syncall to sync pin states with app. It will work on all versions.
Yes I could use virtual pins but the thing us that they are build in and a pain to get out. I also don’t see why I should so this since it all used to work perfectly with minimal coding with just using digital pins.
It never was an issue till two updates ago.
Blynk is constantly under development… and thus that development (including to the Cloud Server), requires constant updating of App and Libraries, followed by reflashing those libraries and code into any the MCU’s that you have deployed.
Another reason to consider using code vs not… adding OTA code would have made even out of reach devices capable of regular updates.
You may have no choice but to manually dig out and reflash updated code onto each device in order to get them back up and running… but this time adding in OTA abilities (if the MCU is capable of such, e.g. ESP8266) would be recommended, since Blynk is going to be constantly developed in the future as well
Thanks for your reply!
Yeah I’m thinking about doing that, however being able to use digital pins without having to do any coding is actually a sales point on the website. It clearly is a bug since it crept in two updates ago.
Does anyone know where I can get the older .apk from?
True… but you still need to update the Library, and reflash the MCU in order to take advantage of that update, in order to stay current with App and Server (Cloud or Local) changes… they all work together and if you only update part, or don’t update any (except the Cloud server which you will not have a choice about) then something will eventually fail.
Right, so I just updated the library to 0.4.10 and made some hardware improvements in the process (thanks for the kick up the backside!).
However it unfortunately doesn’t solve this issue.
Edit: I discovered a work around by deleting the device in Blynk and then adding a new one with the same function. So it does seem there is a problem in the app instead of my hardware. @BlynkAndroidDev
I simply deleted the button and then the device in Blynk. I then added a new device with the same name but obviously a different auth token. Uploaded the new token to my esp8266 and added a new button with the new device in Blynk.
Everything works now so I got there in the end. Thanks for all the help!
Since you use the direct pin control, there might be a slightly different way in how all three… App, Server, and Library (on MCU) interact as opposed to Virtual pins… which in all my projects and experiments do seem much more stable throughout system changes.
But sounds like the software version of “turn it off and on again” works just fine in this case Good to know for future direct pin control issues.
It was never the Hardware that was in question… but for reference, the App is primarily a GUI interface to the Server, the Server is where all the projects and settings are stored… and is what interfaces with the Library (on the MCU).
Glad you have it back up and running I guess we can call this one solved.