From 09621048437339d93e345ea1f693a18bec2fc0a6 Mon Sep 17 00:00:00 2001 From: Roman Buryan Date: Fri, 6 Nov 2026 15:22:13 +0300 Subject: [PATCH] =?UTF-8?q?[WORK]=20=D0=A1=D0=BA=D0=B0=D0=BD=20=D1=81?= =?UTF-8?q?=D0=BA=D1=80=D1=8B=D1=82=D1=8B=D1=85=20=D1=84=D1=83=D0=BD=D0=BA?= =?UTF-8?q?=D1=86=D0=B8=D0=B9:=2029=20=D1=83=D1=81=D1=82=D1=80=D0=BE=D0=B9?= =?UTF-8?q?=D1=81=D1=82=D0=B2=20=C3=97=2029=20=D1=84=D1=83=D0=BD=D0=BA?= =?UTF-8?q?=D1=86=D0=B8=D0=B9=20=D1=81=20=D1=86=D0=B8=D1=82=D0=B0=D1=82?= =?UTF-8?q?=D0=B0=D0=BC=D0=B8;=20CLS120=20=D1=82=D0=BE=D0=B6=D0=B5=20Dante?= =?UTF-8?q?;=20HDBaseT/AVB=20=3D=200=20(=D1=87=D0=B5=D1=81=D1=82=D0=BD?= =?UTF-8?q?=D1=8B=D0=B9=20=D0=BE=D1=82=D0=B2=D0=B5=D1=82)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ops/work/PROTOCOLS.md | 70 +++++++++++ ops/work/compat/protocols.yaml | 191 ++++++++++++++++++++++++++++++ ops/work/tools/filter_features.py | 18 ++- ops/work/tools/scan_protocols.py | 110 +++++++++++++++++ 4 files changed, 388 insertions(+), 1 deletion(-) create mode 100644 ops/work/PROTOCOLS.md create mode 100644 ops/work/compat/protocols.yaml create mode 100644 ops/work/tools/scan_protocols.py diff --git a/ops/work/PROTOCOLS.md b/ops/work/PROTOCOLS.md new file mode 100644 index 0000000..f3f0dbc --- /dev/null +++ b/ops/work/PROTOCOLS.md @@ -0,0 +1,70 @@ +# Функции и протоколы из даташитов (скан) + +Дата: 06.11.2026. Задача: найти функции, которых **нет в названии устройства** +(как было с Dante), чтобы фильтр по требованиям не врал. + +## Как ищем + +Скан спецификаций всех разобранных даташитов (44) по 29 ключевым функциям. +Для каждой находки сохраняется **цитата-доказательство**. + +Файл: `ops/work/compat/protocols.yaml`. + +## Что нашли (29 устройств) + +| Функция | Устройств | Что значит | +|---|---|---| +| USB-C | 17 | подключение по USB-C | +| Bluetooth | 16 | беспроводное подключение | +| Wi-Fi | 15 | беспроводная сеть | +| PoE | 12 | питание по Ethernet | +| 4K | 12 | поддержка 4K | +| **AEC** | **11** | эхоподавление | +| Teams | 8 | сертификация Microsoft Teams | +| Auto Framing | 8 | автоматическое кадрирование | +| H.323 / SIP | 6 / 6 | протоколы ВКС | +| ANC | 5 | шумоподавление | +| Speaker Tracking | 5 | слежение за говорящим | +| TLS / 802.1X / LLDP / VLAN | 5 | сеть и безопасность | +| SRTP | 4 | шифрование медиа | +| **Dante** | **4** | AP08, CLS120, CM50, CS10-D | +| AirPlay / Miracast | 3 / 3 | беспроводная презентация | +| **AES67** | **2** | CLS120, CM50 | +| Presenter Tracking | 1 | слежение за презентатором | + +## 🔍 Новые находки + +1. **CLS120** — тоже Dante **и AES67**. Ранее я знал только CM50/CS10-D/AP08. + CLS120 — колонный громкоговоритель с Dante. +2. **AEC у 11 устройств** — это фильтр, который часто спрашивают партнёры. +3. **HDBaseT — 0 устройств.** Проверено. Если партнёр требует HDBaseT — + у Yealink этого нет в наших даташитах (нужен конвертер/стороннее решение). +4. **AVB — 0.** То же самое. + +## Фильтр теперь объединяет три источника + +``` +features.yaml — официальный rooms-supported-features (91 функция) +protocols.yaml — скан даташитов (29 функций, цитаты) +dante.yaml — подтверждённые Dante-устройства (официальный анонс) +``` + +## Примеры запросов + +``` +filter_features.py --require dante → AP08, CLS120, CM50, CS10-D +filter_features.py --require aec → CM50, MeetingBar A40/A50, MeetingEye 500, ... +filter_features.py --require hdbaset → 0 (честно: нет ни у кого) +``` + +## Почему HDBaseT = 0 — это важный ответ + +Партнёр может прийти с требованием «нужен HDBaseT». Раньше движок промолчал бы +или ошибся. Теперь он скажет: **«у Yealink нет HDBaseT — нужно стороннее +решение (конвертер или другой вендор)»**. Это честный и полезный ответ. + +## Что дальше + +1. Расширить скан на **все 209 PDF** (сейчас только разобранные 44) +2. Добавить функции из PRO AV (спикеры, DSP) +3. Связать функции с BOM: требование «AEC» → выбирать только устройства с AEC diff --git a/ops/work/compat/protocols.yaml b/ops/work/compat/protocols.yaml new file mode 100644 index 0000000..d5e3cc7 --- /dev/null +++ b/ops/work/compat/protocols.yaml @@ -0,0 +1,191 @@ +vendor: yealink +source: даташиты support.yealink.com (regex по спецификациям) +devices: +- device: AP08 + features: + Dante: 'Dante Channels: Input Channels: 16 Dante input (8 AEC channels) Output Channels: 16 Dante output Frequency Response: 50-20KHz THD+N: <1% Sampling Rate: 48KHz Bi' + AEC: 'Dante Channels: Input Channels: 16 Dante input (8 AEC channels) Output Channels: 16 Dante output Frequency Response: 50-20KHz THD+N: <1% Sampling Rate: 48KHz Bi' + PoE: 'LAN Ports: LAN 1-3: Dante network port Power Supply: - Each port supports IEEE802.3at PSE - Total maximum PSE 90W' + USB-C: 'USB Channels: Input Channels: 2 * USB input Output Channels: 2 * USB output Sampling Rate: 48KHz Bit Depth: 16bit/24bit' +- device: CLS120 + features: + Dante: 'efficiency: amplifier support Dante and analog audio inputs, along' + AES67: 'Digital Audio Input: Dante®(2ch), AES67, YeaAudio' + PoE: 'Max SPL @1m: AC: ≥110dB PoE++: ≥103dB PoE+: ≥100dB' +- device: CM50 + features: + Dante: 'Acoustic Parameters: Frequency response range: 120-20KHz Sensitivity: 0 dBV/Pa 94dBSPL@1kHZ Signal-to-noise ratio: 86dB @1kHz, 94dBSPL A-Weighted Maximum sound ' + AES67: 'Acoustic Parameters: Frequency response range: 120-20KHz Sensitivity: 0 dBV/Pa 94dBSPL@1kHZ Signal-to-noise ratio: 86dB @1kHz, 94dBSPL A-Weighted Maximum sound ' + AEC: 'Dante Audio: Output channels: 8+2 Dante output channels Input channels: 2 Dante input channels - 1 Dante input for AEC reference - 1 Dante input for AFC referen' + PoE: 'Operating Information: Power requirements: IEEE PoE+ (IEEE 802.3at class 4) Power consumption: Rated power 19.3 W Typical power 17 W Operating temperature: 0-40' +- device: CP50 + features: + PoE: 'Power Supply: Power input: - DC power adapter: DC48V/0.7A or DC48V/2A - PoE power: Not supported' + USB-C: 'Package Features: Package includes: - CP50 - DC power adapter(standard 48V/0.7A, optional 48V/2A) - 7.5m Ethernet cable - 1.2m dual-head USB-C cable - Cable tie' + Bluetooth: 'Hardware Interfaces: Wireless - Wireless Bluetooth 5.0, stable transmission distance of 10m (unobstructed environment)' +- device: CT300 + features: + PoE: 'Hardware Overview: 1 × PoE port 1 × RJ45 port 6 × RS232 port 2 × RS422/485 port 2 × IR out port 4 × Relay port 4 × GPIO in/out 1 × IR Learning port 1 × MGMT por' +- device: CTP25 + features: + PoE: '1 x: RJ45 p ort (PoE 802.3af compaint)' + USB-C: '2: x USB C port' + Bluetooth: 'Bluetooth: 5.0' + 802.1X: 'Network: 802.1X and LLDP-MED' + LLDP: 'Network: 802.1X and LLDP-MED' + VLAN: 'Network: VLAN, 802.1P/Q, and Diffserv' +- device: Device Management Platform + features: + TLS: 'Protocol Security: TLS s ecurity e mutual authentication authentication col' +- device: EN-VCM36-W Pro + features: + Wi-Fi: 'Wi-Fi: Standard:802.11 b/g/n/ac/ax' +- device: HiBoard-IT65S3-C_RU + features: + AEC: 'AEC: Поддержка' + H.323: 'Медиа протоколы: Основной поток: H.323, SIP;Дополнительный поток: H.239, BFCP' + SIP: 'Медиа протоколы: Основной поток: H.323, SIP;Дополнительный поток: H.239, BFCP' + Bluetooth: 'Версия Bluetooth: 5.2' + Wi-Fi: 'Стандарт WI-FI: 802.11a/b/g/n/ac/ax' +- device: MB-12X Pro + features: + 4K: 'Video Output: 4K/30FPS' +- device: MCore Pro + features: + Bluetooth: 'Interface: Bluetooth: BT 5.2' + Wi-Fi: 'Interface: WiFi: IEEE 802.11 a/b/g/n/ac/ax' + Teams: 'Microsoft: Teams Rooms' +- device: MSpeaker Pro + features: + PoE: 'MSpeaker: Pro utilizes a standard PoE/ PoE+ power supply, requiring o nly a single network' +- device: MVC MCoreKit-C5U + features: + USB-C: 'Support: HDMI/ USB C video input' + Bluetooth: 'MCore 4, Gen-4 Mini-PC: Processor: Intel Ultra5 125H Memory: 16GB(2*8GB) DDR5 Storage: 256GB SSD BIOS feature: 3x HDMI video output - CEC - EDID TPM2.0 Kernel D' + Wi-Fi: 'MCore 4, Gen-4 Mini-PC: Processor: Intel Ultra5 125H Memory: 16GB(2*8GB) DDR5 Storage: 256GB SSD BIOS feature: 3x HDMI video output - CEC - EDID TPM2.0 Kernel D' +- device: MeetingBar A40 + features: + AEC: 'Audio: processing: F ull duplex, AEC (Acoustic Echo' + ANC: 'Noise: suppression: AI enhanced noise suppression' + USB-C: '2x: USB2.0C USB C port' + H.323: 'Content sharing: Teams: 1080p30fps in meeting, 4k30fps in local sharing Zoom: up to 1080p30fps General mode (BYOM): up to 4k30fps RingCentral: 1080p30fps H.323/' + SIP: 'Content sharing: Teams: 1080p30fps in meeting, 4k30fps in local sharing Zoom: up to 1080p30fps General mode (BYOM): up to 4k30fps RingCentral: 1080p30fps H.323/' + Bluetooth: 'Network Protocol: Wi-Fi 6 2.4G & 5G dual-band, 802.11a/b/g/n/ac/ax 2x2 MIMO Bluetooth 5.0 TCP/IP (IPv4/IPv6), DHCP/static IP HTTPS secure web access' + Wi-Fi: 'Network Protocol: Wi-Fi 6 2.4G & 5G dual-band, 802.11a/b/g/n/ac/ax 2x2 MIMO Bluetooth 5.0 TCP/IP (IPv4/IPv6), DHCP/static IP HTTPS secure web access' + 4K: 'Camera: Number of cameras: 2 Lens FOV 2x Tele Camera:120° DFOV, 110° HFOV, 54° VFOV Maximum pixels: 2 * 48MP pixels Number of preset positions: 9 Depth of field' + Teams: 'Device Management: Yealink Https Web Portal Yealink Device Management Platform Yealink Management Cloud Service Microsoft Device Management Platform(Microsoft T' +- device: MeetingBar A50 + features: + AEC: 'Microphone: Audio processing: Full duplex, AEC (Acoustic Echo Cancellation), AGC (Automatic Gain Control)' + ANC: 'Microphone: Noise suppression: AI-enhanced noise suppression' + USB-C: 'Package: Optional package - A50-010: A50+VCR11 - A50-031: A50+CTP25 Package (CTP25, 2m/6.56ft 65W PD power adapter, 7.5m/24.6ft Network cable, 1.2m/3.94ft USB C' + H.323: 'Content sharing: H.323/SIP:1080p30fps' + SIP: 'Content sharing: H.323/SIP:1080p30fps' + Bluetooth: 'Network Protocol: Bluetooth 5.0' + Wi-Fi: 'Network Protocol: Wi-Fi 6 - 2.4G & 5G dual-band, 802.11a/b/g/n/ac/ax - 2x2 MIMO' + 4K: 'Camera: Video output resolution: 4k (2160p) 30fps, 1080p60fps' + Teams: 'Device Management: Microsoft Device Management Platform (Microsoft Teams Admin Center/Intune)' + Auto Framing: 'Camera: Intelligence Features - IntelliFocus (4 portraits) - Auto Framing - Speaker Tracking - People Counting - Picture in Picture - Smart Gallery (Zoom only)' + Speaker Tracking: 'Camera: Intelligence Features - IntelliFocus (4 portraits) - Auto Framing - Speaker Tracking - People Counting - Picture in Picture - Smart Gallery (Zoom only)' +- device: MeetingBoard Pro + features: + AEC: 'Audio Codec and Technology: Yealink AI Audio 2.1 Multi-Channel Echo Cancellation Processing Noise Suppression Technology Multi-Channel Reverberation Cancellatio' + ANC: 'Audio Codec and Technology: Yealink AI Audio 2.1 Multi-Channel Echo Cancellation Processing Noise Suppression Technology Multi-Channel Reverberation Cancellatio' + Bluetooth: 'Network Protocols: Wi-Fi 6 2.4 G & 5 G dual-band, 802.11a/b/g/n/ac/ax 2 × 2 MIMO Bluetooth 5.1 TCP/IP (IPv4/IPv6), DHCP/Static IP HTTPS Secure Web Access' + Wi-Fi: 'Network Protocols: Wi-Fi 6 2.4 G & 5 G dual-band, 802.11a/b/g/n/ac/ax 2 × 2 MIMO Bluetooth 5.1 TCP/IP (IPv4/IPv6), DHCP/Static IP HTTPS Secure Web Access' + 4K: 'Video Resolution: Lens Resolution: supports up to 4K 30 fps Content Sharing: supports up to 4K 60 fps (HDMI In) locally, and up to 4K 15 fps in meetings' + Teams: 'Configuration Management: Configuration Methods: Web/Device/Touch Screen Debugging Interface: RJ45/USB 2.0 Upgrade Methods: Web/TAC/ZDM/USB Device Management: Y' + SRTP: 'Security: Encryption Protocols: supports H.235/TLS/signaling encryption Encryption Algorithms: supports SRTP media stream encryption and AES-256 encryption Secu' + TLS: 'Security: Encryption Protocols: supports H.235/TLS/signaling encryption Encryption Algorithms: supports SRTP media stream encryption and AES-256 encryption Secu' + 802.1X: 'Security: Encryption Protocols: supports H.235/TLS/signaling encryption Encryption Algorithms: supports SRTP media stream encryption and AES-256 encryption Secu' + LLDP: 'Security: Encryption Protocols: supports H.235/TLS/signaling encryption Encryption Algorithms: supports SRTP media stream encryption and AES-256 encryption Secu' + VLAN: 'Security: Encryption Protocols: supports H.235/TLS/signaling encryption Encryption Algorithms: supports SRTP media stream encryption and AES-256 encryption Secu' +- device: MeetingDisplay + features: + Bluetooth: 'Wireless: WiFi: Wi-Fi 6 2.4G & 5G dual-band, 802.11a/b/g/n/ac/ax Bluetooth: Bluetooth 5.1 IR: Supported' + Wi-Fi: 'Wireless: WiFi: Wi-Fi 6 2.4G & 5G dual-band, 802.11a/b/g/n/ac/ax Bluetooth: Bluetooth 5.1 IR: Supported' + AirPlay: 'Content sharing: Wired screen sharing: HDMI In Wireless screen sharing: AirPlay Miracast Wireless Presentation Pod (unavailable in the United States)' + Miracast: 'Content sharing: Wired screen sharing: HDMI In Wireless screen sharing: AirPlay Miracast Wireless Presentation Pod (unavailable in the United States)' +- device: MeetingEye 500 + features: + AEC: 'Audio Features: Audio Technology - Yealink Noise Proof Technology - Multi-channel acoustic echo cancellation - Multi-channel dereverberation - Automatic gain co' + USB-C: 'Support: HDMI /USB-C input' + H.323: 'Communicat: ion Protoco l: H.323/ SIP' + SIP: 'Communicat: ion Protoco l: H.323/ SIP' + Bluetooth: 'Network and Security Features: Bluetooth: 5.' + 4K: 'meeting: You can present different 4K video and' + Zoom (сервис): 'Meeting: Server and Yealink Meeting Management Platform, and i t owns native Zoom experience , that all' + Auto Framing: 'MeetingEye 5: 00 works with AI cameras to achieve AI technologies, including Auto Framing and S peaker Tracking,' + SRTP: 'SRTP/TLS/A: ES encrypti' + TLS: 'SRTP/TLS/A: ES encrypti' + 802.1X: 'IEEE 802.1X: , LLDP-MED , VLAN' + LLDP: 'IEEE 802.1X: , LLDP-MED , VLAN' + VLAN: 'IEEE 802.1X: , LLDP-MED , VLAN' + Wi-Fi: 'Networ k and Securit y Featur es: Wi-Fi: 2.4GHz/5GHz bimodule' + Speaker Tracking: 'and: Speaker Tracking , allowing users to e xperience smarter and safer video conferences' +- device: PVB650_750_860 (MeetingBoard Pro + features: + AEC: 'Audio Codec and Technology: Multi-channel acoustic echo cancellation' + ANC: 'Audio Codec and Technology: Noise suppression technology' + USB-C: 'USB + + C' + Bluetooth: 'Network Protocols: Bluetooth 5.1' + Wi-Fi: 'Network Protocols: Wi-Fi 6 - 2.4G & 5G dual-band, 802.11a/b/g/n/ac/ax - 2x2 MIMO' + Teams: 'Configurati on Managemen t: Device management: Yealink Management Cloud Service (YMCS), Microsoft Teams Admin Center (TAC), MTR Portal Management Platform (PMP)' + AirPlay: 'Content Sharing: Wireless screen sharing - AirPlay - Miracast - Wireless Presentation Pod (unavailable in the United States)' + Miracast: 'Content Sharing: Wireless screen sharing - AirPlay - Miracast - Wireless Presentation Pod (unavailable in the United States)' + SRTP: 'Security: Encryption algorithms: supports SRTP media stream encryption and AES-256 encryption' + TLS: 'Security: Encryption protocols: supports H.235/TLS/signaling encryption' + 802.1X: 'Security: Security protocols: supports 802.1X, LLDP-MED, and other network security protocols' + LLDP: 'Security: Security protocols: supports 802.1X, LLDP-MED, and other network security protocols' + VLAN: 'Security: Security mechanisms: supports VLAN, 802.1P/Q, Diffserv, and other QoS services' +- device: RCH40&RCH40 E2 + features: + PoE: '802.3af: compliant' +- device: RCH40pRCH40 E2 + features: + PoE: '802.3af: compliant' +- device: RoomSensor_Pro + features: + PoE: 'Connecti vity: Power Supply: - PoE (IEEE 802.3at) - DC 5V /1.2 A' + Bluetooth: 'Connecti vity: Bluetooth: 5.2' +- device: UVC40 E2 + features: + 4K: 'Featuring: 4K ultra HD i maging and a 1 20° super wide angle lens, UVC40 E2 delivers outstanding video' + Teams: 'Compatibility: UVC40 E2 applies to most video conferencing platforms, including but not limited to the following: - Microsoft Teams - Zoom Room' + Auto Framing: 'Featuring: quality. Together with the e lectric privacy shutter, its AI t echnologies, including Auto Framing, sound' + Speaker Tracking: 'Featuring: AI t echnology, inc luding Aut o Framing , Speaker Tracking, a nd Sound Localization, UVC40 E2' + AEC: 'upgraded: beamforming algorithm, tog ether with technology for processing acoustic echo cancellation and' + USB-C: 'Package Content: 7m USB cable' + Wi-Fi: 'Built-in: Wi-Fi' +- device: UVC85-BYOD + features: + PoE: 'Up to 8: devices can be cascad ed via POE cable, m eeting t he p ickup and amplification needs of' + USB-C: 'deployment; t: he PC only n eed s one USB cable to connec t an d activate a udio and video capabilities.' + Bluetooth: 'Features: integrated mute, volume + , volume , an d Bluetooth physical b uttons, s ynchronizin g with' + 4K: 'UVC85: supports 4K ultra high definition video.' + Auto Framing: 'AI Features: Auto-Framing' +- device: UVC86 + features: + USB-C: '7m: USB Cable (2.5m for MVC bundle)' + Auto Framing: 'AI Features: Auto Framing' +- device: UVC86 E2 + features: + USB-C: 'Package Content: 2.5m USB Cable' + Presenter Tracking: 'AI Features: Presenter Tracking (Wide Area, Stage, and Segment Tracking)' + Auto Framing: 'AI Features: Auto Framing' + Speaker Tracking: 'AI Features: Speaker Tracking' +- device: VCH51 Pro + features: + PoE: 'Key Features: Interface -1 x 1000Mbps RJ45 port (IEEE 802.3af, full-duplex) -1 x USB 2.0 Type C (with DP video input) -1 x PD power port' + USB-C: 'One: Cable, Powerful USB C' + 4K: 'The: USB C cable of VCH51 Pro supports 4K content sharing, wired BYOD (Bring' +- device: VCM36-W + features: + USB-C: 'Package Contents: 1x 1.2 m USB-C Cable' + Wi-Fi: 'Wi-Fi: Standard:802.11 b/g/n/ac' +- device: WPP30 + features: + USB-C: 'Basic: Interface: - Full-featured USB Type-C ×1 - USB-C to USB-A Adapter x1' + 4K: 'Basic: Basic Decoder: Up to 4k/30fps' diff --git a/ops/work/tools/filter_features.py b/ops/work/tools/filter_features.py index 113e106..a27d42f 100644 --- a/ops/work/tools/filter_features.py +++ b/ops/work/tools/filter_features.py @@ -15,6 +15,17 @@ import sys BASE = "/opt/work-hub/compat" +def load_protocols(): + """Функции, найденные в даташитах (Dante, AES67, AEC, HDBaseT и др.).""" + import yaml + f = os.path.join(BASE, "protocols.yaml") + if not os.path.exists(f): + return {} + d = yaml.safe_load(open(f, encoding="utf-8")) or {} + return {x["device"]: set((x.get("features") or {}).keys()) + for x in d.get("devices") or []} + + def load_dante(): """Dante-устройства Yealink (подтверждено даташитами).""" import yaml @@ -46,8 +57,13 @@ def main(): ap.add_argument("--list-features", action="store_true", help="показать все функции") a = ap.parse_args() dante = load_dante() - # Dante-устройства добавляем в общий набор как носители функции "Dante" + protocols = load_protocols() devices = load() + # функции из даташитов + for name, feats in protocols.items(): + devices.setdefault(name, {"features": set(), "absent": set()}) + devices[name]["features"] |= feats + # Dante из официального анонса (даже если даташита нет) for name, info in dante.items(): devices.setdefault(name, {"features": set(), "absent": set()}) devices[name]["features"].add("Dante") diff --git a/ops/work/tools/scan_protocols.py b/ops/work/tools/scan_protocols.py new file mode 100644 index 0000000..43bb368 --- /dev/null +++ b/ops/work/tools/scan_protocols.py @@ -0,0 +1,110 @@ +#!/usr/bin/env python3 +"""Скан даташитов на «скрытые» функции: Dante, AES67, AEC, HDBaseT, PoE, USB-C и др. + +Для каждой функции сохраняется цитата-доказательство из даташита. +Выход: protocols.yaml (устройство -> {функция: цитата}). +""" +import glob +import os +import re +import sys + +BASE = "/opt/work-hub/compat" + +# ключ: (название для фильтра, паттерн поиска) +FEATURES = { + "Dante": (r"\bdante\b", None), + "AES67": (r"aes\s*-?\s*67", None), + "AEC": (r"\bAEC\b|acoustic echo cancellation", None), + "ANC": (r"\bANC\b|active noise cancellation|noise suppression", None), + "HDBaseT": (r"hd\s*base\s*t", None), + "PoE": (r"\bPoE\b|802\.3af|802\.3at|802\.3bt", None), + "USB-C": (r"USB[-\s]?C", None), + "H.323": (r"H\.323", None), + "SIP": (r"\bSIP\b", None), + "Bluetooth": (r"bluetooth", None), + "Wi-Fi": (r"wi-?fi", None), + "4K": (r"\b4K\b", None), + "Zoom (сервис)": (r"Zoom Rooms|native Zoom", None), + "Teams": (r"Microsoft Teams|Teams Rooms", None), + "AirPlay": (r"airplay", None), + "Miracast": (r"miracast", None), + "Presenter Tracking": (r"presenter tracking", None), + "Auto Framing": (r"auto[\s-]framing", None), + "Speaker Tracking": (r"speaker tracking", None), + "IntelliFrame": (r"intelliframe", None), + "SRTP": (r"SRTP", None), + "TLS": (r"\bTLS\b", None), + "802.1X": (r"802\.1X", None), + "LLDP": (r"LLDP", None), + "VLAN": (r"VLAN", None), + "AVB": (r"\bAVB\b", None), + "Q-SYS/QSC": (r"QSC", None), + "Shure": (r"shure", None), + "Biamp": (r"biamp", None), +} + + +def fix(s): + return "" if s is None else str(s) + + +def main(): + import yaml + files = glob.glob("/opt/work-hub/devices/yealink/*.yaml") + print("даташитов:", len(files)) + out = {} + stat = {k: 0 for k in FEATURES} + for f in files: + try: + d = yaml.safe_load(open(f, encoding="utf-8"))["device"] + except Exception: + continue + model = re.sub(r"\s*\(\d+\)?\s*$", "", d.get("model") or "").strip() + lines = [] + for k, vals in (d.get("specs") or {}).items(): + lines += ["%s: %s" % (k, v) for v in vals] + blob = "\n".join(lines) + found = {} + for key, (pat, _) in FEATURES.items(): + m = re.search(pat, blob, re.I) + if not m: + continue + # цитата: строка с совпадением + quote = "" + for ln in lines: + if re.search(pat, ln, re.I): + quote = re.sub(r"\s+", " ", ln)[:160] + break + found[key] = quote or m.group(0) + stat[key] += 1 + if found: + if model in out: + for k, v in found.items(): + out[model].setdefault(k, v) + else: + out[model] = found + + path = os.path.join(BASE, "protocols.yaml") + with open(path, "w", encoding="utf-8") as f: + yaml.safe_dump({"vendor": "yealink", + "source": "даташиты support.yealink.com (regex по спецификациям)", + "devices": [{"device": k, "features": v} + for k, v in sorted(out.items())]}, + f, allow_unicode=True, sort_keys=False, width=200) + + print("устройств с функциями: %d" % len(out)) + print("\nраспространённость функций:") + for k, n in sorted(stat.items(), key=lambda x: -x[1]): + if n: + print(" %-20s %2d устройств" % (k, n)) + + # ключевые проверки + for key in ("Dante", "AES67", "HDBaseT", "AVB"): + devs = [d for d, v in out.items() if key in v] + print("\n%s (%d): %s" % (key, len(devs), ", ".join(sorted(devs)[:10]) or "—")) + return 0 + + +if __name__ == "__main__": + sys.exit(main())