apption-labs / meater-cloud-public-rest-api

MEATER Cloud REST API documentation.
84 stars 4 forks source link

Device List doesn't clear if offline #27

Open Bobby-McGonigle opened 2 years ago

Bobby-McGonigle commented 2 years ago

I've noticed in my polling of the probes, that their status doesn't clear when they go offline.

The last status of the probes is given back to us as a response on each request.

I figured, if they were off/offline, the devices array would then be empty, which would indicate that a probe, or multiple probes are offline, or without power.

For example, when I was first building with the API, it took a bit of time for data to trickle in between polls and I would see a response like

{ status: 'OK', statusCode: 200, data: { devices: [] }, meta: {} }

Which makes sense, I was patient and the data then began to flow in.

Later on, I wanted account for when these devices power down. I expected the data above to show eventually, but the data maintained the last status of my probes

{ status: 'OK',
  statusCode: 200,
  data: 
   { devices: 
   [ { id: '---',
       temperature: { internal: 17.4, ambient: 17.4 },
       cook: null,
       updated_at: 1650570685 },
     { id: '---',
       temperature: { internal: 17.7, ambient: 17.7 },
       cook: null,
       updated_at: 1650570686 },
     { id: '---',
       temperature: { internal: 17.7, ambient: 17.7 },
       cook: null,
       updated_at: 1650570688 },
     { id: '---',
       temperature: { internal: 17.8, ambient: 17.8 },
       cook: null,
       updated_at: 1650570690 } ] }

Does the meater cloud eventually purge this status data? Or does the last status maintain itself until the probes come back online again?

Bobby-McGonigle commented 2 years ago

Update

Never mind, my bad 😅

seems to clear itself out after a while.

Followup question, would you happen to know how long it takes for this data to clear out?