Set variables via TCP
With TCP control, you can set variables on your FRAMR Player using a simple command syntax to dynamically control content.
This feature is particularly useful for managing dynamic content that changes based on external conditions or control commands. In this article, you will learn how to set variables via a TCP connection.
Variable control via TCP is available from Firmware Version 4.27 and up
Connection Settings
Before setting variables via TCP, you need to establish a connection to the FRAMR Player.
Required Connection Parameters:
• IP Address: The IP address of the player
• Port: 5005
Ensure that your system or control device establishes a connection to this port to send commands successfully.
Commands for Variables via TCP
Once the connection to the FRAMR Player is established, you can set a variable via TCP.
Command Syntax:
- VariableName: The name of the variable you want to set.
- Value: The desired value of the variable.
- $0A: Represents the line break character (LF – Line Feed).
Example Commands:
Command | Meaning |
---|---|
demo#true$0A | Sets the variable “demo” to the value “true” |
playlistID#100000$0A | Sets the variable “playlistID” to the value “100000” |
These commands can be used, for example, to display different content depending on the set variable or to display playlists based on the playlist ID.
Useful Tools
To test the TCP connection, you can use the free Windows program Hercules. This tool allows you to easily send TCP commands to the FRAMR Player and verify communication. Hercules provides a user-friendly interface for sending TCP messages and analyzing received data.