The cloud returner will buffer the data and then push it to the autopi cloud.
Currently it’s possible to set any returner you want, but unfortunately most returners requires some additional configuration in the minion configuration file, and this is currently managed from the cloud - and not really possible to modify on the device without it being overwritten when the minion process restarts.
So if the returner needs no additional configuration it can be used, but I’m not sure if there exists any returners that doesn’t expect some additional configuration.
Can you explain what you are trying to achieve?
The cloud returner will take any data you send it, and send it to the cloud, so if you have a module called
my_rainsensor
with a function called
get_mm_of_rain
you can have a job that runs the function by calling my_rainsensor.get_mm_of_rain
and if any arguments is required, those can be configured in the args field, and the same for kwargs (just remember that kwargs should be in the format some_kwarg=123
Put it another way, is there a way to configure a job or custom code so that the results ends up in the events list ? I’ve tried some of the documented retainers but I didn’t see anything.
Obviously the end game is to see the results of jobs and custom code nicely graphed in the Dashboard view and we arn’t there yet, but it will be useful to be able to view the results somehow pending this so we can explore what data is available from the car.
It will be stored on our cloud storage system, and then (soon) you will be able to configure the dashboard to load your custom data, and display it in a chart etc. So when a job executes, and the returner is set to ‘cloud’ - the result is (today) uploaded to our cloud and stored - but you are unfortunately not yet able to retrieve it.
When setting up a job, you can set specific arguments to that job, but I don’t believe it’s possible to pass parameters to the returner - at least not via the --return_kwargs argument.
So you could go and add the necessary configuration fields to the minion config. Currently the minion config lives on the cloud, and is retrieved to the minion on startup, so it will overwrite any local changes.
But it may be possible to have custom sections of the minion config in the minion.d directory inside /etc/salt/minion, but this is solely a saltstack feature and is not yet managed and or supported by us.
Events
You can actually fire events from the custom modules, but only events with a specific prefix are uploaded to the cloud.
But it’s a great idea to be able to fire custom events and show them in the events list. To be able to do so we are adding a custom prefix that people can use to create custom events.
To see an example of sending events, you can check out the core repository on github
Timeline
We have a new release coming out monday (i hope) with a bunch of stuff - and the next thing I will start working on after the release, is being able to retrieve all custom data from the API, and show it in the configurable dashboard.
So we are talking weeks, not months before you will be able to retrieve the data in the API and configure the dashboard to show it in a chart.