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.
|
- [`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.
|
- [`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.
|
- [`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.
|
- [`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.
|
- [`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.
|
- [`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 | | | |
|
| [`http`] | `yuv4mpegpipe` | `http`, `tcp` | yes | | | |
|
||||||
| [`isapi`] | `alaw`, `mulaw` | `http` | | | | yes |
|
| [`isapi`] | `alaw`, `mulaw` | `http` | | | | yes |
|
||||||
| [`ivideon`] | `mp4` | `ws` | yes | | | |
|
| [`ivideon`] | `mp4` | `ws` | yes | | | |
|
||||||
|
| [`kasa`] | `h264`, `mulaw` | `http` | yes | | | |
|
||||||
| [`mjpeg`] | `ascii` | `http` | | yes | | |
|
| [`mjpeg`] | `ascii` | `http` | | yes | | |
|
||||||
| [`mjpeg`] | `jpeg` | `http` | | yes | | |
|
| [`mjpeg`] | `jpeg` | `http` | | yes | | |
|
||||||
| [`mjpeg`] | `mpjpeg` | `http` | | yes | 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
|
[`http`]: http/README.md
|
||||||
[`isapi`]: isapi/README.md
|
[`isapi`]: isapi/README.md
|
||||||
[`ivideon`]: ivideon/README.md
|
[`ivideon`]: ivideon/README.md
|
||||||
|
[`kasa`]: kasa/README.md
|
||||||
[`mjpeg`]: mjpeg/README.md
|
[`mjpeg`]: mjpeg/README.md
|
||||||
[`mp4`]: mp4/README.md
|
[`mp4`]: mp4/README.md
|
||||||
[`mpegts`]: mpegts/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/http"
|
||||||
"github.com/AlexxIT/go2rtc/internal/isapi"
|
"github.com/AlexxIT/go2rtc/internal/isapi"
|
||||||
"github.com/AlexxIT/go2rtc/internal/ivideon"
|
"github.com/AlexxIT/go2rtc/internal/ivideon"
|
||||||
|
"github.com/AlexxIT/go2rtc/internal/kasa"
|
||||||
"github.com/AlexxIT/go2rtc/internal/mjpeg"
|
"github.com/AlexxIT/go2rtc/internal/mjpeg"
|
||||||
"github.com/AlexxIT/go2rtc/internal/mp4"
|
"github.com/AlexxIT/go2rtc/internal/mp4"
|
||||||
"github.com/AlexxIT/go2rtc/internal/mpegts"
|
"github.com/AlexxIT/go2rtc/internal/mpegts"
|
||||||
@@ -96,6 +97,7 @@ func main() {
|
|||||||
{"gopro", gopro.Init},
|
{"gopro", gopro.Init},
|
||||||
{"isapi", isapi.Init},
|
{"isapi", isapi.Init},
|
||||||
{"ivideon", ivideon.Init},
|
{"ivideon", ivideon.Init},
|
||||||
|
{"kasa", kasa.Init},
|
||||||
{"mpegts", mpegts.Init},
|
{"mpegts", mpegts.Init},
|
||||||
{"multitrans", multitrans.Init},
|
{"multitrans", multitrans.Init},
|
||||||
{"nest", nest.Init},
|
{"nest", nest.Init},
|
||||||
|
|||||||
+10
-1
@@ -89,12 +89,21 @@ Some formats and protocols go2rtc supports exclusively. They have no equivalent
|
|||||||
|
|
||||||
## Developers
|
## Developers
|
||||||
|
|
||||||
File naming:
|
**File naming:**
|
||||||
|
|
||||||
- `pkg/{format}/producer.go` - producer for this format (also if support backchannel)
|
- `pkg/{format}/producer.go` - producer for this format (also if support backchannel)
|
||||||
- `pkg/{format}/consumer.go` - consumer for this format
|
- `pkg/{format}/consumer.go` - consumer for this format
|
||||||
- `pkg/{format}/backchanel.go` - producer with only backchannel func
|
- `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
|
## Useful links
|
||||||
|
|
||||||
- https://www.wowza.com/blog/streaming-protocols
|
- https://www.wowza.com/blog/streaming-protocols
|
||||||
|
|||||||
@@ -130,9 +130,10 @@ export default defineConfig({
|
|||||||
{text: 'eseecloud', link: '/internal/eseecloud/'},
|
{text: 'eseecloud', link: '/internal/eseecloud/'},
|
||||||
{text: 'flussonic', link: '/internal/flussonic/'},
|
{text: 'flussonic', link: '/internal/flussonic/'},
|
||||||
{text: 'gopro', link: '/internal/gopro/'},
|
{text: 'gopro', link: '/internal/gopro/'},
|
||||||
|
{text: 'hass', link: '/internal/hass/'},
|
||||||
{text: 'isapi', link: '/internal/isapi/'},
|
{text: 'isapi', link: '/internal/isapi/'},
|
||||||
{text: 'ivideon', link: '/internal/ivideon/'},
|
{text: 'ivideon', link: '/internal/ivideon/'},
|
||||||
{text: 'hass', link: '/internal/hass/'},
|
{text: 'kasa', link: '/internal/kasa/'},
|
||||||
{text: 'mpegts', link: '/internal/mpegts/'},
|
{text: 'mpegts', link: '/internal/mpegts/'},
|
||||||
{text: 'multitrans', link: '/internal/multitrans/'},
|
{text: 'multitrans', link: '/internal/multitrans/'},
|
||||||
{text: 'nest', link: '/internal/nest/'},
|
{text: 'nest', link: '/internal/nest/'},
|
||||||
|
|||||||
@@ -171,6 +171,7 @@
|
|||||||
"gopro",
|
"gopro",
|
||||||
"isapi",
|
"isapi",
|
||||||
"ivideon",
|
"ivideon",
|
||||||
|
"kasa",
|
||||||
"mpegts",
|
"mpegts",
|
||||||
"nest",
|
"nest",
|
||||||
"ring",
|
"ring",
|
||||||
|
|||||||
Reference in New Issue
Block a user