db.collection('iot').doc('test')
      .get()
      .then(snapshot => {
         setData(snapshot.data())
      })
      .catch(error => {
        console.error(error)
      })