Sports Monitor

Live sports scores, schedules and team monitoring for IoX

Version 1.0.0 — User Guide

Contents

  1. Overview
  2. Supported Leagues
  3. Installation
  4. Team Configuration
  5. Web Dashboard
  6. Controller Node
  7. Team Nodes
  8. Adaptive Polling
  9. IoX Automation Examples
  10. Security and Password Management
  11. System Backup
  12. Troubleshooting
  13. Data Sources and Limitations

1. Overview

Sports Monitor brings professional and collegiate sports information into your IoX home automation system. Monitor your favorite teams and use their game status, scores, schedules and results to trigger automations throughout your home.

Sports Monitor is designed primarily as an automation data source, rather than a replacement for a dedicated sports viewing application.

2. Supported Leagues

SportLeague
FootballNFL
FootballNCAA Football
BasketballNBA
BasketballWNBA
BasketballNCAA Men's Basketball
BasketballNCAA Women's Basketball
BaseballMLB
BaseballNCAA Baseball
HockeyNHL
SoccerMajor League Soccer (MLS)
SoccerEnglish Premier League

Available teams are retrieved directly from ESPN. The same school may be monitored independently in multiple sports.

3. Installation

  1. Open the plugin Store in eisy-ui.
  2. Locate Sports Monitor and install it in an available plugin slot.
  3. Allow the installation to finish and verify that the plugin is running.
  4. Open the Sports Monitor web interface in your browser.
https://<eisy-IP-address>:8770

For example, if your eisy IP address is 192.168.1.100:

https://192.168.1.100:8770

First-Time Administrator Setup

On your first visit, you will be prompted to create and confirm an administrator password. The password must contain at least 12 characters.

After creating the password, log in using:

Usernameadmin
PasswordThe password you created
Your browser may display a certificate warning when accessing the local HTTPS interface. Verify that the address belongs to your eisy before proceeding.

The web interface uses TCP port 8770. An internal backend uses loopback port 18770 and is not intended for direct user access. Install only one instance of Sports Monitor per eisy.

4. Team Configuration

Adding a Team

  1. Log in to the web interface.
  2. Select a league from the league dropdown.
  3. Wait for the available teams to be retrieved.
  4. Optionally enter a team name or abbreviation in the search field.
  5. Select the desired team.
  6. Accept the suggested node name or enter a custom name.
  7. Click Add Team.

The plugin saves the configuration, creates the corresponding IoX node and queues an initial data poll. A plugin restart is not required.

Repeat these steps for additional teams, up to a combined maximum of 32 teams. Duplicate entries for the same team and league are not permitted.

Renaming a Team

Click Rename on the team card and enter the desired display name. The existing node address is retained.

Removing a Team

Click Remove on the team card and confirm the deletion. The plugin removes the IoX node and its saved team configuration.

Removing a team deletes its IoX node. Review any programs that reference that node before removing it.

Configuration Persistence

Team configurations are saved through the plugin configuration system and are restored when Sports Monitor restarts.

5. Web Dashboard

The dashboard displays a separate card for each configured team. Depending on the available data, each card includes:

ButtonFunction
Poll NowQueue an immediate data refresh for this team.
RenameChange the team's display name.
RemoveDelete the team and its IoX node.

The dashboard refreshes approximately every 15 seconds while displayed. It reads cached plugin data rather than making a separate ESPN request on every browser refresh.

Sports monitoring continues even when the browser is closed or the administrator is logged out.

6. Controller Node

The Sports Monitor Controller provides overall plugin status.

FieldDescription
Connection Status Unknown, Offline or Online. Online indicates at least one monitored team has an online connection status.
Monitored TeamsNumber of active team nodes.
Online TeamsNumber of teams with online connection status.
Last Successful UpdateMost recent successful team update, expressed as Unix time.

Controller Commands

CommandFunction
QueryReport current node values to IoX.
Poll All TeamsQueue an immediate poll of all monitored teams.

7. Team Nodes

Each monitored team has its own IoX node containing the following 21 status fields.

DriverIoX FieldDescription
STConnection Status Unknown, Offline, Online.
GV1Game Status Unknown, Scheduled, In Progress, Final, Postponed, Canceled, Delayed, Suspended, Halftime.
GV2Team Score Score of the monitored team.
GV3Opponent Score Score of the opposing team.
GV4Score Differential Team score minus opponent score. Positive when ahead, negative when behind.
GV5Score Status Unknown, Winning, Losing, Tied.
GV6Period Quarter, half, period or inning, depending on the sport.
GV7Game Clock (Seconds) Reported game clock expressed in seconds, where available.
GV8Home/Away Unknown, Home, Away, Neutral.
GV9Last Game Result Unknown, Win, Loss, Tie. Refers to the last completed game.
GV10Season Wins Number of season wins.
GV11Season Losses Number of season losses.
GV12Season Ties Number of season ties or draws, where applicable.
GV13Ranking Reported team ranking, when available.
GV14Next Game Unix Time Scheduled next game time in Unix seconds.
GV15Minutes Until Game Whole minutes until the next confirmed game time.
GV16Next Game Home/Away Unknown, Home, Away, Neutral.
GV17Next Game Time Confirmed Unknown, No, Yes.
GV18Last Successful Update Unix timestamp of the last successful data retrieval.
GV19Possession Unknown, Our Team, Opponent. Available for supported game feeds.
GV20Overtime Losses Overtime losses, primarily applicable to hockey.

Enumerated Values

Field TypeNumeric Values
Connection Status0 Unknown, 1 Offline, 2 Online
Game Status0 Unknown, 1 Scheduled, 2 In Progress, 3 Final, 4 Postponed, 5 Canceled, 6 Delayed, 7 Suspended, 8 Halftime
Score Status0 Unknown, 1 Winning, 2 Losing, 3 Tied
Location0 Unknown, 1 Home, 2 Away, 3 Neutral
Last Game Result0 Unknown, 1 Win, 2 Loss, 3 Tie
Confirmation0 Unknown, 1 No, 2 Yes
Possession0 Unknown, 1 Our Team, 2 Opponent

Understanding Node Values

When creating automations, check Connection Status and Game Status as appropriate. A previously retrieved score may remain visible when the connection is offline.

Team Commands

CommandFunction
QueryReport the current node values to IoX.
Poll TeamQueue an immediate data refresh for this team.

8. Adaptive Polling

Sports Monitor automatically adjusts polling frequency based on the next scheduled game and whether a game is in progress. This reduces unnecessary network traffic while providing more frequent updates when they are useful.

ConditionNormal Polling Interval
No upcoming game12 hours
Next game more than 24 hours away60 minutes
Next game within 24 hours15 minutes
Next game within 1 hour5 minutes
Next game within 5 minutes30 seconds
Game in progress30 seconds
Upcoming game time unconfirmed60 minutes
Data retrieval error60-second retry interval

Polling intervals may be shortened to transition into the next polling category at the appropriate time.

These are target intervals. Network delays, ESPN response times and the number of monitored teams can affect actual update timing.

The plugin can reuse recent league scoreboard responses when monitoring multiple teams, reducing duplicate ESPN requests.

Adaptive polling is managed internally by Sports Monitor. Changing the standard plugin Short Poll or Long Poll settings is not necessary to achieve the intervals shown above.

Manual Polling

Use Poll Now in the dashboard, Poll Team on a team node, or Poll All Teams on the controller to request an immediate refresh without waiting for the next scheduled poll.

9. IoX Automation Examples

Sports Monitor allows IoX programs to respond to sports events. The following examples illustrate possible applications. Replace the example node names, scenes and notification actions with those in your own system.

Example 1: Upcoming Game Reminder

If
    'Texas Longhorns' Connection Status is Online
And 'Texas Longhorns' Next Game Time Confirmed is Yes
And 'Texas Longhorns' Minutes Until Game >= 0
And 'Texas Longhorns' Minutes Until Game <= 15
And 'Texas Longhorns' Game Status is not In Progress

Then
    Send Notification "Texas game starts soon"

Else
    - No Actions -

Use a state variable or a separate disabled action program to prevent repeated reminders for the same game.

Example 2: Activate Game Day Lighting

If
    'Dallas Cowboys' Connection Status is Online
And 'Dallas Cowboys' Game Status is In Progress

Then
    Set 'Game Day Lighting' On

Else
    - No Actions -

This can activate team-colored lighting, a television scene or other entertainment equipment.

Example 3: Celebrate a Score

Create an integer variable to hold the team's previous score. Initialize it to the current score when a new game begins.

If
    'Dallas Cowboys' Connection Status is Online
And 'Dallas Cowboys' Game Status is In Progress
And 'Dallas Cowboys' Team Score > $PreviousScore

Then
    $PreviousScore = 'Dallas Cowboys' Team Score
    Run Program 'Score Celebration' (Then Path)

Else
    - No Actions -

The celebration program might flash lights, play a sound or send a notification. Reset the stored score for each new game and account for score corrections if necessary.

Example 4: Celebrate a Victory

If
    'San Antonio Spurs' Connection Status is Online
And 'San Antonio Spurs' Game Status is Final
And 'San Antonio Spurs' Last Game Result is Win

Then
    Run Program 'Victory Celebration' (Then Path)

Else
    - No Actions -

Use a one-shot latch, armed when a new game begins, to prevent a previous victory from triggering again after a restart or connection recovery.

Example 5: Home Game Reminder

If
    'Texas Longhorns' Connection Status is Online
And 'Texas Longhorns' Next Game Home/Away is Home
And 'Texas Longhorns' Next Game Time Confirmed is Yes
And 'Texas Longhorns' Minutes Until Game >= 0
And 'Texas Longhorns' Minutes Until Game <= 120

Then
    Send Notification "Home game within two hours"

Else
    - No Actions -
These are illustrative IoX program examples, not directly importable program files. IoX can reevaluate conditions when node values change. Use appropriate state variables, latches and reset logic for actions that should occur only once per game. Data polling may also miss intermediate scoring events.

10. Security and Password Management

The web configuration interface uses HTTPS and administrator authentication. Passwords are stored as salted password hashes rather than plaintext.

Changing the Administrator Password

  1. Log in to the web interface.
  2. Click Change Password.
  3. Enter the current password.
  4. Enter and confirm the new password.
  5. Submit the change and log in using the new password.

Changing the password invalidates existing authenticated sessions.

Session Expiration

Administrator sessions expire after approximately one hour of inactivity. Background dashboard refreshes do not by themselves keep an inactive administrator session alive.

Forgotten Administrator Password

If you forget your password, click Forgot Password on the login page. The recovery page displays an SSH command customized for your installed plugin slot.

  1. Copy the recovery command displayed on the page.
  2. Connect to your eisy using SSH.
  3. Run the displayed command.
  4. Copy the generated recovery code.
  5. Enter the recovery code and a new password on the recovery page.
  6. Log in using the new password.

For example, if Sports Monitor is installed in slot 27:

sudo -u plugin_27 /usr/local/bin/python3 /var/eisyui/ns/plugin_27/sports_auth.py reset

The recovery code is valid for 15 minutes and is intended for one-time use. Generate another code if the original expires.

Always use the command displayed by your own recovery page. The plugin slot number in the example above may differ from your installation.

Network Security

Keep the configuration interface on your trusted local network. Do not expose the web interface directly to the public internet. Use a trusted VPN when remote access is needed.

11. System Backup

Sports Monitor is designed to be compatible with the eisy-ui system backup process. Required runtime files and administrator credential files are assigned restricted permissions with explicit read access for the eisy-ui backup service.

These permissions are applied automatically when the relevant files are created or replaced. No manual permission changes should be necessary.

Team configuration is maintained through the plugin configuration system. After restoring a system backup, verify that the plugin starts, the configured teams are present and the web interface is accessible.

Historical game data is retrieved from ESPN rather than maintained as a permanent local sports database.

12. Troubleshooting

Unable to Open the Web Interface

Sports Monitor includes a watchdog that attempts to restart the web server if it exits unexpectedly.

Team Discovery Fails

Team Shows Offline

Offline indicates that the latest data retrieval attempt failed. Previously retrieved values may remain available. The plugin automatically retries failed requests.

Use Poll Now to request an immediate retry.

Team Does Not Appear in IoX

Next Game Time Is Missing

The next game may not yet be scheduled, its start time may be unconfirmed, or the team may be between seasons. Check the Next Game Time Confirmed field before using the countdown in an automation.

Scores Appear Delayed

Sports Monitor uses polling rather than a real-time streaming sports feed. Updates depend on ESPN's published data and the current polling interval. Short delays are normal.

Reviewing Logs

Use the plugin log viewer in eisy-ui. For advanced SSH troubleshooting, the following commands show recent plugin and web server log entries for an example installation in slot 27:

sudo tail -n 100 /var/eisyui/ns/plugin_27/logs/debug.log
sudo tail -n 100 /var/eisyui/ns/plugin_27/logs/sports_web.log

Replace 27 with your actual plugin slot number.

13. Data Sources and Limitations

Sports Monitor retrieves publicly accessible sports data from ESPN's JSON endpoints. These endpoints are unofficial and are not guaranteed to remain available or unchanged.

Sports Monitor is an independent home automation plugin and is not affiliated with or endorsed by ESPN or the supported sports leagues.

It is intended for informational and home automation purposes, not for applications requiring guaranteed real-time sports data.

Version History

Version 1.0.0 — Initial Release

Source repository: GitHub - Sports Monitor