Subject of the issue
I have created a service which runs Flask and receives sensor updates as POST message. Service is up and is updating Python shelve db correctly.
I have trouble using service worker to upload sensor readings from the shelve db to AutoPi.io Cloud .
I’m definitely doing something wrong and running out of ideas what to try next Would be interested in direct tips how to get things to work and link to corresponding documentation which defines correct way to upload the data.
Your environment
- Updated 2021-03-13
Steps to reproduce
-
Create a new service from repo using “Custom Code”.
-
Create “dump” and “cloud” hooks to the new service.
-
Create a service worker which uses “dump” handler and “cloud” returner:
Expected behaviour
Data from worker/returner is uploaded to AutoPi.io Cloud
Actual behaviour
No data is uploaded to AutoPi.io Cloud from service worker. Only workaround with custom execution code + cron job uploads to dashboard.
Workaround is following:
-
Create a custom execution code which gets data from the same shelve db:
-
Cron job fetches data using the custom execution code and uses “cloud” returner:
-
Data is visible in the dashboard: