What are Spotsets?
In short, Items that match the requirement as specified in the Spotset definition belong to that Spotset. The requirement can be an Item property (i.e: its type, technology or code) that should be equal to, or match a given pattern. An Item can match more than one Spotset at the time.
The number of Items that match a Spotset can be used to trigger local Smartspot actions using Sense&Control. For example to enable a LED if an UHF RFID item is within immediate range of the Smartspot or open a door when an Item code is listed.
Example
This example first shows a couple Spotsets and their requirements, and Items and their properties. Then this example explains which Item belongs to a Spotset and the reasoning why.
Table: Spotsets
Set ID | Requirement |
101 | Item has RFID as technology. |
102 | Item has Bluetooth as technology. |
200 | Item has Tag as type. |
250 | Item code is listed on list: [2222, 3333]. |
Table: Items
Item Code | Type | Protocol | Technology |
1111 | Tag | nanoble | Bluetooth |
2222 | Tag | epcgen2 | RFID |
3333 | Smarttag | nanoble | Bluetooth |
Using the information in the tables above, which Item matches one or multiple Spotset as defined above and why?
- Item 1111 belongs to:
- Set 102; Property Technology equals Bluetooth.
- Set 200; Property Type equals Tag.
- Item 2222 belongs to:
- Set 101; Property Technology equals RFID.
- Set 200; Property Type equals Tag.
- Set 250; Property Code is listed on list.
- Item 3333 belongs to:
- Set 102; Property Technology equals Bluetooth.
- Set 250; Property Code is listed on list.
Spotset types
There are different types of Spotset available. The table below presents an overview of all supported Spotset types and a short description. For more detailed information see Spotset Reference.
Set Type | Description |
any | Wildcard Spotset matches all the Items when present/in range. |
list | Items with a code listed on this list, match this Spotset when present/in range. Using this type it's possible to synchronize Items from Brain to Smartspots using a ItemList on Brain. |
codemask | Items that (partly) match the code and mask match this Spotset when present/in range. |
coderange | Items that are within a specified code range match this Spotset when present/in range. |
codelength | Items that have an equal code (bit) length match this Spotset when present/in range. |
type | Items that have a specified Type match this Spotset when present/in range. |
protocol | Items that have a specified Protocol match this Spotset when present/in range. |
technology | Items that have a specified Technology match this Spotset when present/in range. |
areacode | Items that have a specified Area Code match this Spotset when present/in range. |
extended | Items that have extended data, contain a specified key and the value matches the requirements match this Spotset when present/in range. |
Unique identifiers
Each Spotset has an identifier that's called setid. This identifier is a number between 0 and 256, and is used for synchronization. The identifier should be unique within a collection of Spotsets for one Smartspot device. So this means that it's allowed if you use the same number to create the same Spotset type across multiple Smartspots, but it's not allowed to use the same number multiple times for the same Smartspot device.
Default Spotsets
The table below lists all the Spotsets that are by default available in the Smartspot. These Spotsets will automatically be created for each new device or after a factory reset. Other Spotsets types may be added and managed through Brain Server.
Setid | Set Type | Created and Maintained by |
0 | any | Smartspot |
1 | list | Smartspot |
2 | list | Smartspot |
101 | technology | Smartspot |
102 | technology | Smartspot |
Synchronization and Management
Spotsets are being synchronized between Smartspot and Brain as soon as the Smartspot connects with Brain. Synchronization of Spotsets is executed in both directions. Please note that Spotsets loaded from a different Brain server will be removed as soon as you connect the Smartspot to another Brain server. Default Smartspot Spotsets cannot be removed.
Using the Brain server Spotset Editor
This tool allows to manage Spotsets from all Smartspot devices within Brain server. To access this tool; In Brain select Utilities, Spotset editor.
Before creating any Spotsets with the type list, with the intention to be used to synchronize items from Brain server to Smartspot readers, first create a ItemList set in Brain Server (Utilities, Item Editor, Sets). Optionally add items to this ItemList set, however this can also be done at a later stage as well. Finally create the Spotset and link it to the ItemList.
For more information see section Smartspot Spotsets vs. Brain Server Sets below.
Using the Brain server REST Web API
The Brain REST Web API makes it possible to get an overview of all Spotsets stored on a Smartspot device, create new or remove existing Spotsets . It's not possible to change Spotsets once they are being created.
The following URL format can be used to access Sets in the Brain Server REST API:
- URL: https://{server}/api/spotsets/
- Server: Your Brain server, for example: brain.intellifi.nl
An overview of stored Spotsets can also be received via the build-in Smartspot web server. When the internal web server is enabled, open a browser and enter the IP address of the Smartspot. Select the Sets API option from the Menu. This opens a new tab in your browser and returns an overview (in JSON) of all stored Sets.
For more information see section Smartspot Spotsets vs. Brain Server Sets below.
Smartspot Spotsets vs. Brain Server Sets
Both the Smartspot and Brain use the concept of Sets. While their fundamentals are based on the same principles, they can not be exchanged directly between Brain server and Smartspot.
Spotsets are more focused on the Smartspot device with features like Sense&Control and management via the Brain server, while Brain Sets are used across all Brain Services, Components, Apps and REST web API.
List Spotset
The Smartspot List Spotset is the only exception and makes it possible to synchronize a Brain ItemList Set to one or multiple Smartspots. Synchronization is only supported in one way from Brain to Smartspot. This means that Items added to a Brain List Set are automatically loaded into the Smartspot List Set. On removal, the Item is also removed from the Smartspot List Set.
The figure below shows how Item can be synchronized via Brain server List Set and Spot List Spotsets.
Using the Brain server REST web API
To configure Item synchronization, you'll need to create a new Brain Item List Set (or use an existing one) and for each Smartspot that should store the Items, a List Spotset definition that contains a reference (resource ID) of the Brain Item List Set.
Create a new Brain Item List Set. Keep the returned resource ID. If using an existing one, find the resource ID.
curl -d '{"label": "Sync Items to Smartspots"}' -X POST \
-H "Content-Type: application/json" https://{brain-url}/api/sets/itemlists
Response:
{
"id": "BRAIN_SET_RESOURCE_ID",
"label": "Sync Items on this List to Smartspots",
"total": 0,
"sha1": null,
...
}
Create a new List Spotset and use the resource ID of the Brain Item List Set as value for the itemlist.
curl -d '{"setid":40,"type":"list","itemlist":"<BRAIN_SET_RESOURCE_ID>"}' \
-X POST -H "Content-Type: application/json" \
https://{brain-url}/api/spotsets
Response:
{
"id": "SPOT_SET_RESOURCE_ID",
"itemlist":"<BRAIN_SET_RESOURCE_ID>",
"mutations": null,
"total": 0,
"sha1": null,
...
}
All items added to or removed from this Brain Item List Set are now automatically synced to a Smartspot.
Using the Brain server web application
- Use an exisitng ItemSet or create a new one. Open Item Editor (Utilities) and create an ItemSet. Use a name that is easy to identify and as a reference for the purpose, such as "Access Control". It is not required to create a new ItemSet for each Smartspot. Smartspot Spotsets can use the same ItemList source for synchronisation.
- Add items to the ListSet. This step can also be done at a later stage as Brain server will synchorize all changes to the Smartspots.
- Open Spotset Editor (Utilities).
- Create one or more Spotsets with type List and select the Smartspot using its serial number. Good practice is to use the same ID for all Spotsets using the same ItemList. This makes it easier for Sense&Control sharing the same schema (setid) for Smartspot devices. Fill in the max required item capacity. This can not be changed later without removing the Spotset completely. A Smartspot can store up to 8000 items in total, a single Spotset can store max. 1000 items.
- Update Sense&Control for the Smartspots. Refer to Sense&Control for more information.
For more information about the supported Set types see Spotset Reference.
Comments
0 comments
Please sign in to leave a comment.