Workflow script for the Ulanzi Pixel Clock, based on the n8n.io automation software and Awtrix Light.
Display your Twitch Followers on your Ulanzi Pixel Clock
Template: Follower Count
Rounded down to three significant figures
Example: 43.42K
- Navigate to your Ulanzi Pixel Clock admin screen (usually
192.168.1.128
) - Select the Icons Tab
- Type
20643
into the first field named Lametric Icon ID - Click Download
- Visit the Latest Releases section and download the
Twitch_Followers.json
file to your computer
- In your n8n automation server, create a new workflow
Import from File
and select the downloaded Workflow
-
Follow the below steps to get your Twitch API Keys
- Sign in to the Twitch Developer Console
- Click Register Your Application
- Fill in the following information:
- Name:
Type a name for your app
- OAuth Redirect URLs:
http://localhost:5678/rest/oauth2-credential/callback
- Category:
Other
- Hit Create
- Name:
- Back on the Twitch Developer Console, click on Manage, next to your newly created app
- Copy your Client ID somewhere temporarily
- Click on New Secret
- Copy your Client Secret somewhere temporarily
-
Double-click and open the second step of the workflow, named Fetch Data
-
Under Authentication, select Generic Credential Type
-
Under Generic Auth Type, select OAuth2 API
-
Under Credential for OAuth2 API, select Create New Credential
-
In the pop up screen, enter the following:
- Grant Type:
Client Credentials
- Access Token URL:
https://id.twitch.tv/oauth2/token
- Client ID:
YOUR CLIENT ID
- Client Secret:
YOUR CLIENT SECRET
- Scope:
moderator:read:followers
- Authentication:
Body
- Hit Connect my account
- In the Twitch Pop-up window, make sure you are logged into the correct Twitch Account (if you have mutliple accounts), then click Authorize App
- Grant Type:
-
Back on the Fetch Data screen
- Under Query Parameters, replace the
XXXXX
with yourTwitch Broadcaster ID
(Find your Twitch ID) - Under Header Parameters, Replace the
XXXXX
with yourYOUR CLIENT ID
- Under Query Parameters, replace the
- On the last step named Send to Clock, make sure the IP address in the URL field is correct (usually
192.168.1.128
) - On the Workflow canvas, click on the button
Execute Workflow
Set the workflow to "Active", to keep it running in the background
Visit the Lovely Discord and perhaps I can help you there.