Hi,
I’m succesfully controlling 2 awnings by 2 Blynk sliders on 3 IOS devices with just a small problem.
When the IOS App is reactivated from OFF or background after long time it’s not updated with last slider data in the Cloud.
Thanks
Flavio
Hi,
I’m succesfully controlling 2 awnings by 2 Blynk sliders on 3 IOS devices with just a small problem.
When the IOS App is reactivated from OFF or background after long time it’s not updated with last slider data in the Cloud.
Thanks
Flavio
@piflav presumably iOS version of the app has sync feature?
Not sure if BLYNK_APP_CONNECTED() function has been adopted by iOS version yet, but when it has the following should work when the app connects.
BLYNK_APP_CONNECTED()
{
Blynk.syncVirtual(Vx); // set x to virtual pin number of slider
}
In the meantime you could try using a super Android Smartphone.
BLYNK_APP_CONNECTED() it’s not present on the documention but accoding to its name could be a workaround to PUSH data to cloud and get sliders updated in real-time.
Your example sounds wrong because the Arduino don’t need to be updated it’s the opposite the app must be.
If you review all the documentation i.e. this site and GitHub in addition to the docs page then you will see it’s a fairly new feature.[quote=“piflav, post:3, topic:15305”]
Your example sounds wrong because the Arduino don’t need to be updated it’s the opposite the app must be.
[/quote]
I think you are correct.
Use the following syntax in the new function instead:
Blynk.virtualWrite(Vx SomeVariable);
Not sure if any of this will work for iOS.
@Eugene does iOS have BLYNK_APP_CONNECTED() function?
There is not much to adopt - the BLYNK_APP_CONNECTED feature works regardless what app (iOS or Android) connected. BUT the thing is that it is turned off by default and should be enabled in Project Settings from the Blynk app. Android version has this setting and iOS not yet. For sure it will appear in the upcoming iOS update.
I tried to add a refresh Button forcing Arduino to push data but no success. It sounds the App think to be updated so no reason to re-sync with Blynk server. That means even if BLYNK_APP_CONNECTED() is available no way to get sliders updated.
@piflav you should be using BlynkTimer to do timed virtualWrite() to the app. Do you have this set up in your sketch?
Perhaps paste your formatted sketch.
Sorry with “push data” I meant Arduino virtualWrite the Sliders status but basically I can re-link App sliders and Arduino status only acting on Slider itself or, on the main iPhone, stop-start the project
@piflav so if slider is on V0 with a range of 1 to 10 are you saying the following does not move the slider to 6 with iOS?
Blynk.virtualWrite(V0, 6);
Perhaps I misunderstand your problem or iOS is very different to Android.
Exactly. It happens only restarting or resuming the App after a while.
Now I should retry with new 2.9.6 App
I’ve updated 2 iPhones and iPad to new iOS APP and the problem sounds fixed. Now it looks like 1st step when the app starts or wakes from boground is re-syncing with Blynk.cc cloud where, in the mean time, the data could be changed.
Very good.
Thanks