mirror of
https://gitcode.com/waxgourd/addons
synced 2025-12-06 20:38:28 +08:00
首次推出了remote-webview-sever
This commit is contained in:
4
remote-webview-server/CHANGELOG.md
Normal file
4
remote-webview-server/CHANGELOG.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
### 1.1.3(2025-11-28)
|
||||||
|
- 版本升级
|
||||||
|
### 1.1.2(2025-11-26)
|
||||||
|
- 首次推出
|
||||||
31
remote-webview-server/DOCS.md
Normal file
31
remote-webview-server/DOCS.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# 远程网页渲染服务器
|
||||||
|
|
||||||
|
## 配置说明
|
||||||
|
|
||||||
|
### 一、安装
|
||||||
|
|
||||||
|
1、安装该加载项。
|
||||||
|
|
||||||
|
2、将固件烧录到EPS32中控屏,连接wifi到HA一个局域网内。
|
||||||
|
|
||||||
|
### 二、配置
|
||||||
|
|
||||||
|
1、进入该加载项的配置页,确认启动**暴露debug代理**。
|
||||||
|
|
||||||
|
2、确认**debug代理端口**(默认9222)。
|
||||||
|
|
||||||
|
3、使用具有chrome内核的浏览器访问“**chrome://inspect/#devices**“。
|
||||||
|
|
||||||
|
4、点击**Configure**按钮,在最下一行输入HA的IP:9222(例如192.168.1.10:9222),点击**Done**。
|
||||||
|
|
||||||
|
5、**重启一次中空屏**,等待几秒后会看到HomeAssistant的登录页面。
|
||||||
|
|
||||||
|
6、回到浏览器,在下面会出现“**Home Assistant**”的一条远程浏览器,点击下面的**inspect**即可打开该标签页完整的 DevTools 调试窗口。
|
||||||
|
|
||||||
|
7、在调试窗口可以通过键盘老输入账号、密码。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
详细图文教程操作请查看论坛。
|
||||||
24
remote-webview-server/README.md
Normal file
24
remote-webview-server/README.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# 冬瓜甄选addons:远程网页渲染服务器
|
||||||
|
|
||||||
|
## 关于
|
||||||
|
|
||||||
|
一个无头浏览器,用来渲染HA网页( Home Assistant 仪表盘),并通过 WebSocket 将这些页面以图块(image tiles)流式传输给轻量级客户端(如 ESP32 显示屏)。服务器支持多个客户端同时在线,每个客户端都有自己的屏幕分辨率、方向和独立的设备设置。
|
||||||
|
|
||||||
|
## 功能特性
|
||||||
|
|
||||||
|
- 在无头 Chromium 环境中渲染页面,并通过 WebSocket 推送图像块(image tiles)。
|
||||||
|
- 图块合并与变更检测,用于减少数据包数量和降低 CPU 负载。
|
||||||
|
- 支持定时、阈值、按需触发整帧回传。
|
||||||
|
- 可配置:图块大小、JPEG 质量、WS 消息大小、最小帧间隔等。
|
||||||
|
- 客户端独立参数:每个中控屏都可独立配置宽度、高度、tile大小、jpeg质量、每条消息最大字节数等。
|
||||||
|
- 热重配置:重新连接并传输新的参数,会重新配置该设备会话并触发一次整帧刷新。
|
||||||
|
- 更智能的帧节流:节流 + 内容哈希去重(跳过完全相同的帧)。
|
||||||
|
- 不使用 = 休眠:仍会 ACK 帧以保持 Chromium 渲染管线活跃,但在没有任何监听者时不会进行编码或队列处理。
|
||||||
|
- 触摸事件:按下、抬起、滑动(尚不支持复杂手势)。
|
||||||
|
- 客户端驱动导航:客户端可控制打开哪个页面。
|
||||||
|
- 内置自测页面,用于可视化和测量渲染时间。
|
||||||
|
- 健康检查接口,用于容器编排系统。
|
||||||
|
- 可选 DevTools 访问(通过 TCP 代理)。
|
||||||
|
|
||||||
|
## 来源
|
||||||
|
https://github.com/strange-v/RemoteWebViewServer
|
||||||
51
remote-webview-server/config.yaml
Normal file
51
remote-webview-server/config.yaml
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
name: "远程网页渲染服务器"
|
||||||
|
version: "1.1.3"
|
||||||
|
slug: "remote_webview_server"
|
||||||
|
description: "把你的Home Assistant仪表盘通过WebSocket方式实时推送到ESP32的中控屏上。"
|
||||||
|
url: https://gitcode.com/waxgourd/addons
|
||||||
|
image: r.hassbus.com/wghaos/remote-webview-server-{arch}
|
||||||
|
arch:
|
||||||
|
- amd64
|
||||||
|
- aarch64
|
||||||
|
startup: application
|
||||||
|
boot: auto
|
||||||
|
host_network: true
|
||||||
|
video: true
|
||||||
|
udev: true
|
||||||
|
init: false
|
||||||
|
watchdog: "[PROTO:http]://[HOST]:[PORT:18080]/"
|
||||||
|
map:
|
||||||
|
- type: addon_config
|
||||||
|
read_only: false
|
||||||
|
options:
|
||||||
|
tile_size: 32
|
||||||
|
full_frame_tile_count: 4
|
||||||
|
full_frame_area_threshold: 0.5
|
||||||
|
full_frame_every: 50
|
||||||
|
every_nth_frame: 1
|
||||||
|
min_frame_interval_ms: 80
|
||||||
|
jpeg_quality: 85
|
||||||
|
max_bytes_per_message: 61440
|
||||||
|
ws_port: 8081
|
||||||
|
debug_port: 9221
|
||||||
|
expose_debug_proxy: false
|
||||||
|
debug_proxy_port: 9222
|
||||||
|
health_port: 18080
|
||||||
|
prefers_reduced_motion: false
|
||||||
|
user_data_dir: "/pw-data"
|
||||||
|
schema:
|
||||||
|
tile_size: int
|
||||||
|
full_frame_tile_count: int
|
||||||
|
full_frame_area_threshold: float
|
||||||
|
full_frame_every: int
|
||||||
|
every_nth_frame: int
|
||||||
|
min_frame_interval_ms: int
|
||||||
|
jpeg_quality: int
|
||||||
|
max_bytes_per_message: int
|
||||||
|
ws_port: int
|
||||||
|
debug_port: int
|
||||||
|
expose_debug_proxy: bool
|
||||||
|
debug_proxy_port: int
|
||||||
|
health_port: int
|
||||||
|
prefers_reduced_motion: bool
|
||||||
|
user_data_dir: str
|
||||||
BIN
remote-webview-server/icon.png
Normal file
BIN
remote-webview-server/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
BIN
remote-webview-server/logo.png
Normal file
BIN
remote-webview-server/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
62
remote-webview-server/translations/en.yaml
Normal file
62
remote-webview-server/translations/en.yaml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
---
|
||||||
|
configuration:
|
||||||
|
tile_size:
|
||||||
|
name: tile_size
|
||||||
|
description: >-
|
||||||
|
Tile edge size in pixels. Helps the server choose tile packing; it’s best to keep it a multiple of 16.
|
||||||
|
full_frame_tile_count:
|
||||||
|
name: full_frame_tile_count
|
||||||
|
description: >-
|
||||||
|
Number of tiles the server should use for full-frame updates.
|
||||||
|
full_frame_area_threshold:
|
||||||
|
name: full_frame_area_threshold
|
||||||
|
description: >-
|
||||||
|
Area delta (fraction of screen) above which the server should send a full frame.
|
||||||
|
full_frame_every:
|
||||||
|
name: full_frame_every
|
||||||
|
description: >-
|
||||||
|
Force a full-frame update every N frames (0 disables).
|
||||||
|
every_nth_frame:
|
||||||
|
name: every_nth_frame
|
||||||
|
description: >-
|
||||||
|
Frame-rate divider. Server should send only every Nth frame.
|
||||||
|
min_frame_interval_ms:
|
||||||
|
name: min_frame_interval_ms
|
||||||
|
description: >-
|
||||||
|
Minimum time between frames on the wire, in milliseconds.
|
||||||
|
jpeg_quality:
|
||||||
|
name: jpeg_quality
|
||||||
|
description: >-
|
||||||
|
JPEG quality hint for the server’s encoder.
|
||||||
|
max_bytes_per_message:
|
||||||
|
name: max_bytes_per_message
|
||||||
|
description: >-
|
||||||
|
Upper bound for a single WS binary message.
|
||||||
|
ws_port:
|
||||||
|
name: ws_port
|
||||||
|
description: >-
|
||||||
|
ws port
|
||||||
|
debug_port:
|
||||||
|
name: debug_port
|
||||||
|
description: >-
|
||||||
|
debug port
|
||||||
|
expose_debug_proxy:
|
||||||
|
name: expose_debug_proxy
|
||||||
|
description: >-
|
||||||
|
expose debug proxy
|
||||||
|
debug_proxy_port:
|
||||||
|
name: debug_proxy_port
|
||||||
|
description: >-
|
||||||
|
debug proxy port
|
||||||
|
health_port:
|
||||||
|
name: health_port
|
||||||
|
description: >-
|
||||||
|
health port
|
||||||
|
prefers_reduced_motion:
|
||||||
|
name: prefers_reduced_motion
|
||||||
|
description: >-
|
||||||
|
prefers reduced motion
|
||||||
|
user_data_dir:
|
||||||
|
name: user_data_dir
|
||||||
|
description:
|
||||||
|
user data dir
|
||||||
62
remote-webview-server/translations/zh-Hans.yaml
Normal file
62
remote-webview-server/translations/zh-Hans.yaml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
---
|
||||||
|
configuration:
|
||||||
|
tile_size:
|
||||||
|
name: 图块边缘大小(像素单位)
|
||||||
|
description: >-
|
||||||
|
图块边缘大小(像素单位)。帮助服务器选择地块填充;最好保持在16的倍数。
|
||||||
|
full_frame_tile_count:
|
||||||
|
name: full_frame_tile_count
|
||||||
|
description: >-
|
||||||
|
服务器应使用用于全画面更新的瓦片数量。
|
||||||
|
full_frame_area_threshold:
|
||||||
|
name: full_frame_area_threshold
|
||||||
|
description: >-
|
||||||
|
服务器应发送全帧的区域差异(屏幕比例)。
|
||||||
|
full_frame_every:
|
||||||
|
name: full_frame_every
|
||||||
|
description: >-
|
||||||
|
每N帧强制更新一次全帧(0个禁用帧)。
|
||||||
|
every_nth_frame:
|
||||||
|
name: every_nth_frame
|
||||||
|
description: >-
|
||||||
|
帧率分频器。服务器应该每隔N帧发送一次。
|
||||||
|
min_frame_interval_ms:
|
||||||
|
name: min_frame_interval_ms
|
||||||
|
description: >-
|
||||||
|
线上帧间隔的最短时间,以毫秒计。
|
||||||
|
jpeg_quality:
|
||||||
|
name: jpeg_quality
|
||||||
|
description: >-
|
||||||
|
服务器编码器的JPEG画质提示。
|
||||||
|
max_bytes_per_message:
|
||||||
|
name: max_bytes_per_message
|
||||||
|
description: >-
|
||||||
|
单个WS二进制消息的上界。
|
||||||
|
ws_port:
|
||||||
|
name: ws_port
|
||||||
|
description: >-
|
||||||
|
WS端口
|
||||||
|
debug_port:
|
||||||
|
name: debug_port
|
||||||
|
description: >-
|
||||||
|
debug端口
|
||||||
|
expose_debug_proxy:
|
||||||
|
name: expose_debug_proxy
|
||||||
|
description: >-
|
||||||
|
暴露debug代理
|
||||||
|
debug_proxy_port:
|
||||||
|
name: debug_proxy_port
|
||||||
|
description: >-
|
||||||
|
debug代理端口
|
||||||
|
health_port:
|
||||||
|
name: health_port
|
||||||
|
description: >-
|
||||||
|
health端口
|
||||||
|
prefers_reduced_motion:
|
||||||
|
name: prefers_reduced_motion
|
||||||
|
description: >-
|
||||||
|
偏爱的简化的动作
|
||||||
|
user_data_dir:
|
||||||
|
name: user_data_dir
|
||||||
|
description:
|
||||||
|
用户数据目录
|
||||||
Reference in New Issue
Block a user