Update,
Was able (with help from @Ubidots ) to implement a better Webhook that would not need to be changed as the number of samples per reporting period changes.
This is based on @rickkas7's intermediate webhook tutorial. After experimenting with the different approaches, it turns out that with this form, you can have as few or as many samples per reporting period and use the standard Ubidots bulk API (link above) endpoint. The structure looks like this:
{
"array":[
{{#a}}
{
"banana":{{b}},
"capybara":{{c}}
},
{{/a}}
{}
]
}
As Rick points out in his tutorial, the extra {} after the datapoints makes for a compliant JSON payload. Ubidots has no issues ingesting this webhook:
I will provide a specific example of this in the thread on the garden watering project.
With this piece, You can use the sleepHelper library today as we wait to see what the back-end process will be.
Thanks, Chip