SmartWorks Support Service
Introduction
A specific support service has been created for the edge to take care of setting up clients, subscribers and publishers for a Thing and to sync a Thing with the SmartWorks cloud: Support SmartWorks service (ase-support-smartworks).
Logic has been put at the Edge specifically for the SmartWorks cloud integration, but as a separate service (if you want to use your own cloud, you build the logic).
Thing(Description) Sync
A REST API client is used to make cloud API calls. For configuration the API URL is needed, as well as a Client ID and Client Secret (for this an App needs to be set up on the cloud, see Sync App section).
- When a Thing is created at the Edge (Category needs to
be set on the Thing description):
- first create it on the cloud so we have the UID
- if the Category does not exist on the cloud, create it first
- then create it at the edge
- set up Thing Categories (MQTT subscribers and publishers) for the Thing
- when a Thing is updated at the Edge (Category needs to
be set on the Thing description):
- update the Thing on the cloud
- when a Thing is deleted at the Edge (Category needs to
be set on the Thing description):
- delete the Thing on the cloud
- if Thing Categories exists, delete them
If the REST client cannot connect or is not authorized, then none of the cloud sync calls can happen.