mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2026-04-22 15:47:06 +08:00
Move kasa source to separate module
This commit is contained in:
@@ -191,7 +191,7 @@ A summary table of all modules and features can be found [here](internal/README.
|
||||
- [`hass`](internal/hass/README.md) - Import cameras from [Home Assistant](https://www.home-assistant.io/) config files.
|
||||
- [`homekit`](internal/homekit/README.md) - Cameras with [Apple HomeKit](https://www.apple.com/home-app/accessories/) protocol.
|
||||
- [`isapi`](internal/isapi/README.md) - Two-way audio for [Hikvision ISAPI](https://tpp.hikvision.com/download/ISAPI_OTAP) protocol.
|
||||
- [`kasa`](internal/tapo/README.md#tp-link-kasa) - [TP-Link Kasa](https://www.kasasmart.com/) cameras.
|
||||
- [`kasa`](internal/kasa/README.md) - [TP-Link Kasa](https://www.kasasmart.com/) cameras.
|
||||
- [`multitrans`](internal/multitrans/README.md) - Two-way audio for Chinese version of [TP-Link](https://www.tp-link.com.cn/) cameras.
|
||||
- [`nest`](internal/nest/README.md) - [Google Nest](https://developers.google.com/nest/device-access/supported-devices) cameras through user-unfriendly and paid APIs.
|
||||
- [`ring`](internal/ring/README.md) - Ring cameras with two-way audio support.
|
||||
|
||||
@@ -41,6 +41,7 @@ Some formats and protocols go2rtc supports exclusively. They have no equivalent
|
||||
| [`http`] | `yuv4mpegpipe` | `http`, `tcp` | yes | | | |
|
||||
| [`isapi`] | `alaw`, `mulaw` | `http` | | | | yes |
|
||||
| [`ivideon`] | `mp4` | `ws` | yes | | | |
|
||||
| [`kasa`] | `h264`, `mulaw` | `http` | yes | | | |
|
||||
| [`mjpeg`] | `ascii` | `http` | | yes | | |
|
||||
| [`mjpeg`] | `jpeg` | `http` | | yes | | |
|
||||
| [`mjpeg`] | `mpjpeg` | `http` | | yes | yes | |
|
||||
@@ -86,6 +87,7 @@ Some formats and protocols go2rtc supports exclusively. They have no equivalent
|
||||
[`http`]: http/README.md
|
||||
[`isapi`]: isapi/README.md
|
||||
[`ivideon`]: ivideon/README.md
|
||||
[`kasa`]: kasa/README.md
|
||||
[`mjpeg`]: mjpeg/README.md
|
||||
[`mp4`]: mp4/README.md
|
||||
[`mpegts`]: mpegts/README.md
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# TP-Link Kasa
|
||||
|
||||
[`new in v1.7.0`](https://github.com/AlexxIT/go2rtc/releases/tag/v1.7.0)
|
||||
|
||||
[TP-Link Kasa](https://www.kasasmart.com/) non-standard protocol [more info](https://medium.com/@hu3vjeen/reverse-engineering-tp-link-kc100-bac4641bf1cd).
|
||||
|
||||
- `username` - urlsafe email, `alex@gmail.com` -> `alex%40gmail.com`
|
||||
- `password` - base64password, `secret1` -> `c2VjcmV0MQ==`
|
||||
|
||||
```yaml
|
||||
streams:
|
||||
kc401: kasa://username:password@192.168.1.123:19443/https/stream/mixed
|
||||
```
|
||||
|
||||
Tested: KD110, KC200, KC401, KC420WS, EC71.
|
||||
@@ -0,0 +1,13 @@
|
||||
package kasa
|
||||
|
||||
import (
|
||||
"github.com/AlexxIT/go2rtc/internal/streams"
|
||||
"github.com/AlexxIT/go2rtc/pkg/core"
|
||||
"github.com/AlexxIT/go2rtc/pkg/kasa"
|
||||
)
|
||||
|
||||
func Init() {
|
||||
streams.HandleFunc("kasa", func(source string) (core.Producer, error) {
|
||||
return kasa.Dial(source)
|
||||
})
|
||||
}
|
||||
@@ -24,6 +24,7 @@ import (
|
||||
"github.com/AlexxIT/go2rtc/internal/http"
|
||||
"github.com/AlexxIT/go2rtc/internal/isapi"
|
||||
"github.com/AlexxIT/go2rtc/internal/ivideon"
|
||||
"github.com/AlexxIT/go2rtc/internal/kasa"
|
||||
"github.com/AlexxIT/go2rtc/internal/mjpeg"
|
||||
"github.com/AlexxIT/go2rtc/internal/mp4"
|
||||
"github.com/AlexxIT/go2rtc/internal/mpegts"
|
||||
@@ -96,6 +97,7 @@ func main() {
|
||||
{"gopro", gopro.Init},
|
||||
{"isapi", isapi.Init},
|
||||
{"ivideon", ivideon.Init},
|
||||
{"kasa", kasa.Init},
|
||||
{"mpegts", mpegts.Init},
|
||||
{"multitrans", multitrans.Init},
|
||||
{"nest", nest.Init},
|
||||
|
||||
+10
-1
@@ -89,12 +89,21 @@ Some formats and protocols go2rtc supports exclusively. They have no equivalent
|
||||
|
||||
## Developers
|
||||
|
||||
File naming:
|
||||
**File naming:**
|
||||
|
||||
- `pkg/{format}/producer.go` - producer for this format (also if support backchannel)
|
||||
- `pkg/{format}/consumer.go` - consumer for this format
|
||||
- `pkg/{format}/backchanel.go` - producer with only backchannel func
|
||||
|
||||
**Mentioning modules:**
|
||||
|
||||
- [`main.go`](../main.go)
|
||||
- [`README.md`](../README.md)
|
||||
- [`internal/README.md`](../internal/README.md)
|
||||
- [`website/.vitepress/config.js`](../website/.vitepress/config.js)
|
||||
- [`website/api/openapi.yaml`](../website/api/openapi.yaml)
|
||||
- [`www/schema.json`](../www/schema.json)
|
||||
|
||||
## Useful links
|
||||
|
||||
- https://www.wowza.com/blog/streaming-protocols
|
||||
|
||||
@@ -130,9 +130,10 @@ export default defineConfig({
|
||||
{text: 'eseecloud', link: '/internal/eseecloud/'},
|
||||
{text: 'flussonic', link: '/internal/flussonic/'},
|
||||
{text: 'gopro', link: '/internal/gopro/'},
|
||||
{text: 'hass', link: '/internal/hass/'},
|
||||
{text: 'isapi', link: '/internal/isapi/'},
|
||||
{text: 'ivideon', link: '/internal/ivideon/'},
|
||||
{text: 'hass', link: '/internal/hass/'},
|
||||
{text: 'kasa', link: '/internal/kasa/'},
|
||||
{text: 'mpegts', link: '/internal/mpegts/'},
|
||||
{text: 'multitrans', link: '/internal/multitrans/'},
|
||||
{text: 'nest', link: '/internal/nest/'},
|
||||
|
||||
@@ -171,6 +171,7 @@
|
||||
"gopro",
|
||||
"isapi",
|
||||
"ivideon",
|
||||
"kasa",
|
||||
"mpegts",
|
||||
"nest",
|
||||
"ring",
|
||||
|
||||
Reference in New Issue
Block a user