Difference between asset modules and asset categories?

121 views
Skip to first unread message

Duy Anh Pham

unread,
Nov 26, 2016, 4:09:30 AM11/26/16
to SiteWhere
Dear Derek,

What is difference between asset modules and asset categories?
There are REST API for both but they looks almost identical.

Thanks,
Duy Anh

Derek Adams

unread,
Nov 26, 2016, 9:50:23 AM11/26/16
to SiteWhere
Asset modules are a generic concept for grouping assets, whether loaded from the database or from an external identity/asset management system. Asset categories are the SiteWhere model objects for storing/grouping assets when stored in the database. When the asset module manager starts, all asset categories are loaded as asset modules so that the same APIs can be used whether interacting with assets in a local database, or assets in a remote management system.

fausti...@isen-lille.fr

unread,
Mar 21, 2018, 5:31:00 AM3/21/18
to SiteWhere
Hi,

I am trying to create Hardware asset category at SiteWhere start, but I only manage to create asset module
How can I automatically generate an asset category from an asset module ?
My point it to access those assets on web interface (locally as described on previous message)

Here is how I do :
  • On my sitewhere-tenant.xml template I added the following asset management which creates me the Hardware asset module :
<sw:asset-management>
 
<sw:filesystem-hardware-asset-module filename="hardware-assets.xml" moduleId="hardware-assets" moduleName="hardware-assets"/>
 
</sw:asset-management>
  • The assets on file hardware-assets.xml are created on the asset module hardware-assets
I know I can easily create the asset category with assets using the assetModel.groovy file and loading it on template.json initializer, but I want to do it the way I described, with xml files
I am using SiteWhere 1.9

Thank you,
Faustin
Reply all
Reply to author
Forward
0 new messages