Steam smart home integration, free and open source

Status of chosen Steam accounts: online, current game, playtime, parental control scenes.
Overview
This integration follows the Steam status of the accounts you choose (yours, your children's, your friends'): online or not, the game being played and for how long, the playtime of the last two weeks, the Steam level and the last logoff. Each account becomes a Gladys device, a dashboard widget shows them all at a glance, and scene triggers let Gladys react when someone starts or stops playing, comes online, or has been playing for too long (parental control).
It reads the official Steam Web API (api.steampowered.com) with a free API key, read-only: nothing is ever changed on Steam. Not affiliated with Valve: Steam is a trademark of Valve Corporation.
Developed without a real Steam account at hand: feedback welcome.
Prerequisites
- Gladys Assistant 5.1.0 or later.
- A Steam Web API key, free: sign in on steamcommunity.com/dev/apikey, enter any domain name (for example
localhost) and copy the 32-character key. Steam only gives keys to accounts that have spent at least 5 USD in the store. - The accounts to follow. The current game is only visible when the profile is public and its game details are public too (Steam: Edit profile, Privacy settings). A private profile still shows its status (online, away…), never its game.
Configuration
In Gladys, Integrations, Steam, Configuration:
| Field | Content |
|---|---|
| Steam API key | The key copied from steamcommunity.com/dev/apikey. Stored in the Gladys configuration, never written to the logs. |
| Accounts to follow | Up to 20, separated by commas: a SteamID64 (76561198…, shown on store.steampowered.com/account), a profile URL (https://steamcommunity.com/id/name/ or /profiles/7656…), a custom URL name, or the STEAM_0:1:… and [U:1:…] forms. |
| Refresh interval | 30 seconds, 1, 2 or 5 minutes (1 minute by default). |
| Language of the feature names | English, French (default), German or Spanish: the names of the features at creation, and the texts sent to the scenes. |
Then open the Discovery tab and add the accounts you want as devices. The Check the accounts button, below the configuration, resolves every entry and says whether its profile is public.
Devices
One device per account, named "Steam" followed by the Steam name. All features are read-only.
| Feature | Type | Content |
|---|---|---|
| Status | Text | Offline, Online, Busy, Away, Snooze, Looking to trade, Looking to play. |
| Online | Binary | 1 when the account is not offline. |
| In game | Binary | 1 while a game is running (public profiles only). |
| Current game | Text | The name of the game, "None" otherwise. |
| Gaming session | Duration (minutes) | Length of the current session, 0 out of game. See "Playing for more than…" for what a session is. |
| Playtime (2 weeks) | Duration (hours) | Total playtime of the last two weeks, read every 30 minutes. |
| Steam level | Counter | The Steam level, read every 30 minutes. |
| Last logoff | Text | Date and time of the last logoff, in the time zone of Gladys. |
The binary and duration features can be used in the scene conditions of Gladys ("In game" equals 1, "Gaming session" above 60).
Widget
Steam accounts: two tiles (number of accounts in game, accounts online) and one line per account (ten at most): the game and the session length while playing, the status otherwise, with a color (green in game, blue online, orange busy or away, grey offline). A note names the private profiles. The widget shows the last refresh: it never calls Steam itself.
Scene triggers
Each trigger can be narrowed to one account (empty: any account) and passes the account name to the scene actions.
| Trigger | When | Information passed on |
|---|---|---|
| Starts playing | A game starts, or the player switches to another one. Optional filter: the exact name of the game. | Account name, game, Steam app id |
| Stops playing | A game ends, or the player switches to another one. Optional filter: the game. | Account name, game, minutes played |
| Playing for more than… | The gaming session reaches the chosen duration (15, 30, 45 minutes, 1, 1.5, 2, 3 or 4 hours). A session is continuous play, whatever the game: switching games keeps it, a break under 10 minutes too. It fires once per session and per duration, even after a restart of Gladys. | Account name, game, minutes reached |
| Comes online | The account goes from offline to any other status. | Account name, status |
The first refresh after a start of the integration only records the situation: it fires nothing.
Scene action
Read a Steam account gives the following steps of the scene the status, online (yes/no), in game (yes/no), the current game and the session length of one account. It reads the last refresh, without calling Steam: combine it with "Only continue if" to act only when the account is playing.
Configuration action
Check the accounts resolves each entry of the accounts field and answers, for each one, the Steam name and SteamID64 and whether the profile is public, or why the entry was not found.
Scene examples
- Bedtime: every school day at 21:00, "Read a Steam account" on your child's account, "Only continue if" in game is true, then send "Time to stop [game]" on the family speaker.
- Screen time: trigger "Playing for more than… 2 hours" on your child's account, then send yourself a message "Léo has been playing for 2 hours ([game])" and dim the lights of the room.
- Game evening: trigger "Starts playing" on your account, then switch the living room to the "Gaming" scene and silence the notifications.
Refresh and Steam quotas
The integration refreshes by itself at the chosen interval (it does not depend on the polling of Gladys). One request reads every account at once; the level and the playtime are read every 30 minutes, only for the accounts added to Gladys. With the default interval and three accounts added, that is about 1,700 requests a day, far from the 100,000 calls per day allowed by the Steam Web API Terms of Use. If Steam answers "too many requests" (HTTP 429), the integration pauses for 5 minutes. Steam itself updates the status with a delay of up to a few minutes.
Troubleshooting
- "Steam refused the API key" in the Configuration screen: copy the key again from steamcommunity.com/dev/apikey (32 characters, no space).
- No game shown while someone plays: the profile, or its game details, are not public. "Check the accounts" says it, and so does the widget.
- An account is missing from the Discovery tab: check its spelling with "Check the accounts"; a custom URL name is the one after
/id/in the profile URL, not the display name. - Steam does not answer: the integration keeps the last known states and tries again at every interval; the Configuration screen says so.
- More details: set the
LOG_LEVEL=debugenvironment variable on the container. The normal logs only hold starts, errors and recoveries.
Limits
- Read-only: no message, no friend, no purchase, nothing changes on Steam.
- The current game and the playtime need a public profile with public game details: Steam hides them otherwise, even from the account owner's own key.
- Steam's own status can lag by a few minutes, and an "invisible" account looks offline.
- A game launched outside Steam is not seen; a non-Steam game added to the library may show with its name only.
- 20 accounts at most; the widget lists the first ten.
- Developed without a real Steam account at hand: feedback welcome on the Gladys forum.
Configuration settings
These are the settings Steam asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Your Steam API key | section | No | Get a free key on the Steam developer page (a Steam account with a purchase is needed). The current game is only visible on public profiles whose game details are public. |
| Steam API key | secret | Yes | 32 characters, shown on steamcommunity.com/dev/apikey. |
| Accounts to follow | string | Yes | Up to 20, separated by commas: SteamID64, profile URL or custom URL name. |
| Refresh interval | select | No | How often Steam is asked for the status of the accounts. |
| Language of the feature names | select | No | Also used for the texts sent to scenes (status, no game). |
How to install Steam in Gladys
- In Gladys, open Integrations: Steam appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/guim31/gladys-steam:1.0.1), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/guim31/gladys-steam.
Steam requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.
Not running Gladys yet? It is free and open source: follow the installation guide to get started.
About external integrations
Steam is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub — source of this documentation