Compare commits

...

931 Commits

Author SHA1 Message Date
Koushik Dutta
f976903a29 server: update deps 2023-09-08 20:11:15 -07:00
Nick Berardi
4ca63aadd5 alexa: display camera on doorbell press (#1066) 2023-09-08 13:56:49 -07:00
Koushik Dutta
6c932aec89 snapshot: refactor to remove ffmpeg usage 2023-09-07 09:34:23 -07:00
Koushik Dutta
d7030c3dcf videoanalysis: ignore webcodec if not running under electron 2023-09-06 08:43:59 -07:00
Koushik Dutta
172ebf06de server: add pending result method tracker 2023-09-06 07:50:53 -07:00
Koushik Dutta
5f28c5a291 postbeta 2023-09-06 07:50:32 -07:00
Koushik Dutta
4c9ba5073e cloud: cleanup 2023-09-05 22:51:49 -07:00
Koushik Dutta
11d67f36be cloud: show port in Advanced in Disabled/Cloudflare Tunnel mode 2023-09-05 20:00:43 -07:00
Koushik Dutta
d38357ded9 webrtc: better 6to4 detection 2023-09-05 10:31:34 -07:00
Koushik Dutta
f22e2ccfe7 webrtc: fast path for ipv6 relay candidates 2023-09-05 09:47:22 -07:00
Koushik Dutta
e2b2f68477 server: postbeta 2023-09-05 08:29:24 -07:00
Koushik Dutta
57e87fbe8d postbeta 2023-09-05 08:29:14 -07:00
Koushik Dutta
31b05162fc beta 2023-09-04 17:56:14 -07:00
Koushik Dutta
c63efa0fca cloud: fixup settings.json 2023-09-04 17:56:10 -07:00
Koushik Dutta
ce5255aa45 postbeta 2023-09-04 17:02:25 -07:00
Koushik Dutta
4692be1586 server: v6/v4 mixup fix 2023-09-04 17:02:17 -07:00
Koushik Dutta
632d971dd5 server: remove axios 2023-09-04 16:56:49 -07:00
Koushik Dutta
2f17c85e99 postbeta 2023-09-04 16:56:36 -07:00
Koushik Dutta
9c6cdc9ac3 postbeta 2023-09-04 16:46:13 -07:00
Koushik Dutta
7007456bdd server: fix ipv6 addresses 2023-09-04 16:46:05 -07:00
Koushik Dutta
73fc738c0b cloud: additional bin path fixes 2023-09-03 17:45:55 -07:00
Koushik Dutta
abd1227fab cloud: fix cloudflared bin install 2023-09-03 17:39:29 -07:00
Brett Jia
7d2226df75 arlo: upstreaming changes (#1059)
* eager stream urls

* bump 0.8.16 for beta

* use curl-cffi everywhere, use alternative to piwheels, configurable eager streams

* bump 0.8.17 for beta

* bump 0.8.18 for release

* update backup hosts

* bump 0.8.19 for release

* resurrect pyav and aiortc

* bump 0.8.20 for beta

* unify scrypted-arlo-go and aiortc, disable aiortc

* update backup hosts

* use native sse client

* bump 0.8.21 for beta

* fix native sseclient restart loop

* update backup hosts

* bump 0.8.22 for beta

* handle disconnects with python-level restart

* bump 0.8.23 for beta

* move sse restart to native code

* bump 0.8.24 for beta

* bump 0.8.25 for release

* update backup hosts

* bump 0.8.26 for release
2023-09-03 15:41:04 -07:00
Koushik Dutta
8f50415920 cloud: need to learn to code 2023-09-02 18:27:17 -07:00
Koushik Dutta
20ed523b30 cloud: fix EACCES 2023-09-02 17:25:29 -07:00
Koushik Dutta
effadb1437 cloud: add/shim macos arm64 cloudflared builds 2023-09-02 14:50:57 -07:00
Koushik Dutta
07c7c91c63 coreml: public beta that uses use coremltools beta 2023-09-01 14:41:46 -07:00
Koushik Dutta
878ddbdf1c python-codecs: fix windows leak 2023-08-31 18:10:10 -07:00
Koushik Dutta
d95e9c78ea cameras: update ip address in info after adding 2023-08-30 09:05:17 -07:00
Koushik Dutta
49dc1d8f36 python-codecs: add support for gstreamer jpeg output, publish beta 2023-08-29 20:54:17 -07:00
Koushik Dutta
425e17a88b tensorflow-lite: fix windows 2023-08-27 22:10:19 -07:00
Koushik Dutta
9bca6b0a94 ha: add network share support 2023-08-27 10:28:14 -07:00
Koushik Dutta
3a62d9cd31 cli: add ffplay filter args 2023-08-26 21:31:31 -07:00
Koushik Dutta
8f6bedd9d8 sdk: publish 2023-08-26 20:38:19 -07:00
Koushik Dutta
1c2a9d767f rebroadcast: Fix up output arguments handling and rtsp rebroadcast 2023-08-26 19:55:27 -07:00
Koushik Dutta
7ecee4298c sdk: update 2023-08-26 16:51:01 -07:00
Koushik Dutta
4f1aad895f sdk: update 2023-08-26 16:50:04 -07:00
Koushik Dutta
94667d2136 core: promote snapshot to core plugin, publish 2023-08-26 13:43:38 -07:00
Koushik Dutta
7d13055eae Merge branch 'main' of github.com:koush/scrypted 2023-08-26 13:38:00 -07:00
Koushik Dutta
f90140dbd7 core: add doc links 2023-08-26 13:37:41 -07:00
Brett Jia
8b3a66b6ba core: replace google maps with leaflet/OSM (#1046)
* core: replace google maps with leaflet/OSM

* core: publish
2023-08-26 10:40:40 -07:00
Brett Jia
8c03852cfb chromecast: publish (#1045) 2023-08-25 19:16:51 -07:00
slyoldfox
d795cd527d bticino: 0.0.11 - kick off audio and video streams sooner without waiting for the SIP call to be established (#1044)
Co-authored-by: Marc Vanbrabant <marc@foreach.be>
2023-08-25 08:36:26 -07:00
Koushik Dutta
a24d986717 tflite: update yolov8n 320 model 2023-08-24 19:48:32 -07:00
Koushik Dutta
60ec304e68 predict: report hardware acceleration optiosn 2023-08-24 12:25:36 -07:00
Koushik Dutta
6a9d498ff8 snapshot: relax error messages 2023-08-24 09:23:53 -07:00
Koushik Dutta
c60821043b cameras: remove pam-diff dependency 2023-08-24 08:49:35 -07:00
Koushik Dutta
e5a63dd992 coreml: remove python-codecs dependency, mac should use the desktop app. 2023-08-23 21:20:29 -07:00
Koushik Dutta
f77ea922f2 predict: readd python codecs dependency 2023-08-23 21:19:48 -07:00
Koushik Dutta
1e8deeb638 Merge branch 'main' of github.com:koush/scrypted 2023-08-23 18:50:28 -07:00
Koushik Dutta
a28ecb71e1 videoanalysis: add better explanation for pipeline ffmpeg pipeline failure 2023-08-23 18:50:21 -07:00
Brett Jia
4067455396 core: publish (#1038) 2023-08-23 10:50:16 -07:00
Brett Jia
9b828a6045 core: docker installs delay update prompt until image is ready (#1034)
* core: docker installs delay update prompt until image is ready

* update settings page with new check
2023-08-23 09:58:11 -07:00
Koushik Dutta
efce576c68 server: beta 2023-08-21 13:38:09 -07:00
Koushik Dutta
66b314f2aa postbeta 2023-08-21 13:36:52 -07:00
Koushik Dutta
d6ebc1fa85 postbeta 2023-08-21 13:35:45 -07:00
Koushik Dutta
8d756a26bd server: Fix hang caused by null-ish headers 2023-08-21 13:33:24 -07:00
Koushik Dutta
81c28b86d3 reolink: update readme 2023-08-20 11:02:29 -07:00
Koushik Dutta
73f5e03774 core: publish 2023-08-18 08:42:28 -07:00
Koushik Dutta
cd078afcf9 client: fix webrtc usage 2023-08-17 18:31:50 -07:00
Koushik Dutta
6e393514cf cloud: add No TLS Verify to cloudflare readme section 2023-08-17 10:38:01 -07:00
Koushik Dutta
4b62bceede cloud: add cloudflare tunnel token option 2023-08-17 10:19:09 -07:00
Koushik Dutta
fbbbdd8ab5 cloud: publish 2023-08-16 19:34:02 -07:00
Koushik Dutta
a0e28c0a28 core: publish 2023-08-16 19:07:08 -07:00
Koushik Dutta
ff28238422 cloud: publish beta 2023-08-16 19:05:44 -07:00
Koushik Dutta
4e9744360a client: add support for cloudflared 2023-08-16 18:59:36 -07:00
Koushik Dutta
7336fac8c4 cloud: minor code cleanups and remove duckdns 2023-08-16 18:02:45 -07:00
Koushik Dutta
6771d17829 cloud: restructure 2023-08-16 14:50:52 -07:00
Koushik Dutta
62f1ca66f6 core: make iframe logins less confusing. show hostname on login screen. 2023-08-16 10:57:31 -07:00
Koushik Dutta
13cc562e68 cloud: duckdns prototype 2023-08-15 21:40:23 -07:00
Koushik Dutta
aff1e86d6f Revert "cloud: revert duckdns + letsencrypt"
This reverts commit 7d022548b9.
2023-08-15 21:29:30 -07:00
Koushik Dutta
c1f1e96109 predict: cleanups 2023-08-15 21:29:18 -07:00
Koushik Dutta
a36b3066fe python-codecs: fix corrupt frames 2023-08-15 21:27:56 -07:00
Koushik Dutta
cadf10b505 Merge branch 'main' of github.com:koush/scrypted 2023-08-15 11:16:26 -07:00
Koushik Dutta
ed541629b2 core: change type to prevent mqtt from enabling 2023-08-15 11:16:09 -07:00
Koushik Dutta
7d022548b9 cloud: revert duckdns + letsencrypt 2023-08-12 23:14:13 -07:00
Koushik Dutta
9aa9bae3a3 cloud: fixup hostname logic 2023-08-12 23:09:41 -07:00
Koushik Dutta
7f29b05980 cloud: supports letsencrypt via duckdns 2023-08-12 22:54:25 -07:00
Koushik Dutta
b89573e910 cloud: cleanup deps 2023-08-12 20:28:34 -07:00
Koushik Dutta
18426bcdc1 cloud: restructure 2023-08-12 20:05:56 -07:00
Koushik Dutta
f562dd5362 cloud: fix unhandled rejection 2023-08-12 19:59:00 -07:00
Koushik Dutta
1f1218a594 cloud: increase connection pool 2023-08-12 19:55:59 -07:00
Koushik Dutta
1aca97c2ae common: updates 2023-08-12 19:38:17 -07:00
Koushik Dutta
bd41410367 common: add async queue 2023-08-12 14:10:51 -07:00
Koushik Dutta
291d734a05 videoanalysis: restart object detection if crashed or evicted 2023-08-12 12:55:13 -07:00
Koushik Dutta
feec534b86 python-codecs: publish 2023-08-11 09:29:27 -07:00
Koushik Dutta
9ae7e6c0b5 h264-repacketizer: add types 2023-08-11 09:29:16 -07:00
Koushik Dutta
a6f11d6d0c cloud: improve head of line issues 2023-08-11 09:28:59 -07:00
Koushik Dutta
a15af8005b opencv: avoid broken version 4.8.0.76 2023-08-10 07:39:38 -07:00
Koushik Dutta
c13a3f252a core: publish 2023-08-10 07:35:30 -07:00
Koushik Dutta
0eaf9ef2d9 Merge branch 'main' of github.com:koush/scrypted 2023-08-10 07:35:16 -07:00
Nick Berardi
b9fc69347a alexa: added helpful error messages regarding token expiration (#1007) 2023-08-09 17:24:54 -07:00
Koushik Dutta
f6e8a363ab webrtc: fix webrtc connection timeout leak 2023-08-07 09:02:43 -07:00
Brett Jia
a6d163ec5a core: aggregate streams support horizontal padding (#1002) 2023-08-06 15:23:04 -07:00
Brett Jia
2d62944ac1 python-codecs: make annotations compatible to pre-3.10 (#1000) 2023-08-06 09:54:08 -07:00
Koushik Dutta
b564553998 python-codecs: rollback sdk bug 2023-08-06 09:53:26 -07:00
Koushik Dutta
6e4fdb6e99 videoanalysis: fix object detection eviction bug 2023-08-04 13:47:19 -07:00
Koushik Dutta
ca00983ecd client: better webrtc api connection usage 2023-08-03 20:33:24 -07:00
Koushik Dutta
36b8b9eeed common: formatting 2023-08-03 19:45:19 -07:00
Koushik Dutta
fbd6937627 webrtc/core: streamline p2p connection 2023-08-03 19:18:51 -07:00
Koushik Dutta
7c66826657 docker: dont pass usb through by default 2023-08-02 08:41:46 -07:00
Koushik Dutta
62c4a8b240 detection plugins: remove image splitting logic, let upstream handle that. switch to yolov8_320 as default. 2023-07-31 14:12:56 -07:00
Koushik Dutta
af860d840a mac: fix cli script 2023-07-31 13:54:43 -07:00
Koushik Dutta
42eb4fc80b python-codecs: dont letterbox resize requests. 2023-07-31 00:56:03 -07:00
Koushik Dutta
5c965936e9 Merge branch 'main' of github.com:koush/scrypted 2023-07-30 23:53:47 -07:00
Koushik Dutta
fe5cc59872 core: fix object detection svg layout 2023-07-30 23:53:42 -07:00
Brett Jia
5d965ebfa7 arlo: upstreaming changes to 0.8.15 (#982)
* wip hidden devices

* hidden devices impl

* bump 0.8.12 for beta

* update backup auth hosts

* bump 0.8.13 for release

* use curl-cffi everywhere

* bump 0.8.14 for beta

* Revert "use curl-cffi everywhere"

This reverts commit 80422a8037.

* update auth hosts

* bump 0.8.15 for release
2023-07-29 10:02:12 -07:00
Koushik Dutta
b462249d93 Merge branch 'main' of github.com:koush/scrypted 2023-07-28 21:19:46 -07:00
Koushik Dutta
29d8abed45 tensorflow-lite: more models 2023-07-28 21:19:41 -07:00
Koushik Dutta
65cb13b0d1 tensorflow-lite: add more models 2023-07-28 20:24:51 -07:00
Koushik Dutta
522f8e9cba Update config.yaml 2023-07-28 13:36:15 -07:00
Koushik Dutta
16199463ec python-codecs: publsih 2023-07-28 00:02:17 -07:00
Koushik Dutta
220c010232 python-codecs: fix zygote pop usage. implement firstFrameOnly pipeline blocking. 2023-07-28 00:01:01 -07:00
Koushik Dutta
02238f99b2 python-codecs: use zygote to speed up inference startup 2023-07-27 23:52:52 -07:00
Koushik Dutta
1e53234cd6 Merge branch 'main' of github.com:koush/scrypted 2023-07-27 14:54:52 -07:00
Koushik Dutta
824b7327a1 cloud: update deps 2023-07-27 14:54:41 -07:00
Koushik Dutta
81d4a3f249 Update docker.yml 2023-07-27 13:48:43 -07:00
Koushik Dutta
db1bd07b71 docker: increment base 2023-07-27 13:32:24 -07:00
Koushik Dutta
35026f6b5b Merge branch 'main' of github.com:koush/scrypted 2023-07-27 13:25:37 -07:00
Koushik Dutta
9160efc2f7 docker: allow pip to install to system 2023-07-27 13:25:33 -07:00
Koushik Dutta
6bc1e6a742 Update docker-common.yml 2023-07-27 13:16:45 -07:00
Koushik Dutta
475e4a60d7 Update docker-common.yml 2023-07-27 13:15:31 -07:00
Koushik Dutta
1f2edf1a12 Update docker-common.yml 2023-07-27 13:05:38 -07:00
Koushik Dutta
b3db0aa78f Update docker-common.yml 2023-07-27 13:05:21 -07:00
Koushik Dutta
0766d67a75 docker: move coral to full image only 2023-07-27 12:52:46 -07:00
Koushik Dutta
d2ac428916 server: publish 2023-07-26 17:35:36 -07:00
Koushik Dutta
945fb16bd6 postrelease 2023-07-26 17:35:19 -07:00
Koushik Dutta
711eb222ed postbeta 2023-07-26 17:35:07 -07:00
Koushik Dutta
19f8bfb74a unifi-protect: older controller fix for doorbells 2023-07-24 15:07:10 -07:00
Koushik Dutta
08a8428d6e openvino: update dep 2023-07-23 18:50:21 -07:00
Koushik Dutta
4feeeda904 openvino: restart if detection times out 2023-07-23 18:48:07 -07:00
Koushik Dutta
753373a691 server: validate local address 2023-07-22 18:54:23 -07:00
Koushik Dutta
2f3529b822 rebroadcast: simplify prebuffer sync frame search, remove dead code... 2023-07-21 18:16:13 -07:00
Koushik Dutta
2501d1460b sdk: fix frame generator signature 2023-07-21 18:12:51 -07:00
Koushik Dutta
e063637100 rebroadcast: Fix prebuffer sync frame search lol 2023-07-21 18:12:37 -07:00
Koushik Dutta
5ec0bf4bf3 Merge branch 'main' of github.com:koush/scrypted 2023-07-20 19:53:47 -07:00
Koushik Dutta
0c05b59121 tensorflow-lite: temp hack to fix wide angle detection 2023-07-20 19:53:43 -07:00
Koushik Dutta
cbbfa0b525 homekit: readme 2023-07-20 13:25:24 -07:00
Koushik Dutta
28835b1ccc unifi-protect: use new isDoorbell flag 2023-07-18 12:24:54 -07:00
Koushik Dutta
0585e7bbaf unifi: log characteristics 2023-07-18 11:42:53 -07:00
Koushik Dutta
b2040ea2c8 videoanalysis: fix motion suspend/timeout/resume interaction 2023-07-18 10:05:36 -07:00
Koushik Dutta
2fd2151b4f Merge branch 'main' of github.com:koush/scrypted 2023-07-18 09:30:19 -07:00
Koushik Dutta
4c7974519d homekit/webrtc: fix broken stapa handling on unifi 2023-07-18 09:30:15 -07:00
Brett Jia
d91c919558 arlo: upstreaming changes for versions 0.8.5 - 0.8.11 (#956)
* cancel motion and audio events after 60s

* retry on imap errors

* bump 0.8.5 for beta

* better detection of sse shutdown to avoid thrashing

* restart plugin on unrecoverable login error

* bump 0.8.6 for beta

* more error handling + bump curl-cffi

* bump 0.8.7 for release

* delay motion and audio event end triggers by 10s

* transfer sip ffmpeg params to stream signaling code

* bump 0.8.8 for beta

* allow customizing imap sender address

* bump 0.8.9 for beta

* bump 0.8.10 for release

* docs, imap backoff, use bs4 to parse 2fa email

* bump 0.8.11 for release
2023-07-16 14:46:48 -07:00
Koushik Dutta
7a297761bc homekit: fix mdns names? 2023-07-15 09:35:32 -07:00
Koushik Dutta
c15e10e5cf rtp: disable jitter buffer spam 2023-07-15 09:12:01 -07:00
Koushik Dutta
3494106857 python-client: fix message queues 2023-07-15 08:52:24 -07:00
Koushik Dutta
7d3dfb16f0 predict: rev model downloads for label normalization 2023-07-14 12:13:18 -07:00
Koushik Dutta
63fc223036 docker: move deadsnakes ppa to docker only. tf no longer supported local install. 2023-07-12 21:57:26 -07:00
Koushik Dutta
6736379858 ring: support reload login between auth and code 2023-07-11 19:02:43 -07:00
Koushik Dutta
7a811b2b22 ring: publish auth fixes 2023-07-11 16:59:54 -07:00
Koushik Dutta
dd5cb432c9 google-device-access: hack comment 2023-07-11 14:49:47 -07:00
Koushik Dutta
ab3a71ab49 Merge branch 'main' of github.com:koush/scrypted 2023-07-11 14:46:13 -07:00
Koushik Dutta
b5c9382180 google-device-access: fix webrtc negotiation via hack 2023-07-11 14:46:07 -07:00
Koushik Dutta
81682678ac Update README.md 2023-07-11 11:18:44 -07:00
Koushik Dutta
dec184629e Update README.md (#946)
* Update README.md

* Update README.md
2023-07-11 11:15:35 -07:00
dignabbit
f33bb53138 docker: improve management of avahi (#940)
Co-authored-by: Dignabbit <test@example.com>
2023-07-11 11:15:13 -07:00
Koushik Dutta
2d3957e086 Update README.md 2023-07-10 23:57:49 -07:00
Koushik Dutta
d16ed9e54f Update README.md 2023-07-10 23:57:01 -07:00
Koushik Dutta
d7e8052498 ring: remove push receiver token shim 2023-07-10 11:27:02 -07:00
Koushik Dutta
48cd3830a5 webrtc: pass through single packet stapa 2023-07-10 07:59:05 -07:00
Koushik Dutta
ce138d1a17 videoanalysis: log when object detection is zone filtered. 2023-07-08 11:29:15 -07:00
Koushik Dutta
7b4919fba9 Merge branch 'main' of github.com:koush/scrypted 2023-07-08 09:17:07 -07:00
Koushik Dutta
0b3dee3a03 ring: support custom controlCenterDisplayName 2023-07-08 09:16:54 -07:00
Raman Gupta
4cef09540b sdk: fix typing (#938) 2023-07-08 09:11:55 -07:00
Koushik Dutta
92583e568a ring: fix erroneous polling 2023-07-07 14:39:36 -07:00
Koushik Dutta
67aaa08c31 Merge branch 'main' of github.com:koush/scrypted 2023-07-06 08:12:59 -07:00
Koushik Dutta
2e9f618f6f snapshot: fix default behavior when snapshot url is provided on cameras without a Camera interface 2023-07-06 08:12:54 -07:00
Raman Gupta
bf4d39d6af sdk: Improve python generation (#931)
* Improve python generation

* tweak

* tweak

* Move classes to other
2023-07-06 08:04:19 -07:00
Raman Gupta
c31e68f720 Update connect_scrypted_client (#932) 2023-07-05 17:38:43 -07:00
Koushik Dutta
6d8b3c1ce7 ring: publish with more auth fixes 2023-07-05 12:47:05 -07:00
Koushik Dutta
106fef95b4 webrtc: notify track startup failure 2023-07-04 23:52:19 -07:00
Koushik Dutta
488d68ee1c python-client: initial implementation 2023-07-04 14:02:51 -07:00
Koushik Dutta
f7e35fb1ee Merge branch 'main' of github.com:koush/scrypted 2023-07-04 09:07:09 -07:00
Koushik Dutta
b1bf897bdb ring: notification fixes 2023-07-04 09:07:05 -07:00
Brett Jia
8eb533c220 arlo: update to 0.8.4 beta (#923)
* basestation debugging output

* faster 2 way startup

* fix type annotation

* separate thread for logging server + bump scrypted-arlo-go

* update backup auth hosts

* bump 0.8.1 for release

* further optimize 2 way startup latency

* bump 0.8.2 for release

* skip pings on battery doorbell

* bump 0.8.3 for beta

* more docs

* try fix cloudflare 403 with curl-cffi

* bump 0.8.4 for beta
2023-07-02 17:14:29 -07:00
Koushik Dutta
f10cdfbced opencv: handle frame size changes 2023-07-02 14:08:00 -07:00
Koushik Dutta
8f5e9e5a8c rebroadcast: keep trying to restart rtsp server 2023-07-02 12:53:19 -07:00
Koushik Dutta
cc0283ef39 videoanalysis: add pipeline hang logging 2023-07-02 08:47:10 -07:00
Koushik Dutta
5c7b67c973 videoanalysis: restart motion detection on stopped streams 2023-07-02 08:38:43 -07:00
Koushik Dutta
d1be0f1b4c Merge branch 'main' of github.com:koush/scrypted 2023-06-30 19:11:41 -07:00
Koushik Dutta
55d58d1e44 reolink: use new client per event listener 2023-06-30 19:11:37 -07:00
Koushik Dutta
d9dccf36a3 mail: readme 2023-06-30 17:58:23 -07:00
Koushik Dutta
33477fdf80 reolink/onvif: fix listener destroy throw error 2023-06-30 11:49:20 -07:00
Koushik Dutta
e6ece3aa3e videoanalysis: add anayze mode hint 2023-06-30 11:42:40 -07:00
Koushik Dutta
6a4126191b videoanalysis: settings tweaks 2023-06-30 11:07:06 -07:00
Koushik Dutta
e9f999b911 docker: simplify nvr storage instructions 2023-06-30 10:29:56 -07:00
Koushik Dutta
1fef31a081 docker: fix reversed logic 2023-06-29 21:14:52 -07:00
Koushik Dutta
659f99c33d docker: fix install on linux when /dev/dri is missing 2023-06-29 21:13:47 -07:00
Koushik Dutta
a9deff0046 webrtc: allow mac/ios types 2023-06-29 19:38:23 -07:00
Koushik Dutta
7a56cefe2a reolink: add support for reolink doorbells, deprecating onvif plugin usage 2023-06-29 09:44:40 -07:00
Koushik Dutta
a06c6e9568 webrtc: fix erroneous window laptop transcode. fix spurious NAL delimiter logging. 2023-06-28 20:33:24 -07:00
Koushik Dutta
56f127a203 webrtc: stapa/sei fix. stream start failure fix/logging. 2023-06-28 11:24:26 -07:00
Koushik Dutta
2ffe67b2db videoanalysis: fix cpu calc 2023-06-27 23:23:02 -07:00
Koushik Dutta
44dc648398 videoanalysis: uncap detection duration. disable snapshot fallback. use a max concurrent detection calcuation 2023-06-27 23:09:41 -07:00
Koushik Dutta
7807cc4bc6 Merge branch 'main' of github.com:koush/scrypted 2023-06-27 20:00:38 -07:00
Koushik Dutta
81fb690089 reolink: docs 2023-06-27 20:00:32 -07:00
Brett Jia
8b15617f6e arlo: various enhancements + upstreaming changes (#913)
* reorder models and add VMC4060P

* add VMC4060P

* use new UA for cloudscraper + bump scrypted-arlo-go

* bump 0.7.30 for release

* improve readme

* tcp logger server to collect individual camera output + add arlo baby to hw lists

* send exception guard logs to device logger

* bump scrypted-arlo-go with new logging interface

* log device-specific errors returned from arlo

* bump 0.7.31 for beta

* more error listeners and some comments

* experimental arlo baby fix

* bump 0.7.32 for beta

* arlo baby nightlight

* bump 0.7.33 for beta

* nightlight device name fix

* bump 0.7.34 for beta

* fix nightlight constructor

* bump 0.7.35 for beta

* bump 0.7.36 for release

* functional sip webrtc 2way

* refactored 2way code + various tweaks throughout

* document sip v2 endpoint

* update backup auth host

* bump 0.7.37 for release

* add media user agent

* sip refactoring bugfixes

* bump 0.8.0 for release
2023-06-26 20:01:53 -07:00
Koushik Dutta
fd8aa70352 rebroadcast: improve prebuffer session logging 2023-06-25 18:13:20 -07:00
Koushik Dutta
be888d215d alexa: fix doorbells 2023-06-25 10:28:46 -07:00
Koushik Dutta
ce5f568a5d server: fix non admin cli login. 2023-06-24 10:49:58 -07:00
Koushik Dutta
336220559f videoanalysis: fix potential leak 2023-06-22 23:32:15 -07:00
Koushik Dutta
8014060a54 rebroadcast :publish 2023-06-22 17:59:15 -07:00
Brett Jia
7f4c8997b9 snapshot: tell ffmpeg pipe input format (#902)
* snapshot: tell ffmpeg pipe input format

* use image2pipe
2023-06-21 16:09:42 -07:00
Koushik Dutta
9f73b92dbd Merge branch 'main' of github.com:koush/scrypted 2023-06-20 20:32:31 -07:00
Koushik Dutta
381892fca6 webrtc: fix dtls cookie race condition 2023-06-20 20:32:26 -07:00
Koushik Dutta
a28df23032 snapshot: add request timeout 2023-06-18 11:14:55 -07:00
Koushik Dutta
dc5456d36f tensorflow-lite: fix yolov8 uint8 to int8 color conversion 2023-06-17 23:50:46 -07:00
Koushik Dutta
3a23e8ed26 coreml: fix mobilenet url 2023-06-17 23:17:56 -07:00
Koushik Dutta
e0db86cb41 cameras: timeout snapshots to free socket 2023-06-17 23:09:23 -07:00
Koushik Dutta
37ccefebd1 tensorflow-lite: readme 2023-06-17 12:17:05 -07:00
Koushik Dutta
0076c4827f tensorflow-lite: yolov8 is not compatible with usb edgetpu 2023-06-17 12:14:49 -07:00
Koushik Dutta
c5c07d8169 tensorflow-lite: fall back to mobilenet if edgepu startup fails 2023-06-16 17:18:46 -07:00
Koushik Dutta
2372acc796 rebroadcast: cleanup sdp rejection 2023-06-16 15:38:48 -07:00
Brett Jia
6b9c3e4aa0 rebroadcast: recover after ffmpeg exits before printing sdp (#890)
* rebroadcast: recover after ffmpeg exits before printing sdp

* Revert "rebroadcast: recover after ffmpeg exits before printing sdp"

This reverts commit aee2124937.

* reject sdp promise on ffmpeg exit
2023-06-16 15:33:47 -07:00
Koushik Dutta
d5b652da8c ring: save push credentials, polling now disabled by default. publish beta 2023-06-16 12:08:22 -07:00
Koushik Dutta
2b9a0f082d predict: refactor, add support for yolov8 on tflite 2023-06-16 12:08:04 -07:00
Koushik Dutta
b10b4d047e openvino: fix labels 2023-06-15 14:09:41 -07:00
Koushik Dutta
74cd23bd88 openvino: functional yolov8 2023-06-15 11:46:37 -07:00
Koushik Dutta
ef742bdb23 coreml/openvino: yolov8 support 2023-06-15 00:54:53 -07:00
Koushik Dutta
6f7fa54f24 coreml: yolov8 default on apple silicon 2023-06-14 20:56:45 -07:00
Koushik Dutta
d9a575cb5a coreml: add yolov8 2023-06-14 18:43:29 -07:00
Koushik Dutta
29094afa4d server: fix typo 2023-06-14 12:35:17 -07:00
Koushik Dutta
62a92fe083 coreml/openvino: improve yolov4, add yolov3 to openvino 2023-06-12 21:39:33 -07:00
Koushik Dutta
9b8bde556c coreml: add yolov4-tiny model 2023-06-12 17:59:05 -07:00
Koushik Dutta
326ef11760 openvino: cleanup 2023-06-12 17:45:38 -07:00
Koushik Dutta
92a0b4a863 client: update sdk 2023-06-12 13:01:50 -07:00
Koushik Dutta
9fd3641455 openvino: support more models 2023-06-12 13:01:42 -07:00
Koushik Dutta
2918cf9ae1 core: ui fixes 2023-06-12 09:40:26 -07:00
Koushik Dutta
6f004db859 openvino: test other models 2023-06-11 23:29:37 -07:00
Koushik Dutta
367d741c5f openvino: fix models to accept rgb instead of bgr 2023-06-11 23:06:00 -07:00
Koushik Dutta
8f83894e49 python-codecs: implement hang protection 2023-06-11 14:24:53 -07:00
Koushik Dutta
ea6e33d159 videoanalysis: prevent snapshot throttling when its only a single camera 2023-06-11 09:13:05 -07:00
Koushik Dutta
1b5565b5b2 openvino: choose better defaults for precision 2023-06-11 08:48:55 -07:00
Koushik Dutta
19692d02c6 docker: update s6 2023-06-10 23:50:44 -07:00
Koushik Dutta
4179698c12 gh: switch back to gh builders 2023-06-10 20:38:50 -07:00
Koushik Dutta
1eea3a87d0 gh: switch back to gh builders 2023-06-10 20:38:07 -07:00
Koushik Dutta
ec89a77955 gh: switch back to gh builders 2023-06-10 20:33:30 -07:00
Koushik Dutta
443158286e gh: remove pi builder 2023-06-10 20:30:54 -07:00
Koushik Dutta
b168ca52c6 gh: remove pi builder 2023-06-10 20:27:46 -07:00
Koushik Dutta
fe01d3a1ba gh: remove pi builder 2023-06-10 20:26:12 -07:00
Koushik Dutta
18cad22627 ha: publish 2023-06-10 19:31:10 -07:00
Koushik Dutta
c67c9a028c ha: publish 2023-06-10 19:30:23 -07:00
Koushik Dutta
0cff8ad5ed docker: fix ffmpeg path 2023-06-10 18:59:11 -07:00
Koushik Dutta
0269959cf3 docker: use apt ffmpeg 2023-06-10 17:22:16 -07:00
Koushik Dutta
1b6de42eca ha: update 2023-06-10 16:49:25 -07:00
Koushik Dutta
39342d5d46 docker: Fix arch detection on pi builders 2023-06-10 16:28:58 -07:00
Koushik Dutta
c4b5af46d0 docker: Fix arch detection on pi builders 2023-06-10 16:27:30 -07:00
Koushik Dutta
a46235d095 python-codecs: publish 2023-06-10 15:25:56 -07:00
Koushik Dutta
848d490a66 Merge branch 'main' of github.com:koush/scrypted 2023-06-10 15:11:12 -07:00
Koushik Dutta
87fbb95157 postrelease 2023-06-10 15:10:25 -07:00
Koushik Dutta
c036da9ae0 Update test.yml 2023-06-09 16:27:09 -07:00
Koushik Dutta
1688fcc126 Merge branch 'main' of github.com:koush/scrypted 2023-06-09 16:17:43 -07:00
Koushik Dutta
99cae0ba31 docker: use nonfree intel media drivers 2023-06-09 16:17:39 -07:00
Koushik Dutta
a7b00b9e91 Update docker-common.yml 2023-06-08 21:18:44 -07:00
Koushik Dutta
3f2a62c6f2 docker: fix dist upgrade 2023-06-08 21:08:35 -07:00
Koushik Dutta
3fc318a370 Update docker.yml 2023-06-08 18:16:46 -07:00
Koushik Dutta
aed8575aa0 github: pi only allows 1 key on default acct 2023-06-08 17:54:08 -07:00
Koushik Dutta
2e28b50588 github: add rpi 4 builder 2023-06-08 17:41:32 -07:00
Koushik Dutta
2e87cc380f github: add rpi 4 builder 2023-06-08 17:34:00 -07:00
Koushik Dutta
1fdd2d4b01 github: rename secret priv key 2023-06-08 17:23:18 -07:00
Koushik Dutta
53b23b2ca8 Merge branch 'main' of github.com:koush/scrypted 2023-06-08 17:18:02 -07:00
Koushik Dutta
54016a9c78 github: update build push action 2023-06-08 17:17:58 -07:00
Koushik Dutta
d207a3b824 docker: switch from wget to curl 2023-06-08 17:16:54 -07:00
Koushik Dutta
e72a74d008 docker: clean up lite builds 2023-06-08 15:29:08 -07:00
Koushik Dutta
d1b907e45b Merge branch 'main' of github.com:koush/scrypted 2023-06-08 15:17:22 -07:00
Koushik Dutta
4a4c47ffe2 docker: clean up lite builds 2023-06-08 15:16:53 -07:00
Koushik Dutta
f6baf99935 Update docker.yml 2023-06-08 14:36:47 -07:00
Koushik Dutta
b5cc138e2b Update docker-common.yml 2023-06-08 14:33:28 -07:00
Koushik Dutta
40738a74cf Update docker-common.yml 2023-06-08 14:23:39 -07:00
Koushik Dutta
d2b1f104ca Update docker-common.yml 2023-06-08 14:17:10 -07:00
Koushik Dutta
6cb4f589c0 Update docker-common.yml 2023-06-08 14:10:01 -07:00
Koushik Dutta
5cf2b26630 Update docker-common.yml 2023-06-08 14:07:37 -07:00
Koushik Dutta
e7f16af04c Update docker-common.yml 2023-06-08 14:06:58 -07:00
Koushik Dutta
6287b9deaa Update docker-common.yml 2023-06-08 13:47:01 -07:00
Koushik Dutta
b9b5fdb712 docker: remove for loop 2023-06-08 13:40:39 -07:00
Koushik Dutta
c85af9c8a5 Merge branch 'main' of github.com:koush/scrypted 2023-06-08 13:36:25 -07:00
Koushik Dutta
069f765507 linux: fix multi python install 2023-06-08 13:36:23 -07:00
Koushik Dutta
0e587abc79 Update docker-common.yml 2023-06-08 13:27:11 -07:00
Koushik Dutta
47770c0a8d Update docker-common.yml 2023-06-08 13:18:23 -07:00
Koushik Dutta
82d1c3afe5 docker: revert sh expression 2023-06-08 12:54:54 -07:00
Koushik Dutta
1c9b52ce4f docker: move intel stuff into footer 2023-06-08 11:51:47 -07:00
Koushik Dutta
adcd9fa537 linux: move intel stuff out since it requires jammy 2023-06-08 11:47:06 -07:00
Koushik Dutta
91e2c2870b linux: quote commands for execution 2023-06-08 10:51:57 -07:00
Koushik Dutta
1fc892815d docker: fix piping 2023-06-08 10:32:07 -07:00
Koushik Dutta
38ed1acc15 docker: fix typo 2023-06-08 10:20:51 -07:00
Koushik Dutta
3bdc9ab930 docker: use intel repos for jammy 2023-06-08 10:11:02 -07:00
Koushik Dutta
bfa6346333 linux: fix dockerfile translation/exec 2023-06-08 10:04:19 -07:00
Koushik Dutta
fcbb308cb8 install: fix linux local syntax 2023-06-08 09:54:36 -07:00
Koushik Dutta
f137edcc8c install: fix linux local syntax 2023-06-08 09:53:17 -07:00
Koushik Dutta
53e6f083b9 docker: working jammy + tflite 2023-06-08 09:46:38 -07:00
Koushik Dutta
0f96fdb4bc tensorflow-lite: publish 2023-06-08 09:28:08 -07:00
Koushik Dutta
96ea3f3b27 postbeta 2023-06-08 09:22:54 -07:00
Koushik Dutta
a31d6482af postbeta 2023-06-08 09:12:21 -07:00
Koushik Dutta
be16bf7858 postbeta 2023-06-08 08:50:40 -07:00
Koushik Dutta
1dad0126bc postbeta 2023-06-08 08:08:24 -07:00
Koushik Dutta
9292ebbe48 tensorflow-lite: fix missing settings, add python version hints 2023-06-08 07:54:41 -07:00
Koushik Dutta
0b3a1a1998 docker: update before install 2023-06-07 16:25:22 -07:00
Koushik Dutta
b5d58b6899 Merge branch 'main' of github.com:koush/scrypted 2023-06-07 16:11:30 -07:00
Koushik Dutta
215a56f70e docker: jammy default 2023-06-07 16:11:08 -07:00
Koushik Dutta
c593701e72 gh: Update docker.yml 2023-06-07 15:59:53 -07:00
Koushik Dutta
46351f2fd7 docs: update 2023-06-07 15:22:35 -07:00
Koushik Dutta
9bce4acd14 postbeta 2023-06-07 15:20:38 -07:00
Koushik Dutta
cba20ec887 postbeta 2023-06-07 15:18:48 -07:00
Koushik Dutta
7c41516cce python-codecs: fix stride handling 2023-06-07 15:10:40 -07:00
Koushik Dutta
1f209072ba opencv: relax threshold defaults 2023-06-07 15:09:04 -07:00
Koushik Dutta
8978bff8a9 postbeta 2023-06-07 10:32:52 -07:00
Koushik Dutta
04c500b855 sdk: update 2023-06-07 10:32:18 -07:00
Koushik Dutta
8b4859579c rebroadcast: strip out all legacy audio handling 2023-06-07 08:34:45 -07:00
Koushik Dutta
90deaf1161 postbeta 2023-06-07 08:22:23 -07:00
Koushik Dutta
de56a8c653 server: remove dead code 2023-06-07 08:22:15 -07:00
Koushik Dutta
a5215ae92b Merge branch 'main' of github.com:koush/scrypted 2023-06-07 08:17:22 -07:00
Koushik Dutta
73cd40b540 server: strip and update dependencies 2023-06-07 08:17:13 -07:00
Koushik Dutta
93556dd404 postbeta 2023-06-07 07:40:15 -07:00
Brett Jia
125b436cb6 arlo: upstreaming changes (#844)
* remove webrtc emulation

* turn on two way audio by default

* add arloq pings and tweak log messages

* bump for release

* bump scrypted-arlo-go to remove unused code

* add arloqs pings

* better 2fa selection error msg + get sipinfo

* wip sip

* re-enable basestation push to talk

* bump for 0.7.24 release

* bump to working wheels

* disable MQTT backend and use SSE as default

* some login error handling

* remove dependency on cryptography and switch back to scrypted tool

* bump for 0.7.27 release

* implement DASH container

* expand documentation

* expand documentation

* bump for 0.7.28 beta

* discourage DASH further

* cleaner container selection

* tweak documentation

* tweak documentation

* bump for 0.7.29 release
2023-06-04 07:29:45 -04:00
Koushik Dutta
0a4ea032f5 client: include hostname property in login challenge 2023-06-02 15:36:05 -07:00
slyoldfox
c658cee5c9 sip: v0.0.9
* * Fix an issues in SIP.js where the ACK and BYE replies didn't go to the correct uri

* * Implemented outgoing SIP MESSAGE sending
* Adding voice mail check
* Adding a lock for a bticino doorbell

* Cleanup dependencies, code in sip, bticino plugins

* Cleanup dependencies, code in sip, bticino plugins

* Clear stale devices from our map and clear the voicemail check

* Do not require register() for a SIP call

* Narrow down the event matching to deletes of devices

* Use releaseDevice to clean up stale entries

* Fix uuid version

* Attempt to make two way audio work

* Attempt to make two way audio work - fine tuning

* Enable incoming doorbell events

* SipCall was never a "sip call" but more like a manager
SipSession was more the "sip call"

* * Rename sip registered session to persistent sip manager
* Allow handling of call pickup in homekit (hopefully!)

* * use the consoles from the camera object

* * use the consoles from the camera object

* * Fix the retry timer

* * Added webhook url

* * parse record route correctly

* * Add gruu and use a custom fork of sip.js which supports keepAlive SIP clients (and dropped Websocket)
* use cross-env in package.json

* Added webhook urls for faster handling of events

* Added videoclips

* plugins/sip 0.0.6

* plugins/bticino 0.0.7

* Implemented Reboot interface

* v0.0.9 which works with c300-controller

* better validation during creation of device
* automatically sets the correct settings depending on the data sent back from the controller

---------

Co-authored-by: Marc Vanbrabant <marc@foreach.be>
2023-06-02 13:37:52 -04:00
Koushik Dutta
6589176c8b Merge branch 'main' of github.com:koush/scrypted 2023-06-01 20:33:33 -07:00
Koushik Dutta
6c4c83f655 rebroadcast: hack fix for ffmpeg sdp race condition 2023-06-01 20:33:28 -07:00
Billy Zoellers
8d4124adda add types to support Air Purifier (#833)
* add types to support Air Purifier

* fix homekit type for airpurifier
2023-06-01 15:07:25 -04:00
Brett Jia
b7cda86df7 fix typo reported by community member (#831) 2023-05-29 17:23:24 -07:00
Koushik Dutta
6622e13e51 openvino: fix setting typo 2023-05-29 15:11:41 -07:00
Koushik Dutta
cbc45da679 openvino: add setting for compute target 2023-05-29 15:07:19 -07:00
Koushik Dutta
e7d06c66af gha: only do s6 builds 2023-05-29 10:21:57 -07:00
Koushik Dutta
ea02bc3b6f github: switch to jammy 2023-05-29 10:21:28 -07:00
Koushik Dutta
2b43cb7d15 postbeta 2023-05-29 10:20:00 -07:00
Koushik Dutta
f3c0362e18 server: prep for python3.10 2023-05-29 10:19:51 -07:00
Koushik Dutta
817ae42250 docker: fix install prompts 2023-05-28 19:58:12 -07:00
Koushik Dutta
8043f83f20 github: self hosted runner 2023-05-28 15:55:12 -07:00
Koushik Dutta
d33ab5dbcf gihub: self hosted runner 2023-05-28 15:54:50 -07:00
Koushik Dutta
2b1674bea8 docker/github: switch to jammy 2023-05-28 15:38:40 -07:00
Koushik Dutta
f045e59258 docker: normalize Dockerfile across arch 2023-05-28 12:57:55 -07:00
Koushik Dutta
9125aafc07 openvino: rollback 2023-05-28 12:55:13 -07:00
Koushik Dutta
6f5244ec9f videoanalysis: correctly pass motion zones to object detector 2023-05-28 09:01:21 -07:00
Koushik Dutta
f1eb2f988a openvino: unlock version for jammy 2023-05-27 23:10:35 -07:00
Koushik Dutta
1f659d9a72 python-codecs: move dimensions into caps 2023-05-27 23:09:42 -07:00
Koushik Dutta
dd98f12f2a python-codecs: fix pil rgba to jpg. fix image close race condition. 2023-05-27 22:46:55 -07:00
Koushik Dutta
2063e3822a docker: focal builds 2023-05-27 20:25:10 -07:00
Koushik Dutta
f7495a7a76 docker: update base image fingerprint 2023-05-27 18:16:45 -07:00
Koushik Dutta
fddb9c655f docker: use lunar 2023-05-27 18:05:32 -07:00
Koushik Dutta
297e7a7b4f docker: use jammy and lunar 2023-05-27 17:51:05 -07:00
Koushik Dutta
29e080f6b6 docker: switch back to ubuntu for better driver supports and deadsnakes ppa 2023-05-27 17:49:12 -07:00
Koushik Dutta
c72ea24794 python-codecs: fix vaapi post procesisng 2023-05-27 10:22:31 -07:00
Koushik Dutta
ada80796de homekit: fix basic fans 2023-05-27 09:37:30 -07:00
Koushik Dutta
1ebcf32998 python-codecs: fix vaapi gray output 2023-05-26 14:16:50 -07:00
Koushik Dutta
79765ba58e python-codecs: fix assert spam, code cleanups 2023-05-26 08:56:27 -07:00
Koushik Dutta
ff4665520c python-codecs: bug fixes 2023-05-25 23:34:49 -07:00
Koushik Dutta
be5b810335 python-codecs: cleanup code, add some fast paths 2023-05-25 23:08:15 -07:00
Koushik Dutta
fdc99b7fa6 python-codecs: major refactor to support hw acceleration and on demand color space conversion 2023-05-25 10:48:25 -07:00
Koushik Dutta
f730d13cbd ring: fix busted ass ring polling/push 2023-05-24 17:58:51 -07:00
Koushik Dutta
af02753cef server/core: support built in server updates 2023-05-23 12:04:02 -07:00
Koushik Dutta
9334d1c2a4 server: fix potential plugin startup hang 2023-05-23 08:48:26 -07:00
Koushik Dutta
71ecc07e2b webrtc: respect device pixel ratio 2023-05-23 01:44:29 -07:00
Koushik Dutta
5310dd5ff6 ui: social, account creation cleanups 2023-05-22 19:01:15 -07:00
Koushik Dutta
adf1a10659 sdk: image resize filters 2023-05-22 09:45:21 -07:00
Koushik Dutta
2ecc26c914 docker: use new install env var 2023-05-22 08:52:56 -07:00
Koushik Dutta
9a49416831 ha: use diff env var 2023-05-22 08:51:45 -07:00
Koushik Dutta
f0eff01898 ha: bump version, add env variable to prevent future notifications 2023-05-22 08:50:05 -07:00
Koushik Dutta
edd071739f python-codecs: dont feed preroll into queue 2023-05-21 22:48:06 -07:00
Koushik Dutta
ab81c568bc sdk: update 2023-05-21 22:44:14 -07:00
Koushik Dutta
62470df0af server: fix env anon login 2023-05-21 21:54:12 -07:00
Koushik Dutta
19b83eb056 postrelease 2023-05-21 21:53:43 -07:00
Koushik Dutta
b75d4cbfd4 postbeta 2023-05-21 21:52:41 -07:00
Koushik Dutta
8c0bb7b205 postrelease 2023-05-21 14:51:13 -07:00
Koushik Dutta
ef64515e56 python sample: readme 2023-05-20 22:08:25 -07:00
Koushik Dutta
302272e437 Merge branch 'main' of github.com:koush/scrypted 2023-05-20 22:07:45 -07:00
Koushik Dutta
80e433f6ef python sample: readme 2023-05-20 22:07:40 -07:00
Raman Gupta
60786aba2b Fix python SDK types (#817) 2023-05-20 21:32:43 -07:00
Brett Jia
256fde46f6 arlo: eco mode for snapshot throttling + disable experimental features (#816)
* eco mode, download images, remove experimental intercom

* rename imported var

* bump for release
2023-05-20 19:22:59 -07:00
Koushik Dutta
e1a7dd367e postbeta 2023-05-19 22:27:49 -07:00
Koushik Dutta
8612ba3462 postbeta 2023-05-19 22:06:16 -07:00
Koushik Dutta
ab638f26be postbeta 2023-05-19 21:49:31 -07:00
Koushik Dutta
02b881a2d2 postbeta 2023-05-19 21:41:15 -07:00
Koushik Dutta
35475b03e2 docker: pci coral example 2023-05-19 19:10:30 -07:00
Koushik Dutta
0b55c777f8 alexa: publish w/ storage fix 2023-05-19 12:22:10 -07:00
Koushik Dutta
68f86d214c Merge branch 'main' of github.com:koush/scrypted 2023-05-18 20:10:44 -07:00
Koushik Dutta
2abea2d25b videoanalysis: logging 2023-05-18 20:10:36 -07:00
Brett Jia
1c2f17b9f9 arlo: backup code path for cloudflare 403 (#809)
* experimental 403 fix

* use ips directly

* fix crash on empty device list

* bump for beta

* test post before returning

* bump for beta

* use cloudflare by default

* bump for beta

* bump for release
2023-05-18 19:23:15 -07:00
Koushik Dutta
e3d4800e4f python-codecs: implement image close 2023-05-17 21:03:51 -07:00
Koushik Dutta
d2f175715b webrtc: fix local transport detection on ipv6t 2023-05-17 21:03:04 -07:00
Koushik Dutta
93c1a699f1 snapshot: publish 2023-05-17 21:02:56 -07:00
Koushik Dutta
41570e9134 h264: publish 2023-05-17 14:24:30 -07:00
Koushik Dutta
3ef75854c2 postbeta 2023-05-17 11:35:51 -07:00
Koushik Dutta
c88a638f4e server: fix level db lock error not being reported 2023-05-17 11:35:42 -07:00
Koushik Dutta
793c4da33a postbeta 2023-05-17 10:59:48 -07:00
Koushik Dutta
68f071660e server: await server port listeners 2023-05-17 10:59:40 -07:00
Koushik Dutta
8ea5b6aca6 postbeta 2023-05-17 10:53:16 -07:00
Koushik Dutta
2f13c77444 server: add default admin login via token 2023-05-17 10:52:50 -07:00
Koushik Dutta
981ad183f5 gh: remove bookworm builds 2023-05-16 22:00:53 -07:00
Koushik Dutta
8748be82ef docker: add xz-utils 2023-05-16 20:30:08 -07:00
Koushik Dutta
a347fc2b73 gh: fix yaml 2023-05-16 19:41:55 -07:00
Koushik Dutta
002bf3b52c gh: fix yaml 2023-05-16 19:37:31 -07:00
Koushik Dutta
72abcd79ec gh: fix base bookworm image args 2023-05-16 19:19:10 -07:00
Koushik Dutta
86e5b824c7 docker: fix bookworm pip issues 2023-05-16 18:09:22 -07:00
Koushik Dutta
43f6f176f0 gh: fix docker common path 2023-05-16 15:21:10 -07:00
Koushik Dutta
bc543aa28e docker: add bookworm target 2023-05-16 15:11:30 -07:00
Koushik Dutta
e90db378e8 install: remove aiofiles dependency 2023-05-16 14:46:07 -07:00
Koushik Dutta
f2907532aa snapshot: cleanup timeout handling 2023-05-16 10:54:46 -07:00
Koushik Dutta
866706505a python-codecs: support vaapi color conversion 2023-05-15 14:37:22 -07:00
Koushik Dutta
59db3b622c ha: release 2023-05-15 13:10:52 -07:00
Koushik Dutta
7451b9903a rebroadcast: add ffmpeg transcode 2023-05-15 13:10:14 -07:00
Koushik Dutta
aded2e43b1 rebroadcast: support output transcoidng 2023-05-15 10:49:48 -07:00
Koushik Dutta
031a7527e1 ha: publish 2023-05-15 08:22:45 -07:00
Koushik Dutta
2aca568707 ha: publish 2023-05-14 14:10:21 -07:00
Koushik Dutta
6b22d34831 Merge branch 'main' of github.com:koush/scrypted 2023-05-14 14:08:39 -07:00
root
429d9ec5a6 ha: add home assistant api 2023-05-14 13:59:49 -07:00
Koushik Dutta
b426668146 postbeta 2023-05-14 13:56:18 -07:00
Koushik Dutta
8bce14f834 server: support auto installation of single plugin via SCRYPTED_INSTALL_PLUGIN 2023-05-14 13:56:08 -07:00
Koushik Dutta
7511abf768 various plugins: publish rpc gc churn fix 2023-05-13 14:11:32 -07:00
Koushik Dutta
180c12e8cc rebroadcast: create dirs before writing rtsp file 2023-05-13 14:03:36 -07:00
Koushik Dutta
1ed7d03a20 client: detection jpeg example 2023-05-13 07:43:49 -07:00
Koushik Dutta
9e7b57f154 python-codecs: fix process exit before aclose finish. publish betas. 2023-05-12 21:57:34 -07:00
Koushik Dutta
205fdb0222 fix per frame rpc gc churn 2023-05-12 20:26:18 -07:00
Koushik Dutta
d8f3edee1e core: fix init order 2023-05-12 20:25:52 -07:00
Koushik Dutta
90c9efc8a6 rebroadcast: use highwatermark for nvr perf improvement 2023-05-11 10:20:28 -07:00
Koushik Dutta
3893ccd776 Merge branch 'main' of github.com:koush/scrypted 2023-05-11 08:12:30 -07:00
Koushik Dutta
1b154f14bc docs: update 2023-05-11 08:12:25 -07:00
Koushik Dutta
2e3eba4350 Update test.yml 2023-05-10 22:29:45 -07:00
Koushik Dutta
450f05910a Update test.yml 2023-05-10 22:28:27 -07:00
Brett Jia
22505c9226 arlo: charger interface + fix cloudflare api (#784)
* add Charger interface

* update settings documentation

* arlo: fix cloudflare api issues
2023-05-10 15:01:09 -07:00
Koushik Dutta
7120bf86ff snapshot: fix description 2023-05-10 13:22:28 -07:00
Koushik Dutta
b49742204f ha: publish 2023-05-10 11:00:03 -07:00
Koushik Dutta
6fda76a5e8 gh: support versioned publish tags 2023-05-10 10:37:00 -07:00
Koushik Dutta
08bd785d45 gh: remove ha workflow 2023-05-10 08:19:49 -07:00
Koushik Dutta
aa9ddb35aa ha: restructure 2023-05-10 08:05:13 -07:00
Koushik Dutta
7997c07179 ha: use standard docker image 2023-05-10 08:04:36 -07:00
Koushik Dutta
a67e24d5dc github: fix action version 2023-05-09 19:05:01 -07:00
Koushik Dutta
0d4da0dd06 server: build off npm tag and determine version in giuthub action 2023-05-09 19:03:34 -07:00
Koushik Dutta
993e903f3b postbeta 2023-05-09 19:00:50 -07:00
Koushik Dutta
fbb11a5312 server: allow ip based admin auth 2023-05-09 19:00:39 -07:00
Koushik Dutta
ea72d2159b ha: add logos/icons 2023-05-09 12:43:09 -07:00
Koushik Dutta
1892fdb529 ha: publish 2023-05-09 10:47:11 -07:00
Koushik Dutta
1e16793b20 ha: move recordings out of the volume 2023-05-09 10:44:54 -07:00
Koushik Dutta
2f6c577b47 README: add HAOS 2023-05-09 10:08:31 -07:00
Koushik Dutta
212306449b wip 2023-05-09 10:06:19 -07:00
Koushik Dutta
16445bc38e ha: fix image 2023-05-09 08:49:45 -07:00
Koushik Dutta
b6e9e15d4f client: clear hash/query 2023-05-09 08:00:12 -07:00
Koushik Dutta
39abd49ea0 ha: autogenerate admin token 2023-05-09 07:59:57 -07:00
Koushik Dutta
05b9b49732 core: escape iframe for logins 2023-05-08 23:07:32 -07:00
Koushik Dutta
1857acac66 core: fix base url hash/query leak 2023-05-08 22:02:14 -07:00
Koushik Dutta
fedf184847 core: fix ingress shell 2023-05-08 21:47:41 -07:00
Koushik Dutta
d2afac0dd6 Merge branch 'main' of github.com:koush/scrypted 2023-05-08 14:48:27 -07:00
Koushik Dutta
6844b55983 ha: release 2023-05-08 14:48:19 -07:00
Koushik Dutta
379dabc182 ha: log in to dockerhub and ghcr 2023-05-08 14:11:28 -07:00
Koushik Dutta
df3c751f2d ha: fix missing env 2023-05-08 13:53:40 -07:00
Koushik Dutta
da714d1f94 ha: fix Dockerfile arch 2023-05-08 13:16:25 -07:00
Koushik Dutta
34ee29b7b4 Merge branch 'main' of github.com:koush/scrypted 2023-05-08 13:10:28 -07:00
Koushik Dutta
4c48f50e01 ha: fix Dockerfile missing var 2023-05-08 13:10:20 -07:00
Koushik Dutta
81a5a4349c docker: checkout repo 2023-05-08 11:28:52 -07:00
Koushik Dutta
8526c92dcc postbeta 2023-05-08 11:28:07 -07:00
Koushik Dutta
73fefeec26 server: relative redirects 2023-05-08 11:27:48 -07:00
Koushik Dutta
6060b50856 docker/ha: ha fixes 2023-05-08 11:27:37 -07:00
Koushik Dutta
d29cd7e421 ha: addon 2023-05-08 11:24:55 -07:00
Koushik Dutta
8589283135 postbeta 2023-05-07 22:21:31 -07:00
Koushik Dutta
837dae5f02 server: add support for long term token access 2023-05-07 22:21:19 -07:00
Koushik Dutta
c26aa2d01e client: publish 2023-05-07 22:12:16 -07:00
Koushik Dutta
c98eca23ab mqtt: publiush 2023-05-07 14:01:54 -07:00
Koushik Dutta
eb5d1ac4f6 client: squelch logging 2023-05-06 12:01:37 -07:00
Koushik Dutta
37b0e46dd0 rebroadcast: Fix audio codec parsing bug 2023-05-06 12:01:25 -07:00
Koushik Dutta
042dd84520 core: fix non-root repl and console 2023-05-05 17:31:38 -07:00
Koushik Dutta
62d5c145c2 core/client: support endpoints that are proxied from a non root webroot 2023-05-04 22:53:34 -07:00
Koushik Dutta
1ea3774849 videoanalysis: default to snapshot mode < 4 cpu 2023-05-03 21:16:03 -07:00
Koushik Dutta
9d8345e901 videoanalysis/motion: implement video rate control 2023-05-03 15:57:37 -07:00
Koushik Dutta
9ed850e327 rebroadcast/webrtc: fixup pcm_ulaw handling 2023-05-03 14:11:17 -07:00
Koushik Dutta
957d27b8ef rebroadcast: revert publish 2023-05-03 13:23:05 -07:00
Koushik Dutta
b74a957ecb Revert "rebroadcast: publish"
This reverts commit debaedfd8c.
2023-05-03 12:48:06 -07:00
Koushik Dutta
debaedfd8c rebroadcast: publish 2023-05-03 12:39:50 -07:00
Koushik Dutta
0123a97e3c videoanalysis: allow sleep on motion 2023-05-02 10:23:00 -07:00
Koushik Dutta
a32d47e192 postbeta 2023-05-02 09:43:51 -07:00
Koushik Dutta
90ed8bd3f5 server: reboot interface support 2023-05-02 09:43:42 -07:00
Koushik Dutta
c4f4002f55 sdk: publish 2023-05-01 23:13:27 -07:00
Koushik Dutta
1ea2828e78 plugins/sdk: add support for rebooting devices 2023-05-01 23:04:05 -07:00
Koushik Dutta
eb864456df sdk: rebuild 2023-05-01 20:00:15 -07:00
Koushik Dutta
51af4f07ff postbeta 2023-04-30 23:25:32 -07:00
Koushik Dutta
f6201acf2a server: add runtime kill 2023-04-30 23:25:23 -07:00
Koushik Dutta
96ac479c73 postbeta 2023-04-30 08:54:29 -07:00
Koushik Dutta
0c08875de3 server: build scripts now rev minor version, while flavors rev minor 2023-04-30 08:54:12 -07:00
Koushik Dutta
bd05fc1b5d postbeta 2023-04-29 18:35:38 -07:00
Koushik Dutta
5a0d325718 server: remove aiofiles dependency 2023-04-29 18:35:28 -07:00
Koushik Dutta
015794c1d1 sdk: update 2023-04-29 11:30:42 -07:00
Koushik Dutta
02d5b429b7 Revert "server: add hook for getting runtime"
This reverts commit e169d154e7.
2023-04-29 11:30:20 -07:00
Koushik Dutta
e169d154e7 server: add hook for getting runtime 2023-04-29 11:09:56 -07:00
Koushik Dutta
01c7b5674a postbeta 2023-04-29 08:34:04 -07:00
Koushik Dutta
a7a1aed0dc client: update 2023-04-28 10:12:02 -07:00
Koushik Dutta
6bb3f0fd19 sdk: additional video clip thumbnail options 2023-04-28 08:58:59 -07:00
Koushik Dutta
7828de9d50 sdk: add thumbnail side option to video clip requests 2023-04-28 08:46:57 -07:00
Koushik Dutta
ea77bb29d0 postrelease 2023-04-28 08:28:49 -07:00
Koushik Dutta
bb184247d0 server: fix deleted device leak 2023-04-28 08:28:40 -07:00
Koushik Dutta
dbc45173ae postbeta 2023-04-28 08:02:00 -07:00
Koushik Dutta
95a23b2882 postrelease 2023-04-28 07:34:50 -07:00
Koushik Dutta
212883e84b server: probe one off discovered devices after creation 2023-04-28 07:34:21 -07:00
Koushik Dutta
1200537d62 cloud: support default login 2023-04-27 23:42:54 -07:00
Koushik Dutta
5f6adc9449 predict: publish 2023-04-27 21:53:50 -07:00
Koushik Dutta
7d17236ca7 server: fix prepublishOnly script 2023-04-27 10:31:13 -07:00
Koushik Dutta
028401362a postrelease 2023-04-27 10:30:59 -07:00
Koushik Dutta
69927be4f4 rebroadcast: publish beta 2023-04-26 22:51:34 -07:00
Koushik Dutta
ffee1c5cc2 predict: publish 2023-04-26 22:51:28 -07:00
Koushik Dutta
ebc3a03e2c postrelease 2023-04-26 22:47:50 -07:00
Koushik Dutta
4246e3c476 server: filter link local addresses 2023-04-26 22:47:33 -07:00
Koushik Dutta
3fce0838f1 Merge branch 'main' of github.com:koush/scrypted 2023-04-26 18:40:27 -07:00
Koushik Dutta
2609e301fe python-codecs: fix gray conversion 2023-04-26 18:40:22 -07:00
Koushik Dutta
f4737bf2ac docker: fix stupid bash/zsh issue 2023-04-26 10:22:55 -07:00
Koushik Dutta
fc102aa526 postbeta 2023-04-26 09:56:27 -07:00
Koushik Dutta
9ef33e156f docker: pass through /dev/dri in compose 2023-04-26 09:40:07 -07:00
Koushik Dutta
881865a0cb docker: add intel opencl driver 2023-04-26 09:22:16 -07:00
Koushik Dutta
be5643cc53 openvino: fix bufferconvertor 2023-04-25 22:35:41 -07:00
Koushik Dutta
7e6eba1596 openvino: initial release 2023-04-25 21:56:07 -07:00
Koushik Dutta
27dde776a6 rebroadcast: further settings cleanups 2023-04-25 18:46:38 -07:00
Koushik Dutta
b24159a22a rebroadcast: strip out legacy containers 2023-04-25 18:32:11 -07:00
Koushik Dutta
b6c242b9d5 postrelease 2023-04-25 14:11:58 -07:00
Koushik Dutta
2fbaa12caa core: support selecting interfaces 2023-04-25 14:10:04 -07:00
Koushik Dutta
eb5a497e82 prebeta 2023-04-25 14:04:56 -07:00
Koushik Dutta
66a0ea08ec server: support binding to interfaces 2023-04-25 14:04:50 -07:00
Koushik Dutta
0527baf14a webrtc: update werift, remove unnecessary disable ipv6 option. addresses can be filtered individually. 2023-04-25 13:37:16 -07:00
Koushik Dutta
c7c5c6eed5 server: electron app hooks 2023-04-25 13:34:14 -07:00
Koushik Dutta
143c950c19 core: add support for multiple local addresses 2023-04-25 13:28:00 -07:00
Koushik Dutta
8d0bb0fa97 prebeta 2023-04-24 23:26:53 -07:00
Koushik Dutta
964274e50c prebeta 2023-04-24 23:22:32 -07:00
Koushik Dutta
e9844528aa python-codecs: add timestamps 2023-04-24 18:32:43 -07:00
Koushik Dutta
0609fc8986 python-codecs: publish typings fix 2023-04-24 11:46:14 -07:00
Koushik Dutta
9331b71433 opencv/sdk: fix typing.Union missing 2023-04-24 09:26:21 -07:00
Koushik Dutta
21f8239db7 videoanalysis: publish 2023-04-24 09:26:03 -07:00
Koushik Dutta
86042ec3fe sdk/videoanalysis: add zone hints to detection generator 2023-04-23 21:25:39 -07:00
Koushik Dutta
cdb87fb268 dummy-switch: further settings tweaks 2023-04-22 21:57:15 -07:00
Koushik Dutta
63dcd35b17 dummy-switch: friendly names on extensions 2023-04-22 21:54:35 -07:00
Koushik Dutta
951c3b9be6 dummy-switch: add replace binary sensor extension 2023-04-22 21:52:06 -07:00
Koushik Dutta
ed642bb3fe homekit: dont sync notifier toggle buttons by default 2023-04-22 21:35:07 -07:00
Koushik Dutta
8093cdd3d9 homekit: remove linked motion sensor 2023-04-22 21:29:12 -07:00
Koushik Dutta
fcbfc3a73f Merge branch 'main' of github.com:koush/scrypted 2023-04-22 21:27:54 -07:00
Koushik Dutta
94945a48bd dummy-switch: create replace motion sensor extension 2023-04-22 21:27:48 -07:00
Brett Jia
e360ede5cb rebroadcast: prebuffer on charging battery (#751)
* rework battery prebuffer to take into account charger interface

* rename handler

* do not restart exited stream on low battery

* tweak battery prebuffer state + periodically poll battery prebuffer state
2023-04-22 16:54:15 -07:00
Roarrk
bc9ec73567 coreml: accomodate MultiArray (Float32 0 × 80) models (#749)
Hack to accomodate models that has an output of type Float32 instead of Double.
2023-04-22 16:54:02 -07:00
Sheng
cd7e570508 chromecast: fix stop casting issue (#753) 2023-04-22 16:53:42 -07:00
Koushik Dutta
1b06c9c11d videoanalyis: pause motion detection while motion is active and resume after timeout 2023-04-22 10:10:46 -07:00
Koushik Dutta
154ab42d15 videonalaysis: refactor to avoid holding onto generators 2023-04-22 08:16:34 -07:00
Koushik Dutta
1929f6e8ed python-codecs: simplify generator code 2023-04-21 09:20:04 -07:00
Koushik Dutta
58bfa17cfe postrelease 2023-04-20 21:55:22 -07:00
Koushik Dutta
38c7006055 server: fix runaway cluster sockets 2023-04-20 21:55:15 -07:00
Koushik Dutta
b5e16b45a9 python-codecs: fix potential leak 2023-04-20 20:05:17 -07:00
Koushik Dutta
9c13668812 doorbird: publish 2023-04-20 11:58:10 -07:00
Koushik Dutta
a1ca724d6b opencv: support reference frame interval setting 2023-04-20 11:57:48 -07:00
Koushik Dutta
1b032d669c postrelease 2023-04-19 21:37:44 -07:00
Koushik Dutta
c492c15081 rpc: async generator should throw if yielded and when the peer has been killed. garbage collection does not trigger async generator return or throw. 2023-04-19 21:35:46 -07:00
Koushik Dutta
ee7076384b prebeta 2023-04-19 21:17:59 -07:00
Koushik Dutta
717cac721a detect: connect to rpc object for every videoframe 2023-04-19 12:18:02 -07:00
Koushik Dutta
af41c853bc Merge branch 'main' of github.com:koush/scrypted 2023-04-19 12:17:27 -07:00
Koushik Dutta
109b716753 sdk: update 2023-04-19 12:16:56 -07:00
Qasim Mehmood
07930508fe Publish mutable docker tags for all variants (#738)
This should add mutable docker tags for all variants that allow for updating via docker pull
2023-04-19 12:12:29 -07:00
nanosonde
a291abe375 Initial version of Doorbird plugin (#736)
save work

Add audio-transmit part

Fetch VGA JPEG snapshots from the camera

save work

Use fixed doorbird module 2.1.2

save work

Add doorbell and motion events

Clean up.

Improved initial camera setup like amcrest plugin

Update README
2023-04-19 12:12:18 -07:00
Koushik Dutta
f4f34b2da8 server: fix script 2023-04-18 10:47:32 -07:00
Koushik Dutta
3b4de526ba postrelease 2023-04-18 10:45:28 -07:00
Koushik Dutta
5de67fca86 server: fix python 3.8 issues 2023-04-18 10:45:20 -07:00
Koushik Dutta
98dc0b1b6d postrelease 2023-04-18 10:44:57 -07:00
Koushik Dutta
a05595ecc7 pam-diff/videoanalysis: fix performance, remove sharp dependency 2023-04-18 00:26:29 -07:00
Koushik Dutta
87be4648f1 prebeta 2023-04-17 22:14:36 -07:00
Koushik Dutta
60e51adb41 postrelease 2023-04-17 14:24:33 -07:00
Koushik Dutta
ace7720fe1 videoanalysis: fix snapshot hangs caused by HOL jpeg 2023-04-17 12:52:46 -07:00
Koushik Dutta
b9eb74d403 videoanalysis: add prebuffer hint 2023-04-17 09:55:20 -07:00
Koushik Dutta
fb7353383d predict: rollback rpc change until server is published 2023-04-17 08:46:32 -07:00
Koushik Dutta
bee119b486 python-codecs: handle vips rgba conversion 2023-04-17 08:46:24 -07:00
Koushik Dutta
0b6ffc2b87 predict: strip out allow list 2023-04-16 20:50:49 -07:00
Koushik Dutta
3863527b4d server: fix publish scripts 2023-04-16 13:11:44 -07:00
Koushik Dutta
51c48f4a1c prebeta 2023-04-16 13:10:41 -07:00
Koushik Dutta
4c138e9b4c prebeta 2023-04-16 12:11:25 -07:00
Koushik Dutta
e762c305a3 server: implement various python apis 2023-04-16 12:10:20 -07:00
Koushik Dutta
5bce335288 server: implement various python apis 2023-04-16 12:08:48 -07:00
Koushik Dutta
8201e9883a sdk: update python sdk 2023-04-16 11:43:02 -07:00
Koushik Dutta
74e5884285 videoanalysis: fix generator leak 2023-04-16 10:13:31 -07:00
Koushik Dutta
9cffd9ffbe server: fix noop cluster connect 2023-04-15 21:35:36 -07:00
Koushik Dutta
d8b617f2ae prebeta 2023-04-15 21:35:07 -07:00
Koushik Dutta
aeb564aa5d python-codecs: fix rgb->grasycale conversion 2023-04-15 21:22:52 -07:00
Koushik Dutta
45f672883a sdk: improve moving object metadata 2023-04-15 20:14:05 -07:00
Koushik Dutta
c0ff857a1b server: improve cluster resolution 2023-04-15 20:13:43 -07:00
Koushik Dutta
64f7e31f54 prebeta 2023-04-15 20:11:40 -07:00
Koushik Dutta
6b55f8876e prebeta 2023-04-15 15:12:10 -07:00
Koushik Dutta
718a31f2c5 prebeta 2023-04-15 15:02:32 -07:00
Koushik Dutta
c1e1d50fa5 sdk: publish 2023-04-15 10:14:42 -07:00
Koushik Dutta
75c4a1939f server: publish beta 2023-04-15 09:33:23 -07:00
Koushik Dutta
0d703c2aff predict: remove filter options 2023-04-15 09:33:10 -07:00
Koushik Dutta
0a6e4fda75 sdk: add support for designating object is moving 2023-04-14 22:29:05 -07:00
Koushik Dutta
4c2de9e443 server: add getDevice convenience method for pluginId/nativeId 2023-04-14 22:24:12 -07:00
Koushik Dutta
b8a4fedf1a client: publish 2023-04-14 22:08:58 -07:00
Koushik Dutta
79d9f1d4a1 server: add getDevice convenience method for pluginId/nativeId 2023-04-14 22:07:49 -07:00
Koushik Dutta
983213c578 sort-tracker: deprecate 2023-04-14 16:06:06 -07:00
Koushik Dutta
7dd3d71ebd videoanalysis: remove problematic ffmpeg video generator 2023-04-14 13:36:56 -07:00
Koushik Dutta
493f8deeef Revert "server: watch for dangling python processes"
This reverts commit b29f2d5ee1.
2023-04-14 13:02:51 -07:00
Koushik Dutta
b29f2d5ee1 server: watch for dangling python processes 2023-04-14 12:52:16 -07:00
Koushik Dutta
96bda10123 sort-tracker: remove average area check 2023-04-14 09:58:55 -07:00
Koushik Dutta
3294700d31 core: fix ui refresh issue 2023-04-14 08:07:12 -07:00
Koushik Dutta
0cf77d4c76 core: add support for date./time settings 2023-04-13 19:43:20 -07:00
Koushik Dutta
953841e3a5 update samples 2023-04-13 19:40:02 -07:00
Koushik Dutta
393c1017df sdk: add date/time/datetime types 2023-04-13 13:05:44 -07:00
Koushik Dutta
f50176d14a server: fix CPU usage being lost on fork exit 2023-04-13 12:53:21 -07:00
Koushik Dutta
7f2bf0b542 webrtc: fix ffmpeg leak 2023-04-13 12:51:52 -07:00
Koushik Dutta
9e3990400c zwave: publish 2023-04-13 12:51:41 -07:00
Koushik Dutta
95eed80735 webrtc: fix ffmpeg leak 2023-04-13 12:51:29 -07:00
Koushik Dutta
be43d0c017 zwave: publish 2023-04-12 09:47:05 -07:00
mikeburgh
386ea9a98a Fixing sensor mapping to position (#719) 2023-04-11 20:11:46 -07:00
Koushik Dutta
9b40978f61 client/server: fix various async generator bugs in remote client 2023-04-11 13:53:38 -07:00
Koushik Dutta
f0ee435cd0 videoanalysis: fix detection calculation/throttling in snapshot mode 2023-04-10 17:49:33 -07:00
Koushik Dutta
30748784ef videoanalysis: fix logging 2023-04-10 14:30:14 -07:00
Koushik Dutta
8310e33719 videoanalysis: profile system performance and use snapshot mode when necessary 2023-04-10 12:48:32 -07:00
Koushik Dutta
1d18697161 videoanalysis: watch for pipeline hangs. fix race conditions around pipeline startup/termination. 2023-04-10 10:17:26 -07:00
Koushik Dutta
d500b3fd6c h264 packetizer: update codec information with stapa packets 2023-04-10 08:06:41 -07:00
Koushik Dutta
95ae916b6c Merge branch 'main' of github.com:koush/scrypted 2023-04-09 21:02:47 -07:00
Koushik Dutta
ec3e16f20f onvif (reolink): implement two way audio 2023-04-09 21:02:42 -07:00
Brett Jia
30d28f543c arlo: boolean settings + publish (#713) 2023-04-09 14:49:43 -07:00
Koushik Dutta
e0cce24999 python-codecs: publish 2023-04-09 12:04:40 -07:00
Koushik Dutta
409b25f8b0 python-codecs: fix windows process cleanup 2023-04-09 12:04:16 -07:00
Koushik Dutta
8f278abec8 videoanalysis: fix bug where stream failure may cause motion detector to never restart 2023-04-08 11:10:49 -07:00
Koushik Dutta
d6179dab82 prebeta 2023-04-08 10:19:11 -07:00
Koushik Dutta
ed186e2142 server/rpc: improve typings on rpc message type 2023-04-08 10:19:06 -07:00
Koushik Dutta
3c021bb2c8 prebeta 2023-04-08 10:17:24 -07:00
Koushik Dutta
c522edc622 server/rpc: improve typings on rpc message type 2023-04-08 10:17:18 -07:00
Koushik Dutta
022a103bcb prebeta 2023-04-08 10:05:07 -07:00
Koushik Dutta
efd125b6e4 server/rpc: add Uint8Array to node transport safe arguments 2023-04-08 10:05:02 -07:00
Koushik Dutta
19f7688a65 python-codecs: publish 2023-04-08 09:18:54 -07:00
Koushik Dutta
7f18e4629c prebeta 2023-04-08 09:18:38 -07:00
Koushik Dutta
dfe2c937a1 server: add hook for cluster peer creation 2023-04-08 09:18:31 -07:00
Koushik Dutta
47d7a23a3d postrelease 2023-04-07 21:15:04 -07:00
Koushik Dutta
0ea609c80c server: update dependencies 2023-04-07 21:14:58 -07:00
Koushik Dutta
71ee5727f1 sdk: update 2023-04-07 15:11:24 -07:00
Koushik Dutta
2383f16112 videoanalysis: improve logging for debugging 2023-04-07 14:53:27 -07:00
Koushik Dutta
7d5defd736 homekit: publish 2023-04-07 14:06:38 -07:00
Koushik Dutta
cbf4cf0579 server: fix typo in storage of undefined 2023-04-07 14:06:17 -07:00
Koushik Dutta
422dd94e5c plugins: update problematic setStorage(key, undefined) 2023-04-07 14:05:49 -07:00
Koushik Dutta
076f5e27f1 postrelease 2023-04-07 13:50:09 -07:00
Koushik Dutta
645de2e5fd predict: improve input aspect ratio match fast path 2023-04-07 10:17:05 -07:00
Koushik Dutta
dcf24a77d7 postrelease 2023-04-07 08:30:27 -07:00
Koushik Dutta
7065365a47 postrelease 2023-04-07 08:30:21 -07:00
Koushik Dutta
b82520776e sdk/server: search for TypedDict in typing and typing_extensions 2023-04-07 08:29:47 -07:00
Koushik Dutta
638c1f77fd ring: fix login issues 2023-04-07 08:06:16 -07:00
Koushik Dutta
73a489ea37 rtc: null check double offer error 2023-04-06 22:35:52 -07:00
Koushik Dutta
77d69f025a server: fix release build scripts 2023-04-06 08:32:44 -07:00
Koushik Dutta
3bc14ad248 prebeta 2023-04-06 08:32:33 -07:00
Koushik Dutta
03e5a9dec1 Merge branch 'main' of github.com:koush/scrypted 2023-04-06 08:22:11 -07:00
Koushik Dutta
57b790c332 server: publish beta 2023-04-06 08:22:05 -07:00
Koushik Dutta
ce2ea63be7 server: add hook for npm exec in non-node environment (electron) 2023-04-06 08:21:37 -07:00
Alex Leeds
2dd4721b7f ring: fix login 406 error (#698) 2023-04-06 07:45:33 -07:00
Justin Angevaare
667075dfad Add tip about digest authentication (#697) 2023-04-06 07:45:24 -07:00
Koushik Dutta
7abdb06b66 postrelease 2023-04-05 14:39:28 -07:00
Koushik Dutta
43e5822c93 server: fix first run account creation bug 2023-04-05 14:39:20 -07:00
Koushik Dutta
bc579514e7 python-codecs: add numpy to requirements.txt 2023-04-05 11:55:04 -07:00
Koushik Dutta
825100f94e webrtc: add answer only option 2023-04-05 10:17:17 -07:00
Koushik Dutta
803bfc1560 pam-diff: tweak default motion percent 2023-04-05 10:16:46 -07:00
Koushik Dutta
b2013a54ed pam-diff: tweak default motion percent 2023-04-05 10:15:40 -07:00
Koushik Dutta
f252407935 rebroadcast: fix settings clear issue 2023-04-04 11:37:37 -07:00
Koushik Dutta
516f2a2a7b server: fetch version from package registry 2023-04-04 10:14:31 -07:00
Koushik Dutta
c1677ce691 postrelease 2023-04-04 09:59:39 -07:00
Koushik Dutta
5028fb812d server: storage polyfill should serialize keys and values as strings 2023-04-04 09:58:51 -07:00
Koushik Dutta
2db4e2579f server: add more files to .npmignore 2023-04-04 08:24:23 -07:00
Koushik Dutta
b339ca6cd2 fix bug where deleted users have continued/escalated permissions 2023-04-04 08:17:44 -07:00
Koushik Dutta
f100999cb1 postrelease 2023-04-04 08:17:13 -07:00
Koushik Dutta
2863756bd6 Revert "webrtc: startRtpForwarderProcess remove werift dependency"
This reverts commit 143a0b2c41.
2023-04-03 14:26:56 -07:00
Koushik Dutta
cc408850a0 videoanalysis: changing pipeline should restart video analysis 2023-04-03 12:26:02 -07:00
Koushik Dutta
ed1ceeda51 core: return correct acls for admins 2023-04-03 11:16:14 -07:00
Koushik Dutta
df09d8e92a Merge branch 'main' of github.com:koush/scrypted 2023-04-03 08:34:35 -07:00
Koushik Dutta
298ac960d1 core: fix checkbox ui 2023-04-03 08:34:30 -07:00
Nick Berardi
62d4d55aae unifi: added native zoom capability (#684) 2023-04-03 08:24:56 -07:00
Nick Berardi
a2121c0dc5 alexa: add setting to publish debug events to console (#685) 2023-04-03 08:24:31 -07:00
Koushik Dutta
9b5ea27c0b core: fix checkbox ui 2023-04-03 08:23:20 -07:00
Koushik Dutta
0b0e90fc04 server: fix version being off by 1 in release notes/tag 2023-04-02 10:13:52 -07:00
Koushik Dutta
d8aff609bf core: publish 2023-04-02 09:37:54 -07:00
Koushik Dutta
d8283c261a homekit: publish beta 2023-04-02 09:37:49 -07:00
Koushik Dutta
e3aca964be Merge branch 'main' of github.com:koush/scrypted 2023-04-02 09:34:07 -07:00
Koushik Dutta
a96025c45f prerelease 2023-04-02 09:33:56 -07:00
Koushik Dutta
6afd4b4579 server: aggressively kill python plugin processes and forks 2023-04-02 09:33:48 -07:00
Brett Jia
f97669949d sdk, core: add Charger interface (#680)
* add Charger interface

* add charger icon to web ui

* import correct path

* get charge state displayed correctly
2023-04-01 21:03:54 -07:00
Koushik Dutta
0a0a31574f Merge branch 'main' of github.com:koush/scrypted 2023-04-01 15:02:46 -07:00
Koushik Dutta
90fb751a22 reolink: stream spec hints 2023-04-01 15:02:39 -07:00
Brett Jia
b8d06fada5 arlo: toggle for wired power + audio sensors (#679)
* remove hints to force prebuffer snapshots to fetch stream

* cleanup exception guard + catch prebuffer snapshot errors

* settings to remove Battery interface

* delayed init to load battery percentage

* fix plugin crash due to missing smart features dict

* properly add toggle for wired power

* fix race condition when multiple settings are updated at once

* bump 0.7.10 for beta

* audio detection + clean up battery/no-battery settings

* bump 0.7.11 for beta

* remove basestation models from camera class

* bump 0.7.12 for release
2023-04-01 14:28:54 -07:00
Koushik Dutta
2cecb1686f core: fix ui hang, readd launcher 2023-03-31 23:21:10 -07:00
Koushik Dutta
db03775530 prerelease 2023-03-31 20:37:25 -07:00
Koushik Dutta
cccbc33f1a server: detect 32/64 mixed mode issue and provide hint on how to fix. https://github.com/koush/scrypted/issues/678 2023-03-31 20:37:14 -07:00
Koushik Dutta
5f23873366 videoanalysis: fix bug where motion sensor would stop on invalid condition 2023-03-31 12:37:52 -07:00
Koushik Dutta
e43accae67 Merge branch 'main' of github.com:koush/scrypted 2023-03-31 09:45:02 -07:00
Koushik Dutta
b3a0cda6f9 python-codecs: fix vips/yuv/gray fast path 2023-03-31 09:44:57 -07:00
Alex Leeds
58c3348282 hap: merge in sirens as child devices (#674)
* hap: merge in sirens as child devices

* add subtype to onOff base
2023-03-31 07:44:38 -07:00
Koushik Dutta
a9e6d76e99 python-codecs: fix libav jpeg export 2023-03-30 23:59:05 -07:00
Koushik Dutta
3b58936387 predict: remove dead code 2023-03-30 09:35:47 -07:00
Koushik Dutta
3a14ab81c8 sample: update 2023-03-30 09:35:37 -07:00
Koushik Dutta
291178a7b5 sdk/client: update 2023-03-30 09:34:57 -07:00
Koushik Dutta
b65faf1a79 opencv: add gray toBuffer fast path 2023-03-30 09:34:45 -07:00
Koushik Dutta
9d8a1353c0 opencv: fix motion box translation 2023-03-29 17:25:24 -07:00
Koushik Dutta
b29d793178 ring: remove accidental clearing of clips cache 2023-03-29 16:42:09 -07:00
Koushik Dutta
d8e406d415 webrtc: reduce debug logging 2023-03-29 16:41:16 -07:00
Koushik Dutta
4529872fd6 videoanalysis: make sharp optional 2023-03-29 14:03:35 -07:00
Koushik Dutta
fa86c31340 prerelease 2023-03-29 12:41:56 -07:00
Koushik Dutta
94ded75d40 docker: fix watchtower token 2023-03-29 12:17:05 -07:00
Koushik Dutta
887b61cd7a prebeta 2023-03-29 11:58:54 -07:00
Koushik Dutta
48e3d30987 server: output docker flavor to logs 2023-03-29 11:58:43 -07:00
Koushik Dutta
02dba3cd71 docker: include flavor in env variable 2023-03-29 11:57:11 -07:00
Koushik Dutta
195769034d docker: include flavor in env variable 2023-03-29 11:56:50 -07:00
Koushik Dutta
39c08aa378 prebeta 2023-03-29 10:19:18 -07:00
Koushik Dutta
fa8056d38e python: purge packages on update 2023-03-29 10:18:34 -07:00
Koushik Dutta
145f116c68 webrtc/h264: reset stapa sent flag after every idr frame 2023-03-29 09:37:41 -07:00
Koushik Dutta
15b6f336e4 common: add h264 fragment information parsing 2023-03-29 08:18:13 -07:00
Koushik Dutta
8b46f0a466 openv: use new pipieline 2023-03-29 08:17:52 -07:00
Koushik Dutta
a20cc5cd89 docker: always install packages for arm 2023-03-29 08:01:08 -07:00
Koushik Dutta
3d068929fd predict: publish 2023-03-28 19:40:14 -07:00
Koushik Dutta
928f9b7579 prerelease 2023-03-28 19:36:48 -07:00
Koushik Dutta
c1c5a42645 server: fixup versioned prefix/node_modules path 2023-03-28 19:36:39 -07:00
Koushik Dutta
12643cdde2 Merge branch 'main' of github.com:koush/scrypted 2023-03-28 19:27:26 -07:00
Koushik Dutta
0bff96a6e6 python-codecs: pil crop is not thread safe https://github.com/python-pillow/Pillow/issues/4848 2023-03-28 19:27:22 -07:00
TA2k
4e7e67de54 Enable ipv6 for avahi (#670)
Enable ipv6 for avahi to allow multiple mdns server on one host
2023-03-28 13:32:14 -07:00
Koushik Dutta
65c4a30004 rebroadcast: use regular file open flags for truncate 2023-03-28 12:45:52 -07:00
Koushik Dutta
309a1dc11f rebroadcast: add truncation error logging 2023-03-28 12:43:07 -07:00
Koushik Dutta
b7904b73b2 Merge branch 'main' of github.com:koush/scrypted 2023-03-28 12:20:14 -07:00
Koushik Dutta
9e9ddbc5f3 rebroadcast: catch various unhandled errors 2023-03-28 12:20:07 -07:00
Koushik Dutta
ceda54f91b rebroadcast: support recording truncation 2023-03-28 12:19:38 -07:00
Koushik Dutta
1d4052b839 common: simplify some socket utils 2023-03-28 10:26:48 -07:00
Koushik Dutta
6a5d6e6617 predict: cleanups 2023-03-28 10:26:43 -07:00
Koushik Dutta
f55cc6066f common: simplify some socket utils 2023-03-28 10:25:50 -07:00
Brett Jia
527714e434 arlo: camera [spot,flood]lights, sirens + only use interfaces when hardware supports it (#660)
* only create vss and siren for supported basestation models

* VideoClips only if camera has cloud recording + start of Cameras as DeviceProviders

* make verbose logging a boolean toggle

* camera spotlights and floodlights

* tweak video clip delete warning

* bump 0.7.5 for beta

* bump 0.7.6 for release + pin deps

* expose sirens on supported cameras

* bump 0.7.7 for release
2023-03-27 16:43:23 -07:00
Koushik Dutta
8a1633ffa3 tensorflow: reduce dependencies for new pipeline 2023-03-27 12:23:44 -07:00
Koushik Dutta
56b2ab9c4f prerelease 2023-03-27 11:53:24 -07:00
Koushik Dutta
d330e2eb9d server: remove os machine usage which only exists in recent node builds 2023-03-27 11:53:19 -07:00
Koushik Dutta
b55e7cacb3 predict: remove old pipline code 2023-03-27 11:14:53 -07:00
Koushik Dutta
c70375db06 prerelease 2023-03-27 09:37:39 -07:00
Koushik Dutta
2c23021d40 server: catch/print startup errors to console and not just events tab 2023-03-27 09:37:29 -07:00
Koushik Dutta
84a4ef4539 mac: reorder unpin 2023-03-27 09:02:37 -07:00
Koushik Dutta
7f3db0549b python-codecs: update requirements.txt 2023-03-27 08:52:20 -07:00
Koushik Dutta
de0e1784a3 amcrest: fix camera default name 2023-03-27 08:50:01 -07:00
Koushik Dutta
5a8798638e homekit: do not start two way audio if only an rtcp packet is received 2023-03-27 08:48:40 -07:00
Koushik Dutta
14da49728c videoanalysis: remove old pipeline 2023-03-26 23:28:52 -07:00
Koushik Dutta
55423b2d09 videoanalysis: yuv/gray extraction fixes 2023-03-26 23:03:08 -07:00
Koushik Dutta
596106247b python-codecs: fix libav and pil issues 2023-03-26 22:43:13 -07:00
Koushik Dutta
5472d90368 opencv: beta 2023-03-26 19:21:22 -07:00
Koushik Dutta
fcf58413fc prebeta 2023-03-26 12:25:30 -07:00
Koushik Dutta
0d03b91753 server: add query tokens to env auth 2023-03-26 12:25:23 -07:00
Koushik Dutta
2fd088e4d6 prebeta 2023-03-26 12:09:21 -07:00
Koushik Dutta
c6933198b2 server: autocreate admin if specified by env 2023-03-26 12:09:15 -07:00
Koushik Dutta
210e684a22 docker: fix watchtower scope https://github.com/koush/scrypted/issues/662 2023-03-26 11:38:38 -07:00
Koushik Dutta
53cc4b6ef3 python-codecs: fix older version of pil 2023-03-26 11:36:09 -07:00
Koushik Dutta
d58d138a68 mac: trim deps, unpin hacked up gst libs 2023-03-25 22:03:14 -07:00
Koushik Dutta
c0199a2b76 mac: remove gstreamer hack from install script 2023-03-25 21:55:57 -07:00
Koushik Dutta
badb1905ce prerelease 2023-03-25 21:54:40 -07:00
Koushik Dutta
735c2dce7b Merge branch 'main' of github.com:koush/scrypted 2023-03-25 21:52:56 -07:00
Koushik Dutta
ffae3f246f python-codecs: fix mac crash 2023-03-25 21:52:51 -07:00
Koushik Dutta
31b424f89f server: mac python fixes 2023-03-25 21:52:32 -07:00
Brett Jia
3b7acc3a90 homekit: merge child lights into cameras (#659) 2023-03-25 20:09:42 -07:00
Koushik Dutta
7e66d1ac7f prebeta 2023-03-25 19:45:11 -07:00
Koushik Dutta
a613da069e server: relax failure on python arch mismatch 2023-03-25 19:45:05 -07:00
Koushik Dutta
40b73c6589 prebeta 2023-03-25 18:42:52 -07:00
Koushik Dutta
ef16ca83a2 server: detect python architecture vs machine mismatch 2023-03-25 18:42:39 -07:00
Koushik Dutta
76bf1d0d3f docker: rollback linux changes 2023-03-25 18:35:40 -07:00
Koushik Dutta
3d5ccf25d1 server: log host os specs 2023-03-25 15:05:08 -07:00
Koushik Dutta
36fcb713d9 videoanalysis: ffmpeg frame generator fixes 2023-03-25 15:04:40 -07:00
Koushik Dutta
e306631850 docker: arm fixes 2023-03-25 14:40:37 -07:00
Koushik Dutta
17400fa886 docker: arm fixes 2023-03-25 14:37:17 -07:00
Koushik Dutta
c6dc628616 docker: arm fixes 2023-03-25 14:31:40 -07:00
Koushik Dutta
f974653e73 videoanalysis: make new pipeline the default 2023-03-25 12:05:35 -07:00
Koushik Dutta
b83880a8a3 Merge branch 'main' of github.com:koush/scrypted 2023-03-25 11:34:37 -07:00
Koushik Dutta
ee4d8f52df pam-diff: fixup score reporting 2023-03-25 11:34:33 -07:00
Brett Jia
3854b75c6e arlo: video clips + virtual security system for sirens (#656)
* fix doorbell device type

* bump 0.7.1 for beta

* standalone camera fixes

* bump 0.7.2 for beta

* more type annotations + trickle discover all devices

* fetch arlo library clips

* log options

* cache library at lower level and fetch clips on demand

* move library timedelta range lower in stack

* wip siren as security system

* virtual security system and tweaks

* vss documentation and settings

* expand vss usage docs

* more docs changes

* force homekit and scrypted to update given vss and siren state

* RE-ENABLING SIREN!!!

* bump 0.7.3 for beta

* bump 0.7.3 for release
2023-03-25 11:13:28 -07:00
Koushik Dutta
07c3173506 docker: fix pip execution command 2023-03-25 10:43:12 -07:00
Koushik Dutta
2894ab1b96 prerelease 2023-03-25 09:28:26 -07:00
Koushik Dutta
99995ea882 server: start watchdog/stats after plugin dependency installation completes 2023-03-25 09:27:04 -07:00
Koushik Dutta
d6560fbbe4 prerelease 2023-03-24 21:50:42 -07:00
Koushik Dutta
7205583104 prebeta 2023-03-24 20:45:10 -07:00
Koushik Dutta
8479a16d3d vscode-typescript: update sample 2023-03-24 20:21:11 -07:00
Koushik Dutta
409aad4794 videoanalysis: publish 2023-03-24 20:20:22 -07:00
Koushik Dutta
a29d009e5c sdk: update 2023-03-24 20:19:48 -07:00
Koushik Dutta
6772419ccf rpc: async iterator close should happen silently 2023-03-24 20:19:41 -07:00
Koushik Dutta
38746ee743 homekit: publish beta 2023-03-24 19:52:39 -07:00
Brett Jia
c5cb3ffa90 homekit: merge SecuritySystem & child Sirens as one Homekit accessory (#650)
* add OnOff to SecuritySystem accessory as a switch

* BFS to reorder devices + merge and skip devices

* add some comments

* more safety checks

* embarrassing moment where I forgot this isn't BFS
2023-03-24 19:52:10 -07:00
Brett Jia
e119056267 actions: tests for platform-specific install scripts (#653)
* Create test.yml

* debugging

* Update install-scrypted-dependencies-linux.sh

* Update install-scrypted-dependencies-linux.sh

* Update test.yml

* Update install-scrypted-dependencies-linux.sh

* Update test.yml

* Update test.yml

* Update test.yml

* Run for only certain paths
2023-03-24 08:23:08 -07:00
Koushik Dutta
590ad3de37 Merge branch 'main' of github.com:koush/scrypted 2023-03-23 19:59:47 -07:00
Koushik Dutta
6cd412de88 detect: add format hints 2023-03-23 19:59:26 -07:00
Koushik Dutta
33ca0242b1 videoanalysis: dps tracker 2023-03-23 19:42:17 -07:00
Koushik Dutta
68d3f10888 rtsp server: fix URL quirk in electron 2023-03-23 19:42:00 -07:00
Koushik Dutta
7a844aac84 sdk: format hints on video frame 2023-03-23 19:41:45 -07:00
Koushik Dutta
6f2bb9fd9e server: hack fix python sdk path 2023-03-23 00:37:17 -07:00
Koushik Dutta
12e47993a4 server: electron environment fixes 2023-03-22 22:50:02 -07:00
Koushik Dutta
b0396b77bd server: serialization intrinsic for Uint8Array 2023-03-22 22:49:28 -07:00
Koushik Dutta
07c2314376 server: update package lock 2023-03-22 19:52:06 -07:00
Koushik Dutta
cee140e49f sort-tracker: publish 2023-03-22 19:51:52 -07:00
Koushik Dutta
a3963af6e7 prebeta 2023-03-22 14:47:32 -07:00
Koushik Dutta
8ff28418b3 mac: install cmake 2023-03-22 14:13:56 -07:00
Koushik Dutta
08a5c2f2b3 docker: set SCRYPTED_BASE_VERSION 2023-03-22 14:00:22 -07:00
Koushik Dutta
286bd5b19e docker: set SCRYPTED_BASE_VERSION 2023-03-22 13:58:01 -07:00
Koushik Dutta
59f3c2e3ad server: add mechanism to force pip/npm install rerun on upgrade 2023-03-22 13:54:04 -07:00
Koushik Dutta
ea1b394061 tensorflow-lite: publish 2023-03-22 13:27:25 -07:00
Koushik Dutta
5dc1af76e8 Merge branch 'main' of github.com:koush/scrypted 2023-03-22 13:15:42 -07:00
Koushik Dutta
771bbd834b python-codecs: use pillow-simd if possible 2023-03-22 13:15:35 -07:00
Alex Leeds
418724f860 ring: fix video clip thumbnails (#651) 2023-03-22 13:12:42 -07:00
Koushik Dutta
2ecf48bc60 python-codecs: add Pillow fallback 2023-03-22 13:08:32 -07:00
Koushik Dutta
d19b942d2c videoanalysis: remove kernel monkey patch 2023-03-21 23:14:33 -07:00
Koushik Dutta
08e724759d videoanalysis: use deterministic defaultsg 2023-03-21 23:06:34 -07:00
Koushik Dutta
80031bc80b videoanalysis: publish 2023-03-21 23:00:45 -07:00
Koushik Dutta
beb53c672c videoanalysis: include ffmpeg frame grabber 2023-03-21 23:00:08 -07:00
Koushik Dutta
0dc75bf737 prebeta 2023-03-21 21:23:51 -07:00
Koushik Dutta
59008fb964 server: fix bug where python async generator aclose is not called on rpc objects 2023-03-21 21:16:08 -07:00
Koushik Dutta
b119e5ee00 videoanalsyis: log when image is saved as jpeg 2023-03-21 16:22:40 -07:00
Koushik Dutta
01d0f4c72a pam-diff: new pipeline support 2023-03-21 16:17:41 -07:00
Koushik Dutta
9fe3f1a4db docker: add libjpeg-dev 2023-03-21 08:57:30 -07:00
Koushik Dutta
60bf112ebd reolnk: remove hikvision default name 2023-03-21 08:56:43 -07:00
Koushik Dutta
45aa443889 homekit: beta 2023-03-21 08:55:14 -07:00
Koushik Dutta
08f4922860 docker: add libjpeg-dev 2023-03-21 08:52:39 -07:00
Koushik Dutta
899970405a sdk: fix literals and unions 2023-03-20 23:22:46 -07:00
Koushik Dutta
b4a3960e43 Merge branch 'main' of github.com:koush/scrypted 2023-03-20 23:20:24 -07:00
Koushik Dutta
0514e62d78 mqtt: make it fork compatible 2023-03-20 23:20:19 -07:00
Alex Leeds
3621e58d4c hap: remove persistence from camera type (#649) 2023-03-20 20:51:55 -07:00
Koushik Dutta
506b24026f docker: Fix armv7 check 2023-03-20 20:22:44 -07:00
Koushik Dutta
98b67f5d56 docker: Fix armv7l detection 2023-03-20 19:21:27 -07:00
Koushik Dutta
33c95aa0e8 prebeta 2023-03-20 17:18:45 -07:00
Koushik Dutta
7d8f86bb6c sdk: dont add sourcemap if none was generated 2023-03-20 17:18:36 -07:00
Koushik Dutta
d6717cc58b server: add additional plugin runtime hooks for electron 2023-03-20 17:18:18 -07:00
Koushik Dutta
673f8e3b2a docker: trim dependencies further 2023-03-20 17:13:03 -07:00
Koushik Dutta
cae87ba414 docker: reorder 2023-03-20 16:35:55 -07:00
Koushik Dutta
13362fd53e docker: remove ffmpeg, use node static binary, and remove gstreamer ugly plugins 2023-03-20 16:35:01 -07:00
Koushik Dutta
d9f2ba0665 docker: further reduce dependencies 2023-03-20 16:31:24 -07:00
Koushik Dutta
64a0f90a9a docker: reduce dependencies for non arm7, pil will have wheels 2023-03-20 16:19:26 -07:00
Koushik Dutta
88300910a2 detect: clean up requirements 2023-03-20 16:18:36 -07:00
Koushik Dutta
7face43d54 python-codecs: fix decoder selection getting clobbered 2023-03-20 15:50:07 -07:00
Koushik Dutta
6a9f35ce2a docker: undo typing change 2023-03-20 14:07:52 -07:00
Koushik Dutta
effe76f251 docker: update massive nvidia build 2023-03-20 13:30:10 -07:00
Koushik Dutta
58d5539cb8 Merge branch 'main' of github.com:koush/scrypted 2023-03-20 13:29:33 -07:00
Koushik Dutta
d956ee06d0 tensorflow: update to new api, add opencv dep 2023-03-20 13:29:28 -07:00
Alex Leeds
8ddf91d13b ring: fix location mode subscriptions (#646)
* ring: fix location mode subscriptions

* Update package-lock.json

* ring: probe devices after discovery
2023-03-20 11:28:50 -07:00
Koushik Dutta
3f65cd4f6d Update Dockerfile.nvidia 2023-03-20 08:43:50 -07:00
Koushik Dutta
3ffdbf9d2b Update Dockerfile.nvidia 2023-03-20 08:43:20 -07:00
Koushik Dutta
a51754b0e3 docker: add tensorflow nvidia support 2023-03-20 08:42:28 -07:00
slyoldfox
e8ee21e567 btcino 0.0.7 / sip 0.0.6 (#644)
* * Fix an issues in SIP.js where the ACK and BYE replies didn't go to the correct uri

* * Implemented outgoing SIP MESSAGE sending
* Adding voice mail check
* Adding a lock for a bticino doorbell

* Cleanup dependencies, code in sip, bticino plugins

* Cleanup dependencies, code in sip, bticino plugins

* Clear stale devices from our map and clear the voicemail check

* Do not require register() for a SIP call

* Narrow down the event matching to deletes of devices

* Use releaseDevice to clean up stale entries

* Fix uuid version

* Attempt to make two way audio work

* Attempt to make two way audio work - fine tuning

* Enable incoming doorbell events

* SipCall was never a "sip call" but more like a manager
SipSession was more the "sip call"

* * Rename sip registered session to persistent sip manager
* Allow handling of call pickup in homekit (hopefully!)

* * use the consoles from the camera object

* * use the consoles from the camera object

* * Fix the retry timer

* * Added webhook url

* * parse record route correctly

* * Add gruu and use a custom fork of sip.js which supports keepAlive SIP clients (and dropped Websocket)
* use cross-env in package.json

* Added webhook urls for faster handling of events

* Added videoclips

* plugins/sip 0.0.6

* plugins/bticino 0.0.7
2023-03-20 07:19:08 -07:00
Koushik Dutta
420f070035 prebeta 2023-03-19 18:27:25 -07:00
Koushik Dutta
c78cbc04d3 server: add non invoking entry point 2023-03-19 18:27:21 -07:00
Koushik Dutta
dddf565fbe prebeta 2023-03-19 18:26:42 -07:00
Koushik Dutta
0516ca810d server: add non invoking entry point 2023-03-19 18:26:28 -07:00
Alex Leeds
fac67696a9 ring: add lights, switches & outlets (#642) 2023-03-19 14:59:14 -07:00
Koushik Dutta
c62d4bd3fd prebeta 2023-03-19 14:53:32 -07:00
Koushik Dutta
877e1d4992 server: export start promise to wait for https server 2023-03-19 14:53:26 -07:00
Koushik Dutta
35b5cddd95 Merge branch 'main' of github.com:koush/scrypted 2023-03-19 14:46:51 -07:00
Koushik Dutta
a86fb128d9 prebeta 2023-03-19 14:46:42 -07:00
Koushik Dutta
983daae971 server: expose gc programatically 2023-03-19 14:46:37 -07:00
Koushik Dutta
9b687e3286 prebeta 2023-03-19 14:41:16 -07:00
Koushik Dutta
abfd0ffe35 server: add explicit hook for main file 2023-03-19 14:41:02 -07:00
Alex Leeds
407afa1d8c ring: add glass break & mailbox sensor (#641)
* ring: add glass break sensor

* ring: add beams motion sensor
2023-03-19 08:55:56 -07:00
Koushik Dutta
9bafe97ef6 sdk: updatre 2023-03-18 22:12:09 -07:00
Koushik Dutta
cb151e79d8 Merge branch 'main' of github.com:koush/scrypted 2023-03-18 20:43:33 -07:00
Koushik Dutta
7e6230d7b0 onvif: make relative movement the ptz default 2023-03-18 20:43:23 -07:00
Alex Leeds
7d95de389a ring: split location and camera from main file (#640) 2023-03-18 20:18:56 -07:00
Koushik Dutta
2ce187bc98 snapshot: readd timeout that got lost during vips revert 2023-03-18 17:11:20 -07:00
Koushik Dutta
100671265e opencv: fix frame import from buffer in new pipeline 2023-03-18 17:00:14 -07:00
Koushik Dutta
965d5af631 Merge remote-tracking branch 'origin/hap' 2023-03-18 16:59:43 -07:00
Koushik Dutta
a19f356a66 server: start python plugins outside of exception handling if gi is unavailable 2023-03-18 14:25:27 -07:00
Alex Leeds
a520357a23 hap: fix camera init without sensor (#639) 2023-03-18 14:01:34 -07:00
Koushik Dutta
d92d130a7c Merge branch 'main' of github.com:koush/scrypted 2023-03-18 13:57:48 -07:00
Koushik Dutta
c8dd7d2f04 mac: include libav codecs 2023-03-18 13:57:42 -07:00
Koushik Dutta
b85b589675 detect: VAAPI crash fix, avoid decodebin usage if possible 2023-03-18 13:57:24 -07:00
Alex Leeds
9b4cbed28f ring: restructure plugin (#638) 2023-03-18 13:03:08 -07:00
Brett Jia
6b1794d32f remote: add reconnect and disable WIP mediaobject converter (#637) 2023-03-18 11:19:48 -07:00
Koushik Dutta
aefe4b6849 Merge branch 'main' of github.com:koush/scrypted 2023-03-18 10:40:22 -07:00
Koushik Dutta
a68395174a python-codecs: add missing band extraction named argument 2023-03-18 10:40:16 -07:00
Brett Jia
8a56e789b7 arlo: add basestation and basestation siren + other tweaks (#636)
* configure stream refresh

* use modelId directly

* bump 0.6.8

* lower refresh rate to 20 min

* basestations as DeviceProviders + various type annotations

* reorder

* trickle discover basestations to avoid clobbering cameras

* generalize device creation + start of siren

* functional basestation siren

* bump 0.7.0 for beta
2023-03-18 10:26:02 -07:00
Koushik Dutta
06ef146c5b Merge remote-tracking branch 'origin/hap' 2023-03-18 09:20:55 -07:00
Koushik Dutta
4121cbd400 prerelease 2023-03-18 08:05:24 -07:00
Koushik Dutta
2d3bb8798d server: disable python stdout buffering 2023-03-18 08:05:14 -07:00
Koushik Dutta
b7b6ac0f87 python-codecs: fix python3.7 maybe 2023-03-17 23:54:32 -07:00
Koushik Dutta
e5fb65d75e prerelease 2023-03-17 23:42:47 -07:00
Koushik Dutta
290b73f3d9 python-codecs: fix hw acceleration 2023-03-17 23:42:33 -07:00
Koushik Dutta
f717e87306 snapshot: include ffmpeg path 2023-03-17 23:37:20 -07:00
Koushik Dutta
b80ac7c60d prebeta 2023-03-17 23:21:33 -07:00
Koushik Dutta
997a4732ec server: additional python rpc transport fixes 2023-03-17 23:21:07 -07:00
Koushik Dutta
6e08f11578 snapshot/python-codecs: move high performance native image library to larger package as optional dependency 2023-03-17 22:58:29 -07:00
Koushik Dutta
87c4814e6f prebeta 2023-03-17 22:22:39 -07:00
Koushik Dutta
2e0e009719 server: update publish scripts 2023-03-17 22:22:30 -07:00
Koushik Dutta
77399038e9 server: clean up python rpc transports 2023-03-17 22:21:07 -07:00
Koushik Dutta
fae66619fb prepublish 2023-03-17 19:16:50 -07:00
Koushik Dutta
d979b9ec0c server: connection.poll should provide None to block forever 2023-03-17 19:16:15 -07:00
Koushik Dutta
975319a65d motion: implement a default inclusion zone that prevents on screen clocks from triggering motion 2023-03-17 16:19:50 -07:00
Koushik Dutta
7b5aa4ba2d python-codecs: remove erroneous libav from gstreamer settings 2023-03-17 16:19:20 -07:00
Koushik Dutta
670739c82b python-codecs: restructure, add gstreamer decoder option 2023-03-17 10:28:41 -07:00
Koushik Dutta
8511bd15a8 server: update package lock 2023-03-16 23:59:19 -07:00
Koushik Dutta
06d3c89274 prepublish 2023-03-16 23:59:10 -07:00
Koushik Dutta
e13f3eb2f1 server: add python forked processes to stats 2023-03-16 23:59:01 -07:00
Koushik Dutta
001918d613 predict: fix detections from webui 2023-03-16 23:58:45 -07:00
Koushik Dutta
c859c3aa40 detect: publish plugins with new video pipeline support 2023-03-16 23:40:33 -07:00
Koushik Dutta
2bce019677 predict: make models a separate download 2023-03-16 23:29:02 -07:00
Koushik Dutta
6ba3386157 detect: fix peer kill causing exception inside finally handler 2023-03-16 22:10:25 -07:00
Koushik Dutta
51e66d98f9 videoanalysis: changing motion detect mode should restart motion detection 2023-03-16 22:09:56 -07:00
Koushik Dutta
6484804649 server: update package lock 2023-03-16 20:37:54 -07:00
Koushik Dutta
b2a05c099d prepublish 2023-03-16 20:37:42 -07:00
Koushik Dutta
898331da4c Merge branch 'main' of github.com:koush/scrypted 2023-03-16 20:37:33 -07:00
Koushik Dutta
9044e782b2 python-codecs: add gray decoding support 2023-03-16 20:37:28 -07:00
Koushik Dutta
aedb985941 detect: support motion on new pipeline 2023-03-16 20:37:12 -07:00
Koushik Dutta
9ba22e4058 server: fix python rpc kill handling 2023-03-16 20:33:09 -07:00
Alex Leeds
ab0afb61ae ring: add video clips support (#635)
* ring: add video clips support

* fix merge
2023-03-16 18:40:36 -07:00
Alex Leeds
bf00ba0adc ring: add support for locks (#634) 2023-03-16 18:32:20 -07:00
Koushik Dutta
d564cf1b62 server: update package lock 2023-03-16 11:13:24 -07:00
Koushik Dutta
544dfb3b24 Update rtsp-proxy.ts 2023-03-16 10:40:19 -07:00
Alex Leeds
21eeab6c3c hap: fix characteristic warnings (#621)
* hap: fix characteristic warnings

* hap: add avahi support through docker compose and add docs
2023-03-16 10:39:52 -07:00
Koushik Dutta
cf9af910be rtsp: rtsp proxy example 2023-03-16 10:03:24 -07:00
Koushik Dutta
e2e65f93af prepublish 2023-03-16 09:37:34 -07:00
Koushik Dutta
b271567428 server: Fix device initialization on first report 2023-03-16 09:37:25 -07:00
Koushik Dutta
a88a295d9a server: fixup project file 2023-03-15 23:09:16 -07:00
Koushik Dutta
38ba31ca7d tensorflow-lite: use multiple tpu 2023-03-15 23:08:48 -07:00
Koushik Dutta
1c8ff2493b coreml: move prediction onto background thread 2023-03-15 23:04:45 -07:00
Koushik Dutta
5c9f62e6b6 videoanalysis: add snapshot pipeline 2023-03-15 23:04:13 -07:00
Koushik Dutta
6fd8018c52 python-codecs: fix nre 2023-03-15 23:02:50 -07:00
Koushik Dutta
d900ddf5f1 mac: fix erroneous typing installation 2023-03-15 21:54:17 -07:00
Koushik Dutta
e3a8d311ce python-codecs: add libav support 2023-03-15 20:33:44 -07:00
Koushik Dutta
8bbc3d5470 videoanalysis: generator cleanup 2023-03-15 17:18:28 -07:00
Koushik Dutta
00cf987cec videoanalysis: reimplemnet snapshots for new pipeline 2023-03-15 17:03:34 -07:00
Koushik Dutta
7e5dcae64a webrtc/alexa: add option to disable TURN on peers that already have externally reachable addresses 2023-03-15 10:31:25 -07:00
Koushik Dutta
cb67237d7c server: update package lock 2023-03-15 01:28:39 -07:00
Koushik Dutta
4be848c440 prepublish 2023-03-15 01:28:05 -07:00
Koushik Dutta
b33422b066 server: fix python fork hangs 2023-03-15 01:28:01 -07:00
Koushik Dutta
77418684da server: publish 2023-03-14 23:50:22 -07:00
Koushik Dutta
08cf9f7774 prepublish 2023-03-14 23:49:51 -07:00
Koushik Dutta
9f2fabf9c0 Merge branch 'main' of github.com:koush/scrypted 2023-03-14 23:47:24 -07:00
Koushik Dutta
e2e1c7be44 server: remove python log statement 2023-03-14 23:47:05 -07:00
Koushik Dutta
ba030ba197 server: fix multiprocessing blocking read on linux 2023-03-14 23:45:06 -07:00
Koushik Dutta
a4f37bdc16 snapshot: publish 2023-03-14 23:42:33 -07:00
Koushik Dutta
f6c7b00562 tensorflow-lite: fix numpy serialization issue 2023-03-14 23:41:55 -07:00
Koushik Dutta
b951614f7c Merge branch 'main' of github.com:koush/scrypted 2023-03-14 20:13:28 -07:00
Koushik Dutta
f1dfdb3494 coreml: revert tracker dependency removal 2023-03-14 20:13:22 -07:00
Nick Berardi
ffbd25b13b alexa: set screen ratio to 720p (#625) 2023-03-14 18:40:47 -07:00
Koushik Dutta
4f03fe2420 docker: fix pyvips cffi mismatch 2023-03-14 18:00:10 -07:00
Koushik Dutta
ffdb386afa mac: include libvips in installer 2023-03-14 17:25:47 -07:00
Koushik Dutta
9eeeaa79d0 docker: include libvips 2023-03-14 16:08:22 -07:00
Koushik Dutta
4163142d1e Merge branch 'main' of github.com:koush/scrypted 2023-03-14 15:45:35 -07:00
Koushik Dutta
71cddc67e0 predict: publish new pipeline support 2023-03-14 15:45:30 -07:00
Alex Leeds
2cbc4eb54f eufy: support multiple p2p streams (#624) 2023-03-14 15:26:46 -07:00
Koushik Dutta
fc94fb4221 core: republish 2023-03-14 15:21:13 -07:00
Koushik Dutta
85ed41c590 server: publish 2023-03-14 15:15:09 -07:00
Koushik Dutta
59f889a200 prepublish 2023-03-14 15:15:05 -07:00
Koushik Dutta
18c6edd310 homekit: beta 2023-03-09 08:13:37 -08:00
Koushik Dutta
a1d7a0d9ca homekit: fixup hap recordign cleanup 2023-03-08 15:34:17 -08:00
Koushik Dutta
5d5078534d homekit: fixup hap implementation 2023-03-08 15:08:22 -08:00
Koushik Dutta
537a968e2e Merge remote-tracking branch 'alex/hap' into hap 2023-03-08 13:41:49 -08:00
Alex Leeds
4520d1d29f homekit: update hap 2023-03-08 13:07:59 -05:00
477 changed files with 41876 additions and 48912 deletions

View File

@@ -1,50 +0,0 @@
name: Publish Scrypted (git HEAD)
on:
workflow_dispatch:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
strategy:
matrix:
node: ["16-bullseye"]
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to Github Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image (scrypted)
uses: docker/build-push-action@v2
with:
build-args: BASE=${{ matrix.node }}
context: .
file: docker/Dockerfile.HEAD
platforms: linux/amd64,linux/arm64,linux/armhf
push: true
tags: |
koush/scrypted:HEAD
ghcr.io/koush/scrypted:HEAD
cache-from: type=gha
cache-to: type=gha,mode=max

View File

@@ -2,54 +2,70 @@ name: Publish Scrypted Common
on:
workflow_dispatch:
release:
types: [published]
schedule:
# publish the common base once a month.
- cron: '30 8 2 * *'
jobs:
push_to_registry:
build:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
runs-on: self-hosted
# runs-on: ubuntu-latest
strategy:
matrix:
NODE_VERSION: ["18"]
BUILDPACK_DEPS_BASE: ["bullseye"]
BASE: ["jammy"]
FLAVOR: ["full", "lite", "thin"]
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Set up SSH
uses: MrSquaare/ssh-setup-action@v2
with:
host: Koushik-MacStudio
private-key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
- name: Set up SSH
uses: MrSquaare/ssh-setup-action@v2
with:
host: raspberrypi
private-key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
platforms: linux/arm64,linux/armhf
append: |
- endpoint: ssh://koush@Koushik-MacStudio
platforms: linux/arm64
- endpoint: ssh://koush@raspberrypi
platforms: linux/armhf
- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to Github Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image (scrypted-common)
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
build-args: NODE_VERSION=${{ matrix.NODE_VERSION }}
context: docker/
file: docker/Dockerfile.${{ matrix.FLAVOR }}
platforms: linux/amd64,linux/arm64,linux/armhf
build-args: |
NODE_VERSION=${{ matrix.NODE_VERSION }}
BASE=${{ matrix.BASE }}
context: install/docker/
file: install/docker/Dockerfile.${{ matrix.FLAVOR }}
platforms: linux/amd64,linux/armhf,linux/arm64
push: true
tags: |
koush/scrypted-common:${{ matrix.NODE_VERSION }}-${{ matrix.BUILDPACK_DEPS_BASE }}-${{ matrix.FLAVOR }}
# ${{ matrix.NODE_VERSION == '16-bullseye' && 'koush/scrypted-common:latest' || '' }}
koush/scrypted-common:${{ matrix.NODE_VERSION }}-${{ matrix.BASE }}-${{ matrix.FLAVOR }}
cache-from: type=gha
cache-to: type=gha,mode=max

View File

@@ -1,48 +1,67 @@
name: Publish Scrypted
name: Publish Scrypted Docker Image
on:
workflow_dispatch:
inputs:
docker_tag:
description: 'Docker Tag'
tag:
description: "The npm tag used to build the Docker image. The tag will be resolved as a specific version on npm, and that will be used to version the docker image."
required: true
package_version:
description: 'Package Version'
publish_tag:
description: "The versioned tag for the published Docker image. NPM will use the minor version, Docker should only specify a patch version."
required: false
release:
types: [published]
jobs:
push_to_registry:
build:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
runs-on: self-hosted
# runs-on: ubuntu-latest
strategy:
matrix:
BASE: ["18-bullseye-full", "18-bullseye-lite", "18-bullseye-thin"]
BASE: ["18-jammy-full", "18-jammy-lite", "18-jammy-thin"]
SUPERVISOR: ["", ".s6"]
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
- name: NPM Package Request
id: npm-request
uses: fjogeleit/http-request-action@v1
with:
path: server
url: 'https://registry.npmjs.org/@scrypted/server'
method: 'GET'
- name: Print Version
run: echo "Version ${{ github.event.inputs.package_version || steps.package-version.outputs.current-version }}"
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Set NPM Version
id: package-version
run: echo "NPM_VERSION=${{ fromJson(steps.npm-request.outputs.response)['dist-tags'][ github.event.inputs.tag] }}" >> "$GITHUB_OUTPUT"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up SSH
uses: MrSquaare/ssh-setup-action@v2
with:
host: Koushik-MacStudio
private-key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
- name: Set up SSH
uses: MrSquaare/ssh-setup-action@v2
with:
host: raspberrypi
private-key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/arm64,linux/armhf
append: |
- endpoint: ssh://koush@Koushik-MacStudio
# platforms: linux/arm64
platforms: linux/arm64
- endpoint: ssh://koush@raspberrypi
platforms: linux/armhf
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
@@ -56,25 +75,31 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image (scrypted)
uses: docker/build-push-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
build-args: |
BASE=${{ matrix.BASE }}
SCRYPTED_INSTALL_VERSION=${{ github.event.inputs.package_version }}
context: docker/
file: docker/Dockerfile${{ matrix.SUPERVISOR }}
SCRYPTED_INSTALL_VERSION=${{ steps.package-version.outputs.NPM_VERSION }}
context: install/docker/
file: install/docker/Dockerfile${{ matrix.SUPERVISOR }}
platforms: linux/amd64,linux/arm64,linux/armhf
push: true
tags: |
${{ format('koush/scrypted:{0}{1}-v{2}', matrix.BASE, matrix.SUPERVISOR, github.event.inputs.package_version || steps.package-version.outputs.current-version) }}
${{ matrix.BASE == '18-bullseye-full' && matrix.SUPERVISOR == '.s6' && format('koush/scrypted:{0}', github.event.inputs.docker_tag) || '' }}
${{ github.event.inputs.docker_tag == 'latest' && matrix.BASE == '18-bullseye-lite' && matrix.SUPERVISOR == '' && 'koush/scrypted:lite' || '' }}
${{ github.event.inputs.docker_tag == 'latest' && matrix.BASE == '18-bullseye-thin' && matrix.SUPERVISOR == '' && 'koush/scrypted:thin' || '' }}
${{ format('koush/scrypted:{0}{1}-v{2}', matrix.BASE, matrix.SUPERVISOR, github.event.inputs.publish_tag || steps.package-version.outputs.NPM_VERSION) }}
${{ matrix.BASE == '18-jammy-full' && matrix.SUPERVISOR == '.s6' && format('koush/scrypted:{0}', github.event.inputs.tag) || '' }}
${{ github.event.inputs.tag == 'latest' && matrix.BASE == '18-jammy-full' && matrix.SUPERVISOR == '' && 'koush/scrypted:full' || '' }}
${{ github.event.inputs.tag == 'latest' && matrix.BASE == '18-jammy-lite' && matrix.SUPERVISOR == '' && 'koush/scrypted:lite' || '' }}
${{ github.event.inputs.tag == 'latest' && matrix.BASE == '18-jammy-thin' && matrix.SUPERVISOR == '' && 'koush/scrypted:thin' || '' }}
${{ github.event.inputs.tag == 'latest' && matrix.BASE == '18-jammy-lite' && matrix.SUPERVISOR == '.s6' && 'koush/scrypted:lite-s6' || '' }}
${{ github.event.inputs.tag == 'latest' && matrix.BASE == '18-jammy-thin' && matrix.SUPERVISOR == '.s6' && 'koush/scrypted:thin-s6' || '' }}
${{ format('ghcr.io/koush/scrypted:{0}{1}-v{2}', matrix.BASE, matrix.SUPERVISOR, github.event.inputs.package_version || steps.package-version.outputs.current-version) }}
${{ matrix.BASE == '18-bullseye-full' && matrix.SUPERVISOR == '.s6' && format('ghcr.io/koush/scrypted:{0}', github.event.inputs.docker_tag) || '' }}
${{ github.event.inputs.docker_tag == 'latest' && matrix.BASE == '18-bullseye-lite' && matrix.SUPERVISOR == '' && 'ghcr.io/koush/scrypted:lite' || '' }}
${{ github.event.inputs.docker_tag == 'latest' && matrix.BASE == '18-bullseye-thin' && matrix.SUPERVISOR == '' && 'ghcr.io/koush/scrypted:thin' || '' }}
${{ format('ghcr.io/koush/scrypted:{0}{1}-v{2}', matrix.BASE, matrix.SUPERVISOR, github.event.inputs.publish_tag || steps.package-version.outputs.NPM_VERSION) }}
${{ matrix.BASE == '18-jammy-full' && matrix.SUPERVISOR == '.s6' && format('ghcr.io/koush/scrypted:{0}', github.event.inputs.tag) || '' }}
${{ github.event.inputs.tag == 'latest' && matrix.BASE == '18-jammy-full' && matrix.SUPERVISOR == '' && 'ghcr.io/koush/scrypted:full' || '' }}
${{ github.event.inputs.tag == 'latest' && matrix.BASE == '18-jammy-lite' && matrix.SUPERVISOR == '' && 'ghcr.io/koush/scrypted:lite' || '' }}
${{ github.event.inputs.tag == 'latest' && matrix.BASE == '18-jammy-thin' && matrix.SUPERVISOR == '' && 'ghcr.io/koush/scrypted:thin' || '' }}
${{ github.event.inputs.tag == 'latest' && matrix.BASE == '18-jammy-lite' && matrix.SUPERVISOR == '.s6' && 'ghcr.io/koush/scrypted:lite-s6' || '' }}
${{ github.event.inputs.tag == 'latest' && matrix.BASE == '18-jammy-thin' && matrix.SUPERVISOR == '.s6' && 'ghcr.io/koush/scrypted:thin-s6' || '' }}
cache-from: type=gha
cache-to: type=gha,mode=max

60
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,60 @@
name: Test
on:
push:
branches: ["main"]
paths: ["install/**", ".github/workflows/test.yml"]
pull_request:
paths: ["install/**", ".github/workflows/test.yml"]
workflow_dispatch:
jobs:
test_linux_local:
name: Test Linux local installation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run install script
run: |
cat ./install/local/install-scrypted-dependencies-linux.sh | sudo SERVICE_USER=$USER bash
- name: Test server is running
run: |
systemctl status scrypted.service
curl -k --retry 20 --retry-all-errors --retry-max-time 600 https://localhost:10443/
test_mac_local:
name: Test Mac local installation
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run install script
run: |
mkdir -p ~/.scrypted
bash ./install/local/install-scrypted-dependencies-mac.sh
- name: Test server is running
run: |
curl -k --retry 20 --retry-all-errors --retry-max-time 600 https://localhost:10443/
test_windows_local:
name: Test Windows local installation
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run install script
run: |
.\install\local\install-scrypted-dependencies-win.ps1
- name: Test server is running
run: |
curl -k --retry 20 --retry-all-errors --retry-max-time 600 https://localhost:10443/

2
.gitignore vendored
View File

@@ -1,2 +1,4 @@
.DS_Store
__pycache__
venv
.venv

8
.gitmodules vendored
View File

@@ -1,6 +1,3 @@
[submodule "plugins/homekit/HAP-NodeJS"]
path = external/HAP-NodeJS
url = ../../koush/HAP-NodeJS
[submodule "plugins/unifi-protect/src/unifi-protect"]
path = external/unifi-protect
url = ../../koush/unifi-protect.git
@@ -35,9 +32,6 @@
[submodule "plugins/sample-cameraprovider"]
path = plugins/sample-cameraprovider
url = ../../koush/scrypted-sample-cameraprovider
[submodule "plugins/tensorflow-lite/sort_oh"]
path = plugins/sort-tracker/sort_oh
url = ../../koush/sort_oh.git
[submodule "plugins/cloud/node-nat-upnp"]
path = plugins/cloud/node-nat-upnp
path = plugins/cloud/external/node-nat-upnp
url = ../../koush/node-nat-upnp.git

View File

@@ -1,58 +1,20 @@
# Scrypted
Scrypted is a high performance home video integration and automation platform.
* Video load instantly, everywhere: [Demo](https://www.reddit.com/r/homebridge/comments/r34k6b/if_youre_using_homebridge_for_cameras_ditch_it/)
* [HomeKit Secure Video Support](https://github.com/koush/scrypted/wiki/HomeKit-Secure-Video-Setup)
* Google Home support: "Ok Google, Stream Backyard"
* Alexa Support: Streaming to Alexa app on iOS/Android and Echo Show.
Scrypted is a high performance home video integration platform and NVR with smart detections. [Instant, low latency, streaming](https://streamable.com/xbxn7z) to HomeKit, Google Home, and Alexa. Supports most cameras. [Learn more](https://docs.scrypted.app).
<img width="400" alt="Scrypted_Management_Console" src="https://user-images.githubusercontent.com/73924/185666320-ae972867-6c2c-488a-8413-fd8a215e9fee.png">
<img src="https://github.com/koush/scrypted/assets/73924/57e1d556-cd3d-4448-81f9-a6c51b6513de">
# Installation
## Installation and Documentation
Select the appropriate guide. After installation is finished, remember to visit [HomeKit Secure Video Setup](https://github.com/koush/scrypted/wiki/HomeKit-Secure-Video-Setup).
Installation and camera onboarding instructions can be found in the [docs](https://docs.scrypted.app).
* [Raspberry Pi](https://github.com/koush/scrypted/wiki/Installation:-Raspberry-Pi)
* Linux
* [Docker Compose](https://github.com/koush/scrypted/wiki/Installation:-Docker-Compose-Linux) - This is the recommended method. Local installation may interfere with other server software.
* [Docker](https://github.com/koush/scrypted/wiki/Installation:-Docker-Linux) - Use Docker Compose. This is a reference documentation.
* [Local Installation](https://github.com/koush/scrypted/wiki/Installation:-Linux) - Use this if Docker scares you or whatever.
* Mac
* [Local Installation](https://github.com/koush/scrypted/wiki/Installation:-Mac)
<!-- * Docker Desktop is [not supported](https://github.com/koush/scrypted/wiki/Installation:-Docker-Desktop). -->
* Windows
* [Local Installation](https://github.com/koush/scrypted/wiki/Installation:-Windows)
* [WSL2 Installation](https://github.com/koush/scrypted/wiki/Installation:-WSL2-Windows)
<!-- * Docker Desktop is [not supported](https://github.com/koush/scrypted/wiki/Installation:-Docker-Desktop). -->
* [ReadyNAS: Docker](https://github.com/koush/scrypted/wiki/Installation:-Docker-ReadyNAS)
* [Synology: Docker](https://github.com/koush/scrypted/wiki/Installation:-Docker-Synology-NAS)
* [QNAP: Docker](https://github.com/koush/scrypted/wiki/Installation:-Docker-QNAP-NAS)
* [Unraid: Docker](https://github.com/koush/scrypted/wiki/Installation:-Docker-Unraid)
## Discord
Chat on Discord for support, tips, announcements, and bug reporting. There is an active and helpful community.
[Join Scrypted Discord](https://discord.gg/DcFzmBHYGq)
## Wiki
There are many topics covered in the [Scrypted Wiki](https://github.com/koush/scrypted/wiki) sidebar. Review them for documented support, tips, and guides before asking for assistance on GitHub or Discord.
## Supported Platforms
* Google Home
* Apple HomeKit
* Amazon Alexa
Supported accessories:
* Camera and Core Plugins: https://github.com/koush/scrypted/tree/main/plugins
* Community Plugins: https://github.com/orgs/scryptedapp/repositories
## Community
Scrypted has active communities on [Discord](https://discord.gg/DcFzmBHYGq), [Reddit](https://reddit.com/r/scrypted), and [Github](https://github.com/koush/scrypted). Check them out if you have questions!
## Development
## Debug Scrypted Plugins in VSCode
## Debug Scrypted Plugins in VS Code
```sh
# this is an example for homekit.
@@ -65,7 +27,7 @@ cd scrypted
code plugins/homekit
```
You can now launch (using the Start Debugging play button) the HomeKit Plugin in VSCode. Please be aware that you do *not* need to restart the Scrypted Server if you make changes to a plugin. Edit the plugin, launch, and the updated plugin will deploy on the running server.
You can now launch (using the Start Debugging play button) the HomeKit Plugin in VS Code. Please be aware that you do *not* need to restart the Scrypted Server if you make changes to a plugin. Edit the plugin, launch, and the updated plugin will deploy on the running server.
If you do not want to set up VS Code, you can also run build and install the plugin directly from the command line:
@@ -79,7 +41,7 @@ npm run build && npm run scrypted-deploy 127.0.0.1
Want to write your own plugin? Full documentation is available here: https://developer.scrypted.app
## Debug the Scrypted Server in VSCode
## Debug the Scrypted Server in VS Code
Debugging the server should not be necessary, as the server only provides the hosting and RPC mechanism for plugins. The following is for reference purpose. Most development can be done by debugging the relevant plugin.
@@ -93,4 +55,4 @@ cd scrypted
code server
```
You can now launch the Scrypted Server in VSCode.
You can now launch the Scrypted Server in VS Code.

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/common",
"version": "1.0.1",
"version": "1.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/common",
"version": "1.0.1",
"version": "1.0.2",
"license": "ISC",
"dependencies": {
"@scrypted/sdk": "file:../sdk",

View File

@@ -1,5 +1,6 @@
{
"name": "@scrypted/common",
"private": true,
"version": "1.0.1",
"description": "",
"main": "index.js",

171
common/src/async-queue.ts Normal file
View File

@@ -0,0 +1,171 @@
import { Deferred } from "./deferred";
class EndError extends Error {
}
export function createAsyncQueue<T>() {
let ended: Error | undefined;
const waiting: Deferred<T>[] = [];
const queued: { item: T, dequeued?: Deferred<void> }[] = [];
const dequeue = async () => {
if (queued.length) {
const { item, dequeued: enqueue } = queued.shift()!;
enqueue?.resolve();
return item;
}
if (ended)
throw ended;
const deferred = new Deferred<T>();
waiting.push(deferred);
return deferred.promise;
}
const submit = (item: T, dequeued?: Deferred<void>, signal?: AbortSignal) => {
if (ended)
return false;
if (waiting.length) {
const deferred = waiting.shift();
dequeued?.resolve();
deferred.resolve(item);
return true;
}
const qi = {
item,
dequeued,
};
queued!.push(qi);
signal?.addEventListener('abort', () => {
const index = queued.indexOf(qi);
if (index === -1)
return;
queued.splice(index, 1);
dequeued?.reject(new Error('abort'));
});
return true;
}
function queue() {
return (async function* () {
while (true) {
try {
const item = await dequeue();
yield item;
}
catch (e) {
if (e instanceof EndError)
return;
throw e;
}
}
})();
}
function clear(error?: Error) {
const ret: T[] = [];
const items = queued.splice(0, queued.length);
for (const item of items) {
if (error)
item.dequeued?.reject(error)
else
item.dequeued?.resolve(undefined);
ret.push(item.item);
}
return ret;
}
return {
clear() {
return clear();
},
queued,
async pipe(callback: (i: T) => void) {
for await (const i of queue()) {
callback(i as any);
}
},
submit(item: T, signal?: AbortSignal) {
return submit(item, undefined, signal);
},
end(e?: Error) {
if (ended)
return false;
// catch to prevent unhandled rejection.
ended = e || new EndError()
clear(e);
return true;
},
async enqueue(item: T, signal?: AbortSignal) {
const dequeued = new Deferred<void>();
if (!submit(item, dequeued, signal))
return false;
await dequeued.promise;
return true;
},
dequeue,
get queue() {
return queue();
}
}
}
// async function testSlowEnqueue() {
// const asyncQueue = createAsyncQueue<number>();
// asyncQueue.submit(-1);
// asyncQueue.submit(-1);
// asyncQueue.submit(-1);
// asyncQueue.submit(-1);
// (async () => {
// console.log('go');
// for (let i = 0; i < 10; i++) {
// asyncQueue.submit(i);
// await sleep(100);
// }
// asyncQueue.end(new Error('fail'));
// })();
// const runQueue = async (str?: string) => {
// for await (const n of asyncQueue.queue) {
// console.log(str, n);
// }
// }
// runQueue('start');
// setTimeout(runQueue, 400);
// }
// async function testSlowDequeue() {
// const asyncQueue = createAsyncQueue<number>();
// const runQueue = async (str?: string) => {
// for await (const n of asyncQueue.queue) {
// await sleep(100);
// }
// }
// runQueue()
// .catch(e => console.error('queue threw', e));
// console.log('go');
// for (let i = 0; i < 10; i++) {
// console.log(await asyncQueue.enqueue(i));
// console.log(i);
// }
// asyncQueue.end(new Error('fail'));
// console.log(await asyncQueue.enqueue(555));
// }
// testSlowDequeue();

View File

@@ -1,15 +1,17 @@
export class Deferred<T> {
finished = false;
resolve!: (value: T|PromiseLike<T>) => void;
reject!: (error: Error) => void;
resolve!: (value: T|PromiseLike<T>) => this;
reject!: (error: Error) => this;
promise: Promise<T> = new Promise((resolve, reject) => {
this.resolve = v => {
this.finished = true;
resolve(v);
return this;
};
this.reject = e => {
this.finished = true;
reject(e);
return this;
};
});
}

View File

@@ -4,8 +4,11 @@ import { EventEmitter } from 'events';
import { Server } from 'net';
import { Duplex } from 'stream';
import { cloneDeep } from './clone-deep';
import { Deferred } from "./deferred";
import { listenZeroSingleClient } from './listen-cluster';
import { ffmpegLogInitialOutput, safeKillFFmpeg, safePrintFFmpegArguments } from './media-helpers';
import { createRtspParser } from "./rtsp-server";
import { parseSdp } from "./sdp-utils";
import { StreamChunk, StreamParser } from './stream-parser';
const { mediaManager } = sdk;
@@ -57,9 +60,13 @@ export async function parseResolution(cp: ChildProcess) {
}
async function parseInputToken(cp: ChildProcess, token: string) {
let processed = 0;
return new Promise<string>((resolve, reject) => {
cp.on('exit', () => reject(new Error('ffmpeg exited while waiting to parse stream information: ' + token)));
const parser = (data: Buffer) => {
processed += data.length;
if (processed > 10000)
return resolve(undefined);
const stdout: string = data.toString().split('Output ')[0];
const idx = stdout.lastIndexOf(`${token}: `);
if (idx !== -1) {
@@ -77,7 +84,11 @@ async function parseInputToken(cp: ChildProcess, token: string) {
};
cp.stdout.on('data', parser);
cp.stderr.on('data', parser);
});
})
.finally(() => {
cp.stdout.removeAllListeners('data');
cp.stderr.removeAllListeners('data');
});
}
export async function parseVideoCodec(cp: ChildProcess) {
@@ -158,8 +169,6 @@ export async function startParserSession<T extends string>(ffmpegInput: FFmpegIn
const args = ffmpegInput.inputArguments.slice();
let needSdp = false;
const ensureActive = (killed: () => void) => {
if (!isActive) {
killed();
@@ -211,11 +220,6 @@ export async function startParserSession<T extends string>(ffmpegInput: FFmpegIn
}
}
if (needSdp) {
args.push('-sdp_file', `pipe:${pipeCount++}`);
stdio.push('pipe');
}
// start ffmpeg process with child process pipes
args.unshift('-hide_banner');
safePrintFFmpegArguments(console, args);
@@ -225,20 +229,7 @@ export async function startParserSession<T extends string>(ffmpegInput: FFmpegIn
ffmpegLogInitialOutput(console, cp, undefined, options?.storage);
cp.on('exit', () => kill(new Error('ffmpeg exited')));
let sdp: Promise<Buffer[]>;
if (needSdp) {
sdp = new Promise<Buffer[]>(resolve => {
const ret: Buffer[] = [];
cp.stdio[pipeCount - 1].on('data', buffer => {
ret.push(buffer);
resolve(ret);
});
})
}
else {
sdp = Promise.resolve([]);
}
const deferredStart = new Deferred<void>();
// now parse the created pipes
const start = () => {
for (const p of startParsers) {
@@ -257,6 +248,7 @@ export async function startParserSession<T extends string>(ffmpegInput: FFmpegIn
const { resetActivityTimer } = setupActivityTimer(container, kill, events, options?.timeout);
for await (const chunk of parser.parse(pipe as any, parseInt(inputVideoResolution?.[2]), parseInt(inputVideoResolution?.[3]))) {
await deferredStart.promise;
events.emit(container, chunk);
resetActivityTimer();
}
@@ -268,14 +260,26 @@ export async function startParserSession<T extends string>(ffmpegInput: FFmpegIn
});
};
// tbh parsing stdout is super sketchy way of doing this.
parseAudioCodec(cp).then(result => inputAudioCodec = result);
parseResolution(cp).then(result => inputVideoResolution = result);
await parseVideoCodec(cp).then(result => inputVideoCodec = result);
const rtsp = (options.parsers as any).rtsp as ReturnType<typeof createRtspParser>;
rtsp.sdp.then(sdp => {
const parsed = parseSdp(sdp);
const audio = parsed.msections.find(msection => msection.type === 'audio');
const video = parsed.msections.find(msection => msection.type === 'video');
inputVideoCodec = video?.codec;
inputAudioCodec = audio?.codec;
});
const sdp = new Deferred<Buffer[]>();
rtsp.sdp.then(r => sdp.resolve([Buffer.from(r)]));
killed.then(() => sdp.reject(new Error("ffmpeg killed before sdp could be parsed")));
start();
return {
start,
sdp,
start() {
deferredStart.resolve();
},
sdp: sdp.promise,
get inputAudioCodec() {
return inputAudioCodec;
},
@@ -361,8 +365,7 @@ export interface RebroadcasterOptions {
},
}
export async function handleRebroadcasterClient(duplex: Promise<Duplex> | Duplex, options?: RebroadcasterOptions) {
const socket = await duplex;
export function handleRebroadcasterClient(socket: Duplex, options?: RebroadcasterOptions) {
const firstWriteData = (data: StreamChunk) => {
if (data.startStream) {
socket.write(data.startStream)

View File

@@ -1,6 +1,6 @@
import net from 'net';
import { once } from 'events';
import dgram, { SocketType } from 'dgram';
import { once } from 'events';
import net from 'net';
export async function closeQuiet(socket: dgram.Socket | net.Server) {
if (!socket)
@@ -37,6 +37,23 @@ export async function createBindZero(socketType?: SocketType) {
return createBindUdp(0, socketType);
}
export async function createSquentialBindZero(socketType?: SocketType) {
let attempts = 0;
while (true) {
const rtpServer = await createBindZero(socketType);
try {
const rtcpServer = await createBindUdp(rtpServer.port + 1, socketType);
return [rtpServer, rtcpServer];
}
catch (e) {
attempts++;
closeQuiet(rtpServer.server);
}
if (attempts === 10)
throw new Error('unable to reserve sequential udp ports')
}
}
export async function reserveUdpPort() {
const udp = await createBindZero();
await new Promise(resolve => udp.server.close(() => resolve(undefined)));
@@ -62,4 +79,4 @@ export async function bind(server: dgram.Socket, port: number) {
}
}
export { listenZero, listenZeroSingleClient } from "@scrypted/server/src/listen-zero";
export { ListenZeroSingleClientTimeoutError, listenZero, listenZeroSingleClient } from "@scrypted/server/src/listen-zero";

View File

@@ -51,14 +51,8 @@ function silence() {
return ret;
}
export class BrowserSignalingSession implements RTCSignalingSession {
private pc: RTCPeerConnection;
pcDeferred = new Deferred<RTCPeerConnection>();
dcDeferred = new Deferred<RTCDataChannel>();
microphone: RTCRtpSender;
micEnabled = false;
onPeerConnection: (pc: RTCPeerConnection) => Promise<void>;
options: RTCSignalingOptions = {
function createOptions() {
const options: RTCSignalingOptions = {
userAgent: getUserAgent(),
capabilities: {
audio: RTCRtpReceiver.getCapabilities?.('audio') || {
@@ -76,6 +70,18 @@ export class BrowserSignalingSession implements RTCSignalingSession {
height: screen.height,
},
};
return options;
}
export class BrowserSignalingSession implements RTCSignalingSession {
private pc: RTCPeerConnection;
pcDeferred = new Deferred<RTCPeerConnection>();
dcDeferred = new Deferred<RTCDataChannel>();
microphone: RTCRtpSender;
micEnabled = false;
onPeerConnection: (pc: RTCPeerConnection) => Promise<void>;
__proxy_props = { options: createOptions() };
options = createOptions();
constructor() {
}
@@ -250,7 +256,8 @@ export class BrowserSignalingSession implements RTCSignalingSession {
function logSendCandidate(console: Console, type: string, session: RTCSignalingSession): RTCSignalingSendIceCandidate {
return async (candidate) => {
try {
console.log(`${type} trickled candidate:`, candidate.sdpMLineIndex, candidate.candidate);
if (localStorage.getItem('debugLog') === 'true')
console.log(`${type} trickled candidate:`, candidate.sdpMLineIndex, candidate.candidate);
await session.addIceCandidate(candidate);
}
catch (e) {
@@ -283,6 +290,10 @@ function createCandidateQueue(console: Console, type: string, session: RTCSignal
}
}
export async function legacyGetSignalingSessionOptions(session: RTCSignalingSession) {
return typeof session.options === 'object' ? session.options : await session.getOptions();
}
export async function connectRTCSignalingClients(
console: Console,
offerClient: RTCSignalingSession,
@@ -290,14 +301,14 @@ export async function connectRTCSignalingClients(
answerClient: RTCSignalingSession,
answerSetup: Partial<RTCAVSignalingSetup>
) {
const offerOptions = await offerClient.getOptions();
const answerOptions = await answerClient.getOptions();
const offerOptions = await legacyGetSignalingSessionOptions(offerClient);
const answerOptions = await legacyGetSignalingSessionOptions(answerClient);
const disableTrickle = offerOptions?.disableTrickle || answerOptions?.disableTrickle;
if (offerOptions?.offer && answerOptions?.offer)
throw new Error('Both RTC clients have offers and can not negotiate. Consider implementing this in @scrypted/webrtc.');
if (offerOptions?.requiresOffer && answerOptions.requiresOffer)
if (offerOptions?.requiresOffer && answerOptions?.requiresOffer)
throw new Error('Both RTC clients require offers and can not negotiate.');
offerSetup.type = 'offer';
@@ -308,11 +319,13 @@ export async function connectRTCSignalingClients(
const offer = await offerClient.createLocalDescription('offer', offerSetup as RTCAVSignalingSetup,
disableTrickle ? undefined : answerQueue.queueSendCandidate);
console.log('offer sdp', offer.sdp);
if (localStorage.getItem('debugLog') === 'true')
console.log('offer sdp', offer.sdp);
await answerClient.setRemoteDescription(offer, answerSetup as RTCAVSignalingSetup);
const answer = await answerClient.createLocalDescription('answer', answerSetup as RTCAVSignalingSetup,
disableTrickle ? undefined : offerQueue.queueSendCandidate);
console.log('answer sdp', answer.sdp);
if (localStorage.getItem('debugLog') === 'true')
console.log('answer sdp', answer.sdp);
await offerClient.setRemoteDescription(answer, offerSetup as RTCAVSignalingSetup);
offerQueue.flush();
answerQueue.flush();

View File

@@ -6,8 +6,9 @@ import { parseHTTPHeadersQuotedKeyValueSet } from 'http-auth-utils/dist/utils';
import net from 'net';
import { Duplex, Readable, Writable } from 'stream';
import tls from 'tls';
import { URL } from 'url';
import { Deferred } from './deferred';
import { closeQuiet, createBindUdp, createBindZero, listenZeroSingleClient } from './listen-cluster';
import { closeQuiet, createBindZero, createSquentialBindZero, listenZeroSingleClient } from './listen-cluster';
import { timeoutPromise } from './promise-utils';
import { readLength, readLine } from './read-stream';
import { MSection, parseSdp } from './sdp-utils';
@@ -128,6 +129,16 @@ export function getNaluTypes(streamChunk: StreamChunk) {
return getNaluTypesInNalu(streamChunk.chunks[streamChunk.chunks.length - 1].subarray(12))
}
export function getNaluFragmentInformation(nalu: Buffer) {
const naluType = nalu[0] & 0x1f;
const fua = naluType === H264_NAL_TYPE_FU_A;
return {
fua,
fuaStart: fua && !!(nalu[1] & 0x80),
fuaEnd: fua && !!(nalu[1] & 0x40),
}
}
export function getNaluTypesInNalu(nalu: Buffer, fuaRequireStart = false, fuaRequireEnd = false) {
const ret = new Set<number>();
const naluType = nalu[0] & 0x1f;
@@ -184,48 +195,17 @@ export function createRtspParser(options?: StreamParserOptions): RtspStreamParse
'-f', 'rtsp',
],
findSyncFrame(streamChunks: StreamChunk[]) {
let foundIndex: number;
let nonVideo: {
[codec: string]: StreamChunk,
} = {};
const createSyncFrame = () => {
const ret = streamChunks.slice(foundIndex);
// for (const nv of Object.values(nonVideo)) {
// ret.unshift(nv);
// }
return ret;
}
for (let prebufferIndex = 0; prebufferIndex < streamChunks.length; prebufferIndex++) {
const streamChunk = streamChunks[prebufferIndex];
if (streamChunk.type !== 'h264') {
nonVideo[streamChunk.type] = streamChunk;
continue;
}
if (findH264NaluType(streamChunk, H264_NAL_TYPE_SPS))
foundIndex = prebufferIndex;
}
if (foundIndex !== undefined)
return createSyncFrame();
nonVideo = {};
// some streams don't contain codec info, so find an idr frame instead.
for (let prebufferIndex = 0; prebufferIndex < streamChunks.length; prebufferIndex++) {
const streamChunk = streamChunks[prebufferIndex];
if (streamChunk.type !== 'h264') {
nonVideo[streamChunk.type] = streamChunk;
continue;
if (findH264NaluType(streamChunk, H264_NAL_TYPE_SPS) || findH264NaluType(streamChunk, H264_NAL_TYPE_IDR)) {
return streamChunks.slice(prebufferIndex);
}
if (findH264NaluType(streamChunk, H264_NAL_TYPE_IDR))
foundIndex = prebufferIndex;
}
if (foundIndex !== undefined)
return createSyncFrame();
// oh well!
},
sdp: new Promise<string>(r => resolve = r),
@@ -580,7 +560,7 @@ export class RtspClient extends RtspBase {
const username = decodeURIComponent(authedUrl.username);
const password = decodeURIComponent(authedUrl.password);
const strippedUrl = new URL(url);
const strippedUrl = new URL(url.toString());
strippedUrl.username = '';
strippedUrl.password = '';
@@ -670,7 +650,7 @@ export class RtspClient extends RtspBase {
});
}
async setup(options: RtspClientTcpSetupOptions | RtspClientUdpSetupOptions) {
async setup(options: RtspClientTcpSetupOptions | RtspClientUdpSetupOptions, headers?: Headers) {
const protocol = options.type === 'udp' ? '' : '/TCP';
const client = options.type === 'udp' ? 'client_port' : 'interleaved';
let port: number;
@@ -686,9 +666,9 @@ export class RtspClient extends RtspBase {
port = options.dgram.address().port;
options.dgram.on('message', data => options.onRtp(undefined, data));
}
const headers: any = {
headers = Object.assign({
Transport: `RTP/AVP${protocol};unicast;${client}=${port}-${port + 1}`,
};
}, headers);
const response = await this.request('SETUP', headers, options.path);
let interleaved: {
begin: number;
@@ -953,8 +933,7 @@ export class RtspServer {
const match = transport.match(/.*?client_port=([0-9]+)-([0-9]+)/);
const [_, rtp, rtcp] = match;
const rtpServer = await createBindZero();
const rtcpServer = await createBindUdp(rtpServer.port + 1);
const [rtpServer, rtcpServer] = await createSquentialBindZero();
this.client.on('close', () => closeQuiet(rtpServer.server));
this.client.on('close', () => closeQuiet(rtcpServer.server));
this.setupTracks[msection.control] = {

View File

@@ -217,14 +217,12 @@ const acontrol = 'a=control:';
const artpmap = 'a=rtpmap:';
export function parseMSection(msection: string[]) {
const control = msection.find(line => line.startsWith(acontrol))?.substring(acontrol.length);
const rtpmapFirst = msection.find(line => line.startsWith(artpmap));
const mline = parseMLine(msection[0]);
let codec = parseRtpMap(mline.type, rtpmapFirst).codec;
const rtpmaps = msection.filter(line => line.startsWith(artpmap)).map(line => parseRtpMap(mline.type, line));
const rawRtpmaps = msection.filter(line => line.startsWith(artpmap));
const rtpmaps = rawRtpmaps.map(line => parseRtpMap(mline.type, line));
const codec = parseRtpMap(mline.type, rawRtpmaps[0]).codec;
let direction: string;
for (const checkDirection of ['sendonly', 'sendrecv', 'recvonly', 'inactive']) {
const found = msection.find(line => line === 'a=' + checkDirection);
if (found) {

56
common/test/rtsp-proxy.ts Normal file
View File

@@ -0,0 +1,56 @@
import net from 'net';
import { listenZero } from '../src/listen-cluster';
import { RtspClient, RtspServer } from '../src/rtsp-server';
async function main() {
const server = net.createServer(async serverSocket => {
const client = new RtspClient('rtsp://localhost:57594/911db962087f904d');
await client.options();
const describeResponse = await client.describe();
const sdp = describeResponse.body.toString();
const server = new RtspServer(serverSocket, sdp, true);
const setupResponse = await server.handlePlayback();
if (setupResponse !== 'play') {
serverSocket.destroy();
client.client.destroy();
return;
}
console.log('playback handled');
let channel = 0;
for (const track of Object.keys(server.setupTracks)) {
const setupTrack = server.setupTracks[track];
await client.setup({
// type: 'udp',
type: 'tcp',
port: channel,
path: setupTrack.control,
onRtp(rtspHeader, rtp) {
server.sendTrack(setupTrack.control, rtp, false);
},
});
channel += 2;
}
await client.play();
console.log('client playing');
await client.readLoop();
});
let port: number;
if (false) {
port = await listenZero(server);
}
else {
port = 5555;
server.listen(5555)
}
console.log(`rtsp://127.0.0.1:${port}`);
}
main();

View File

@@ -1,81 +0,0 @@
################################################################
# THIS FILE IS GENERATED. DO NOT EDIT.
################################################################
################################################################
# Begin section generated from template/Dockerfile.full.header
# This common file will be used by both Docker and the linux
# install script.
################################################################
ARG BUILDPACK_DEPS_BASE="bullseye"
FROM buildpack-deps:${BUILDPACK_DEPS_BASE} as header
# switch to nvm?
ARG NODE_VERSION=18
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash -
RUN apt-get update
RUN apt-get install -y nodejs
# Coral Edge TPU
# https://coral.ai/docs/accelerator/get-started/#runtime-on-linux
RUN echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | tee /etc/apt/sources.list.d/coral-edgetpu.list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
RUN apt-get -y update
RUN apt-get -y install libedgetpu1-std
RUN apt-get -y install software-properties-common apt-utils
RUN apt-get -y update
RUN apt-get -y upgrade
# base development stuff
RUN apt-get -y install \
build-essential \
cmake \
gcc \
libgirepository1.0-dev \
libglib2.0-dev \
pkg-config
# ffmpeg
RUN apt-get -y install \
ffmpeg
# gstreamer native https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c#install-gstreamer-on-ubuntu-or-debian
RUN apt-get -y install \
gstreamer1.0-tools libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-alsa \
gstreamer1.0-vaapi
# python native
RUN apt-get -y install \
python3 \
python3-dev \
python3-gi \
python3-gst-1.0 \
python3-matplotlib \
python3-numpy \
python3-opencv \
python3-pil \
python3-pip \
python3-setuptools \
python3-skimage \
python3-wheel
# python pip
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install aiofiles debugpy typing_extensions typing psutil
################################################################
# End section generated from template/Dockerfile.full.header
################################################################
################################################################
# Begin section generated from template/Dockerfile.full.footer
################################################################
FROM header as base
ENV SCRYPTED_DOCKER_SERVE="true"
ENV SCRYPTED_CAN_RESTART="true"
ENV SCRYPTED_VOLUME="/server/volume"
ENV SCRYPTED_INSTALL_PATH="/server"
################################################################
# End section generated from template/Dockerfile.full.footer
################################################################

View File

@@ -1,45 +0,0 @@
ARG BUILDPACK_DEPS_BASE="bullseye"
FROM buildpack-deps:${BUILDPACK_DEPS_BASE} as header
# switch to nvm?
ARG NODE_VERSION=18
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash -
RUN apt-get update
RUN apt-get install -y nodejs
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y install software-properties-common apt-utils
RUN apt-get -y update
# base development stuff
RUN apt-get -y install \
build-essential \
gcc \
libgirepository1.0-dev \
libglib2.0-dev \
pkg-config
# ffmpeg
RUN apt-get -y install \
ffmpeg
ENV SCRYPTED_FFMPEG_PATH=ffmpeg
# python native
RUN apt-get -y install \
python3 \
python3-dev \
python3-gi \
python3-pip \
python3-setuptools \
python3-wheel
# python pip
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install aiofiles debugpy typing_extensions typing psutil
ENV SCRYPTED_DOCKER_SERVE="true"
ENV SCRYPTED_CAN_RESTART="true"
ENV SCRYPTED_VOLUME="/server/volume"
ENV SCRYPTED_INSTALL_PATH="/server"

View File

@@ -1,30 +0,0 @@
ARG BUILDPACK_DEPS_BASE="bullseye"
FROM buildpack-deps:${BUILDPACK_DEPS_BASE} as header
# switch to nvm?
ARG NODE_VERSION=18
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash -
RUN apt-get update
RUN apt-get install -y nodejs
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y install software-properties-common apt-utils
RUN apt-get -y update
# base development stuff
RUN apt-get -y install \
build-essential \
gcc \
libglib2.0-dev \
pkg-config
# ffmpeg
RUN apt-get -y install \
ffmpeg
ENV SCRYPTED_FFMPEG_PATH=ffmpeg
ENV SCRYPTED_DOCKER_SERVE="true"
ENV SCRYPTED_CAN_RESTART="true"
ENV SCRYPTED_VOLUME="/server/volume"
ENV SCRYPTED_INSTALL_PATH="/server"

View File

@@ -1,16 +0,0 @@
#!/bin/bash
if [ -z "$SCRYPTED_DOCKER_AVAHI" ]
then
while true
do
sleep 1000
done
fi
until [ -e /var/run/dbus/system_bus_socket ]; do
echo "Waiting for dbus..."
sleep 1s
done
echo "Starting Avahi daemon..."
exec avahi-daemon --no-chroot -f /etc/avahi/avahi-daemon.conf

View File

@@ -1,4 +0,0 @@
#!/bin/bash
echo "Starting dbus..."
exec dbus-daemon --system --nofork

View File

@@ -1,13 +0,0 @@
################################################################
# Begin section generated from template/Dockerfile.full.footer
################################################################
FROM header as base
ENV SCRYPTED_DOCKER_SERVE="true"
ENV SCRYPTED_CAN_RESTART="true"
ENV SCRYPTED_VOLUME="/server/volume"
ENV SCRYPTED_INSTALL_PATH="/server"
################################################################
# End section generated from template/Dockerfile.full.footer
################################################################

View File

@@ -1,65 +0,0 @@
################################################################
# Begin section generated from template/Dockerfile.full.header
# This common file will be used by both Docker and the linux
# install script.
################################################################
ARG BUILDPACK_DEPS_BASE="bullseye"
FROM buildpack-deps:${BUILDPACK_DEPS_BASE} as header
# switch to nvm?
ARG NODE_VERSION=18
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash -
RUN apt-get update
RUN apt-get install -y nodejs
# Coral Edge TPU
# https://coral.ai/docs/accelerator/get-started/#runtime-on-linux
RUN echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | tee /etc/apt/sources.list.d/coral-edgetpu.list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
RUN apt-get -y update
RUN apt-get -y install libedgetpu1-std
RUN apt-get -y install software-properties-common apt-utils
RUN apt-get -y update
RUN apt-get -y upgrade
# base development stuff
RUN apt-get -y install \
build-essential \
cmake \
gcc \
libgirepository1.0-dev \
libglib2.0-dev \
pkg-config
# ffmpeg
RUN apt-get -y install \
ffmpeg
# gstreamer native https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c#install-gstreamer-on-ubuntu-or-debian
RUN apt-get -y install \
gstreamer1.0-tools libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-alsa \
gstreamer1.0-vaapi
# python native
RUN apt-get -y install \
python3 \
python3-dev \
python3-gi \
python3-gst-1.0 \
python3-matplotlib \
python3-numpy \
python3-opencv \
python3-pil \
python3-pip \
python3-setuptools \
python3-skimage \
python3-wheel
# python pip
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install aiofiles debugpy typing_extensions typing psutil
################################################################
# End section generated from template/Dockerfile.full.header
################################################################

1
external/HAP-NodeJS vendored

Submodule external/HAP-NodeJS deleted from 3fe1f920f5

49
install/config.yaml Executable file
View File

@@ -0,0 +1,49 @@
# Home Assistant Addon Configuration
name: Scrypted
version: "18-jammy-full.s6-v0.41.0"
slug: scrypted
description: Scrypted is a high performance home video integration and automation platform
url: "https://github.com/koush/scrypted"
arch:
- amd64
- aarch64
- armv7
init: false
ingress: true
ingress_port: 11080
panel_icon: mdi:memory
hassio_api: true
homeassistant_api: true
ingress_stream: true
host_network: true
gpio: true
usb: true
uart: true
video: true
image: "ghcr.io/koush/scrypted"
environment:
SCRYPTED_INSTALL_PLUGIN: "@scrypted/homeassistant"
SCRYPTED_VOLUME: "/data/scrypted_data"
SCRYPTED_NVR_VOLUME: "/data/scrypted_nvr"
SCRYPTED_ADMIN_ADDRESS: "172.30.32.2"
SCRYPTED_ADMIN_USERNAME: "homeassistant"
SCRYPTED_INSTALL_ENVIRONMENT: "ha"
backup_exclude:
- '/server/**'
- '/data/scrypted_nvr/**'
- '/data/scrypted_data/plugins/**'
map:
- config:rw
- media:rw
- share:rw
devices:
- /dev/mem
- /dev/dri/renderD128
- /dev/apex_0
- /dev/apex_1
- /dev/apex_2
- /dev/apex_3
- /dev/dri/card0
- /dev/vchiq
- /dev/video10
- /dev/video0

View File

@@ -1,4 +1,4 @@
ARG BASE="18-bullseye-full"
ARG BASE="18-jammy-full"
FROM koush/scrypted-common:${BASE}
WORKDIR /

View File

@@ -1,4 +1,4 @@
ARG BASE="16-bullseye"
ARG BASE="16-jammy"
FROM koush/scrypted-common:${BASE}
WORKDIR /

View File

@@ -0,0 +1,137 @@
################################################################
# THIS FILE IS GENERATED. DO NOT EDIT.
################################################################
################################################################
# Begin section generated from template/Dockerfile.full.header
# This common file will be used by both Docker and the linux
# install script.
################################################################
ARG BASE="jammy"
FROM ubuntu:${BASE} as header
ENV DEBIAN_FRONTEND=noninteractive
# base tools and development stuff
RUN apt-get update && apt-get -y install \
curl software-properties-common apt-utils \
build-essential \
cmake \
ffmpeg \
gcc \
libcairo2-dev \
libgirepository1.0-dev \
pkg-config && \
apt-get -y update && \
apt-get -y upgrade
ARG NODE_VERSION=18
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash -
RUN apt-get update && apt-get install -y nodejs
# python native
RUN apt-get -y install \
python3 \
python3-dev \
python3-pip \
python3-setuptools \
python3-wheel
# these are necessary for pillow-simd, additional on disk size is small
# but could consider removing this.
RUN apt-get -y install \
libjpeg-dev zlib1g-dev
# plugins support fallback to pillow, but vips is faster.
RUN apt-get -y install \
libvips
# gstreamer native https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c#install-gstreamer-on-ubuntu-or-debian
RUN apt-get -y install \
gstreamer1.0-tools gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-alsa \
gstreamer1.0-vaapi
# python3 gstreamer bindings
RUN apt-get -y install \
python3-gst-1.0
# armv7l does not have wheels for any of these
# and compile times would forever, if it works at all.
# furthermore, it's possible to run 32bit docker on 64bit arm,
# which causes weird behavior in python which looks at the arch version
# which still reports 64bit, even if running in 32bit docker.
# this scenario is not supported and will be reported at runtime.
# this bit is not necessary on amd64, but leaving it for consistency.
RUN apt-get -y install \
python3-matplotlib \
python3-numpy \
python3-opencv \
python3-pil \
python3-skimage
# allow pip to install to system
RUN rm -f /usr/lib/python**/EXTERNALLY-MANAGED
# pyvips is broken on x86 due to mismatch ffi
# https://stackoverflow.com/questions/62658237/it-seems-that-the-version-of-the-libffi-library-seen-at-runtime-is-different-fro
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --force-reinstall --no-binary :all: cffi
RUN python3 -m pip install debugpy typing_extensions psutil
################################################################
# End section generated from template/Dockerfile.full.header
################################################################
################################################################
# Begin section generated from template/Dockerfile.full.footer
################################################################
FROM header as base
# intel opencl gpu for openvino
RUN bash -c "if [ \"$(uname -m)\" == \"x86_64\" ]; \
then \
apt-get update && apt-get install -y gpg-agent && \
rm -f /usr/share/keyrings/intel-graphics.gpg && \
curl -L https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \
echo 'deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc' | tee /etc/apt/sources.list.d/intel.gpu.jammy.list && \
apt-get -y update && \
apt-get -y install intel-opencl-icd intel-media-va-driver-non-free && \
apt-get -y dist-upgrade; \
fi"
# python 3.9 from ppa.
# 3.9 is the version with prebuilt support for tensorflow lite
RUN add-apt-repository ppa:deadsnakes/ppa && \
apt-get -y install \
python3.9 \
python3.9-dev \
python3.9-distutils
# allow pip to install to system
RUN rm -f /usr/lib/python**/EXTERNALLY-MANAGED
RUN python3.9 -m pip install --upgrade pip
RUN python3.9 -m pip install --force-reinstall --no-binary :all: cffi
RUN python3.9 -m pip install debugpy typing_extensions psutil
# Coral Edge TPU
# https://coral.ai/docs/accelerator/get-started/#runtime-on-linux
RUN echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | tee /etc/apt/sources.list.d/coral-edgetpu.list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
RUN apt-get -y update && apt-get -y install libedgetpu1-std
ENV SCRYPTED_INSTALL_ENVIRONMENT="docker"
ENV SCRYPTED_CAN_RESTART="true"
ENV SCRYPTED_VOLUME="/server/volume"
ENV SCRYPTED_INSTALL_PATH="/server"
RUN test -f "/usr/bin/ffmpeg"
ENV SCRYPTED_FFMPEG_PATH="/usr/bin/ffmpeg"
# changing this forces pip and npm to perform reinstalls.
# if this base image changes, this version must be updated.
ENV SCRYPTED_BASE_VERSION="20230727"
ENV SCRYPTED_DOCKER_FLAVOR="full"
################################################################
# End section generated from template/Dockerfile.full.footer
################################################################

View File

@@ -0,0 +1,47 @@
ARG BASE="jammy"
FROM ubuntu:${BASE} as header
ENV DEBIAN_FRONTEND=noninteractive
# base tools and development stuff
RUN apt-get update && apt-get -y install \
curl software-properties-common apt-utils \
build-essential \
cmake \
ffmpeg \
gcc \
libcairo2-dev \
libgirepository1.0-dev \
pkg-config && \
apt-get -y update && \
apt-get -y upgrade
ARG NODE_VERSION=18
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash -
RUN apt-get update && apt-get install -y nodejs
# python native
RUN apt-get -y install \
python3 \
python3-dev \
python3-pip \
python3-setuptools \
python3-wheel
# python pip
RUN rm -f /usr/lib/python**/EXTERNALLY-MANAGED
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install debugpy typing_extensions psutil
ENV SCRYPTED_INSTALL_ENVIRONMENT="docker"
ENV SCRYPTED_CAN_RESTART="true"
ENV SCRYPTED_VOLUME="/server/volume"
ENV SCRYPTED_INSTALL_PATH="/server"
RUN test -f "/usr/bin/ffmpeg"
ENV SCRYPTED_FFMPEG_PATH="/usr/bin/ffmpeg"
# changing this forces pip and npm to perform reinstalls.
# if this base image changes, this version must be updated.
ENV SCRYPTED_BASE_VERSION="20230727"
ENV SCRYPTED_DOCKER_FLAVOR="lite"

View File

@@ -0,0 +1,22 @@
FROM koush/18-jammy-full.s6
WORKDIR /
# Install miniconda
ENV CONDA_DIR /opt/conda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda
# Put conda in path so we can use conda activate
ENV PATH=$CONDA_DIR/bin:$PATH
RUN conda install -c conda-forge cudatoolkit=11.2.2 cudnn=8.1.0
ENV CONDA_PREFIX=/opt/conda
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/
# this is a copy pasta, seems to need a reinstall.
# python pip
RUN python3 -m pip install --upgrade pip
# pyvips is broken on x86 due to mismatch ffi
# https://stackoverflow.com/questions/62658237/it-seems-that-the-version-of-the-libffi-library-seen-at-runtime-is-different-fro
RUN python3 -m pip install --force-reinstall --no-binary :all: cffi
RUN python3 -m pip install debugpy typing_extensions psutil

View File

@@ -1,23 +1,25 @@
ARG BASE="18-bullseye-full"
ARG BASE="18-jammy-full"
FROM koush/scrypted-common:${BASE}
# avahi advertiser support
RUN apt-get -y install \
RUN apt-get update && apt-get -y install \
libnss-mdns \
avahi-discover \
libavahi-compat-libdnssd-dev
libavahi-compat-libdnssd-dev \
xz-utils
# copy configurations and scripts
COPY fs /
# s6 process supervisor
ARG S6_OVERLAY_VERSION=3.1.1.2
ARG S6_OVERLAY_VERSION=3.1.5.0
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
ENV S6_KEEP_ENV=1
RUN case "$(uname -m)" in \
x86_64) S6_ARCH='x86_64';; \
armv7l) S6_ARCH='armhf';; \
aarch64) S6_ARCH='aarch64';; \
ARG TARGETARCH
RUN case "${TARGETARCH}" in \
amd64) S6_ARCH='x86_64';; \
arm) S6_ARCH='armhf';; \
arm64) S6_ARCH='aarch64';; \
*) echo "Your system architecture isn't supported."; exit 1 ;; \
esac \
&& cd /tmp \

View File

@@ -0,0 +1,25 @@
ARG BASE="jammy"
FROM ubuntu:${BASE} as header
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install curl software-properties-common apt-utils ffmpeg
# switch to nvm?
ARG NODE_VERSION=18
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - && apt-get update && apt-get install -y nodejs
ENV SCRYPTED_INSTALL_ENVIRONMENT="docker"
ENV SCRYPTED_CAN_RESTART="true"
ENV SCRYPTED_VOLUME="/server/volume"
ENV SCRYPTED_INSTALL_PATH="/server"
RUN test -f "/usr/bin/ffmpeg"
ENV SCRYPTED_FFMPEG_PATH="/usr/bin/ffmpeg"
# changing this forces pip and npm to perform reinstalls.
# if this base image changes, this version must be updated.
ENV SCRYPTED_BASE_VERSION="20230727"
ENV SCRYPTED_DOCKER_FLAVOR="thin"

View File

@@ -0,0 +1,3 @@
./docker-build.sh
docker build -t koush/scrypted:18-jammy-full.nvidia -f Dockerfile.nvidia

View File

@@ -3,15 +3,16 @@
set -x
NODE_VERSION=18
BUILDPACK_DEPS_BASE=bullseye
SCRYPTED_INSTALL_VERSION=beta
IMAGE_BASE=jammy
FLAVOR=full
BASE=$NODE_VERSION-$BUILDPACK_DEPS_BASE-$FLAVOR
BASE=$NODE_VERSION-$IMAGE_BASE-$FLAVOR
echo $BASE
SUPERVISOR=.s6
SUPERVISOR_BASE=$BASE$SUPERVISOR
docker build -t koush/scrypted-common:$BASE -f Dockerfile.$FLAVOR \
--build-arg NODE_VERSION=$NODE_VERSION --build-arg BUILDPACK_DEPS_BASE=$BUILDPACK_DEPS_BASE . && \
--build-arg NODE_VERSION=$NODE_VERSION --build-arg BASE=$IMAGE_BASE . && \
\
docker build -t koush/scrypted:$SUPERVISOR_BASE -f Dockerfile$SUPERVISOR \
--build-arg BASE=$BASE .
--build-arg BASE=$BASE --build-arg SCRYPTED_INSTALL_VERSION=$SCRYPTED_INSTALL_VERSION .

View File

@@ -3,9 +3,10 @@ version: "3.5"
# The Scrypted docker-compose.yml file typically resides at:
# ~/.scrypted/docker-compose.yml
# Scrypted NVR Storage (Optional Network Volume: Part 1 of 3)
# Example volumes SMB (CIFS) and NFS.
# Uncomment only one.
# volumes:
# nvr:
# driver_opts:
@@ -20,40 +21,77 @@ version: "3.5"
services:
scrypted:
image: koush/scrypted
environment:
# Scrypted NVR Storage (Part 2 of 3)
# Uncomment the next line to configure the NVR plugin to store recordings
# use the /nvr directory within the container. This can also be configured
# within the plugin manually.
# The drive or network share will ALSO need to be configured in the volumes
# section below.
# - SCRYPTED_NVR_VOLUME=/nvr
- SCRYPTED_WEBHOOK_UPDATE_AUTHORIZATION=Bearer SET_THIS_TO_SOME_RANDOM_TEXT
- SCRYPTED_WEBHOOK_UPDATE=http://localhost:10444/v1/update
# nvidia support
# Uncomment next 3 lines for Nvidia GPU support.
# - NVIDIA_VISIBLE_DEVICES=all
# - NVIDIA_DRIVER_CAPABILITIES=all
# runtime: nvidia
container_name: scrypted
restart: unless-stopped
network_mode: host
# uncomment this and a line below as needed.
# devices:
# zwave usb serial device
# - /dev/ttyACM0:/dev/ttyACM0
# all usb devices, such as coral tpu
# - /dev/bus/usb:/dev/bus/usb
# intel hardware accelerated video decoding
# - /dev/dri:/dev/dri
# Uncomment next line to run avahi-daemon inside the container
# Don't use if dbus and avahi run on the host and are bind-mounted
# (see below under "volumes")
# - SCRYPTED_DOCKER_AVAHI=true
# runtime: nvidia
volumes:
- ~/.scrypted/volume:/server/volume
# modify and add the additional volume for Scrypted NVR
# the following example would mount the /mnt/sda/video path on the host
# Scrypted NVR Storage (Part 3 of 3)
# Modify to add the additional volume for Scrypted NVR.
# The following example would mount the /mnt/sda/video path on the host
# to the /nvr path inside the docker container.
# - /mnt/sda/video:/nvr
# or use a network mount from one of the examples above
# Or use a network mount from one of the CIFS/NFS examples at the top of this file.
# - type: volume
# source: nvr
# target: /nvr
# volume:
# nocopy: true
# uncomment the following lines to expose Avahi, an mDNS advertiser.
# make sure Avahi is running on the host machine, otherwise this will not work.
# not compatible with Avahi enabled via SCRYPTED_DOCKER_AVAHI=true
# - /var/run/dbus:/var/run/dbus
# - /var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket
# Default volume for the Scrypted database. Typically should not be changed.
- ~/.scrypted/volume:/server/volume
devices: [
# uncomment the common systems devices to pass
# them through to docker.
# all usb devices, such as coral tpu
# "/dev/bus/usb:/dev/bus/usb",
# hardware accelerated video decoding, opencl, etc.
# "/dev/dri:/dev/dri",
# uncomment below as necessary.
# zwave usb serial device
# "/dev/ttyACM0:/dev/ttyACM0",
# coral PCI devices
# "/dev/apex_0:/dev/apex_0",
# "/dev/apex_1:/dev/apex_1",
]
container_name: scrypted
restart: unless-stopped
network_mode: host
image: koush/scrypted
# logging is noisy and will unnecessarily wear on flash storage.
# scrypted has per device in memory logging that is preferred.
logging:
@@ -85,4 +123,4 @@ services:
# Must match the port in the auto update url above.
- 10444:8080
# check for updates once an hour (interval is in seconds)
command: --interval 3600 --cleanup
command: --interval 3600 --cleanup --scope scrypted

View File

@@ -1,7 +1,7 @@
[server]
#host-name=
use-ipv4=yes
use-ipv6=no
use-ipv6=yes
enable-dbus=yes
ratelimit-interval-usec=1000000
ratelimit-burst=1000
@@ -14,4 +14,4 @@ rlimit-core=0
rlimit-data=4194304
rlimit-fsize=0
rlimit-nofile=768
rlimit-stack=4194304
rlimit-stack=4194304

View File

@@ -0,0 +1,16 @@
#!/bin/bash
if [[ "${SCRYPTED_DOCKER_AVAHI}" != "true" ]]; then
echo "SCRYPTED_DOCKER_AVAHI != true, not starting avahi-daemon" >/dev/stderr
while true
do
sleep 1000
done
fi
until [ -e /var/run/dbus/system_bus_socket ]; do
echo "Waiting for dbus..."
sleep 1s
done
echo "Starting Avahi daemon..."
exec avahi-daemon --no-chroot -f /etc/avahi/avahi-daemon.conf

View File

@@ -0,0 +1,12 @@
#!/bin/bash
if [[ "${SCRYPTED_DOCKER_AVAHI}" != "true" ]]; then
echo "SCRYPTED_DOCKER_AVAHI != true, not starting dbus-daemon" >/dev/stderr
while true
do
sleep 1000
done
fi
echo "Starting dbus..."
exec dbus-daemon --system --nofork

View File

@@ -1,5 +1,15 @@
#!/bin/bash
if [[ "${SCRYPTED_DOCKER_AVAHI}" != "true" ]]; then
echo "SCRYPTED_DOCKER_AVAHI != true, won't manage dbus nor avahi-daemon" >/dev/stderr
exit 0
fi
if grep -qE " ((/var)?/run/dbus|(/var)?/run/avahi-daemon(/socket)?) " /proc/mounts; then
echo "dbus and/or avahi-daemon volumes are bind mounted, won't touch them" >/dev/stderr
exit 0
fi
# make run folders
mkdir -p /var/run/dbus
mkdir -p /var/run/avahi-daemon
@@ -22,4 +32,4 @@ if [ ! -z "$DSM_HOSTNAME" ]; then
sed -i "s/.*host-name.*/host-name=${DSM_HOSTNAME}/" /etc/avahi/avahi-daemon.conf
else
sed -i "s/.*host-name.*/#host-name=/" /etc/avahi/avahi-daemon.conf
fi
fi

View File

@@ -42,7 +42,11 @@ fi
WATCHTOWER_HTTP_API_TOKEN=$(echo $RANDOM | md5sum)
DOCKER_COMPOSE_YML=$SCRYPTED_HOME/docker-compose.yml
echo "Created $DOCKER_COMPOSE_YML"
curl -s https://raw.githubusercontent.com/koush/scrypted/main/docker/docker-compose.yml | sed s/SET_THIS_TO_SOME_RANDOM_TEXT/"$(echo $RANDOM | md5sum)"/g > $DOCKER_COMPOSE_YML
curl -s https://raw.githubusercontent.com/koush/scrypted/main/install/docker/docker-compose.yml | sed s/SET_THIS_TO_SOME_RANDOM_TEXT/"$(echo $RANDOM | md5sum | head -c 32)"/g > $DOCKER_COMPOSE_YML
if [ -d /dev/dri ]
then
sed -i 's/'#' - \/dev\/dri/- \/dev\/dri/g' $DOCKER_COMPOSE_YML
fi
echo "Setting permissions on $SCRYPTED_HOME"
chown -R $SERVICE_USER $SCRYPTED_HOME

View File

@@ -0,0 +1,54 @@
################################################################
# Begin section generated from template/Dockerfile.full.footer
################################################################
FROM header as base
# intel opencl gpu for openvino
RUN bash -c "if [ \"$(uname -m)\" == \"x86_64\" ]; \
then \
apt-get update && apt-get install -y gpg-agent && \
rm -f /usr/share/keyrings/intel-graphics.gpg && \
curl -L https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \
echo 'deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc' | tee /etc/apt/sources.list.d/intel.gpu.jammy.list && \
apt-get -y update && \
apt-get -y install intel-opencl-icd intel-media-va-driver-non-free && \
apt-get -y dist-upgrade; \
fi"
# python 3.9 from ppa.
# 3.9 is the version with prebuilt support for tensorflow lite
RUN add-apt-repository ppa:deadsnakes/ppa && \
apt-get -y install \
python3.9 \
python3.9-dev \
python3.9-distutils
# allow pip to install to system
RUN rm -f /usr/lib/python**/EXTERNALLY-MANAGED
RUN python3.9 -m pip install --upgrade pip
RUN python3.9 -m pip install --force-reinstall --no-binary :all: cffi
RUN python3.9 -m pip install debugpy typing_extensions psutil
# Coral Edge TPU
# https://coral.ai/docs/accelerator/get-started/#runtime-on-linux
RUN echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | tee /etc/apt/sources.list.d/coral-edgetpu.list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
RUN apt-get -y update && apt-get -y install libedgetpu1-std
ENV SCRYPTED_INSTALL_ENVIRONMENT="docker"
ENV SCRYPTED_CAN_RESTART="true"
ENV SCRYPTED_VOLUME="/server/volume"
ENV SCRYPTED_INSTALL_PATH="/server"
RUN test -f "/usr/bin/ffmpeg"
ENV SCRYPTED_FFMPEG_PATH="/usr/bin/ffmpeg"
# changing this forces pip and npm to perform reinstalls.
# if this base image changes, this version must be updated.
ENV SCRYPTED_BASE_VERSION="20230727"
ENV SCRYPTED_DOCKER_FLAVOR="full"
################################################################
# End section generated from template/Dockerfile.full.footer
################################################################

View File

@@ -0,0 +1,80 @@
################################################################
# Begin section generated from template/Dockerfile.full.header
# This common file will be used by both Docker and the linux
# install script.
################################################################
ARG BASE="jammy"
FROM ubuntu:${BASE} as header
ENV DEBIAN_FRONTEND=noninteractive
# base tools and development stuff
RUN apt-get update && apt-get -y install \
curl software-properties-common apt-utils \
build-essential \
cmake \
ffmpeg \
gcc \
libcairo2-dev \
libgirepository1.0-dev \
pkg-config && \
apt-get -y update && \
apt-get -y upgrade
ARG NODE_VERSION=18
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash -
RUN apt-get update && apt-get install -y nodejs
# python native
RUN apt-get -y install \
python3 \
python3-dev \
python3-pip \
python3-setuptools \
python3-wheel
# these are necessary for pillow-simd, additional on disk size is small
# but could consider removing this.
RUN apt-get -y install \
libjpeg-dev zlib1g-dev
# plugins support fallback to pillow, but vips is faster.
RUN apt-get -y install \
libvips
# gstreamer native https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c#install-gstreamer-on-ubuntu-or-debian
RUN apt-get -y install \
gstreamer1.0-tools gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-alsa \
gstreamer1.0-vaapi
# python3 gstreamer bindings
RUN apt-get -y install \
python3-gst-1.0
# armv7l does not have wheels for any of these
# and compile times would forever, if it works at all.
# furthermore, it's possible to run 32bit docker on 64bit arm,
# which causes weird behavior in python which looks at the arch version
# which still reports 64bit, even if running in 32bit docker.
# this scenario is not supported and will be reported at runtime.
# this bit is not necessary on amd64, but leaving it for consistency.
RUN apt-get -y install \
python3-matplotlib \
python3-numpy \
python3-opencv \
python3-pil \
python3-skimage
# allow pip to install to system
RUN rm -f /usr/lib/python**/EXTERNALLY-MANAGED
# pyvips is broken on x86 due to mismatch ffi
# https://stackoverflow.com/questions/62658237/it-seems-that-the-version-of-the-libffi-library-seen-at-runtime-is-different-fro
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --force-reinstall --no-binary :all: cffi
RUN python3 -m pip install debugpy typing_extensions psutil
################################################################
# End section generated from template/Dockerfile.full.header
################################################################

BIN
install/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -45,10 +45,10 @@ ARG() {
}
ENV() {
echo "ignoring ENV $1"
export $@
}
source <(curl -s https://raw.githubusercontent.com/koush/scrypted/main/docker/template/Dockerfile.full.header)
source <(curl -s https://raw.githubusercontent.com/koush/scrypted/main/install/docker/template/Dockerfile.full.header)
if [ -z "$SERVICE_USER" ]
then

View File

@@ -40,48 +40,32 @@ echo "Installing Scrypted dependencies..."
RUN_IGNORE xcode-select --install
RUN brew update
RUN_IGNORE brew install node@18
# needed by scrypted-ffmpeg
RUN_IGNORE brew install sdl2
# gstreamer plugins
RUN_IGNORE brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly
# gst python bindings
RUN_IGNORE brew install gst-python
# python image library
RUN_IGNORE brew install pillow
# snapshot plugin and others
RUN brew install libvips
# dlib
RUN brew install cmake
### HACK WORKAROUND
### https://github.com/koush/scrypted/issues/544
brew unpin gstreamer
brew unpin gst-python
brew unpin gst-plugins-ugly
brew unpin gst-plugins-good
brew unpin gst-plugins-base
brew unpin gst-plugins-good
brew unpin gst-plugins-bad
brew unlink gstreamer
brew unlink gst-python
brew unlink gst-plugins-ugly
brew unlink gst-plugins-good
brew unlink gst-plugins-base
brew unlink gst-plugins-bad
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/49a8667f0c1a6579fe887bc0fa1c0ce682eb01c8/Formula/gstreamer.rb && brew install ./gstreamer.rb
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/49a8667f0c1a6579fe887bc0fa1c0ce682eb01c8/Formula/gst-python.rb && brew install ./gst-python.rb
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/49a8667f0c1a6579fe887bc0fa1c0ce682eb01c8/Formula/gst-plugins-ugly.rb && brew install ./gst-plugins-ugly.rb
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/49a8667f0c1a6579fe887bc0fa1c0ce682eb01c8/Formula/gst-plugins-good.rb && brew install ./gst-plugins-good.rb
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/49a8667f0c1a6579fe887bc0fa1c0ce682eb01c8/Formula/gst-plugins-base.rb && brew install ./gst-plugins-base.rb
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/49a8667f0c1a6579fe887bc0fa1c0ce682eb01c8/Formula/gst-plugins-bad.rb && brew install ./gst-plugins-bad.rb
brew pin gstreamer
brew pin gst-python
brew pin gst-plugins-ugly
brew pin gst-plugins-good
brew pin gst-plugins-base
brew pin gst-plugins-bad
brew unpin gst-plugins-ugly
brew unpin gst-libav
brew unpin gst-python
### END HACK WORKAROUND
# seems to be necessary for python-codecs' pycairo dependency or something?
RUN_IGNORE gobject-introspection libffi pkg-config
# gstreamer plugins
RUN_IGNORE brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-libav
# gst python bindings
RUN_IGNORE brew install gst-python
ARCH=$(arch)
if [ "$ARCH" = "arm64" ]
then
@@ -102,7 +86,11 @@ then
fi
RUN python$PYTHON_VERSION -m pip install --upgrade pip
RUN python$PYTHON_VERSION -m pip install aiofiles debugpy typing_extensions typing opencv-python psutil
if [ "$PYTHON_VERSION" != "3.10" ]
then
RUN python$PYTHON_VERSION -m pip install typing
fi
RUN python$PYTHON_VERSION -m pip install debugpy typing_extensions opencv-python psutil
echo "Installing Scrypted Launch Agent..."

View File

@@ -20,7 +20,7 @@ $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";"
py $SCRYPTED_WINDOWS_PYTHON_VERSION -m pip install --upgrade pip
py $SCRYPTED_WINDOWS_PYTHON_VERSION -m pip install aiofiles debugpy typing_extensions typing opencv-python
py $SCRYPTED_WINDOWS_PYTHON_VERSION -m pip install debugpy typing_extensions typing opencv-python
npx -y scrypted@latest install-server

BIN
install/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -27,13 +27,6 @@ echo "sdk > npm run build"
npm run build
popd
pushd external/HAP-NodeJS
echo "external/HAP-NodeJS > npm install"
npm install
echo "external/HAP-NodeJS > npm run build"
npm run build
popd
pushd external/werift
echo "external/werift > npm install"
npm install

View File

@@ -19,11 +19,11 @@
"-r",
"ts-node/register"
],
"preLaunchTask": "npm: build",
"args": [
"ffplay",
"Kitchen",
"getRecordingStream",
"{\"startTime\":1677699495709}"
"Baby Camera@192.168.2.109",
"getVideoStream",
],
"sourceMaps": true,
"resolveSourceMapLocations": [
@@ -35,4 +35,4 @@
],
},
]
}
}

View File

@@ -1,12 +1,12 @@
{
"name": "scrypted",
"version": "1.0.67",
"version": "1.0.69",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "scrypted",
"version": "1.0.67",
"version": "1.0.69",
"license": "ISC",
"dependencies": {
"@scrypted/client": "^1.1.43",

View File

@@ -1,6 +1,6 @@
{
"name": "scrypted",
"version": "1.0.67",
"version": "1.0.69",
"description": "",
"main": "./dist/main.js",
"bin": {

View File

@@ -172,8 +172,11 @@ async function main() {
ffmpegInput.inputArguments = ffmpegInput.inputArguments.map(i => i === ffmpegInput.url ? ffmpegInput.urls?.[0] : i);
}
}
console.log('ffplay', ...ffmpegInput.inputArguments);
child_process.spawn('ffplay', ffmpegInput.inputArguments, {
const args = [...ffmpegInput.inputArguments];
if (ffmpegInput.h264FilterArguments)
args.push(...ffmpegInput.h264FilterArguments);
console.log('ffplay', ...args);
child_process.spawn('ffplay', args, {
stdio: 'inherit',
});
sdk.disconnect();

View File

@@ -23,10 +23,19 @@ async function example() {
if (!backyard)
throw new Error('Device not found');
backyard.listen(ScryptedInterface.ObjectDetector, (source, details, data) => {
backyard.listen(ScryptedInterface.ObjectDetector, async (source, details, data) => {
const results = data as ObjectsDetected;
console.log(results);
})
console.log('detection results', results);
// detections that are flagged for retention will have a detectionId.
// tf etc won't retain automatically, and this requires a wrapping detector like Scrypted NVR Object Detection
// to decide which frames to keep. Otherwise saving all images would be extremely poor performance.
if (!results.detectionId)
return;
const media = await backyard.getDetectionInput(results.detectionId);
const jpeg = await sdk.mediaManager.convertMediaObjectToBuffer(media, 'image/jpeg');
// do something with the buffer like save to disk or send to a service.
});
}
example();

View File

@@ -1,15 +1,15 @@
{
"name": "@scrypted/client",
"version": "1.1.43",
"version": "1.1.55",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@scrypted/client",
"version": "1.1.43",
"version": "1.1.55",
"license": "ISC",
"dependencies": {
"@scrypted/types": "^0.2.76",
"@scrypted/types": "^0.2.94",
"axios": "^0.25.0",
"engine.io-client": "^6.4.0",
"rimraf": "^3.0.2"
@@ -21,9 +21,9 @@
}
},
"node_modules/@scrypted/types": {
"version": "0.2.76",
"resolved": "https://registry.npmjs.org/@scrypted/types/-/types-0.2.76.tgz",
"integrity": "sha512-/7n8ICkXj8TGba4cHvckLCgSNsOmOGQ8I+Jd8fX9sxkthgsZhF5At8PHhHdkCDS+yfSmfXHkcqluZZOfYPkpAg=="
"version": "0.2.94",
"resolved": "https://registry.npmjs.org/@scrypted/types/-/types-0.2.94.tgz",
"integrity": "sha512-615C6lLnJGk0qhp+Y72B3xeD2CS9p/h8JUmFDjKh4H4IjL6zlV10tZVAXWQt3Q5rmy1WAaS3nScR6NgxZ5woOA=="
},
"node_modules/@socket.io/component-emitter": {
"version": "3.1.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/client",
"version": "1.1.43",
"version": "1.1.55",
"description": "",
"main": "dist/packages/client/src/index.js",
"scripts": {
@@ -17,7 +17,7 @@
"typescript": "^4.9.5"
},
"dependencies": {
"@scrypted/types": "^0.2.76",
"@scrypted/types": "^0.2.94",
"axios": "^0.25.0",
"engine.io-client": "^6.4.0",
"rimraf": "^3.0.2"

View File

@@ -7,6 +7,7 @@ import { timeoutPromise } from "../../../common/src/promise-utils";
import { BrowserSignalingSession, waitPeerConnectionIceConnected, waitPeerIceConnectionClosed } from "../../../common/src/rtc-signaling";
import { DataChannelDebouncer } from "../../../plugins/webrtc/src/datachannel-debouncer";
import type { IOSocket } from '../../../server/src/io';
import { MediaObject } from '../../../server/src/plugin/mediaobject';
import type { MediaObjectRemote } from '../../../server/src/plugin/plugin-api';
import { attachPluginRemote } from '../../../server/src/plugin/plugin-remote';
import { RpcPeer } from '../../../server/src/rpc';
@@ -77,25 +78,48 @@ export interface ScryptedClientOptions extends Partial<ScryptedLoginOptions> {
transports?: string[];
}
function isInstalledApp() {
return globalThis.navigator?.userAgent.includes('InstalledApp');
}
function isRunningStandalone() {
return globalThis.matchMedia?.('(display-mode: standalone)').matches || globalThis.navigator?.userAgent.includes('InstalledApp');
return globalThis.matchMedia?.('(display-mode: standalone)').matches || isInstalledApp();
}
export async function logoutScryptedClient(baseUrl?: string) {
const url = baseUrl ? new URL('/logout', baseUrl).toString() : '/logout';
const url = combineBaseUrl(baseUrl, 'logout');
const response = await axios(url, {
withCredentials: true,
});
return response.data;
}
export function getCurrentBaseUrl() {
// an endpoint within scrypted will be served at /endpoint/[org/][id]
// find the endpoint prefix and anything prior to that will be the server base url.
const url = new URL(window.location.href);
url.search = '';
url.hash = '';
let endpointPath = window.location.pathname;
const parts = endpointPath.split('/');
const index = parts.findIndex(p => p === 'endpoint');
if (index === -1) {
// console.warn('path not recognized, does not contain the segment "endpoint".')
return undefined;
}
const keep = parts.slice(0, index);
keep.push('');
url.pathname = keep.join('/');
return url.toString();
}
export async function loginScryptedClient(options: ScryptedLoginOptions) {
let { baseUrl, username, password, change_password, maxAge } = options;
// pwa should stay logged in for a year.
if (!maxAge && isRunningStandalone())
maxAge = 365 * 24 * 60 * 60 * 1000;
const url = `${baseUrl || ''}/login`;
const url = combineBaseUrl(baseUrl, 'login');
const response = await axios.post(url, {
username,
password,
@@ -114,6 +138,7 @@ export async function loginScryptedClient(options: ScryptedLoginOptions) {
// should maybe move this into the cloud server itself.
const scryptedCloud = response.headers['x-scrypted-cloud'] === 'true';
const directAddress = response.headers['x-scrypted-direct-address'];
const cloudAddress = response.headers['x-scrypted-cloud-address'];
return {
error: response.data.error as string,
@@ -123,20 +148,23 @@ export async function loginScryptedClient(options: ScryptedLoginOptions) {
addresses,
scryptedCloud,
directAddress,
cloudAddress,
};
}
export async function checkScryptedClientLogin(options?: ScryptedConnectionOptions) {
let { baseUrl } = options || {};
const url = `${baseUrl || ''}/login`;
const url = combineBaseUrl(baseUrl, 'login');
const response = await axios.get(url, {
withCredentials: true,
...options?.axiosConfig,
});
const scryptedCloud = response.headers['x-scrypted-cloud'] === 'true';
const directAddress = response.headers['x-scrypted-direct-address'];
const cloudAddress = response.headers['x-scrypted-cloud-address'];
return {
hostname: response.data.hostname as string,
redirect: response.data.redirect as string,
username: response.data.username as string,
expiration: response.data.expiration as number,
@@ -144,9 +172,11 @@ export async function checkScryptedClientLogin(options?: ScryptedConnectionOptio
error: response.data.error as string,
authorization: response.data.authorization as string,
queryToken: response.data.queryToken as any,
token: response.data.token as string,
addresses: response.data.addresses as string[],
scryptedCloud,
directAddress,
cloudAddress,
};
}
@@ -174,9 +204,12 @@ export function redirectScryptedLogin(options?: {
globalThis.location.href = redirect_uri;
}
export function combineBaseUrl(baseUrl: string, rootPath: string) {
return baseUrl ? new URL(rootPath, baseUrl).toString() : '/' + rootPath;
}
export async function redirectScryptedLogout(baseUrl?: string) {
baseUrl = baseUrl || '';
globalThis.location.href = `${baseUrl}/logout`;
globalThis.location.href = combineBaseUrl(baseUrl, 'logout');
}
export async function connectScryptedClient(options: ScryptedClientOptions): Promise<ScryptedClientStatic> {
@@ -189,6 +222,7 @@ export async function connectScryptedClient(options: ScryptedClientOptions): Pro
let localAddresses: string[];
let scryptedCloud: boolean;
let directAddress: string;
let cloudAddress: string;
console.log('@scrypted/client', packageJson.version);
@@ -198,6 +232,8 @@ export async function connectScryptedClient(options: ScryptedClientOptions): Pro
extraHeaders['Authorization'] = loginResult.authorization;
localAddresses = loginResult.addresses;
scryptedCloud = loginResult.scryptedCloud;
directAddress = loginResult.directAddress;
cloudAddress = loginResult.cloudAddress;
authorization = loginResult.authorization;
queryToken = loginResult.queryToken;
console.log('login result', Date.now() - start, loginResult);
@@ -211,6 +247,7 @@ export async function connectScryptedClient(options: ScryptedClientOptions): Pro
localAddresses = loginCheck.addresses;
scryptedCloud = loginCheck.scryptedCloud;
directAddress = loginCheck.directAddress;
cloudAddress = loginCheck.cloudAddress;
username = loginCheck.username;
authorization = loginCheck.authorization;
queryToken = loginCheck.queryToken;
@@ -218,9 +255,10 @@ export async function connectScryptedClient(options: ScryptedClientOptions): Pro
}
let socket: IOClientSocket;
const endpointPath = `/endpoint/${pluginId}`;
const eioPath = `endpoint/${pluginId}/engine.io/api`;
const eioEndpoint = baseUrl ? new URL(eioPath, baseUrl).pathname : '/' + eioPath;
const eioOptions: Partial<SocketOptions> = {
path: `${endpointPath}/engine.io/api`,
path: eioEndpoint,
withCredentials: true,
extraHeaders,
rejectUnauthorized: false,
@@ -237,20 +275,40 @@ export async function connectScryptedClient(options: ScryptedClientOptions): Pro
// if the cert has been accepted. Other browsers seem fine.
// So the default is not to connect to IP addresses on Chrome, but do so on other browsers.
const isChrome = globalThis.navigator?.userAgent.includes('Chrome');
const isNotChromeOrIsInstalledApp = !isChrome || isInstalledApp();
const addresses: string[] = [];
const localAddressDefault = !isChrome;
const localAddressDefault = isNotChromeOrIsInstalledApp;
if (((scryptedCloud && options.local === undefined && localAddressDefault) || options.local) && localAddresses) {
addresses.push(...localAddresses);
}
const directAddressDefault = directAddress && (!isChrome || !isIPAddress(directAddress));
const directAddressDefault = directAddress && (isNotChromeOrIsInstalledApp || !isIPAddress(directAddress));
if (((scryptedCloud && options.direct === undefined && directAddressDefault) || options.direct) && directAddress) {
addresses.push(directAddress);
}
if (((scryptedCloud && options.direct === undefined) || options.direct) && cloudAddress) {
addresses.push(cloudAddress);
}
const tryAddresses = !!addresses.length;
const tryWebrtc = !!globalThis.RTCPeerConnection && (scryptedCloud && options.webrtc === undefined) || options.webrtc;
const webrtcLastFailedKey = 'webrtcLastFailed';
const canUseWebrtc = !!globalThis.RTCPeerConnection;
let tryWebrtc = canUseWebrtc && options.webrtc;
// try webrtc by default on scrypted cloud.
// but webrtc takes a while to fail, so backoff if it fails to prevent continual slow starts.
if (scryptedCloud && canUseWebrtc && globalThis.localStorage && options.webrtc === undefined) {
tryWebrtc = true;
const webrtcLastFailed = parseFloat(localStorage.getItem(webrtcLastFailedKey));
// if webrtc has failed in the past day, dont attempt to use it.
const now = Date.now();
if (webrtcLastFailed < now && webrtcLastFailed > now - 1 * 24 * 60 * 60 * 1000) {
tryWebrtc = false;
console.warn('WebRTC API connection recently failed. Skipping.')
}
}
console.log({
tryLocalAddressess: tryAddresses,
tryWebrtc,
@@ -427,7 +485,7 @@ export async function connectScryptedClient(options: ScryptedClientOptions): Pro
const p2pPromises = [...promises];
promises.push((async () => {
const waitDuration = tryWebrtc ? 3000 : (tryAddresses ? 1000 : 0);
const waitDuration = tryWebrtc ? 10000 : (tryAddresses ? 1000 : 0);
console.log('waiting', waitDuration);
if (waitDuration) {
// give the peer to peers a second, but then try connecting directly.
@@ -454,6 +512,9 @@ export async function connectScryptedClient(options: ScryptedClientOptions): Pro
const any = Promise.any(promises);
let { ready, connectionType, address, rpcPeer } = await any;
if (tryWebrtc && connectionType !== 'webrtc')
localStorage.setItem(webrtcLastFailedKey, Date.now().toString());
console.log('connected', connectionType, address)
socket = ready;
@@ -505,22 +566,7 @@ export async function connectScryptedClient(options: ScryptedClientOptions): Pro
console.log('api attached', Date.now() - start);
mediaManager.createMediaObject = async<T extends MediaObjectOptions>(data: any, mimeType: string, options: T) => {
const mo: MediaObjectRemote & {
[RpcPeer.PROPERTY_PROXY_PROPERTIES]: any,
[RpcPeer.PROPERTY_JSON_DISABLE_SERIALIZATION]: true,
} = {
[RpcPeer.PROPERTY_JSON_DISABLE_SERIALIZATION]: true,
[RpcPeer.PROPERTY_PROXY_PROPERTIES]: {
mimeType,
sourceId: options?.sourceId,
},
mimeType,
sourceId: options?.sourceId,
async getData() {
return data;
},
};
return mo as any;
return new MediaObject(mimeType, data, options) as any;
}
const { browserSignalingSession, connectionManagementId, updateSessionId } = rpcPeer.params;

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/rpc",
"version": "0.0.2",
"version": "0.0.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/rpc",
"version": "0.0.2",
"version": "0.0.4",
"license": "ISC",
"devDependencies": {
"@types/node": "^18.11.18",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/deferred",
"version": "0.0.2",
"version": "0.0.4",
"description": "",
"main": "dist/index.js",
"scripts": {

View File

@@ -0,0 +1 @@
../../../common/src/async-queue.ts

View File

@@ -0,0 +1 @@
../../../common/src/deferred.ts

View File

@@ -1 +0,0 @@
../../../common/src/deferred.ts

View File

@@ -0,0 +1,2 @@
export * from './deferred';
export * from './async-queue';

View File

@@ -1,16 +1,17 @@
{
"name": "@scrypted/h264-packetizer",
"version": "0.0.6",
"name": "@scrypted/h264-repacketizer",
"version": "0.0.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/h264-packetizer",
"version": "0.0.6",
"name": "@scrypted/h264-repacketizer",
"version": "0.0.7",
"license": "ISC",
"devDependencies": {
"@types/node": "^18.11.18",
"rimraf": "^4.1.1",
"ts-node": "^10.9.1",
"typescript": "^4.7.4"
}
},
@@ -43,12 +44,121 @@
"../sdk/types": {
"extraneous": true
},
"node_modules/@cspotcode/source-map-support": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
"dev": true,
"dependencies": {
"@jridgewell/trace-mapping": "0.3.9"
},
"engines": {
"node": ">=12"
}
},
"node_modules/@jridgewell/resolve-uri": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
"integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
"dev": true,
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/sourcemap-codec": {
"version": "1.4.15",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
"dev": true
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.9",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
"dev": true,
"dependencies": {
"@jridgewell/resolve-uri": "^3.0.3",
"@jridgewell/sourcemap-codec": "^1.4.10"
}
},
"node_modules/@tsconfig/node10": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
"integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
"dev": true
},
"node_modules/@tsconfig/node12": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
"dev": true
},
"node_modules/@tsconfig/node14": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
"dev": true
},
"node_modules/@tsconfig/node16": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
"integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
"dev": true
},
"node_modules/@types/node": {
"version": "18.11.18",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
"integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==",
"dev": true
},
"node_modules/acorn": {
"version": "8.10.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
"integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
"dev": true,
"bin": {
"acorn": "bin/acorn"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/acorn-walk": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
"dev": true,
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/arg": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
"dev": true
},
"node_modules/create-require": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
"dev": true
},
"node_modules/diff": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
"dev": true,
"engines": {
"node": ">=0.3.1"
}
},
"node_modules/make-error": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
"dev": true
},
"node_modules/rimraf": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.1.tgz",
@@ -64,6 +174,49 @@
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/ts-node": {
"version": "10.9.1",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
"dev": true,
"dependencies": {
"@cspotcode/source-map-support": "^0.8.0",
"@tsconfig/node10": "^1.0.7",
"@tsconfig/node12": "^1.0.7",
"@tsconfig/node14": "^1.0.0",
"@tsconfig/node16": "^1.0.2",
"acorn": "^8.4.1",
"acorn-walk": "^8.1.1",
"arg": "^4.1.0",
"create-require": "^1.1.0",
"diff": "^4.0.1",
"make-error": "^1.1.1",
"v8-compile-cache-lib": "^3.0.1",
"yn": "3.1.1"
},
"bin": {
"ts-node": "dist/bin.js",
"ts-node-cwd": "dist/bin-cwd.js",
"ts-node-esm": "dist/bin-esm.js",
"ts-node-script": "dist/bin-script.js",
"ts-node-transpile-only": "dist/bin-transpile.js",
"ts-script": "dist/bin-script-deprecated.js"
},
"peerDependencies": {
"@swc/core": ">=1.2.50",
"@swc/wasm": ">=1.2.50",
"@types/node": "*",
"typescript": ">=2.7"
},
"peerDependenciesMeta": {
"@swc/core": {
"optional": true
},
"@swc/wasm": {
"optional": true
}
}
},
"node_modules/typescript": {
"version": "4.7.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
@@ -76,26 +229,165 @@
"engines": {
"node": ">=4.2.0"
}
},
"node_modules/v8-compile-cache-lib": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
"dev": true
},
"node_modules/yn": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
"dev": true,
"engines": {
"node": ">=6"
}
}
},
"dependencies": {
"@cspotcode/source-map-support": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
"dev": true,
"requires": {
"@jridgewell/trace-mapping": "0.3.9"
}
},
"@jridgewell/resolve-uri": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
"integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
"dev": true
},
"@jridgewell/sourcemap-codec": {
"version": "1.4.15",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
"dev": true
},
"@jridgewell/trace-mapping": {
"version": "0.3.9",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
"dev": true,
"requires": {
"@jridgewell/resolve-uri": "^3.0.3",
"@jridgewell/sourcemap-codec": "^1.4.10"
}
},
"@tsconfig/node10": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
"integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
"dev": true
},
"@tsconfig/node12": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
"dev": true
},
"@tsconfig/node14": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
"dev": true
},
"@tsconfig/node16": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
"integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
"dev": true
},
"@types/node": {
"version": "18.11.18",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
"integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==",
"dev": true
},
"acorn": {
"version": "8.10.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
"integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
"dev": true
},
"acorn-walk": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
"dev": true
},
"arg": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
"dev": true
},
"create-require": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
"dev": true
},
"diff": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
"dev": true
},
"make-error": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
"dev": true
},
"rimraf": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.1.tgz",
"integrity": "sha512-Z4Y81w8atcvaJuJuBB88VpADRH66okZAuEm+Jtaufa+s7rZmIz+Hik2G53kGaNytE7lsfXyWktTmfVz0H9xuDg==",
"dev": true
},
"ts-node": {
"version": "10.9.1",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
"dev": true,
"requires": {
"@cspotcode/source-map-support": "^0.8.0",
"@tsconfig/node10": "^1.0.7",
"@tsconfig/node12": "^1.0.7",
"@tsconfig/node14": "^1.0.0",
"@tsconfig/node16": "^1.0.2",
"acorn": "^8.4.1",
"acorn-walk": "^8.1.1",
"arg": "^4.1.0",
"create-require": "^1.1.0",
"diff": "^4.0.1",
"make-error": "^1.1.1",
"v8-compile-cache-lib": "^3.0.1",
"yn": "3.1.1"
}
},
"typescript": {
"version": "4.7.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
"integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
"dev": true
},
"v8-compile-cache-lib": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
"dev": true
},
"yn": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
"dev": true
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/h264-repacketizer",
"version": "0.0.6",
"version": "0.0.7",
"description": "",
"main": "dist/index.js",
"scripts": {
@@ -14,6 +14,7 @@
"devDependencies": {
"@types/node": "^18.11.18",
"rimraf": "^4.1.1",
"ts-node": "^10.9.1",
"typescript": "^4.7.4"
}
}

View File

@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "ES2019",
"target": "ES2020",
"noImplicitAny": true,
"outDir": "./dist",
"esModuleInterop": true,
@@ -10,6 +10,7 @@
"declaration": true,
"resolveJsonModule": true,
},
"exclude": ["**/node_modules"],
"include": [
"src/**/*"
],

1
packages/python-client/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.venv

View File

@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/test.py",
"console": "integratedTerminal",
"justMyCode": true
}
]
}

View File

@@ -0,0 +1 @@
../../server/python/plugin_remote.py

View File

@@ -0,0 +1,3 @@
python-engineio[asyncio_client]
aiohttp
aiodns

View File

@@ -0,0 +1 @@
../../server/python/rpc.py

View File

@@ -0,0 +1 @@
../../server/python/rpc_reader.py

View File

@@ -0,0 +1 @@
../../sdk/types/scrypted_python

View File

@@ -0,0 +1,151 @@
from __future__ import annotations
import asyncio
import os
from contextlib import nullcontext
import aiohttp
import engineio
import plugin_remote
import rpc_reader
from plugin_remote import DeviceManager, MediaManager, SystemManager
from scrypted_python.scrypted_sdk import ScryptedInterface, ScryptedStatic
class EioRpcTransport(rpc_reader.RpcTransport):
def __init__(self, loop: asyncio.AbstractEventLoop):
super().__init__()
self.eio = engineio.AsyncClient(ssl_verify=False)
self.loop = loop
self.write_error: Exception = None
self.read_queue = asyncio.Queue()
self.write_queue = asyncio.Queue()
@self.eio.on("message")
def on_message(data):
self.read_queue.put_nowait(data)
asyncio.run_coroutine_threadsafe(self.send_loop(), self.loop)
async def read(self):
return await self.read_queue.get()
async def send_loop(self):
while True:
data = await self.write_queue.get()
try:
await self.eio.send(data)
except Exception as e:
self.write_error = e
self.write_queue = None
break
def writeBuffer(self, buffer, reject):
async def send():
try:
if self.write_error:
raise self.write_error
self.write_queue.put_nowait(buffer)
except Exception as e:
reject(e)
asyncio.run_coroutine_threadsafe(send(), self.loop)
def writeJSON(self, json, reject):
return self.writeBuffer(json, reject)
async def connect_scrypted_client(
transport: EioRpcTransport,
base_url: str,
username: str,
password: str,
plugin_id: str = "@scrypted/core",
session: aiohttp.ClientSession | None = None,
) -> ScryptedStatic:
login_url = f"{base_url}/login"
login_body = {
"username": username,
"password": password,
}
if session:
cm = nullcontext(session)
else:
cm = aiohttp.ClientSession()
async with cm as _session:
async with _session.post(
login_url, verify_ssl=False, json=login_body
) as response:
login_response = await response.json()
headers = {"Authorization": login_response["authorization"]}
await transport.eio.connect(
base_url,
headers=headers,
engineio_path=f"/endpoint/{plugin_id}/engine.io/api/",
)
ret = asyncio.Future[ScryptedStatic](loop=transport.loop)
peer, peerReadLoop = await rpc_reader.prepare_peer_readloop(
transport.loop, transport
)
peer.params["print"] = print
def callback(api, pluginId, hostInfo):
remote = plugin_remote.PluginRemote(
peer, api, pluginId, hostInfo, transport.loop
)
wrapped = remote.setSystemState
async def remoteSetSystemState(systemState):
await wrapped(systemState)
async def resolve():
sdk = ScryptedStatic()
sdk.api = api
sdk.remote = remote
sdk.systemManager = SystemManager(api, remote.systemState)
sdk.deviceManager = DeviceManager(
remote.nativeIds, sdk.systemManager
)
sdk.mediaManager = MediaManager(await api.getMediaManager())
ret.set_result(sdk)
asyncio.run_coroutine_threadsafe(resolve(), transport.loop)
remote.setSystemState = remoteSetSystemState
return remote
peer.params["getRemote"] = callback
asyncio.run_coroutine_threadsafe(peerReadLoop(), transport.loop)
sdk = await ret
return sdk
async def main():
transport = EioRpcTransport(asyncio.get_event_loop())
sdk = await connect_scrypted_client(
transport,
"https://localhost:10443",
os.environ["SCRYPTED_USERNAME"],
os.environ["SCRYPTED_PASSWORD"],
)
for id in sdk.systemManager.getSystemState():
device = sdk.systemManager.getDeviceById(id)
print(device.name)
if ScryptedInterface.OnOff.value in device.interfaces:
print(f"OnOff: device is {device.on}")
await transport.eio.disconnect()
os._exit(0)
loop = asyncio.new_event_loop()
asyncio.run_coroutine_threadsafe(main(), loop)
loop.run_forever()

View File

@@ -1,4 +1,4 @@
{
"scrypted.debugHost": "10.10.0.50",
"scrypted.debugHost": "koushik-ubuntu",
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/alexa",
"version": "0.2.0",
"version": "0.2.8",
"scripts": {
"scrypted-setup-project": "scrypted-setup-project",
"prescrypted-setup-project": "scrypted-package-json",
@@ -39,6 +39,6 @@
},
"devDependencies": {
"@types/node": "^18.4.2",
"@scrypted/sdk": "^0.2.70"
"@scrypted/sdk": "../../sdk"
}
}

View File

@@ -15,6 +15,11 @@ const includeToken = 4;
export let DEBUG = false;
function debug(...args: any[]) {
if (DEBUG)
console.debug(...args);
}
class AlexaPlugin extends ScryptedDeviceBase implements HttpRequestHandler, MixinProvider, Settings {
storageSettings = new StorageSettings(this, {
tokenInfo: {
@@ -34,6 +39,14 @@ class AlexaPlugin extends ScryptedDeviceBase implements HttpRequestHandler, Mixi
description: 'This is the endpoint Alexa will use to send events to. This is set after you login.',
type: 'string',
readonly: true
},
debug: {
title: 'Debug Events',
description: 'Log all events to the console. This will be very noisy and should not be left enabled.',
type: 'boolean',
onPut(oldValue: boolean, newValue: boolean) {
DEBUG = newValue;
}
}
});
@@ -44,6 +57,8 @@ class AlexaPlugin extends ScryptedDeviceBase implements HttpRequestHandler, Mixi
constructor(nativeId?: string) {
super(nativeId);
DEBUG = this.storageSettings.values.debug ?? false;
alexaHandlers.set('Alexa.Authorization/AcceptGrant', this.onAlexaAuthorization);
alexaHandlers.set('Alexa.Discovery/Discover', this.onDiscoverEndpoints);
@@ -141,12 +156,23 @@ class AlexaPlugin extends ScryptedDeviceBase implements HttpRequestHandler, Mixi
if (!supportedType)
return;
const report = await supportedType.sendEvent(eventSource, eventDetails, eventData);
let report = await supportedType.sendEvent(eventSource, eventDetails, eventData);
if (!report && eventDetails.eventInterface === ScryptedInterface.Online) {
report = {};
}
if (!report && eventDetails.eventInterface === ScryptedInterface.Battery) {
report = {};
}
if (!report) {
this.console.warn(`${eventDetails.eventInterface}.${eventDetails.property} not supported for device ${eventSource.type}`);
return;
}
debug("event", eventDetails.eventInterface, eventDetails.property, eventSource.type);
let data = {
"event": {
"header": {
@@ -234,7 +260,7 @@ class AlexaPlugin extends ScryptedDeviceBase implements HttpRequestHandler, Mixi
const endpoint = await this.getAlexaEndpoint();
const self = this;
this.console.assert(!DEBUG, `event:`, data);
debug("send event to alexa", data);
return axios.post(`https://${endpoint}/v3/events`, data, {
headers: {
@@ -366,14 +392,21 @@ class AlexaPlugin extends ScryptedDeviceBase implements HttpRequestHandler, Mixi
})
}
private setReauthenticateAlert() {
const msg: string = "Please reauthenticate by following the directions below.";
this.log.a(msg);
}
getAccessToken(): Promise<string> {
if (this.accessToken)
return this.accessToken;
this.log.clearAlerts();
const { tokenInfo } = this.storageSettings.values;
if (tokenInfo === undefined) {
this.log.e("Please reauthenticate by following the directions below.");
this.setReauthenticateAlert();
throw new Error("'tokenInfo' is undefined");
}
@@ -406,19 +439,19 @@ class AlexaPlugin extends ScryptedDeviceBase implements HttpRequestHandler, Mixi
case 'invalid_grant':
case 'unauthorized_client':
self.console.error(error?.response?.data);
self.log.e(error?.response?.data?.error_description);
self.log.a(error?.response?.data?.error_description);
self.storageSettings.values.tokenInfo = undefined;
self.accessToken = undefined;
break;
case 'authorization_pending':
self.console.warn(error?.response?.data);
self.log.w(error?.response?.data?.error_description);
self.log.a(error?.response?.data?.error_description);
break;
case 'expired_token':
self.console.warn(error?.response?.data);
self.log.w(error?.response?.data?.error_description);
self.log.a(error?.response?.data?.error_description);
self.accessToken = undefined;
break;
@@ -462,6 +495,8 @@ class AlexaPlugin extends ScryptedDeviceBase implements HttpRequestHandler, Mixi
});
if (accessToken !== undefined) {
this.log.clearAlerts();
try {
response.send({
"event": {
@@ -570,6 +605,8 @@ class AlexaPlugin extends ScryptedDeviceBase implements HttpRequestHandler, Mixi
const { authorization } = request.headers;
if (!this.validAuths.has(authorization)) {
try {
debug("making authorization request to Scrypted");
await axios.get('https://home.scrypted.app/_punch/getcookie', {
headers: {
'Authorization': authorization,
@@ -590,11 +627,11 @@ class AlexaPlugin extends ScryptedDeviceBase implements HttpRequestHandler, Mixi
const { directive } = body;
const { namespace, name } = directive.header;
this.console.assert(!DEBUG, `request: ${namespace}/${name}`);
const mapName = `${namespace}/${name}`;
const handler = alexaHandlers.get(mapName);
debug("received directive from alexa", mapName, body);
const handler = alexaHandlers.get(mapName);
if (handler)
return handler.apply(this, [request, response, directive]);
@@ -641,7 +678,7 @@ class HttpResponseLoggingImpl implements AlexaHttpResponse {
if (options.code !== 200)
this.console.error(`response error ${options.code}:`, body);
else
this.console.assert(!DEBUG, `response ${options.code}:`, body);
debug("response to alexa directive", options.code, body);
if (typeof body === 'object')
body = JSON.stringify(body);

View File

@@ -120,7 +120,7 @@ export async function getCameraCapabilities(device: ScryptedDevice): Promise<Dis
"interface": "Alexa.RTCSessionController",
"version": "3",
"configuration": {
isFullDuplexAudioSupported: true,
"isFullDuplexAudioSupported": true,
}
} as DiscoveryCapability
];

View File

@@ -7,17 +7,35 @@ import { Response, WebRTCAnswerGeneratedForSessionEvent, WebRTCSessionConnectedE
export class AlexaSignalingSession implements RTCSignalingSession {
constructor(public response: AlexaHttpResponse, public directive: any) {
this.options = this.createOptions();
this.__proxy_props = { options: this.createOptions() };
}
__proxy_props: { options: RTCSignalingOptions; };
options: RTCSignalingOptions;
async getOptions(): Promise<RTCSignalingOptions> {
return {
return this.options;
}
private createOptions() {
const options: RTCSignalingOptions = {
proxy: true,
offer: {
type: 'offer',
sdp: this.directive.payload.offer.value,
},
disableTrickle: true,
}
disableTurn: true,
// this could be a low resolution screen, no way of knowning, so never send a 1080p stream
screen: {
devicePixelRatio: 1,
width: 1280,
height: 720
}
};
return options;
}
async createLocalDescription(type: "offer" | "answer", setup: RTCAVSignalingSetup, sendIceCandidate: RTCSignalingSendIceCandidate): Promise<RTCSessionDescriptionInit> {

View File

@@ -6,11 +6,11 @@ import { supportedTypes } from ".";
supportedTypes.set(ScryptedDeviceType.Doorbell, {
async discover(device: ScryptedDevice): Promise<Partial<DiscoveryEndpoint>> {
let capabilities: any[] = [];
let category: DisplayCategory = 'DOORBELL';
const displayCategories: DisplayCategory[] = [];
if (device.interfaces.includes(ScryptedInterface.RTCSignalingChannel)) {
capabilities = await getCameraCapabilities(device);
category = 'CAMERA';
displayCategories.push('CAMERA');
}
if (device.interfaces.includes(ScryptedInterface.BinarySensor)) {
@@ -24,8 +24,11 @@ supportedTypes.set(ScryptedDeviceType.Doorbell, {
);
}
// Important: If your device is a video doorbell, make sure that you list CAMERA before DOORBELL in the displayCategories list.
displayCategories.push('DOORBELL');
return {
displayCategories: [category],
displayCategories,
capabilities
};
},
@@ -38,6 +41,9 @@ supportedTypes.set(ScryptedDeviceType.Doorbell, {
if (response)
return response;
if (eventDetails.eventInterface === ScryptedInterface.BinarySensor && eventData === false)
return {};
if (eventDetails.eventInterface === ScryptedInterface.BinarySensor && eventData === true)
return {
event: {

View File

@@ -1,6 +1,6 @@
{
"compilerOptions": {
"module": "commonjs",
"module": "Node16",
"target": "ES2021",
"resolveJsonModule": true,
"moduleResolution": "Node16",

View File

@@ -1,26 +1,25 @@
{
"name": "@scrypted/amcrest",
"version": "0.0.119",
"lockfileVersion": 2,
"version": "0.0.124",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@scrypted/amcrest",
"version": "0.0.119",
"version": "0.0.124",
"license": "Apache",
"dependencies": {
"@koush/axios-digest-auth": "^0.8.5",
"@scrypted/common": "file:../../common",
"@scrypted/sdk": "file:../../sdk",
"@types/multiparty": "^0.0.33",
"multiparty": "^4.2.2"
"multiparty": "^4.2.3"
},
"devDependencies": {
"@types/node": "^16.11.0"
"@types/node": "^18.16.18"
}
},
"../../common": {
"name": "@scrypted/common",
"version": "1.0.1",
"license": "ISC",
"dependencies": {
@@ -35,8 +34,7 @@
}
},
"../../sdk": {
"name": "@scrypted/sdk",
"version": "0.2.68",
"version": "0.2.103",
"license": "ISC",
"dependencies": {
"@babel/preset-typescript": "^7.18.6",
@@ -71,9 +69,6 @@
"typedoc": "^0.23.21"
}
},
"../sdk": {
"extraneous": true
},
"node_modules/@koush/axios-digest-auth": {
"version": "0.8.5",
"resolved": "https://registry.npmjs.org/@koush/axios-digest-auth/-/axios-digest-auth-0.8.5.tgz",
@@ -100,9 +95,9 @@
}
},
"node_modules/@types/node": {
"version": "16.11.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.0.tgz",
"integrity": "sha512-8MLkBIYQMuhRBQzGN9875bYsOhPnf/0rgXGo66S2FemHkhbn9qtsz9ywV1iCG+vbjigE4WUNVvw37Dx+L0qsPg=="
"version": "18.16.18",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.18.tgz",
"integrity": "sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw=="
},
"node_modules/auth-header": {
"version": "1.0.0",
@@ -120,15 +115,15 @@
"node_modules/depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
"integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/follow-redirects": {
"version": "1.14.9",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==",
"version": "1.15.2",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
"funding": [
{
"type": "individual",
@@ -145,15 +140,15 @@
}
},
"node_modules/http-errors": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.0.tgz",
"integrity": "sha512-4I8r0C5JDhT5VkvI47QktDW75rNlGVsUf/8hzjCC/wkWI/jdTRmBb9aI7erSG82r1bjKY3F6k28WnsVxB1C73A==",
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz",
"integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==",
"dependencies": {
"depd": "~1.1.2",
"inherits": "2.0.4",
"setprototypeof": "1.2.0",
"statuses": ">= 1.5.0 < 2",
"toidentifier": "1.0.0"
"toidentifier": "1.0.1"
},
"engines": {
"node": ">= 0.6"
@@ -165,11 +160,11 @@
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"node_modules/multiparty": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/multiparty/-/multiparty-4.2.2.tgz",
"integrity": "sha512-NtZLjlvsjcoGrzojtwQwn/Tm90aWJ6XXtPppYF4WmOk/6ncdwMMKggFY2NlRRN9yiCEIVxpOfPWahVEG2HAG8Q==",
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/multiparty/-/multiparty-4.2.3.tgz",
"integrity": "sha512-Ak6EUJZuhGS8hJ3c2fY6UW5MbkGUPMBEGd13djUzoY/BHqV/gTuFWtC6IuVA7A2+v3yjBS6c4or50xhzTQZImQ==",
"dependencies": {
"http-errors": "~1.8.0",
"http-errors": "~1.8.1",
"safe-buffer": "5.2.1",
"uid-safe": "2.1.5"
},
@@ -180,7 +175,7 @@
"node_modules/random-bytes": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz",
"integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs=",
"integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==",
"engines": {
"node": ">= 0.8"
}
@@ -212,15 +207,15 @@
"node_modules/statuses": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=",
"integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/toidentifier": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
"engines": {
"node": ">=0.6"
}
@@ -236,147 +231,5 @@
"node": ">= 0.8"
}
}
},
"dependencies": {
"@koush/axios-digest-auth": {
"version": "0.8.5",
"resolved": "https://registry.npmjs.org/@koush/axios-digest-auth/-/axios-digest-auth-0.8.5.tgz",
"integrity": "sha512-EZMM0gMJ3hMUD4EuUqSwP6UGt5Vmw2TZtY7Ypec55AnxkExSXM0ySgPtqkAcnL43g1R27yAg/dQL7dRTLMqO3Q==",
"requires": {
"auth-header": "^1.0.0",
"axios": "^0.21.4"
}
},
"@scrypted/common": {
"version": "file:../../common",
"requires": {
"@scrypted/sdk": "file:../sdk",
"@scrypted/server": "file:../server",
"@types/node": "^16.9.0",
"http-auth-utils": "^3.0.2",
"node-fetch-commonjs": "^3.1.1",
"typescript": "^4.4.3"
}
},
"@scrypted/sdk": {
"version": "file:../../sdk",
"requires": {
"@babel/preset-typescript": "^7.18.6",
"@types/node": "^18.11.18",
"@types/stringify-object": "^4.0.0",
"adm-zip": "^0.4.13",
"axios": "^0.21.4",
"babel-loader": "^9.1.0",
"babel-plugin-const-enum": "^1.1.0",
"esbuild": "^0.15.9",
"ncp": "^2.0.0",
"raw-loader": "^4.0.2",
"rimraf": "^3.0.2",
"stringify-object": "^3.3.0",
"tmp": "^0.2.1",
"ts-loader": "^9.4.2",
"ts-node": "^10.4.0",
"typedoc": "^0.23.21",
"typescript": "^4.9.4",
"webpack": "^5.75.0",
"webpack-bundle-analyzer": "^4.5.0"
}
},
"@types/multiparty": {
"version": "0.0.33",
"resolved": "https://registry.npmjs.org/@types/multiparty/-/multiparty-0.0.33.tgz",
"integrity": "sha512-Il6cJUpSqgojT7NxbVJUvXkCblm50/yEJYtblISDsNIeNYf4yMAhdizzidUk6h8pJ8yhwK/3Fkb+3Dwcgtwl8w==",
"requires": {
"@types/node": "*"
}
},
"@types/node": {
"version": "16.11.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.0.tgz",
"integrity": "sha512-8MLkBIYQMuhRBQzGN9875bYsOhPnf/0rgXGo66S2FemHkhbn9qtsz9ywV1iCG+vbjigE4WUNVvw37Dx+L0qsPg=="
},
"auth-header": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/auth-header/-/auth-header-1.0.0.tgz",
"integrity": "sha512-CPPazq09YVDUNNVWo4oSPTQmtwIzHusZhQmahCKvIsk0/xH6U3QsMAv3sM+7+Q0B1K2KJ/Q38OND317uXs4NHA=="
},
"axios": {
"version": "0.21.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"requires": {
"follow-redirects": "^1.14.0"
}
},
"depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
},
"follow-redirects": {
"version": "1.14.9",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w=="
},
"http-errors": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.0.tgz",
"integrity": "sha512-4I8r0C5JDhT5VkvI47QktDW75rNlGVsUf/8hzjCC/wkWI/jdTRmBb9aI7erSG82r1bjKY3F6k28WnsVxB1C73A==",
"requires": {
"depd": "~1.1.2",
"inherits": "2.0.4",
"setprototypeof": "1.2.0",
"statuses": ">= 1.5.0 < 2",
"toidentifier": "1.0.0"
}
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"multiparty": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/multiparty/-/multiparty-4.2.2.tgz",
"integrity": "sha512-NtZLjlvsjcoGrzojtwQwn/Tm90aWJ6XXtPppYF4WmOk/6ncdwMMKggFY2NlRRN9yiCEIVxpOfPWahVEG2HAG8Q==",
"requires": {
"http-errors": "~1.8.0",
"safe-buffer": "5.2.1",
"uid-safe": "2.1.5"
}
},
"random-bytes": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz",
"integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs="
},
"safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
},
"setprototypeof": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
},
"statuses": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
},
"toidentifier": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
},
"uid-safe": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz",
"integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==",
"requires": {
"random-bytes": "~1.0.0"
}
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/amcrest",
"version": "0.0.119",
"version": "0.0.124",
"description": "Amcrest Plugin for Scrypted",
"author": "Scrypted",
"license": "Apache",
@@ -36,12 +36,12 @@
},
"dependencies": {
"@koush/axios-digest-auth": "^0.8.5",
"@scrypted/sdk": "file:../../sdk",
"@scrypted/common": "file:../../common",
"@scrypted/sdk": "file:../../sdk",
"@types/multiparty": "^0.0.33",
"multiparty": "^4.2.2"
"multiparty": "^4.2.3"
},
"devDependencies": {
"@types/node": "^16.11.0"
"@types/node": "^18.16.18"
}
}

Some files were not shown because too many files have changed in this diff Show More