- 18 Sep 2023
- 3 Minutes to read
- Print
Install PhidgetBoard add-on
- Updated on 18 Sep 2023
- 3 Minutes to read
- Print
This Windows & Linux Player add-on supports the use of PhidgetBoards with connected sonar sensor or digital inputs. In the button mode (digital input), the add-on starts, or stops, event playlists on the
player. In the sonar mode, the addon terminates the screensaver of a player if movement is detected in front of the sensor. If continuing movement is detected, the idle timer is constantly reset.
Hardware
The following two hardware combinations are available:
Button mode
PhidgetInterfaceKit 8/8/8 1018_2
Two switches must be connected to the digital input pins of the Phidget board. Each switch must be connected to the ground pin (G) and one input pin (in this case: Input 0 and Input 5).
If the switch is not pressed, the circuit is closed, and the input signal is low because it is connected to ground. If the switch is pressed, the circuit is opened, and the input signal is set to high by the pullup resistor of the Phidget board.
Schematic:
Sonar mode
This mode can be used with the add-on SonarPhidgetDistanceSensorService and the given components:
- Phidgets Hub:
- VINT Hub Phidget
- HUB0000_0
- Phidgets Sensor
- Sonar Phidget
- DST1200_0
The sensor must be connected to the hub and the hub to the player.
Software
Player: Grassfish Qt (Windows or Linux) version 11.3.1 or higher
Add-on:
- PhidgetsService_1.0.0_win-x64.zip
- PhidgetsService_1.0.0_linux-x64.zip
Installation
The add-on can be installed via the console or via the IXM Platform database.
Windows
Console command to install the add-on: "C:\GVClient\tools\current\gfBootstrap\gfBootstrap.exe" "C:\REPLACE-PATH-TO-ZIP-FILE\PhidgetsService_1.0.0_win-x64"
Reboot the player afterwards.
Linux
Console command to install the add-on: "/opt/grassfish/tools/current/gfBootstrap/gfBootstrap" "/REPLACE-PATH-TO-ZIP-FILE/PhidgetsService_1.0.0_linux-x64.zip
Reboot the player afterwards.
Add-on configuration
The following parameters can be edited:
Section Phidget
Setting | Value | Description |
---|---|---|
LogLevel | 3 | 1 … only errors 2 … 1 + warnings 3 … 2 + general information 5 … 3 + debug information |
LogExpireDays | 30 | Log files are cleaned up after x days |
MaxLogFileSizeMb | 200 | Max. file size of each log file |
PreventDoubleEventTrigger | false | If set to true, an event playlist is not triggered again if it has been played already. |
PlayerHost | localhost | Host of the player. |
PlayerPort | Read from player config settings (config.db) | Port of the local server of the Qt player. |
PhidgetInitTimeoutMs | 5000 | Timeout for initializing the connection to the Phidget board / hub in milliseconds. |
PhidgetOpenTimeoutMs | 5000 | Timeout for opening the connection to a connected sensor in milliseconds. |
SleepAfterErrorMs | [Value] | Timespan to hold after an error occurred in milliseconds. |
Section DistanceSensor
Setting | Value | Description |
---|---|---|
Enabled | false | Enables the sonar distance sensor mode |
HubPort | 0 | The Phidgets hub port, the sensor is connected to |
SensorDataIntervalMs | 250 | Interval the sensor sends data to the add-on [milliseconds] |
ActivateSonarQuiteMode | False | Activates the quiet mode of the sensor. Activating it leads to reduced accuracy of the sensor data. |
MaxSensorDistanceMm | 10000 | Max. distance of movements the sensor processes [millimeters] |
MinDetectionDurationMs | 2000 | Min. duration of a movement that leads to a reset of the idle timer [millimeters] |
DistanceChangeTriggerMm | 50 | Min. distance change between two sensor data sets for a movement to be detected [millimeters] |
DetectionTimeoutMs | 2000 | Timespan after which previous detected movements are discarded [milliseconds] |
MinTimeBetweenIdleTimerResetsMs | 1000 | Min. timespan between two idle time resets after each other [milliseconds] |
After settings have been changed in the config.ini file, the gfPlayer service must be restarted.
Windows
On a Windows Qt Player, the configuration file config.ini file can be found here: C:\GVClient\add-onConfigs\gfPlayer\PhidgetsService\config.ini
Before editing the file, the Read-only attribute must be removed in the Properties window.
Linux
On a Linux Qt Player, the configuration file config.ini can be found here: "/opt/grassfish/add-onConfigs/gfPlayer/PhidgetsService/config.ini"
Button mappings
The mappings.json file is in the same folder as the config.ini file in
- Windows: (C:\GVClient\add-onConfigs\gfPlayer\PhidgetsService\mapping.json
- Linux: /opt/grassfish/add-onConfigs/gfPlayer/PhidgetsService/mapping.json.
The readonly property of the file must also be removed.
For every button, an entry in the Mappings JSON array must be inserted. Each object consists of 3 properties:
- Button … ID of the digital input pin
- EventType … Type of event to be triggered. Possible values are:
- Start
- Stop
- StopLoop
- StopAllEventPlaylists
- EventCode … The code of the event to be triggered or stopped. If the EventType is StopAllEventPlaylists, this property is optional.
After settings have been changed in the config.ini file, the gfPlayer service must be restarted.
IXM Platform configuration
The event playlists in the IXM Platform must be configured as shown below:
The screen layout in the IXM Platform must contain the related program scheme:
The program scheme in the IXM Platform must contain the event playlists:
The EventCode BT0 of the button must be assigned to the event Once by ID in the corresponding event playlist properties in the IXM Platform:
The EventCode BT5 of the button mapping must be assigned to the event Loop by ID in the corresponding event playlist properties in the IXM Platform: