Advanced Software Management - software list doesn't appear with the new SmartREST templates

Hi, we are trying to use the SmartREST templates for advanced software management on our device agent, aka, template [140,setAdvancedSWName1,AdvancedSWVersion1,AdvancedSWType1,AdvancedSWurl1,sw2,ver2,type2,url2,…] that supports typed software (Cumulocity documentation). As per the prerequisites, it says that the migration to the new model must get rid of the c8y_SoftwareList and add c8y_SupportedSoftwareTypes to the device detailing the supported software types (What´s new - Cumulocity IoT Guides). Installations work as before with this new extension, except that without the c8y_SoftwareList, the list of installed software does not appear anymore, although as we can see from the logs, the software list is being published (and the software items have been updated in the repository to hold the softwareType fragment).

What product/components do you use and which version/fix level are you on?

Cumulocity 10.14

Is your question related to the free trial, or to a production (customer) instance?

Customer

What are you trying to achieve? Please describe it in detail.

I would like the software list to appear with the type information as detailed in the documentation What´s new - Cumulocity IoT Guides

Have you installed all the latest fixes for the products and systems you are using?

Unsure - the documentation says a subscription to advanced-software-mgmt microservice is required, which is not listed in the default subscriptions of the management tenant, however, the software repository already supports Software Type field.

Hi Deepthi, the advanced-software-mgmt is needed for this template. Please contact your support to subscribe to it for your tenant.

2 Likes

Hi @Yishu_Zhong, thanks for the reply. I had our support subscribe to the microservice. It seems the microservice is able to receive the POST request from the device as we can see from the logs below:

although the list of installed software doesn’t appear. I understand that for the software list to appear, the device needs to call the endpoint “/service/advanced-software-mgmt/software?deviceId=<mo_id>” and the request to the endpoint returns an empty array. (Software) Child additions have also not been created for the device.

Hi,
can you paste the JSON of your Device? Did you set the two properties “c8y_SupportedOperations” and “c8y_SupportedSoftwareTypes” (see here) on your device?

Hi @Korbinian_Butz, here is the snippet of the device mo (with c8y_SoftwareList no longer present):

I’ve also updated the software packages to have the “owner” fragment set to “service_advanced-software-mgmt”. If I understand that right, the c8y_InstalledSoftware is set by the microservice itself which is then used by the UI to list the installed software list. So far, the software dialog shows the supported software list, the only thing that is missing is the list of installed software.

Could it be that a combination of typed and untyped software prevents the display of the software list? As some of the available software on the device comes directly from the firmware and is not synced with Cumulocity software repository (a backend sync microservice is responsible for syncing software items from external 3rd party repo to Cumulocity)

Did you check that your MQTT payload size does not exceed 16kb?
I had the same issue some time ago with the template 140 and devices which have a lot of software installed. I fixed it by switching to REST for the SoftwareList updates.

Hi Deepthi,

the software type is not mandatory when you create a list of advanced software, so that should not be a problem.

Can you check the response of this request: GET /service/advanced-software-mgmt/software?deviceId= . The software in this response will be displayed on the UI no matter they have a type or not.

@Stefan_Witschel @Yishu_Zhong Thanks very much for your replies. The MQTT payload was under limit and the request to the query yielded an empty response. It seems that having an empty url in the request is a no-no for the advanced-software-mgmt microservice. The software packages have been appended as child additions to the device now with the url in the request set to a non-empty value.

Hi @Deepthi_Deepthi

hm I reported that some time ago with 10.14 and thought it is fixed already. Which c8y version are you using for your test?

allInstalled.append(pkg.shortname)
allInstalled.append(pkg.installed.version)
 allInstalled.append('apt')
#FIXME Bug in 10.14 Cumulocity that URL must not be null and is mandatory
allInstalled.append('test')
return [SmartRESTMessage('s/us', '140', allInstalled)]
1 Like

@Stefan_Witschel I see! Yes, currently we’re at 10.14.0.273. I assume it was not fixed in 10.14…

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.