Google sheets sync

Hi All,

I am building a mobile scale that logs weight with a RFID tag. I have this setup sending the data to google sheets but the issue is the device will most likely loose connectivity intermittently so I need to buffer the data until its online again to sync (the setup is using a battery so the buffered data must be retained) . This could probably be done by writing to file and fetching when a ping to google is successful but is it not possible to save to sheets in offline mode and its syncs by itself?

If I turn off the wifi I get these errors:
"Auth Error: FetchError: request to failed, reason: getaddrinfo EAI_AGAIN"
connect: Network is unreachable
Please check that your service provider or network device has IPv6 enabled

Can I change the API to point at the offline file?

Basically, GS isn't really a very good choice of technology for what you are trying to achieve I'm afraid.

You really want a database that manages sync itself. Something like CouchDB or one of its variants. Since that follows an "eventually" sync model. But anything that supports local writes with delayed sync.

Otherwise, you certainly need to keep a local cache of the data and a track of what has been written. You might also need to keep track of the last used row in the SS so that you can tally up attempted writes and know if something went wrong (e.g. loss of network part-way through a write which could corrupt the data).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.