Using the cumulocity java-agent is there a way to upload a file (i.e. zip) to the FILES REPOSITORY, on the Admin page, then either push this file to all my devices or instruct all devices to pull this file?
2 Answers
You can use the software management process (in devicemanagement).
You upload the file to the software management. Afterwards you can use the file from the software plugin. This will create an operation for the device which contains a direct link to the file.
On the device you then just need to call a GET on this link. There is no specific service implemented for that at the moment.
If you are not talking about software but files in general I would recommend a similar process. Send an operatio to the device that contains a download link to the file.

- 2,039
- 1
- 14
- 23
I think SW installer is only half solution as the java-agent may b broken currently (cumulocity-linux-agent-7.29.0). Agent says:
[CumulocityLongPollingTransport-scheduler-3] WARN c8y.lx.agent.JavaSoftwareDriver - Malformed URL: common-notification-6.17.0.jar
[CumulocityLongPollingTransport-scheduler-3] WARN c8y.lx.agent.JavaSoftwareDriver - Malformed URL: commons-io-2.4.jar
[CumulocityLongPollingTransport-scheduler-3] WARN c8y.lx.agent.JavaSoftwareDriver - Malformed URL: svenson-1.3.8-6.17.0.jar
The operation actually does not have the full URL only the filename:
{
operations: [
{
...
status: "PENDING",
description: "Update device software.",
c8y_Software: {
rest-representation: "rest-representation-7.29.1.jar",
tinkerforge: "tinkerforge-2.1.2.jar",
...
I could only get the SW installer work with the java agent by hosting the files externally and using such syntax on the admin page:
NAME: tinkerforge-driver
VERSION: http://my_ip/tinkerforge-driver-6.17.0.jar
FILE: http://my_ip/tinkerforge-driver-6.17.0.jar

- 73
- 1
- 7