title: Arduino consuming lots of data from firebase
body: <p>I am working on Arduino-firebase home automation project.
  Now, Firebase data changed through mobile application and Arduino Esp8266 model reads data from firebase. So every time in loop it calls</p>
  
  <pre><code> FirebaseObject firebaseObject=Firebase.get(path_command);
  </code></pre>
  
  <p>and it consumes data  continuously .
  So here is my question, <strong>Is there any way to get data only when it is changed on firebase server?.</strong></p>
  
  <p>I have tried below code, but it crashes device at</p>
  
  <p><strong>if (Firebase.available())</strong></p>
  
  <pre><code>Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
    Firebase.stream("/devices/_18_fe_34_d6_9_4f_/command");
  if (Firebase.failed()) {
      Serial.println("streaming error");
      Serial.println(Firebase.error());
    }
  
    if (Firebase.available()) {
        FirebaseObject firebaseObject = Firebase.readEvent();     
        String deviceToken=firebaseObject.getString("device_token");   
          Serial.println(deviceToken);    
    }   
  </code></pre>
  
  <p>Please guide me if better solution available, Thanks you.</p>