Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计通过

dlnadlna 控制

Agent Skill

dlna 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,376

周安装

101

GitHub Stars

公开资料未说明

下载量

832
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dlna(dlna 控制)
来源仓库:https://github.com/dxsdyhm/dlna
安装命令:
openclaw skills install dlna
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install dlna

简介

用于控制本地网络上的 DLNA/UPnP 媒体渲染器,如智能电视和扬声器。

  • 适合发现设备、播放媒体 URL 及控制播放状态等场景。
  • 通过安装命令集成到 OpenClaw,需确认权限和网络访问范围。
  • 使用前请检查维护状态及是否涉及文件读写或命令执行。
  • 建议结合原始 README 核验具体功能和 API 调用方式。

SKILL.md

name
dlna-control
description
Use when controlling DLNA/UPnP media renderers (smart TVs, speakers) on a local network - discovering devices, playing media URLs, controlling playback (play/pause/stop), querying transport status, and setting default devices.

DLNA/UPnP Control

Overview

Control DLNA/UPnP MediaRenderer devices (smart TVs, speakers) on the local network. Uses async_upnp_client library for SSDP discovery and SOAP-based device control.

When to Use

  • Need to discover and list DLNA devices on LAN
  • Play media URLs on smart TVs or DLNA speakers
  • Control playback (play, pause, stop, seek)
  • Query current transport/position status
  • Set default device for simplified operations
  • Build CLI or Python API for DLNA device control

Core Pattern

1. Device Discovery

from async_upnp_client import SsdpListener

async def discover_media_renderers(timeout: float = 5.0) -> list[DeviceInfo]:
    """Discover all MediaRenderer devices on network"""
    listener = SsdpListener()
    await listener.async_start()
    await asyncio.sleep(timeout)

    devices = []
    for usn, location in listener.unique_locations():
        device = await listener.async_get_device(location)
        if device and "MediaRenderer" in device.device_type:
            devices.append(DeviceInfo(
                name=device.friendly_name,
                udn=device.udn,
                location=location
            ))

    await listener.async_stop()
    return devices

2. Media Playback Control

from async_upnp_client import AsyncUPnPClient, AVTransport

async def play_media(device_url: str, media_url: str, title: str = None):
    """Play media URL on DLNA device"""
    async with httpx.AsyncClient() as client:
        device = await UPnPDevice.async_get_device(device_url, client=client)
        av_transport = device.service("urn:schemas-upnp-org:service:AVTransport:1")

        # Build DIDL-Lite metadata
        metadata = f'''<?xml version="1.0" encoding="utf-8"?>
        <DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/"
                   xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/">
          <item id="0" parentID="0" restricted="0">
            <dc:title>{title or 'Media'}</dc:title>
            <res protocolInfo="http-get:*:video/mp4:*">{media_url}</res>
          </item>
        </DIDL-Lite>'''

        await av_transport.action("Stop", InstanceID=0)
        await av_transport.action("SetAVTransportURI", InstanceID=0, CurrentURI=media_url, CurrentURIMetaData=metadata)
        await av_transport.action("Play", InstanceID=0, Speed="1")

3. Transport Status Query

async def get_playback_status(av_transport) -> dict:
    """Query current playback state"""
    info = await av_transport.action("GetTransportInfo", InstanceID=0)
    position = await av_transport.action("GetPositionInfo", InstanceID=0)
    return {
        "state": info.get("CurrentTransportState"),  # PLAYING, PAUSED, STOPPED
        "position": position.get("RelTime"),
        "duration": position.get("TrackDuration")
    }

Quick Reference

ActionMethod
Discover devicesSsdpListener().unique_locations()
PlayAVTransport.action("Play", InstanceID=0, Speed="1")
PauseAVTransport.action("Pause", InstanceID=0)
StopAVTransport.action("Stop", InstanceID=0)
SeekAVTransport.action("Seek", InstanceID=0, Unit="REL_TIME", Target="01:00:00")
VolumeRenderingControl.action("SetVolume", InstanceID=0, DesiredVolume=50)
StatusAVTransport.action("GetTransportInfo", InstanceID=0)

Common Mistakes

IssueFix
SSDP timeoutIncrease timeout to 5-10s; check firewall allows UDP 1900
Play fails silentlyVerify media URL is accessible from TV network; check content type
Wrong content typeMatch protocolInfo to actual MIME type (video/mp4, audio/wav)
Device not foundUse exact UDN or IP:port from discovery; check device supports MediaRenderer

CLI Framework

Use Click for CLI:

import click
import asyncio

@click.group()
def cli():
    """DLNA/UPnP Media Controller"""
    pass

@cli.command()
@click.option("--timeout", "-t", default=5)
def discover(timeout):
    """Discover DLNA devices on network"""
    ...

@cli.command()
@click.argument("media_url")
@click.option("--device", "-d")
def play(media_url, device):
    """Play media URL"""
    ...

Dependencies

dependencies = [
    "async_upnp_client>=0.36.0",
    "click>=8.0.0",
    "httpx>=0.25.0",
]

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

85.7%
按下载量换算713

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills