mirror of
https://github.com/koush/scrypted.git
synced 2026-05-26 14:40:29 +01:00
Fix issue not being able to select your prebufffer
- 2 way audio support test - bump to 0.0.7-beta.1 - improve readme docs
This commit is contained in:
@@ -4,7 +4,14 @@ This is a Tuya controller that integrates Tuya devices, specifically cameras, in
|
||||
|
||||
The plugin will discover all the cameras within Tuya Cloud IoT project and report them to Scrypted, including motion events, for the ones that are supported.
|
||||
|
||||
## Features
|
||||
- Supports Tuya Cameras Streaming.
|
||||
- Supports Tuya Doorbells with ring notifications.
|
||||
- Supports 2-Way communication (for devices that support WebRTC).
|
||||
|
||||
## Requirements
|
||||
|
||||
### Access Id, Access Key, and User Id
|
||||
In order to retrieve `Access Id` and `Access Key`, you must follow the guide below:
|
||||
- [Using Smart Home PaaS (TuyaSmart, SmartLife, ect...)](https://developer.tuya.com/en/docs/iot/Platform_Configuration_smarthome?id=Kamcgamwoevrx&_source=6435717a3be1bc67fdd1f6699a1a59ac)
|
||||
|
||||
@@ -12,12 +19,8 @@ In order to retrieve `Access Id` and `Access Key`, you must follow the guide bel
|
||||
|
||||
Once you have retreived both the `Access Id` and `Access Key` from the project, you can get the `User Id` by going to Tuya Cloud IoT -> Select the Project -> Devices -> Link Tuya App Account -> and then get the UID.
|
||||
|
||||
You also need to enable Messages Service in your project in order to receive real time notifications to Scrypted. (motion events, online/offline, light switch ect...) The way this is achieved is by following this [guide](https://developer.tuya.com/en/docs/iot/subscribe-mq?id=Kavqcrvckbh9h).
|
||||
### Tuya Pulsar
|
||||
You need to enable Messages Service in your project in order to receive real time notifications to Scrypted. (motion events, online/offline, light switch ect...) The way this is achieved is by following this [guide](https://developer.tuya.com/en/docs/iot/subscribe-mq?id=Kavqcrvckbh9h).
|
||||
|
||||
- You do not need to set an alert notification of your phone.
|
||||
- This might not be necessary in the future if I believe MQTT is the way to go, but in the mean time, TuyaPulse is required for this project.
|
||||
|
||||
|
||||
## TODOs
|
||||
- Fix 2-way talk for supported platforms (Can only work with WebRTC since we only get one stream with RTSPS)
|
||||
- Add support for camera doorbells (Just need to implement doorbell notification)
|
||||
|
||||
|
||||
4
plugins/tuya/package-lock.json
generated
4
plugins/tuya/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/tuya",
|
||||
"version": "0.0.7-beta.0",
|
||||
"version": "0.0.7-beta.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/tuya",
|
||||
"version": "0.0.7-beta.0",
|
||||
"version": "0.0.7-beta.1",
|
||||
"dependencies": {
|
||||
"@scrypted/common": "file:../../common",
|
||||
"@scrypted/sdk": "file:../../sdk",
|
||||
|
||||
@@ -46,5 +46,5 @@
|
||||
"@types/uuid": "^8.3.4",
|
||||
"@types/ws": "^8.5.3"
|
||||
},
|
||||
"version": "0.0.7-beta.0"
|
||||
"version": "0.0.7-beta.1"
|
||||
}
|
||||
|
||||
@@ -387,7 +387,8 @@ export class TuyaCamera extends ScryptedDeviceBase implements DeviceProvider, Vi
|
||||
async getVideoStreamOptions(): Promise<ResponseMediaStreamOptions[]> {
|
||||
return [
|
||||
{
|
||||
id: 'default',
|
||||
id: 'cloud-rtsp',
|
||||
name: 'Cloud RTSP',
|
||||
container: 'rtsp',
|
||||
video: {
|
||||
codec: 'h264',
|
||||
@@ -474,7 +475,7 @@ export class TuyaCamera extends ScryptedDeviceBase implements DeviceProvider, Vi
|
||||
}
|
||||
|
||||
// By the time this is called, scrypted would have already reported the device
|
||||
// Only set light switch on cameras that have a status light indicator.
|
||||
// Only set light switch on cameras that have a light switch.
|
||||
|
||||
if (TuyaDevice.hasLightSwitch(camera)) {
|
||||
this.getDevice(this.nativeLightSwitchId)?.updateState(camera);
|
||||
|
||||
@@ -192,7 +192,7 @@ export class TuyaController extends ScryptedDeviceBase implements DeviceProvider
|
||||
let deviceInfo: string[] = [`Creating camera device for: \n- ${camera.name}`];
|
||||
|
||||
if (TuyaDevice.isDoorbell(camera)) {
|
||||
deviceInfo.push(`- Doorbell Notification`);
|
||||
deviceInfo.push(`- Doorbell Notification Supported`);
|
||||
device.interfaces.push(ScryptedInterface.BinarySensor);
|
||||
}
|
||||
|
||||
@@ -202,18 +202,19 @@ export class TuyaController extends ScryptedDeviceBase implements DeviceProvider
|
||||
}
|
||||
|
||||
if (TuyaDevice.hasMotionDetection(camera)) {
|
||||
deviceInfo.push(`- Motion Detection`);
|
||||
deviceInfo.push(`- Motion Detection Supported`);
|
||||
device.interfaces.push(ScryptedInterface.MotionSensor);
|
||||
}
|
||||
|
||||
if (await TuyaDevice.supportsWebRTC(camera, this.cloud)) {
|
||||
deviceInfo.push(`- WebRTC Supported with Intercom`);
|
||||
device.interfaces.push(ScryptedInterface.RTCSignalingChannel);
|
||||
}
|
||||
|
||||
// Device Provider
|
||||
|
||||
if (TuyaDevice.hasLightSwitch(camera)) {
|
||||
deviceInfo.push(`- Light Switch`);
|
||||
deviceInfo.push(`- Has Light Switch`);
|
||||
device.interfaces.push(ScryptedInterface.DeviceProvider);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user