AdvanView is a real-time movement detection and event processing system designed to enhance object tracking and alarm validation in smart environments. It monitors directional movements of tagged objects and generates contextual events that help systems make informed decisions.
Inside AdvanNet, we can find AdvanView Service. This service will allow the user to interact easily with AdvanView's configuration. The main features of this service are:
AdvanView configuration: In AdvanView Service, users will be able to configure the  ocupation box which AdvanView will operate.
IMPORTANT: In order to save the configuration changes and apply them to the AdvanView, it's necessary to dissable - enable the service.
AdvanView's preset configurator: In order to change the parameters for the AdvanView, it is possible to choose between 4 presets.
All of them will modify the parameter that sets the zone in which it will detect or track objects. 
This parameter has 4 values, which are: X, -X, -Y, Y (depth (front), depth (back), width (left), width (right)). 
The default configuration has the following values for the ocupation box = 1000 -1000 -1400 1400;
(Note that, when we say 'right' and 'left', we are referring to the point of view from inside the store.)
AdvanSafe - Primary Only:  This configuration is for when you have only one AdvanSafe installed. The zone will be centered and symetric.
The values for the advwBoundaryBox parameter will be: 1000 -1000 -1400 1400
AdvanSafe - Primary (right) + Secondary: This configuration is for when you have 2 AdvanSafe installed, being the one in the right the primary and the one in the left the slave. The values for the advwBoundaryBox parameter will be: 1000 -1000 -3400 1400
AdvanSafe - Primary (left) + Secondary: This configuration is for when you have 2 AdvanSafe installed, being the one in the left the primary and the one in the right the slave. The values for the advwBoundaryBox parameter will be: 1000 -1000 -1400 3400
AdvanGate - Primary (right): This configuration is for when you have an AdvanGate installed  with the AdvanView in the right side.
The values for the advwBoundaryBox parameter will be: -500 500 0 3500
AdvanGate - Primary (left): This configuration is for when you have an AdvanGate installed with the AdvanView in the left side.
The values for the advwBoundaryBox parameter will be: 500 -500 0 3500
Custom: This configuration allows the user to set the parameters as desired.
Enabling / disabling the service: Once the service is enabled, it will initialice the device, load the configuration, start the heartbeat and connect. When disabled, even if the device is still connected to the USB port, it will remain dormant until enabled again.
To save the changes in the configuration, a disable - enable is needed.
AdvanView includes a movement detection feature that enables the system to generate specific events based on the direction in which an object moves relative to a defined area (called the Occupation area). These events help improve tracking accuracy and contextual awareness.
Each event contains the following information:
Subtype: Describes the nature and direction of the movement.
Object ID: Identifies the tracked object (not present in heartbeat events).
The possible subtypes are:
Crossing Events:
Cross In: The object exits the Occupation area moving towards the inside. (ADVW_CROSS_IN)
Cross Out: The object exits the Occupation area moving towards the outside. (ADVW_CROSS_OUT)
Occupation Entry Events:
From Inside: The object enters the Occupation area coming from the inside. (ADVW_OCCUPATION_FROM_IN)
From Outside: The object enters the Occupation area coming from the outside. (ADVW_OCCUPATION_FROM_OUT)
Undefined Direction: The object enters the Occupation area, but the direction cannot be determined. (ADVW_OCCUPATION_UNDEFINED)
System Heartbeat:
Heartbeat: A periodic signal indicating that AdvanView is active and connected. These events do not include object identifiers. (ADVW_HEARTBEAT)
When an event occurs, besides being logged in the AdvanNet logs, it will be saved in a csv file in /home/keonn/csvs/data.csv.
Movement Trigger Filter
This feature ensures that alarms are only triggered when there is clear evidence of movement through a monitored area, such as a doorway. It works by analyzing movement events detected by AdvanView and only considers alarm candidates that occur within a short time window after such an event.
The system supports three types of movement-based triggers:
Entry Detection (Default): An alarm is considered only if there has been a recent movement into the area.
Entry or Exit Detection: An alarm is considered if there has been either an entry into the area or an exit from it. Only one of these is needed to activate the filter.
Combined Entry and Exit Detection: An alarm is considered only if the same object has both entered and exited the area. This mode is highly restrictive and generally not recommended due to reliability concerns.
How it works?
This system enhances alarm accuracy by integrating with AdvanView event data. It works by monitoring specific triggers from AdvanView and using them to validate or delay potential alarms.
When a trigger event occurs, the system starts a short time window during which any potential alarm is considered valid if it falls within that window. If a potential alarm happens outside this time frame, it is temporarily held in a cache instead of being immediately confirmed. This delay allows the system to wait for a possible confirming event from AdvanView.
The system periodically reviews the cached alarms to determine whether they should be confirmed or discarded. This review happens regularly, even if no new data is received, ensuring that alarms are processed correctly even when the confirming event is the last one to arrive.
Additionally, the system includes a health check that verifies the connection to AdvanView every few seconds. If AdvanView is not connected, the system will behave as if no valid triggers are present, preventing false alarms.
Configuration:
To use this functionallity use the following Advanced JSON Conf in EPC_EAS_ALARM_200:
"useAdvanView":true
"advanViewWindow":X (recommended 2000)
"debugADVW":true (To log debug messages)
"useDoubleExitCondition":true (To use the  second trigger condition, recomended true)
"useTrackExits":false (To use third trigger condition, recomended false)
Full example: {"useAdvanView":false, "advanViewWindow":2000, "useDoubleCondition":true}