Step-by-step tutorials for Digital Signage IoT integration
From first event to production deployment
[ 5 Tutorials | Hands-On | ~95 Minutes Total ]
Before starting, ensure you have the following components ready:
Send a simple "Hello World" event from command line to SignPlayer.
On your Windows PC, check that SignService is running:
Open Services (services.msc)
Find "SignService" or "SignageWatchDog"
Status should be: Running
Open Command Prompt on Windows and run:
:: On Windows ipconfig :: Look for IPv4 Address, e.g., 192.168.68.52
From any machine with curl (Pi, Windows, Mac, Linux):
curl 'https://192.168.68.52:8094/player/sendEvent?eventName=helloWorld&store=1' \ -X POST \ -H 'Content-Type: application/json' \ --data-raw '{"message": "Hello from IoT!"}' \ --insecure
Important: Replace 192.168.68.52 with your Windows PC IP address.
The event was sent! To see it, you need to configure a scene in SignStudio to listen for helloWorld events.
You've sent your first IoT event to the Digital Signage system. Next: Configure SignStudio to display the event data.
Display real-time temperature on your digital signage.
+----------+ +-------------+ +-------------+ +-------------+ | DHT11 or | | Node.js | | SignService | | SignPlayer | | Simulated| ---> | Script | ---> | (Windows) | ---> | Display | +----------+ +-------------+ +-------------+ +-------------+
From your development machine, sync the files to your Raspberry Pi:
# On your development machine cd /c/msweb/pi # Sync files to Pi rsync -avz --no-perms --no-owner --no-group -e "ssh" /c/msweb/pi root@10.0.0.24:/root/_node-dev/ # SSH to Pi and fix line endings ssh root@10.0.0.24 "find /root/_node-dev/pi -type f -not -path '*/node_modules/*' -exec dos2unix {} \; && chmod -R 777 /root/_node-dev/pi"
Edit /root/_node-dev/pi/iot/iotSendTemperture.js on the Pi:
// Configuration section at top of file const DEMO = true; // true = simulated, false = real sensor const SIGNSERVICE_HOST = '192.168.68.52'; // <-- Your Windows PC IP const SIGNSERVICE_PORT = 8094; const EVENT_NAME = 'myCustomEvent'; // Event name for SignStudio const POLL_INTERVAL = 4; // Seconds between readings
SSH to your Pi and run the script:
# SSH to Pi ssh root@10.0.0.24 # Navigate to iot directory cd /root/_node-dev/pi/iot # Run the script node iotSendTemperture.js
Expected output:
IoT Temperature Sender Mode: DEMO (simulated) Server: https://192.168.68.52:8094/player/sendEvent... Interval: 4 seconds [10:30:00] Reading #1 Sensor raw: 24.2C / 75.6F / 52.3% Sending to: https://192.168.68.52:8094/... Sent successfully!
In SignStudio, create a new scene with a Label component:
myCustomEventnameThe label will now update every 4 seconds with the temperature reading!
Control a physical relay from touchscreen interactions.
+-------------+ +-------------+ +-------------+ +----------+ | SignPlayer | | SignService | | Node.js | | Relay | | Touch | ---> | Windows | ---> | Pi Script | ---> | GPIO 4 | +-------------+ +-------------+ +-------------+ +----------+
CAUTION: Double-check wiring before powering on!
Relay Module Raspberry Pi 40-Pin Header +-----------+ +-----------+ | | | | | VCC o----+---------+----o Pin 2 (5V) | | | | | IN o----+---------+----o Pin 7 (GPIO 4) | | | | | GND o----+---------+----o Pin 6 (GND) | | | | +-----------+ +-----------+
Edit /root/_node-dev/pi/iot/iotReceiveAlertRelay.js:
// Configuration section const RELAY_PIN = 4; // GPIO pin for relay const PORT = 5001; // Callback server port const SIGNSERVICE_HOST = '192.168.68.52'; // <-- Your Windows PC IP const DEFAULT_EVENT_NAME = 'clickAlarm';
SSH to your Pi and run:
# SSH to Pi ssh root@10.0.0.24 # Navigate to iot directory cd /root/_node-dev/pi/iot # Run the script node iotReceiveAlertRelay.js clickAlarm
Expected output:
IoT Alert Receiver + Relay Control Callback URL: http://192.168.68.24:5001/callback SignService: https://192.168.68.52:8094 Event Name: clickAlarm Relay GPIO: 4 (Pin 7) Registered for event 'clickAlarm' Listening for events... Press Ctrl+C to exit
In SignStudio, create a scene with two Button components:
{
"Button": [{
"$": {
"label": "ALARM ON",
"fieldName": "alarmOn"
}
}],
"EventCommands": [{
"EventCommand": [{
"$": {
"from": "click",
"command": "sendEvent"
},
"Params": {
"eventName": "clickAlarm",
"data": {
"clickAlarm": "on"
}
}
}]
}]
}
{
"Button": [{
"$": {
"label": "ALARM OFF",
"fieldName": "alarmOff"
}
}],
"EventCommands": [{
"EventCommand": [{
"$": {
"from": "click",
"command": "sendEvent"
},
"Params": {
"eventName": "clickAlarm",
"data": {
"clickAlarm": "off"
}
}
}]
}]
}
You can now control physical devices from your digital signage!
Use the interactive web portal for debugging and testing.
On Pi or any machine with Node.js:
# On Pi or any machine with Node.js
cd /root/_node-dev/pi/iot
node iotWebPortal.js
This opens a browser to http://localhost:5000
192.168.68.52)clickAlarmThe portal will now receive events when SignPlayer fires clickAlarm.
myCustomEvent{
"name": "Hello from Portal!"
}
When you touch buttons in SignPlayer that fire clickAlarm, the web portal will display the received data in real-time.
Event Listeners
+------------------------------------------------------------------------+
| clickAlarm [Remove] |
| Callback: http://192.168.68.24:5000/callback |
| +------------------------------------------------------------------+ |
| | { | |
| | "eventName": "clickAlarm", | |
| | "data": { | |
| | "clickAlarm": "on" | |
| | } | |
| | } | |
| +------------------------------------------------------------------+ |
| Last received: 10:45:32 AM |
+------------------------------------------------------------------------+
Make your IoT scripts start automatically on boot.
SSH to your Pi and create the service file:
# SSH to Pi ssh root@10.0.0.24 # Create service file cat > /etc/systemd/system/iot-relay.service << 'EOF' [Unit] Description=IoT Relay Controller After=network.target [Service] Type=simple User=root WorkingDirectory=/root/_node-dev/pi/iot ExecStart=/usr/bin/node iotReceiveAlertRelay.js clickAlarm Restart=always RestartSec=5 [Install] WantedBy=multi-user.target EOF
# Reload systemd systemctl daemon-reload # Enable on boot systemctl enable iot-relay # Start now systemctl start iot-relay # Check status systemctl status iot-relay
# View recent logs journalctl -u iot-relay -n 50 # Follow logs in real-time journalctl -u iot-relay -f
cat > /etc/systemd/system/iot-temp.service << 'EOF' [Unit] Description=IoT Temperature Sender After=network.target [Service] Type=simple User=root WorkingDirectory=/root/_node-dev/pi/iot ExecStart=/usr/bin/node iotSendTemperture.js Restart=always RestartSec=5 [Install] WantedBy=multi-user.target EOF systemctl daemon-reload systemctl enable iot-temp systemctl start iot-temp
Error: connect ECONNREFUSED 192.168.68.52:8094
curl https://192.168.68.52:8094 --insecureEvents sent successfully but nothing happens in SignPlayer
store=1 parameter to persist eventsRelay script receives events but relay doesn't switch
python3 -c "import lgpio; h=lgpio.gpiochip_open(0); lgpio.gpio_claim_output(h, 4); lgpio.gpio_write(h, 4, 1)"
Error: self signed certificate
Add --insecure flag to curl, or in Node.js:
rejectUnauthorized: false
After completing these tutorials, you can explore more advanced IoT integrations:
The IoT integration is just one part of our comprehensive platform. Discover all the tools to power your digital signage network:
Checkout live examples of Digital Signage presentations. The SignPlayer can run everywhere, on Android, Windows, Mac, iPad and even inside your web browser
View MoreFind out why people call us “the world’s most popular digital signage platform”
View More