Channels
Channels manages TV channel lineups for cable, satellite, and IPTV sources. Channel lineups provide user-friendly channel selection with logos, names, and favorites.
Overview
The Channels feature provides:
- Channel Providers: Manage different channel sources (cable, satellite, IPTV)
- Channel Lineups: Define available channels with logos and metadata
- External Sync: Sync channel data from external sources
- Favorites: Mark frequently-watched channels
- Channel Logos: Display network logos in UIs
Viewing Channels
The main grid displays channels filtered by provider:
Columns
- ID - Unique channel identifier
- Channel - Channel number (2, 5, 48, 501, etc.)
- Name - Channel name (ABC, ESPN, HBO, etc.)
- Logo - Logo image URL or path
- Call Sign - Station call sign (WABC, KABC, etc.)
- Favorite - Favorite status
- Enabled - Whether channel is available
- Sort Index - Display order
Grid Actions
- Add - Create a new channel manually
- Delete - Remove a channel
- Sort - Reorder channels
Channel Providers
Channel providers represent different channel sources:
Provider Selector
Dropdown at top of page:
- Select provider to view/edit its channels
- Each provider has independent channel lineup
Actions:
- New - Create a new provider
- Edit - Modify selected provider
- Sync - Sync channels from external source
Creating a Provider
Click New button:
Configuration:
Name: Internal identifier (auto-formatted to lowercase_with_underscores)
- Examples:
cable_comcast,satellite_directv,iptv_stream
External Provider ID: Identifier for external sync service (optional)
- Used when syncing channels from an external API
- Provider-specific ID from the external service
- Example: Comcast system ID, DirecTV location code
- The Sync button is only enabled when this field is set
Editing a Provider
- Select provider from dropdown
- Click Edit button
- Modify configuration
- Click Save
Changes affect:
- Provider metadata
- Sync settings
- All channels in lineup
Syncing Channels
External Channel Sync
The Sync button synchronizes channel data from external sources:
When to Sync:
- Initial setup (populate channel lineup)
- Channel lineup changes (new channels added by provider)
- Channel number changes
- Logo updates
Sync Process:
- Select provider from dropdown
- Click Sync button
- GEM contacts external service (if external_id configured)
- Downloads current channel lineup
- Updates/adds channels:
- New channels added
- Existing channels updated
- Removed channels flagged
- Success message shows results
External Sources:
- Provider APIs (if available)
- EPG (Electronic Program Guide) services
- Third-party channel databases
- Custom integrations
Requirements:
- Provider must have external_id configured
- Network connectivity to sync service
- Valid API credentials (if required)
Manual Channel Entry
For providers without sync support:
-
Select provider
-
Click Add to create channel
-
Enter channel details:
Channel: Channel number
- Example: 2, 5, 48, 501
Name: Channel name
- Example: "ABC", "ESPN", "HBO"
Logo: Logo image URL or path
- Example:
https://logo.provider.com/abc.png - Or:
/images/logos/abc.png
Call Sign: Station identifier
- Example: "WABC-DT", "ESPN-HD"
Favorite: Check if favorite channel
Enabled: Check to make available
Sort Index: Display order — set manually, or drag rows in the grid and click the Save Sort Order button (swap-sort icon) in the toolbar
-
Click Save
Using Channels in UIs
Channel Selection
When broadcast source selected (cable, satellite):
UI Displays:
- Channel grid or list
- Channel logos
- Channel numbers and names
- Favorites section (if favorites configured)
User Actions:
- Click channel to tune
- Search by name or number
- Browse by category (news, sports, movies)
- Access favorites quickly
Channel Commands
Selecting a channel sends command to source device:
Command Format:
Device: cable_box
Command: channel
Args: {channel: 501}
Device driver translates to device-specific protocol:
- Direct tune:
CHAN0501 - IR codes: Individual digit commands
- IP control: API channel change
Preset Enter Behavior
When tuning channels via individual digit commands (IR codes), GEM sends each digit to the device and then automatically sends an enter or select command to confirm the channel. Some devices auto-tune after the last digit and do not require this confirmation.
To disable the automatic enter command for a device, set the preset_enter attribute to false on the device in Devices > Attributes.
Preset Padding
Some devices require channel numbers to be zero-padded to a fixed width (e.g., channel 5 sent as 005). Set the preset_padding attribute on the device to the desired number of digits. When preset padding is set, the enter/select command is automatically skipped since the device knows the channel is complete once all digits are received.
Related device attributes:
preset_enter- Set tofalseto skip the enter/select command after channel digits (default:true)preset_padding- Zero-pad channel numbers to this many digits (e.g.,3sends channel 5 as005). Automatically skips the enter command when set.channel_enter_delay- Delay in milliseconds before sending the enter command (overrides the default digit speed)
Favorite Channels
Marking Favorites
In channel grid:
- Check Favorite column for frequently-watched channels
- Or in UI, long-press channel to mark favorite
Favorite Display
UIs can show favorites prominently:
- Separate favorites section
- Quick access buttons
- First in channel lists
Use Cases
Sports Fans: Favorite all sports channels News Watchers: Favorite news channels Kids: Favorite children's channels (parental control)
Channel Logos
Automatic Logo Fetching
Some device drivers automatically fetch and cache channel logos. For example, the Apple TV driver retrieves app icons from the App Store when syncing its app list as channels. Icons are cached locally in /images/icons/<device_name>/ and assigned to channels automatically — no manual logo configuration is needed.
Logo Sources
External URLs:
https://cdn.example.com/logos/abc.png
https://logo-service.com/v1/channels/501.png
Local Files:
/images/channel_logos/abc.png
/static/logos/espn.png
Theme Assets:
/themes/carbon/icons/channels/hbo.png
Logo Requirements
- Format: PNG (transparent background) or JPG
- Size: 128x128 to 256x256 pixels
- Aspect Ratio: Square or channel logo aspect ratio
- File Size: < 100KB for fast loading
Uploading Logos
Option 1: Upload to static directory
scp channel_logos/*.png gem-server:/opt/gem/static/images/logos/
Option 2: Reference external CDN
- Use provider's logo CDN
- Or third-party logo service
Option 3: Theme assets
- Upload via UI Themes page
- Store in theme for portability
Channel Organization
Sorting Channels
By Channel Number (default):
- 2, 3, 4, 5, ... 48, 49, 50
- Matches remote control channel up/down
- Most intuitive for users
By Name:
- ABC, CBS, CNN, ESPN, HBO, ...
- Alphabetical browsing
By Category:
- News channels together
- Sports channels together
- Movies channels together
- Requires category attribute
Custom Order:
- Use sort index to create custom order
- Favorites first, then by number
- Most-watched first
Advanced Topics
Multi-Provider Support
Different providers for different zones:
Example:
Living Room: Comcast Cable (provider_id: 1)
Bedroom: DirecTV Satellite (provider_id: 2)
Guest House: IPTV Stream (provider_id: 3)
Each AV zone can use a different provider:
- Configure in AV source
- Source links to provider
- Channel selection uses appropriate lineup
EPG Integration
Electronic Program Guide integration:
Store in Attributes:
channel_id: 501
epg_data: {
current_show: "Evening News",
current_time: "18:00-19:00",
next_show: "Primetime Game",
description: "Local and national news coverage"
}
Display in UI:
- Show what's on now
- Show what's on next
- Full program schedule
Sync:
- Periodic updates from EPG service
- Store in channel attributes
- Expire old data
Channel Categories
Organize channels by category:
Implementation via Attributes:
// On each channel
category: "sports" // or "news", "movies", "kids", etc.
UI Benefits:
- Filter channels by category
- Browse by genre
- Category headers in channel list
Parental Controls
Restrict channels based on rating:
Channel Attributes:
rating: "TV-MA" // TV-Y, TV-PG, TV-14, TV-MA
adult_content: true
User/Role Attributes:
max_rating: "TV-PG"
block_adult: true
Implementation:
- Filter channels in UI based on user role
- Require PIN for restricted channels
- Hide adult channels from kids' profiles
Channel Remapping
When provider changes channel numbers:
Update Channels:
- Run sync (if supported)
- Or manually update channel numbers in grid
- Changes reflect immediately in UIs
Macro Channel References:
- Use channel name instead of number for robustness
- "Tune to ESPN" instead of "Tune to 501"
- Survives channel number changes
Troubleshooting
Channels Not Displaying
Check:
- Provider Selected: Provider chosen in dropdown
- Provider Enabled: Provider is enabled
- Channels Exist: Provider has channels configured
- Grid Filter: Grid may be filtered
- Browser Cache: Refresh page
Sync Failed
Check:
- External ID: Provider has external_id configured
- Network: GEM can reach sync service
- Credentials: API credentials valid (if required)
- Service Status: Sync service online and working
- Logs: Check for sync error details
Channel Logos Not Showing
Check:
- Logo URL: URL is valid and accessible
- File Exists: Logo file exists at path
- Permissions: GEM can read logo file
- Format: Logo is PNG or JPG
- CORS: External URLs allow cross-origin (if applicable)
Wrong Channels Tuning
Check:
- Channel Number: Correct channel number in database
- Device Commands: Device accepts channel commands
- Command Format: Channel command format correct for device
- Provider Match: Using correct provider for source
Cannot Delete Channel
Check:
- References: Channel may be referenced in macros
- Favorites: Remove from favorites first
- Provider: Verify correct provider selected
Best Practices
-
Sync Regularly: Run sync monthly or when lineup changes
-
Favorites: Pre-configure favorites for common channels
-
Logos: Use high-quality logos for professional appearance
-
Sorting: Choose sort method that matches user expectations
-
Categories: Organize large lineups (>100 channels) with categories
-
Testing: Test channel tuning after sync
-
Documentation: Document provider credentials and sync process
-
Backup: Export channel data before major changes
Related Documentation
- AV Sources - Linking channels to sources
- AV Zones - Zone configuration
- Devices - Cable box and tuner configuration
- Commands - Channel change commands