Device disconnected ! Now if the devices are disconnected, the widgets will be commanded in the mobile application, but no response will be made

i want to have Feedback for actions that user send from app to confirm command(deliver action)(or when device is disconnectd dont have action on app-button)- so how can i do this?

imagine that i have a button and light on-off so i want to know that when i tap on button to On the Light have a feedback or confirm (to sure do command) cause when the device is disconnected on app button shows On but the device is disconnected and dont take any action to turn light on.

If the MCU is not connected, then when pressing a button widget, you will already get a message on the App stating that device is disconnected… so you need to clarify your question.

not just a message don;t take any action widget when tap(button that set on the disconnected device)

Now if the devices are disconnected, the widgets will be commanded in the mobile application, but no response will be made.

Yes they will see a message… happens to my RPi sketch all the time.

And strangely enough :wink: when the device is offline, no action is taken.

As I said… please clarify what it is you are trying to avoid happening.

1 Like

When this is appeared "Device is Offline " ?

I don’t know… long time now… make sure you have the latest library, latest App, latest Local Server, if you use one.

you mean that is default option? or i should to write a sketch?

Not an option… normal error message.

Build a sketch?? Dude… you really confuse me sometimes :stuck_out_tongue: What do you normally have running on your devices, that you don’t want controlled by the App when the device is offline… my head hurts :confounded:

1 Like

Thank you :sweat_smile:

We have 2 types of messages for that case:

“Device is offline” means command wasn’t sent on your action as there is no active and connected device.
“Device went offline” means device was online but for reason not online anymore. This message appears everytime hardware goes offline.

“Device is offline” usually allows you easily get understanding of what is going on.

1 Like

Perfect answer. thank you so much.

1 Like

what about action on button status when device is offline take action or not?

Not sure what do you mean. However, you can program hardware logic as you need with SYNC feature - http://docs.blynk.cc/#blynk-main-operations-state-syncing

If the device is offline, there is no way it can take action… at best, the last state is on the server, so if you have a sync call in your script upon bootup, the it will react to that, otherwise it boots and waits new commands.

You are aware that this is easy enough to test on your own right?

1 Like

imagine that
1- Light is Off
2- device that connected to Light is disconnected
3- user tap on button that configured to the Pin of Light

Now on app button statues take Off
i want the button status doesn’t any action when device is disconnected but i see that button status take any action without any device check (Feedback) just a message device is offline don’t enough
i want when device is disconnected button status doesn’t change.

So simply make all your buttons momentary and use code to supply positive feedback to all button action via Blynk.virtualWrite(vPin, value) and/or Blynk.setProperty(vPin, “property”, value).

That way if the error message somehow doesn’t giveaway the fact that the device is offline, the lack of positive feedback will.

1 Like

@s.d.engineering you can do this for example with each widget:

BLYNK_WRITE(V1){
  if(Blynk.connected()){
    // code in here
 }
}
1 Like

some times i see that server not in range(disconnected) and app opened so i tap on button to on Light and status shown Light is on but in real light is off i want when server and device is disconnected button status doesn’t change.
I think this is App Capability and depend of server and device.
@Dmitriy