UDP, TCP. REST Subscriber

PNW Subscriber allows the third-party service to gather pick events from the online PNW SmartBox when an assigned SmartTag is picked. 

To gather events, these steps must be completed.

  1. PNW SmartBox and SmartTags must be active.
  2. PNW SmartBox must be online.
  3. PNW Subscriber must be defined from PNW Web Panel to the same stand SmartBox is assigned.
  4. REST, TCP, or UDP servers must be active to receive messages.

As soon as a SmartTag, which is assigned to the defined stand, is picked, the PICKSTART event is sent to the defined server. When the user puts the SmartTag down, the PICKEND event is sent.

 

Define Subscriber

  1. Login to the web panel from panel.picknwatch.com.
  2. Click the Stands menu.
  3. Click on the stand you want to receive events from.Screenshot 2024-02-01 at 16.48.25
  4. Click on Actions > Manage Subscriber button.
  5. The popup on the figure below will be opened.Screenshot 2024-02-01 at 16.48.25

There are 3 types of servers you can use to get events.

  1. TCP Server:  Enter the TCP server address and port to the Subscriber Endpoint.
    • E.g.:   127.0.0.1:9001
    • Every message ends with \n character to separate messages.
  2. UDP Server:  Enter the UDP server address and port to the Subscriber Endpoint.
    • E.g.:   127.0.0.1:9002
    • Every message ends with \n character to separate messages.
    • To broadcast the messages to every device in the network, 255.255.255.255:9002 can be entered. To broadcast a smaller network, a subnet local broadcast address can be used, such as 192.168.1.255:9002.
  3. REST Server: Enter the Rest server address to the Subscriber Endpoint. It must be a POST method receiving text/plain content type.

If you check Security Enabled, the messages will be encrypted with AES 256 symmetric algorithm in Base64. 32-character security key must be given to receive encrypted messages. On the server side, the message must be decrypted before processing.

https://www.devglan.com/online-tools/aes-encryption-decryption can be a sample site to decrypt the message. Input Text is Base64, Select Mode is ECB, and Key Size is 256 bits.


 

Subscriber JSON Model:

It is not composed of an array, and it only contains the action field. The following JSON messages are sent.  

(This JSON Model requires PNW software version 2.20.0-B40) 

 

"PICKSTART-PRODUCTCODE"

The Product Code in the"text string" is the same Product Code number that is defined in the PNW Panel, as shown below in the green box.

 

For pick start event:  

{"action": "PICKSTART-0001"}

 

For pick end event: 

{"action": "PICKEND-0001"}

 

 

BrightSign Integration

There are two ways to send UDP messages to BrightSign Players.

  1. Over Local Area Network (LAN)
  2. Over USB-C to Ethernet Connector.
1 - Over LAN Local Area Network

BrightSign Player(s) and the PNW SmartBox must be on the same LAN for UDP communication. The BrightSign player can be set up to listen for UDP messages from the PNW SmartBox. When a SmartBox is triggered, it sends a UDP to the network. The BrightSign player listens for UDP messages. Once a message is received, the BrightSign software parses the UDP. Once the message is parsed, it can be used as a trigger event in the BrightSIgn presentation.

The PNW UDP message contains more information than is needed to trigger an event. To use a specific piece of information in the UDP message, you can use a wildcard to parse the specific information you need, i.e. listen for UDP  “message_<any>" and then put the wildcard <any> information into a user variable. Use the variable to play a clip in an onDemand state. 

Please visit https://brightsign.atlassian.net/wiki/spaces/DOC/pages/370671898/UDP+Input for more wildcard information.

2 - Over USB-C to Ethernet Connector.

In cases where the BrightSign player is network connected, but the PNW SmartBox is not, you can use the BrightSIgn RJ45 to USB adapter (CBL-USBC-RJ45 RT) to connect the SmartBox to the BrightSign player. This adapter, with a software plugin, allows the SmartBox to connect to the internet through the BrightSign player’s network connection.

  1. Connect the USB adapter to the BrightSign player and the SmartBox.
  2. Add the pizza.brs plugin to the BrightAuthor presentation. This plugin enables the ethernet to USB connection.
  3. To use the UDP data from the SmartBox, follow the steps in the “Over LAN Local Area Network” section above.