Commit Graph

4620 Commits

Author SHA1 Message Date
Koushik Dutta
1c983f55bf rebroadcast: publish strict rtp parser 2026-07-22 10:26:28 -07:00
Koushik Dutta
0def4758b4 rebroadcast: fix potential settings crash 2026-07-22 09:47:07 -07:00
Koushik Dutta
2f4037f5ee cloud: publish 2026-07-14 09:09:16 -07:00
Koushik Dutta
e728d85b11 cloud: save only last 100 persistent ids 2026-07-13 16:49:33 -07:00
Nick Berardi
ade34b7da6 fix(alexa): v3 API compliance, fan speed, security panel, and camera streaming improvements (#2083)
* fix(alexa): v3 API compliance fixes, fan speed, and security panel control

Bring the Alexa Smart Home integration in line with the current v3 API.

Tier 1 (malformed responses / missing handlers):
- BrightnessController: report brightness under the Alexa.BrightnessController
  namespace instead of Alexa.PowerController so Set/AdjustBrightness responses
  match the advertised capability.
- SmartVision ObjectDetection: flatten the doubly-nested payload.events array.
- SecurityPanelController: add Arm/Disarm directive handlers (previously
  advertised but unhandled, silently falling through to a fake success), wired
  to armSecuritySystem/disarmSecuritySystem. Enforce the spec rule rejecting a
  direct ARMED_AWAY -> other armed-state transition with AUTHORIZATION_REQUIRED.
  Drop the advertised FOUR_DIGIT_PIN authorization, which Scrypted cannot honor.
- Auth failures now return an Alexa INVALID_AUTHORIZATION_CREDENTIAL
  ErrorResponse instead of a bare HTTP 500 that Alexa retries and surfaces as a
  generic skill error.

API modernization:
- EndpointHealth: downgrade to the documented v3.1 / connectivity-only shape and
  stop emitting the undocumented battery property (and 3.2 version), which risks
  the whole capability being rejected.
- Fan: add Alexa.RangeController (Fan.Speed, 0-100%) for devices implementing the
  Fan interface, alongside the existing PowerController on/off.

Cleanups:
- addAccessToken: initialize event.endpoint as an object, not an array.
- Hoist getArmState to a shared export instead of duplicating it.

Bump version to 0.4.0.

* fix(alexa): improve camera stream quality and connectivity

Tune the WebRTC negotiation for Alexa camera sessions.

- Resolution: raise the proxied stream cap from 720p to 1080p. The previous
  1280x720 screen hint forced the transcoder into medium-resolution mode for
  every endpoint, so even an Echo Show 15 or Fire TV only received 720p. 1080p
  lets larger displays render sharply while the transcoder still clamps width
  and falls back to 720p when H.264 High can't be negotiated. We cap rather
  than send the uncapped source, since Alexa's directive carries no display
  hint and a 4K stream would waste bandwidth on smaller Echo devices.

- Two-way audio: only advertise isFullDuplexAudioSupported when the camera
  implements the Intercom interface. Advertising full duplex on a one-way
  camera makes Alexa set up a return mic path that goes nowhere.

- TURN: stop unconditionally disabling TURN, and expose a "Use TURN Servers"
  plugin setting (on by default). Alexa sessions are proxied and often cross
  NATs where a TURN relay is the only path that connects; combined with
  disabled trickle ICE (all candidates in the initial SDP), omitting the relay
  candidate left NAT-blocked sessions with no fallback. When enabled, TURN
  usage defers to the WebRTC plugin's own setting, matching the Google Home
  integration; disabling it force-disables TURN for Alexa sessions only.

Bump version to 0.5.0.
2026-06-29 19:47:34 -07:00
Steven Wu
baef85054c fix(homekit): force tcp rtsp_transport for two-way audio talkback (#2081)
The two-way audio talkback loopback (RtspServer over listenZeroSingleClient)
only supports TCP interleaved transport. The talkback ffmpeg input was built
without -rtsp_transport, so ffmpeg attempts a UDP SETUP first and the loopback
responds 461 Unsupported Transport.

The equivalent webrtc talkback path (plugins/webrtc/src/session-control.ts)
has always specified -rtsp_transport tcp; the homekit path did not. Align it.

Before: talkback was silent and the log showed "method SETUP failed: 461
Unsupported Transport". After: the 461 is gone and talkback audio works.
2026-06-28 20:19:34 -07:00
Koushik Dutta
f7018ddd9f Merge branch 'main' of github.com:koush/scrypted 2026-06-01 15:58:09 -07:00
Koushik Dutta
86e7cced78 homekit: add mp4 fragment io timeout 2026-06-01 15:57:55 -07:00
George Talusan
3e94bdeb9a fix(homekit): bump to latest @homebridge/hap-nodejs and @homebridge/ciao to catch the loopback sender packet leak (#2029)
* fix(homekit): bump to latest @homebridge/hap-nodejs and @homebridge/ciao to catch the loopback sender packet leak

* remove dead .gitmodules
2026-06-01 15:40:41 -07:00
thllxb
c5fc35ed6d fix(rebroadcast): do not send getStreamLength before play in RTMP client (#2056)
ffmpeg's libavformat RTMP client (gen_get_stream_length in rtmpproto.c) only sends getStreamLength for seekable/VOD streams, never as an unconditional preamble to play. Some live RTMP servers - notably Reolink cameras - respond to an unsolicited getStreamLength on a live stream by sending TCP FIN ~100-150ms later, killing the connection before the play command can take effect. The rebroadcast prebuffer then enters a tight reconnect loop that never produces a usable stream.

Removing the unconditional getStreamLength send lets Reolink RTMP rebroadcast work indefinitely without disconnects, and should not regress other servers since ffmpeg already runs without it.

Fixes #2055

Co-authored-by: thllxb <223556219+Copilot@users.noreply.github.com>
2026-06-01 15:18:01 -07:00
thllxb
41f2d87a48 fix(reolink): do not percent-encode RTMP credential params (#2058)
The Reolink RTMP server does not percent-decode query parameter values - it compares the raw bytes from the URL against the stored password. URLSearchParams.set() percent-encodes values when the URL is serialised (WHATWG application/x-www-form-urlencoded), which corrupts passwords containing characters such as '!' (-> '%21'), '#' (-> '%23'), '+' (-> '%2B'), space, etc.

Affected: users whose firmware causes getLoginParameters to return {user, password} (instead of a Login-API token) and whose password contains any of those characters. Symptom: rebroadcast prebuffer fails with 'Socket received FIN' immediately after 'Sending play command'.

Append the RTMP credential pairs as raw bytes instead of going through URLSearchParams. Token-only path is unaffected (hex tokens contain no characters that require encoding). Mirrors the rationale of #1509 for the HTTP API path.

Fixes #2057

Co-authored-by: thllxb <223556219+Copilot@users.noreply.github.com>
2026-06-01 15:17:42 -07:00
Koushik Dutta
1545790cdb cloud: publish beta with explicit tunel address 2026-05-20 14:44:57 -07:00
Yuki MIZUNO
55369aeb88 rebroadcast: show stream selection options when synthetic streams are configured (#2012)
* fix: show stream selection options when synthetic streams are configured

* fix: show stream selection options and enforce FFmpeg parser for synthetic streams
2026-04-16 07:57:28 -07:00
Koushik Dutta
194acf15e8 common: use peerDependencies 2026-04-07 10:19:34 -07:00
Koushik Dutta
c6be722989 various: strict fixes 2026-04-02 16:08:23 -07:00
Koushik Dutta
f1fac2ab99 Merge branch 'main' of github.com:koush/scrypted
Some checks failed
Build SDK / Build (push) Has been cancelled
2026-03-28 20:31:35 -07:00
Koushik Dutta
41e17a8dc4 core: remove scripts templates, direct to scripts site 2026-03-28 20:31:31 -07:00
JoshADC
eefab888a7 reolink: logout expired token sessions before renewing (#1979)
The ReolinkCameraClient never called the Logout API before requesting a
new token, causing stale sessions to accumulate on the camera. When the
camera's session limit was reached (~68 min cycle), it would close the
RTMP/RTSP connection, dropping the stream.

Add a logout() method that releases the old token session before login()
requests a new one, matching the pattern already used by ReolinkNvrClient.
This prevents session buildup and eliminates periodic stream drops.

Fixes #1873

Co-authored-by: Josh Casada <joshcasada@Joshs-Mac-mini.ts.net lan>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 08:23:11 -07:00
Koushik Dutta
6a8260d09d ncnn: readd cluster label 2026-03-08 10:42:04 -07:00
Koushik Dutta
4a8d5dbe6d detect: fix segmentation labels 2026-03-08 10:39:00 -07:00
Koushik Dutta
c77bbec748 detect: publish fixed ncnn segmentation and cluster fork 2026-03-08 10:36:10 -07:00
Koushik Dutta
0e31a780ac detect: finish segmentation support 2026-03-07 17:30:09 -08:00
Koushik Dutta
f2f8fb265f detect: finish segmentation support 2026-03-07 17:26:08 -08:00
Koushik Dutta
baa9368199 ncnn: fix face recognition model name 2026-03-07 17:15:31 -08:00
Koushik Dutta
feed98d7e7 ncnn: new models 2026-03-07 09:26:00 -08:00
Koushik Dutta
f62976b979 diagnostics: more domain checks 2026-03-05 08:41:22 -08:00
Koushik Dutta
0aa4118828 detect: bump deps 2026-03-02 11:05:48 -08:00
Koushik Dutta
80b1ba2fa3 detect: publish new models as default 2026-03-01 12:40:05 -08:00
Koushik Dutta
46dd4006c7 detect: move clip to huggingface 2026-02-27 20:49:33 -08:00
Koushik Dutta
e66ea8e794 rebroadcast: publish 2026-02-26 08:42:31 -08:00
Alexis Rouillard
6fd84af50f rebroadcast: Use optional chaining for allowBatteryPrebuffer (#1986) 2026-02-18 10:19:15 -08:00
JoshADC
7112e049cb rebroadcast: fix RTMP acknowledgement uint32 overflow (#1980)
The RTMP client's totalBytesReceived counter grows unbounded as a
JavaScript number. When it exceeds 2^31 (~2.15 GB received), the
writeUInt32BE call in sendAcknowledgementIfNeeded throws a RangeError
because JavaScript bitwise operations produce signed 32-bit integers.
This crashes the RTMP session and drops the video stream.

For a high-bitrate camera like the Reolink D340P (~4 Mbps main stream),
this overflow occurs after approximately 90 minutes of continuous
streaming, causing periodic stream drops at a consistent interval.

Fix by using the unsigned right shift operator (>>> 0) to keep
totalBytesReceived and bytesToAck in the unsigned uint32 range [0,
4294967295], matching the RTMP spec's sequence number wrapping behavior.

Co-authored-by: Josh Casada <joshcasada@Joshs-Mac-mini.ts.net lan>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:53:46 -08:00
George Talusan
440926ef73 onvif: clear binaryTimeout on destroy (#1974) 2026-02-03 14:14:57 -08:00
Roman Sokolov
3d1d3727dc hikvision-doorbell: fixes (#1970)
* Let's try to fix the plugin freezing

* hikvision-doorbell version up after merging from main
2026-01-24 08:18:59 -08:00
Koushik Dutta
079878b663 core: allow PATH in terminal service 2026-01-21 16:21:15 -08:00
Koushik Dutta
0d02ea8f08 core: support cwd in terminalservice 2026-01-21 15:15:50 -08:00
Koushik Dutta
f23ad06eef snapshot: verify acls
Some checks failed
Build SDK / Build (push) Has been cancelled
2026-01-19 22:16:44 -08:00
Koushik Dutta
2fff8b0044 predict: add segmentation models to onnx/coreml and refactor openvino 2026-01-18 13:58:28 -08:00
Koushik Dutta
f415e4f2e1 rebroadcast: publish beta with native rtmp support 2026-01-18 12:59:31 -08:00
Koushik Dutta
9607bcddcf core: publish 2026-01-17 12:24:48 -08:00
Koushik Dutta
1c7f16ed9f openvino: fix single segmentation shape crash 2026-01-17 12:24:44 -08:00
Koushik Dutta
961cb36a97 openvino: wip segmentation 2026-01-17 12:16:55 -08:00
Koushik Dutta
c1895df062 videoanalysis: fixup detection set 2026-01-12 15:10:36 -08:00
Koushik Dutta
bb902467eb videoanalysis: improve logging 2026-01-12 10:06:35 -08:00
Koushik Dutta
7202e99ab0 detect: publish betas 2026-01-10 15:30:07 -08:00
Koushik Dutta
38bac58fc6 openvino: new model, use huggingface as model source 2026-01-10 15:02:20 -08:00
Koushik Dutta
af8abb6072 rebroadcast: publish rtmp support beta 2026-01-09 12:45:48 -08:00
Koushik Dutta
7ef868e42d rebroadcast: rtmp window acks 2026-01-09 12:35:11 -08:00
Koushik Dutta
0185680791 rebroadcast: remove some bit shifting in favor of read/write uintbe 2026-01-08 21:35:04 -08:00
Koushik Dutta
1349bb7433 rebroadcast: slop rtmp implementation 2026-01-08 21:29:05 -08:00