Strategy for offloading heavy work to another device?

I was about to start working on a script that should not be too hard to write in Scriptable, but then I noticed that the online JSON is over 30 MB (with no parameters to request only current data instead of the entire history) and it contains hundreds of entries that I need to sum up to get the single value that I want to display in a widget…

I’m kind of afraid this is a bit much for a script that I want to run automatically (though only once per day) and was wondering whether I could offload the downloading and calculation to my Raspberry Pi. However, I’m not sure how I could provide that value (and maybe a few more) in a simple way without setting up a webserver and database on the Pi.

Tips?

Hm, maybe using online file storage that allows me to update files via an API?

Pastebin does not seem to support updating?

Maybe Fastmail’s file storage using WebDAV will do…

you could do :wink:

  • a simple shared file (fileshare)
  • a small webserver (flask or cherrypy in python)
  • nodeRed server (very good Rpi support)
  • a microservice (remote procedure call)

this may be a bit technical - feel free to ask me anything

Also see Let’s Play Master And Servant.

  • Using the Node.js webdav module it was super simple to upload JSON data to Fastmail.

  • Via Fastmail’s “website” functionality I made the JSON files available (to Shortcuts etc.).

Later today I will find out whether the Pi will autmatically fetch, modify, and upload new data (using crontab) and my iOS widget will automatically be updated with this data (using “Personal automation” on iOS).

I love it when a plan comes together”…