Setting up the Redirect plugin lets you configure endpoints that respond to your TRMNL device as if it were the core web application.
Use Cases
You already use the Alias plugin, but want to avoid refreshing your screen (flicker) if the content hasn't changed.
You want a more dynamic rotation of content. Instead of the default minutes interval set from your Playlist > Playlist Group preferences, you may now instruct a device to wait 3 mins, versus 20 mins, and so on, based on the content being returned.
Your server is generating fresh content (images), which live at other locations, where the URL is not predictable. Either because it is hashed (e.g. S3 bucket) or otherwise needs to be unique. The Alias plugin requires a static endpoint, whereas Redirect allows you to pass back a different URL on each request.
Step 1 - Configure Plugin
From the Plugins directory, select the Redirect plugin. Provide a URL endpoint from your server.
Your server should respond with the below JSON data.
{ filename: 'get-coffee', url: 'https://myserver.com/get-coffee.bmp', refresh_rate: 3000 }
Filename
The filename attribute is used as the "diff" parameter. If the filename between requests does not change, your device will not refresh the screen, thus avoiding unnecessary screen flicker and saving battery power.
βURL
Make sure this points to an image that is 1 bit bitmap(bmp3) or 1 bit PNG, 800x480 pixels. See here for a hint on generating this format with ImageMagick. Your image may be at a local destination, for example 192.168.5.3/my/image.png
.
Refresh Rate
The number of seconds your device should sleep before waking up again to request new content.
Step 2 - You're Done!
Based on your device's refresh settings, TRMNL will begin forwarding your content requests to the Web Address specified above.
Stay focused.
Credits:
Redirect by Alex Bickov from Noun Project (CC BY 3.0)