This article describes all available Senses in Sense&Control with their short code identifiers and descriptions. The reader of this article should have basic understanding of the Sense&Control concept. If not, please visit the Sense&Control Introduction article first.
What is a Sense?
A Sense can be seen as a probe or sensor that senses the state of hard- or software components of a Smartspot device. The output of a Sense represents the current state and updates as soon as a change has been detected. More information about Senses see Sense&Control Introduction.
Quick Reference List
Short Code ID | Name |
in1 | GPIO Hardware Input 1 |
in2 | GPIO Hardware Input 2 |
tick | 5Hz Clock Generator |
t | Time |
eth | Ethernet Link Status |
ip | DHCP IP status |
s | Server Connection Status |
boot | Device Startup State |
r | RFID Reader State |
hit | RFID Hits Received |
set{setid}{stat} | Total Items matching Set requirement |
set{setid}a{antenna}{stat} | Total Items matching Set requirement for given antenna |
bs{id} | Brain Sense |
ws | Web Server State |
#{val}o | Return a Constant Value |
Detailed Reference List
in1
in2
GPIO Hardware Input 1 and 2
These GPIO Hardware inputs make it possible to connect external wiring to the Smartspot and trigger a Sense&Control flow. The 2 inputs are available via the green connector located near the Ethernet connector.
Output options
0: input not activated
1: input is activated
tick
5 Hz Clock Generator
This clock generator generates a continues high low signal with a frequency of 5 Hz. This output can be used as clock input for other Controls such as: Timers, Delays, etc...
Output stream
0,1,0,1,0,1...
t
Time
This sense returns the time in seconds since Jan 1970 and updates each second.
Output example
1536154195
eth
Ethernet Link Status
Returns the current connection status of the Ethernet link.
Output options
0: link is disconnected
1: link is connected
ip
DHCP IP Status
Returns if a valid IP address has been acquired from DHCP. In static IP mode, this sense indicates the current connection status of the Ethernet link.
Output options
0: false
1: true
s
Server Connection Status
Returns if the device is connected with the server. This sense can be used to monitor server connectivity for example using an external LED. The default Sense&Control schema uses this sense to turn the front LED to RED or GREEN depending on this connection state.
Output options
0: not connected with server
1: connected with server
boot
Device Startup State
Returns the startup state of the device. The state default is set to initial. During the boot process of the device, this state will be updated according to the reason for the (re)boot.
Output options
0: initial and default state
1: first boot since device powered up
2: reboot due to firmware update or scheduled restart
3: reboot due to watchdog resetting application software
r
RFID Reader State
Returns if the build-in RFID Reader is operating or idle. The reader may be in idle if:
- There are no antennas connected or,
- The user disabled the reader in Smartspot configuration or,
- The user disabled the reader using the
rd
Reader Inventory Disable Control.
Output options
0: rfid reader in idle state, no inventories.
1: rfid reader is operating and running inventories.
hit
RFID Hits Received
Returns a positive number if the Smartspot received RFID hits during the last period of 250ms. The default Sense&Control schema uses this sense to control the Red colored LED located near the DC input and Ethernet connector.
Output options
0: no RFID hits received in last 250ms.
1: received one or more RFID hits in last 250ms.
set{setid}{stat}
Total Items matching Set requirement
Returns the number of Items that match the requirement defined by the given Item Set. Depending on the statistics type, these items should be present, or in a certain proximity range of the device.
Arguments
setid
Unique set identifier. Number between 0 and 255.stat
Statistics type:- a: Number of present Items that match the requirement in all proximity ranges,
- i: Number of present Items that match the requirement in Immediate range,
- n: Number of present Items that match the requirement in Near range,
- f: Number of present Items that match the requirement in Far range,
- t: Total Items stored in a Listset,
- cs: Contains this set the closest Item?
- ca: Contains this set the closest Area Code?
Examples
See the table below for an overview of all default Item Sets.
- Returns the number of present Items that have the technology RFID:
set101a
- Returns the number of present Items that have the technology Bluetooth and are in immediate range:
set102i
set{setid}a{antenna}{stat}
Total Items matching Set requirement for given antenna
Returns the number of Items that match the requirement defined by the Item Set for the given antenna number. Depending on the statistics type, these items should be present, or in a certain proximity range of the device.
Arguments
setid
Unique set identifier. Number between 0 and 255.antenna
Antenna (zone) number. These numbers are supported: 0 (BLE), 1 - 8 (RFID).stat
Statistics type:- a: Number of present Items that match the requirement in all proximity ranges,
- i: Number of present Items that match the requirement in Immediate range,
- n: Number of present Items that match the requirement in Near range,
- f: Number of present Items that match the requirement in Far range,
Examples
See the table below for an overview of all default Item Sets.
- Returns the number of present Items on antenna 1 that have the technology RFID:
set101a1a
- Returns the number of present Items on antenna 8 that have the technology Bluetooth and are in immediate range:
set102a8i
Default Sets
The table below lists all the sets that are by default available in the Smartspot. Other (customized) sets may be added through Brain.
Setid | Set Type | Requirement |
0 | any | wildcard, all items match this set. |
1 | list | none, default empty list. |
2 | list | none, default empty list. |
101 | technology | rfid, All RFID items match this set. |
102 | technology | bluetooth, All Bluetooth items match this set. |
Output options
0: no matches found.
>0: total matches for this set
bs{id}
Brain Sense
Enables the user to influence Smartspot Sense&Control via the Brain server and remotely trigger a flow. For example, this Sense can be used to start and stop the RFID reader remotely, control the Smartspot GPIO Hardware Output or disable and select antennas directly from your application.
To change the value of the Sense output, request a Sense update via the Brain Web API. Push the new output value in the senses_request
of the Smartspot device you would like to update. The current status of each Brain Sense (if used before) is represented by senses
.
Arguments
id: Integer number in range of 0 and 5.
Output value
Returns the integer number as requested via the Sense update.
ws
Web Server State
Returns if the build-in web server has been enabled and available.
Output options
0: webserver not available.
1: webserver enabled and available.
#{val}o
Return a Constant Value
Returns a constant value.
Arguments
val: Integer number that can be positive, zero or negative.
Examples:
- Returns constant value 0:
#0o
- Returns constant value 12:
#12o
- Return constant value -3:
#-3o
Output options
Returns the number as specified by the argument.
Comments
0 comments
Please sign in to leave a comment.