scrypted-tuya 0.1.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,120 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0-beta.11
4
+
5
+ - Add ingress and webui support to Tuya RTSP Bridge add-on (sidebar integration + Open Web UI button).
6
+ - Add ffprobe resolution hint and camera stream URL logging in getVideoStream.
7
+ - Add qualityToResolution() mapping for stream options hint.
8
+ - 1.5s delay between quality command and RTSP allocation.
9
+ - Improved logging for quality command acceptance/rejection.
10
+ - Rename tuya_rtsp_bridge to bridge.
11
+ - Remove chat.json from repo.
12
+
13
+ ## 0.1.0-beta.10
14
+
15
+ - Add per-camera Smart Life P2P HD RTSP override while preserving Tuya events and controls.
16
+ - Add a Home Assistant add-on definition for QR-authenticated Smart Life WebRTC/P2P to RTSP bridging.
17
+ - Pin the bridge backend to `DanEng1982/tuya-rtsp-bridge` v1.2.4.
18
+ - Fix the add-on startup log command outside the Supervisor bashio shell and add an HTTP health check.
19
+
20
+ ## 0.1.0-beta.9
21
+
22
+ - Request the highest recognised writable quality advertised by the camera schema before RTSP allocation.
23
+ - Safely fall back to Tuya's server-selected quality.
24
+
25
+ ## 0.1.0-beta.7
26
+
27
+ fix: fix setTimeout undefined function
28
+ bump version
29
+
30
+ ## 0.1.0-beta.6
31
+
32
+ chore: update changelog
33
+ fix: ensure timeout is actually correct and bound correctly
34
+ chore: bump version
35
+
36
+ ## 0.1.0-beta.5
37
+
38
+ chore: update changelog
39
+ fix: use correct property for checking connection state
40
+ chore: bump version
41
+
42
+ ## 0.1.0-beta.4
43
+
44
+ fix: resolve mqtt connection issues
45
+ bump version
46
+
47
+ ## 0.1.0-beta.3
48
+
49
+ fixchangelog
50
+ changelog
51
+ quick fix
52
+ bump to beta 3
53
+
54
+ ## 0.1.0-beta.2
55
+
56
+ update commit
57
+ bump version
58
+
59
+ ## 0.1.0-beta.1
60
+
61
+ improve mqtt reconnect, also update status
62
+ wip: prevent setting motion if device has no motion detection
63
+ fix: resolve indicator not updating
64
+ feat: add support for light accessory in camera
65
+ wip: fetch rtsp from Tuya Sharing SDK
66
+
67
+ ## 0.1.0
68
+
69
+ wip: allow changing between different login methods
70
+ wip: remove websocket for cameras since they are not supported
71
+
72
+ ## 0.0.9
73
+
74
+ wip: update components
75
+
76
+ ## 0.0.8
77
+
78
+ format code
79
+ replace tool to use `ffmpeg` and bump v0.0.8
80
+
81
+ ## 0.0.7
82
+
83
+ plugins: update tsconfig.json
84
+ Updated Tuya to v0.0.7 (#408)
85
+
86
+ ## 0.0.7-beta.2
87
+
88
+ tuya: fix crlf in candidate, fix empty stream name in rebroadcast, webrtc logging
89
+ remove null candidate
90
+
91
+ ## 0.0.7-beta.1
92
+
93
+ Fix issue not being able to select your prebuffer
94
+
95
+ ## 0.0.7-beta.0
96
+
97
+ Added support for webrtc, testing needed
98
+
99
+ ## 0.0.6
100
+
101
+ Improvements in WebRTC
102
+ add initial support for webrtc
103
+ allow triggering doorbell (#361)
104
+
105
+ ## 0.0.5
106
+
107
+ [Tuya Plugin] Fixed issue with devices not loading (#355)
108
+
109
+ ## 0.0.4
110
+
111
+ Fix race condition for Tuya Devices (#351)
112
+
113
+ ## 0.0.3
114
+
115
+ tuya: publish
116
+
117
+ ## 0.0.1
118
+
119
+ tuya: project cleanups, remove unnecessary dependencies
120
+ Add Tuya Camera (and Doorbell Cameras) Support (#350)
package/Development.md ADDED
@@ -0,0 +1,15 @@
1
+ # Development
2
+ This document describes how to build and run this plugin.
3
+
4
+ ## npm commands
5
+ - npm run scrypted-webpack
6
+ - npm run scrypted-deploy
7
+ - npm run scrypted-debug
8
+
9
+ ## scrypted distribution via npm
10
+ 1. Ensure package.json is set up properly for publishing on npm.
11
+ 2. npm publish
12
+
13
+ ## Visual Studio Code configuration
14
+ - If using a remote server, edit .vscode/settings.json to specify the IP Address of the Scrypted server.
15
+ - Launch Scrypted Debugger from the launch menu.
package/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # scrypted-tuya
2
+
3
+ Unofficial standalone fork of the Tuya plugin from the [Scrypted repository](https://github.com/koush/scrypted), extracted from [`plugins/tuya`](https://github.com/koush/scrypted/tree/main/plugins/tuya).
4
+
5
+ The standalone extraction is based on upstream commit [`abd37e416dba4e36bcf9768ab6bbf1e82a206dd9`](https://github.com/koush/scrypted/commit/abd37e416dba4e36bcf9768ab6bbf1e82a206dd9). This repository contains only the Tuya plugin and does not include the rest of the Scrypted monorepository.
6
+
7
+ This project is unofficial and is not affiliated with or endorsed by Scrypted or Tuya.
8
+
9
+ ## What changed
10
+
11
+ The upstream plugin requests a cloud RTSP stream from Tuya. For some cameras, Tuya returns the SD profile even when the camera also supports HD.
12
+
13
+ This fork checks the writable device capabilities advertised through the Tuya Sharing API before allocating the RTSP stream. If the camera exposes a video `quality`, `resolution`, `clarity`, `definition`, or `stream_quality` enum, the plugin requests the highest recognised value advertised by that camera.
14
+
15
+ Recognised values include common profiles such as:
16
+
17
+ - `hd`, `high`, `1080p`, and Tuya clarity value `4`;
18
+ - `2k`, `ultra`, `uhd`, and `4k`;
19
+ - lower profiles such as `sd`, `standard`, `720p`, and Tuya clarity value `2` are used only when no higher advertised option exists.
20
+
21
+ Unknown data points and values are not guessed. If the camera does not advertise a writable quality capability, or rejects the command, the plugin safely falls back to the RTSP quality selected by Tuya.
22
+
23
+ ## Important limitation
24
+
25
+ Tuya's documented cloud RTSP allocation endpoint exposes the stream transport, such as RTSP or HLS, but does not expose a documented quality selector. Consequently, this fork can request maximum quality only on cameras that advertise a writable quality-related data point through the Sharing API.
26
+
27
+ Some models control HD exclusively through Tuya's P2P IPC SDK. Those cameras may still return an SD cloud RTSP stream. Check the actual stream resolution on the target camera after installation.
28
+
29
+ ## Features
30
+
31
+ - Tuya and Smart Life camera discovery.
32
+ - Cloud RTSP camera streaming.
33
+ - Maximum advertised video-quality selection with safe fallback.
34
+ - Tuya doorbell ring notifications.
35
+ - Motion events on supported devices.
36
+ - Camera indicator and floodlight controls when exposed by the device.
37
+
38
+ ## Authentication
39
+
40
+ The recommended login method is the QR-code flow using the Tuya or Smart Life application. The legacy Tuya Developer Account login remains available for existing configurations.
41
+
42
+ ## Development
43
+
44
+ Requirements:
45
+
46
+ - Node.js
47
+ - npm
48
+ - a Scrypted server for deployment and runtime testing
49
+
50
+ Install dependencies and verify the project:
51
+
52
+ ```bash
53
+ npm ci
54
+ npm run typecheck
55
+ npm run build
56
+ ```
57
+
58
+ The Scrypted plugin archive is generated at:
59
+
60
+ ```text
61
+ out/plugin.zip
62
+ ```
63
+
64
+ Quality-selection tests are located in `tests/quality.test.ts` and can be run with Bun:
65
+
66
+ ```bash
67
+ bun test tests/quality.test.ts
68
+ ```
69
+
70
+ ## Repository history
71
+
72
+ This repository is a standalone extraction rather than a GitHub network fork because GitHub cannot fork a single subdirectory of a monorepository. Upstream provenance is recorded in `STANDALONE-NOTICE.md` and `UPSTREAM-LICENSE-NOTICE.md`.
73
+
74
+ ## License and attribution
75
+
76
+ The upstream Scrypted repository uses directory-specific licensing and does not declare a conventional SPDX license specifically for `plugins/tuya`. The original upstream notice is preserved in `UPSTREAM-LICENSE-NOTICE.md`.
77
+
78
+ Review the upstream terms and obtain any required permission before redistributing this fork or publishing derived packages. Copyright remains with the original contributors.
79
+
80
+ ## Smart Life P2P HD through the Home Assistant add-on
81
+
82
+ For cameras that remain in **Smart Life**, Tuya Cloud RTSP may be fixed at 640×360. This repository therefore also exposes a Home Assistant add-on based on [DanEng1982/tuya-rtsp-bridge](https://github.com/DanEng1982/tuya-rtsp-bridge), which uses the MIT-licensed [seydx/tuya-ipc-terminal](https://github.com/seydx/tuya-ipc-terminal) WebRTC/P2P engine.
83
+
84
+ 1. In Home Assistant, open **Settings → Add-ons → Add-on Store → Repositories**.
85
+ 2. Add `https://github.com/resonaura/scrypted-tuya`.
86
+ 3. Install and start **Tuya RTSP Bridge**.
87
+ 4. Open `http://HOME_ASSISTANT_IP:8787`, create a QR code, then scan and confirm it in Smart Life.
88
+ 5. Copy the camera HD URL. It has the form `rtsp://HOME_ASSISTANT_IP:8554/CameraName/hd`.
89
+ 6. In Scrypted, open the matching camera created by this Tuya plugin and set **Smart Life P2P HD RTSP URL** to that URL.
90
+
91
+ The Tuya plugin will keep handling discovery, online state, motion, doorbell events, and controls. Video will come from the P2P/WebRTC bridge using the camera's main/HD stream. Removing the override restores the Tuya Cloud RTSP fallback.
92
+
93
+ The add-on is pinned to Tuya RTSP Bridge `v1.2.4` rather than an unversioned branch.
@@ -0,0 +1,5 @@
1
+ # Standalone extraction notice
2
+
3
+ Unofficial standalone extraction of `plugins/tuya` from https://github.com/koush/scrypted.
4
+ Snapshot: `abd37e416dba4e36bcf9768ab6bbf1e82a206dd9`.
5
+ Only the Tuya plugin is included. Review `UPSTREAM-LICENSE-NOTICE.md` before redistribution.
@@ -0,0 +1,3 @@
1
+ # License
2
+
3
+ See individual project directories for licensing, as it will vary throughout the repository. Some plugins may have dependencies that require GPL compliance.