Notifications for different Users/App instances

Hi there,

i have my pretty simple bathroomdoor project setup and it is working pretty well:

Basically there is a swich that is closed when the door is locked. The NodeMCU then changes a Blynk Led Widget to red and back to green once the door is unlocked.

Doorswitch -> NodeMCU -> Blynk app

Now i wanted to add a notification when the door is unlocked and a notify switch is set to “On” in the app. This is also working fine.

void checkBathroomDoor()
{
  // Invert state, since button is "Active LOW"
  int d2state = !digitalRead(D2);

  // Debounce mechanism
  long t = millis();
  if (d2state != prevState) {
    lastChangeTime = t;
  }
  if (t - d2lastChangeTime > 50) {
    if (d2state != d2currState) {
      d2currState = d2state;
      Blynk.virtualWrite(V0, state);
      if (state == 1){
        Blynk.setProperty(V5, "color", "#ff0000");
         
      }
      else {
        Blynk.setProperty(V5, "color", "#00ff04");
        if(v2State == 1){
          Blynk.notify("The Bathroom is now free!");
          Blynk.virtualWrite(V2, 0); 
        }
      }
    }
    
  }
  prevState = d2state;
}

But since the app will be shared with my flatmates if i enable the notification switch in any of the App instances in use the notification is sent to all instances of this App. Is there any way to:

1.: Identify which App/User has the notification button enabled? (I could do that with one switch for each User)

2: Send the notification to a specific app instance?

Anyone has any ideas on this? Otherwise it might work with some ifttt tinkering.

With kind regards
Sebastian

Not possible in the current version, but sounds like something that will be in Blynk 2.0 when (if?) it eventually arrives…

Pete.

1 Like