Steam Broadcasting Integration
Connect to Steam Broadcasting for viewer tracking, broadcast state monitoring, and access to Steam Web API features. Perfect for game streamers who want to integrate Steam-specific features into their stream automation.
Overview
FaustBot's Steam integration connects to Steam Broadcasting and the Steam Web API, allowing you to monitor broadcast status, track viewers, and access game and user information. This enables powerful automations for game-focused streams.
Broadcast Monitoring
Detect when your Steam broadcast starts and ends automatically.
Viewer Tracking
Track viewer count changes and individual join/leave events.
User Information
Look up Steam user profiles including level and game library.
Game Details
Get information about any Steam game including player counts.
Steam Broadcasting
Steam Broadcasting is built into the Steam client and allows you to broadcast your gameplay directly to Steam. FaustBot monitors your broadcast status and can trigger actions based on broadcast events.
Setup
Setting up Steam integration requires authenticating with Steam and optionally providing a Steam Web API key for enhanced features.
Open Steam Settings
Click Steam in the FaustBot sidebar to open the Steam integration page.
Ensure Steam is Running
Make sure the Steam client is running and you are logged in. FaustBot connects through the local Steam client for broadcast monitoring.
Authenticate with Steam
Click Sign in with Steam to authenticate. This allows FaustBot to access your Steam profile and broadcast status.
Connect to Steam
After authentication, click Connect to establish the connection. FaustBot will begin monitoring your Steam account for broadcast events.
Steam Web API Key (Optional)
For enhanced features like detailed user lookups and game information, you can add a Steam Web API key. Get one free from the Steam Developer Portal.
Available Triggers
FaustBot can respond to the following Steam Broadcasting events:
Broadcast Events
Broadcast Started Fires when you start a Steam broadcastBroadcast Ended Fires when your Steam broadcast endsViewer Events
Viewer Joined Fires when a viewer joins your broadcastViewer Left Fires when a viewer leaves your broadcastViewer Count Changed Fires when the viewer count changesEffects
The Steam integration provides the following effects for use in actions:
Get Viewer Count
Get the current broadcast viewer count and store it in a variable.
Get Steam User Info
Look up a Steam user's profile by Steam ID.
Get Game Info
Get details about a Steam game by App ID.
Get Game Player Count
Get the current player count for a Steam game.
Provided Actions
The Steam plugin also registers these actions that can be triggered:
steam.sendMessage- Send a message (requires Steamworks SDK)steam.startBroadcast- Start broadcastingsteam.stopBroadcast- Stop broadcasting
Variables
The following variables are available in Steam trigger events:
| Variable | Description | Triggers |
|---|---|---|
%steamId% | Your Steam ID (64-bit) | All |
%personaName% | Steam display name | All |
%viewerCount% | Current viewer count | Viewer Count Changed |
%previousCount% | Previous viewer count | Viewer Count Changed |
%viewerSteamId% | Steam ID of the viewer | Viewer Joined/Left |
%viewerPersonaName% | Display name of the viewer | Viewer Joined/Left |
%isBroadcasting% | Whether currently broadcasting | All |
%broadcastUrl% | URL to watch your broadcast | Broadcast Started |
Example Use Cases
Multi-Platform Viewer Counter
Combine Steam viewer count with Twitch and YouTube viewers to display a total viewer count across all platforms. Update an OBS text source in real-time as viewers join or leave any platform.
Broadcast Start Notifications
When you start a Steam broadcast, automatically post to Discord with a link to your Steam profile. Show a "Live on Steam" badge overlay in OBS.
Viewer Welcome Messages
Welcome Steam viewers by their persona name when they join your broadcast. Look up their Steam level for VIP treatment of high-level users.
Game Information Overlay
Display current game information in your stream overlay, including the game name, current player count globally, and your own playtime statistics.
Viewer Milestone Celebrations
Trigger special effects when you hit viewer milestones on Steam Broadcasting. Play sounds, show animations, and thank your Steam community.
Scripting API
Access Steam features from your scripts using the CPH API:
Viewer Count Tracking
# React to Steam broadcast viewer changes
def Execute():
viewers = int(args["viewerCount"])
previous = int(args.get("previousCount", 0))
# Celebrate viewer milestones
milestones = [10, 25, 50, 100, 250, 500]
for milestone in milestones:
if previous < milestone <= viewers:
CPH.RunAction(f"Milestone {milestone}")
CPH.ObsShowSource("Scenes", "Celebration")
break
# Update overlay with viewer count
CPH.SetGlobalVar("steamViewers", viewers)
return TrueGame Information
# Get and display Steam game information
def Execute():
app_id = args.get("appId", "730") # Default to CS2
# Get game details from Steam API
game_info = CPH.SteamGetGameInfo(app_id)
if game_info:
CPH.LogInfo(f"Game: {game_info['name']}")
CPH.LogInfo(f"Players: {game_info['current_players']}")
# Update OBS text source with game info
CPH.ObsSetText("Game Info",
f"Now Playing: {game_info['name']}")
return TrueBroadcast State
# Handle Steam broadcast start/end events
def Execute():
event = args.get("triggerId", "")
if "broadcastStarted" in event:
# Broadcast just started
CPH.LogInfo("Steam broadcast started!")
# Notify Discord
CPH.DiscordPostWebhook("stream-alerts",
"I'm now live on Steam Broadcasting!")
# Update OBS
CPH.ObsShowSource("Overlays", "Steam Live Badge")
elif "broadcastEnded" in event:
# Broadcast ended
CPH.LogInfo("Steam broadcast ended")
# Hide overlay
CPH.ObsHideSource("Overlays", "Steam Live Badge")
# Post summary to Discord
viewers = args.get("maxViewers", 0)
CPH.DiscordPostWebhook("stream-alerts",
f"Stream ended! Peak viewers: {viewers}")
return TrueUser Information
# Welcome Steam viewers with their profile info
def Execute():
steam_id = args["steamId"]
persona = args["personaName"]
# Log the join
CPH.LogInfo(f"{persona} joined the broadcast!")
# Get additional user info
user_info = CPH.SteamGetUserInfo(steam_id)
if user_info:
level = user_info.get("level", 0)
games = user_info.get("games_owned", 0)
# Special welcome for high-level users
if level >= 50:
CPH.SendMessage(f"Welcome {persona}! Steam Level {level}!")
else:
CPH.SendMessage(f"Welcome to the stream, {persona}!")
return TrueSee the Scripting Guide for the complete API reference.