@rentlydev/rently-tuya 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/generated/jni/CMakeLists.txt +4 -17
- package/android/generated/jni/react/renderer/components/RNRentlyTuyaSpec/RNRentlyTuyaSpecJSI.h +6 -2
- package/android/src/main/java/com/rentlytuya/RentlyTuyaModule.kt +6 -0
- package/android/src/main/java/com/rentlytuya/dashboard/DoorbellSettings.kt +25 -6
- package/android/src/main/java/com/rentlytuya/dashboard/NavController.kt +19 -2
- package/android/src/main/java/com/rentlytuya/dashboard/OfflineScreen.kt +1 -3
- package/android/src/main/java/com/rentlytuya/tuya/Settings.kt +28 -1
- package/android/src/main/java/com/rentlytuya/tuya/Tuya.kt +4 -0
- package/android/src/main/java/com/rentlytuya/util/KeylessModule.kt +16 -4
- package/android/src/main/res/values/strings.xml +4 -2
- package/ios/dashboard/Dashboard.swift +40 -4
- package/ios/dashboard/NavigationController.swift +13 -4
- package/ios/dashboard/OfflineScreen.swift +5 -7
- package/ios/dashboard/Settings.swift +33 -15
- package/ios/generated/RNRentlyTuyaSpec/RNRentlyTuyaSpec-generated.mm +10 -0
- package/ios/generated/RNRentlyTuyaSpec/RNRentlyTuyaSpec.h +25 -0
- package/ios/generated/RNRentlyTuyaSpecJSI.h +6 -2
- package/ios/listener/KeylessListener.swift +11 -5
- package/ios/listener/RentlyTuya.mm +3 -1
- package/ios/listener/RentlyTuyaImpl.swift +4 -0
- package/ios/tuya/Tuya.swift +3 -0
- package/ios/utils/PermissionManager.swift +41 -0
- package/lib/commonjs/NativeRentlyTuya.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/NativeRentlyTuya.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/NativeRentlyTuya.d.ts +2 -0
- package/lib/typescript/commonjs/src/NativeRentlyTuya.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/NativeRentlyTuya.d.ts +2 -0
- package/lib/typescript/module/src/NativeRentlyTuya.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +2 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/NativeRentlyTuya.ts +2 -0
- package/src/index.tsx +2 -0
- package/lib/commonjs/package.json +0 -1
- package/lib/module/package.json +0 -1
|
@@ -10,7 +10,7 @@ file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/R
|
|
|
10
10
|
|
|
11
11
|
add_library(
|
|
12
12
|
react_codegen_RNRentlyTuyaSpec
|
|
13
|
-
|
|
13
|
+
OBJECT
|
|
14
14
|
${react_codegen_SRCS}
|
|
15
15
|
)
|
|
16
16
|
|
|
@@ -19,23 +19,10 @@ target_include_directories(react_codegen_RNRentlyTuyaSpec PUBLIC . react/rendere
|
|
|
19
19
|
target_link_libraries(
|
|
20
20
|
react_codegen_RNRentlyTuyaSpec
|
|
21
21
|
fbjni
|
|
22
|
-
folly_runtime
|
|
23
|
-
glog
|
|
24
22
|
jsi
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
react_render_componentregistry
|
|
29
|
-
react_render_core
|
|
30
|
-
react_render_debug
|
|
31
|
-
react_render_graphics
|
|
32
|
-
react_render_imagemanager
|
|
33
|
-
react_render_mapbuffer
|
|
34
|
-
react_utils
|
|
35
|
-
rrc_image
|
|
36
|
-
rrc_view
|
|
37
|
-
turbomodulejsijni
|
|
38
|
-
yoga
|
|
23
|
+
# We need to link different libraries based on whether we are building rncore or not, that's necessary
|
|
24
|
+
# because we want to break a circular dependency between react_codegen_rncore and reactnative
|
|
25
|
+
reactnative
|
|
39
26
|
)
|
|
40
27
|
|
|
41
28
|
target_compile_options(
|
package/android/generated/jni/react/renderer/components/RNRentlyTuyaSpec/RNRentlyTuyaSpecJSI.h
CHANGED
|
@@ -38,8 +38,12 @@ public:
|
|
|
38
38
|
template <typename T>
|
|
39
39
|
class JSI_EXPORT NativeRentlyTuyaCxxSpec : public TurboModule {
|
|
40
40
|
public:
|
|
41
|
-
jsi::Value
|
|
42
|
-
return delegate_.
|
|
41
|
+
jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
42
|
+
return delegate_.create(rt, propName);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
|
|
46
|
+
return delegate_.getPropertyNames(runtime);
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
static constexpr std::string_view kModuleName = "RentlyTuya";
|
|
@@ -76,6 +76,8 @@ class RentlyTuyaModule(private val reactContext: ReactApplicationContext) :
|
|
|
76
76
|
scope.launch(exceptionHandler) {
|
|
77
77
|
Tuya.lastMoveOutDate =
|
|
78
78
|
if (params.hasKey("last_moveout_at")) params.getString("last_moveout_at") else null
|
|
79
|
+
Tuya.isDoorbellCallEnabled =
|
|
80
|
+
if (params.hasKey("doorbell_calling_enabled")) params.getBoolean("doorbell_calling_enabled") else false
|
|
79
81
|
Tuya.resetRequired =
|
|
80
82
|
if (params.hasKey("resetRequired")) params.getBoolean("resetRequired") else null
|
|
81
83
|
Tuya.isResident = if (params.hasKey("isResident")) params.getBoolean("isResident") else true
|
|
@@ -99,6 +101,10 @@ class RentlyTuyaModule(private val reactContext: ReactApplicationContext) :
|
|
|
99
101
|
Tuya.setSensitivityLow =
|
|
100
102
|
if (params.hasKey("set_sensitivity_low")) params.getBoolean("set_sensitivity_low") else false
|
|
101
103
|
|
|
104
|
+
// For navigation handling for AOSU charging
|
|
105
|
+
Tuya.doorbellSetting =
|
|
106
|
+
if (params.hasKey("doorbell_setting")) params.getBoolean("doorbell_setting") else false
|
|
107
|
+
|
|
102
108
|
// If both event and continuous recording are false, set event recording to true - NB: Only for 8s Doorbell
|
|
103
109
|
if (!Tuya.eventRecording && !Tuya.continuousRecording) {
|
|
104
110
|
Tuya.eventRecording = true
|
|
@@ -54,6 +54,7 @@ import com.rentlytuya.util.KeylessModule
|
|
|
54
54
|
import com.rentlytuya.util.Util.isLandscape
|
|
55
55
|
import com.rentlytuya.util.Util.strings
|
|
56
56
|
import com.rentlytuya.alerts.SuccessAlert
|
|
57
|
+
import com.rentlytuya.tuya.Tuya.doorbellSetting
|
|
57
58
|
|
|
58
59
|
enum class MotionSensitivityLevel(val level: String) {
|
|
59
60
|
HIGH("High"),
|
|
@@ -90,6 +91,7 @@ fun DoorbellSettings(
|
|
|
90
91
|
isWaterMarkEnabled: MutableState<Boolean>,
|
|
91
92
|
isFlipEnabled: MutableState<Boolean>,
|
|
92
93
|
isAntiDismantlingAlarmEnabled: MutableState<Boolean>,
|
|
94
|
+
isDoorbellCallEnabled: MutableState<Boolean>,
|
|
93
95
|
nightVisionLevel: MutableState<String>,
|
|
94
96
|
isMotionDetectionEnabled: MutableState<Boolean>,
|
|
95
97
|
motionSensitivityLevel: MutableState<String>,
|
|
@@ -119,7 +121,11 @@ fun DoorbellSettings(
|
|
|
119
121
|
isAdvancedSettings.value = false
|
|
120
122
|
isStorageSettings.value = false
|
|
121
123
|
navController.navigate(ScreenRoutes.SETTINGS)
|
|
122
|
-
} else {
|
|
124
|
+
} else if (doorbellSetting && isSettings.value) {
|
|
125
|
+
// If doorbellSetting is true and we're in settings, finish the activity
|
|
126
|
+
isSettings.value = false
|
|
127
|
+
activity.finish()
|
|
128
|
+
}else {
|
|
123
129
|
isSettings.value = false
|
|
124
130
|
navController.navigate(ScreenRoutes.DASHBOARD)
|
|
125
131
|
}
|
|
@@ -144,10 +150,9 @@ fun DoorbellSettings(
|
|
|
144
150
|
isResetWifiAlertVisible = isResetWifiAlertVisible.value,
|
|
145
151
|
onDismiss = { isResetWifiAlertVisible.value = false },
|
|
146
152
|
onReset = {
|
|
147
|
-
Tuya.deviceId?.let {
|
|
148
153
|
KeylessModule.instance?.sendDataToJS(
|
|
149
154
|
eventName = "RESET_WIFI",
|
|
150
|
-
|
|
155
|
+
value = Tuya.tuyaProductName ?: "",
|
|
151
156
|
onSuccess = {
|
|
152
157
|
Log.i(TAG, "Navigate to Add Doorbell Success")
|
|
153
158
|
isResetWifiAlertVisible.value = false
|
|
@@ -158,7 +163,6 @@ fun DoorbellSettings(
|
|
|
158
163
|
isResetWifiAlertVisible.value = false
|
|
159
164
|
}
|
|
160
165
|
)
|
|
161
|
-
} ?: Log.i(TAG, "Device ID is null")
|
|
162
166
|
}
|
|
163
167
|
)
|
|
164
168
|
|
|
@@ -181,7 +185,7 @@ fun DoorbellSettings(
|
|
|
181
185
|
|
|
182
186
|
KeylessModule.instance?.sendDataToJS(
|
|
183
187
|
eventName = "REMOVE_CAMERA",
|
|
184
|
-
|
|
188
|
+
value = it,
|
|
185
189
|
onSuccess = {
|
|
186
190
|
Log.i(TAG, "Remove Doorbell Success")
|
|
187
191
|
isLoading.value = false
|
|
@@ -276,6 +280,21 @@ fun DoorbellSettings(
|
|
|
276
280
|
)
|
|
277
281
|
}
|
|
278
282
|
}
|
|
283
|
+
item {
|
|
284
|
+
SettingsItem(
|
|
285
|
+
title = strings(id = R.string.doorbellCall),
|
|
286
|
+
description = strings(id = R.string.doorbellCallDescription),
|
|
287
|
+
withSwitch = true,
|
|
288
|
+
checked = isDoorbellCallEnabled.value,
|
|
289
|
+
onToggle = {
|
|
290
|
+
Settings.setEnableDoorbellCall(
|
|
291
|
+
enable = it,
|
|
292
|
+
isLoading = isLoading,
|
|
293
|
+
isDoorbellCallEnabled = isDoorbellCallEnabled
|
|
294
|
+
)
|
|
295
|
+
}
|
|
296
|
+
)
|
|
297
|
+
}
|
|
279
298
|
item {
|
|
280
299
|
SettingsItem(
|
|
281
300
|
title = strings(id = R.string.irNightVision),
|
|
@@ -641,7 +660,7 @@ fun DoorbellSettings(
|
|
|
641
660
|
}
|
|
642
661
|
|
|
643
662
|
item {
|
|
644
|
-
Heading(title = strings(id = R.string.
|
|
663
|
+
Heading(title = strings(id = R.string.deviceInformation))
|
|
645
664
|
}
|
|
646
665
|
item {
|
|
647
666
|
SettingsItem(
|
|
@@ -4,6 +4,7 @@ import android.app.Activity
|
|
|
4
4
|
import android.content.res.Configuration
|
|
5
5
|
import android.os.Build
|
|
6
6
|
import android.util.Log
|
|
7
|
+
import androidx.activity.compose.BackHandler
|
|
7
8
|
import androidx.compose.animation.EnterTransition
|
|
8
9
|
import androidx.compose.animation.ExitTransition
|
|
9
10
|
import androidx.compose.foundation.Image
|
|
@@ -46,6 +47,7 @@ import com.rentlytuya.tuya.Tuya
|
|
|
46
47
|
import com.rentlytuya.tuya.Tuya.TAG
|
|
47
48
|
import com.rentlytuya.tuya.Tuya.isDefaultSettingsUpdated
|
|
48
49
|
import com.rentlytuya.tuya.Tuya.isResident
|
|
50
|
+
import com.rentlytuya.tuya.Tuya.doorbellSetting
|
|
49
51
|
import com.rentlytuya.ui.theme.LocalColor
|
|
50
52
|
import com.rentlytuya.util.DPConstants
|
|
51
53
|
import com.rentlytuya.util.DateUtil.isNotNull
|
|
@@ -88,6 +90,7 @@ fun NavController(
|
|
|
88
90
|
val isWaterMarkEnabled = remember { mutableStateOf(false) }
|
|
89
91
|
val isFlipEnabled = remember { mutableStateOf(false) }
|
|
90
92
|
val isAntiDismantlingAlarmEnabled = remember { mutableStateOf(false) }
|
|
93
|
+
val isDoorbellCallEnabled = remember { mutableStateOf(false) }
|
|
91
94
|
val nightVisionLevel = remember { mutableStateOf("0") }
|
|
92
95
|
val isMotionDetectionEnabled = remember { mutableStateOf(false) }
|
|
93
96
|
val motionSensitivityLevel = remember { mutableStateOf("0") }
|
|
@@ -137,6 +140,14 @@ fun NavController(
|
|
|
137
140
|
}
|
|
138
141
|
}
|
|
139
142
|
|
|
143
|
+
LaunchedEffect(Unit) {
|
|
144
|
+
if (doorbellSetting) {
|
|
145
|
+
//navigate to settings screen
|
|
146
|
+
isSettings.value = true
|
|
147
|
+
navController.navigate(ScreenRoutes.SETTINGS)
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
140
151
|
Column(modifier = Modifier.fillMaxSize()) {
|
|
141
152
|
|
|
142
153
|
if (configuration.orientation == Configuration.ORIENTATION_PORTRAIT ||
|
|
@@ -147,7 +158,7 @@ fun NavController(
|
|
|
147
158
|
title = when {
|
|
148
159
|
isFirmwareUpdate.value -> strings(id = R.string.firmwareVersion)
|
|
149
160
|
isFirmwareUpdate.value && isUpdateInProgress.value -> strings(id = R.string.updateFirmware)
|
|
150
|
-
isAdvancedSettings.value -> strings(id = R.string.
|
|
161
|
+
isAdvancedSettings.value -> strings(id = R.string.deviceInformation)
|
|
151
162
|
isStorageSettings.value -> strings(id = R.string.activityStorage)
|
|
152
163
|
currentDestination.value == ScreenRoutes.DASHBOARD -> deviceName.value
|
|
153
164
|
else -> currentDestination.value
|
|
@@ -191,6 +202,7 @@ fun NavController(
|
|
|
191
202
|
isWaterMarkEnabled = isWaterMarkEnabled,
|
|
192
203
|
isFlipEnabled = isFlipEnabled,
|
|
193
204
|
isAntiDismantlingAlarmEnabled = isAntiDismantlingAlarmEnabled,
|
|
205
|
+
isDoorbellCallEnabled = isDoorbellCallEnabled,
|
|
194
206
|
nightVisionLevel = nightVisionLevel,
|
|
195
207
|
isMotionDetectionEnabled = isMotionDetectionEnabled,
|
|
196
208
|
motionSensitivityLevel = motionSensitivityLevel,
|
|
@@ -295,6 +307,7 @@ fun NavController(
|
|
|
295
307
|
isWaterMarkEnabled = isWaterMarkEnabled,
|
|
296
308
|
isFlipEnabled = isFlipEnabled,
|
|
297
309
|
isAntiDismantlingAlarmEnabled = isAntiDismantlingAlarmEnabled,
|
|
310
|
+
isDoorbellCallEnabled = isDoorbellCallEnabled,
|
|
298
311
|
nightVisionLevel = nightVisionLevel,
|
|
299
312
|
isMotionDetectionEnabled = isMotionDetectionEnabled,
|
|
300
313
|
motionSensitivityLevel = motionSensitivityLevel,
|
|
@@ -325,7 +338,7 @@ fun TopBar(
|
|
|
325
338
|
onTrailingIconClick: () -> Unit = {}
|
|
326
339
|
) {
|
|
327
340
|
|
|
328
|
-
val isSpecialTitle = title in listOf(ScreenRoutes.SETTINGS, ScreenRoutes.ACTIVITY_HISTORY, strings(id = R.string.
|
|
341
|
+
val isSpecialTitle = title in listOf(ScreenRoutes.SETTINGS, ScreenRoutes.ACTIVITY_HISTORY, strings(id = R.string.deviceInformation), strings(id = R.string.activityStorage), strings(id = R.string.firmwareVersion), strings(id = R.string.updateFirmware))
|
|
329
342
|
|
|
330
343
|
Box(
|
|
331
344
|
modifier = Modifier
|
|
@@ -410,6 +423,10 @@ private fun handleBackNavigation(
|
|
|
410
423
|
isAdvancedSettings.value = false
|
|
411
424
|
isStorageSettings.value = false
|
|
412
425
|
navController.navigate(ScreenRoutes.SETTINGS)
|
|
426
|
+
} else if (doorbellSetting && isSettings.value) {
|
|
427
|
+
// If doorbellSetting is true and we're in settings, finish the activity
|
|
428
|
+
isSettings.value = false
|
|
429
|
+
activity.finish()
|
|
413
430
|
} else if (currentDestination.value == ScreenRoutes.DASHBOARD) {
|
|
414
431
|
scope.launch {
|
|
415
432
|
val success = Tuya.disconnect { value -> isLoading.value = value }
|
|
@@ -122,10 +122,9 @@ fun OfflineScreen(
|
|
|
122
122
|
primary = true,
|
|
123
123
|
underLine = true,
|
|
124
124
|
onClick = {
|
|
125
|
-
Tuya.deviceId?.let {
|
|
126
125
|
KeylessModule.instance?.sendDataToJS(
|
|
127
126
|
eventName = "RESET_WIFI",
|
|
128
|
-
|
|
127
|
+
value = Tuya.tuyaProductName ?: "",
|
|
129
128
|
onSuccess = {
|
|
130
129
|
Log.i(TAG, "Navigate to Add Doorbell Success")
|
|
131
130
|
activity.finish()
|
|
@@ -134,7 +133,6 @@ fun OfflineScreen(
|
|
|
134
133
|
Log.i(TAG, "Navigate to Add Doorbell Failed")
|
|
135
134
|
}
|
|
136
135
|
)
|
|
137
|
-
} ?: Log.i(TAG, "Device ID is null")
|
|
138
136
|
}
|
|
139
137
|
)
|
|
140
138
|
|
|
@@ -88,6 +88,7 @@ object Settings {
|
|
|
88
88
|
isWaterMarkEnabled: MutableState<Boolean>,
|
|
89
89
|
isFlipEnabled: MutableState<Boolean>,
|
|
90
90
|
isAntiDismantlingAlarmEnabled: MutableState<Boolean>,
|
|
91
|
+
isDoorbellCallEnabled: MutableState<Boolean>,
|
|
91
92
|
nightVisionLevel: MutableState<String>,
|
|
92
93
|
isMotionDetectionEnabled: MutableState<Boolean>,
|
|
93
94
|
motionSensitivityLevel: MutableState<String>,
|
|
@@ -104,6 +105,7 @@ object Settings {
|
|
|
104
105
|
usedStorage: MutableState<String>,
|
|
105
106
|
remainingStorageCapacity: MutableState<String>
|
|
106
107
|
) {
|
|
108
|
+
isDoorbellCallEnabled.value = Tuya.isDoorbellCallEnabled
|
|
107
109
|
val deviceBean = ThingHomeSdk.getDataInstance().getDeviceBean(deviceId)
|
|
108
110
|
if (deviceBean.isNotNull()) {
|
|
109
111
|
for ((key, value) in deviceBean.getDps()) {
|
|
@@ -319,6 +321,31 @@ object Settings {
|
|
|
319
321
|
)
|
|
320
322
|
}
|
|
321
323
|
|
|
324
|
+
fun setEnableDoorbellCall(
|
|
325
|
+
enable: Boolean,
|
|
326
|
+
isLoading: MutableState<Boolean>,
|
|
327
|
+
isDoorbellCallEnabled: MutableState<Boolean>
|
|
328
|
+
) {
|
|
329
|
+
isLoading.value = true
|
|
330
|
+
Tuya.id?.let {
|
|
331
|
+
KeylessModule.instance?.sendDataToJS(
|
|
332
|
+
eventName = "ENABLE_DOORBELL_CALL",
|
|
333
|
+
value = it,
|
|
334
|
+
enableValue = enable,
|
|
335
|
+
onSuccess = {
|
|
336
|
+
isLoading.value = false
|
|
337
|
+
isDoorbellCallEnabled.value = enable
|
|
338
|
+
Log.i(TAG, "Doorbell Call Update Success")
|
|
339
|
+
},
|
|
340
|
+
onFailure = {
|
|
341
|
+
isLoading.value = false
|
|
342
|
+
isDoorbellCallEnabled.value = !enable
|
|
343
|
+
Log.i(TAG,"Doorbell Call Update Failed")
|
|
344
|
+
}
|
|
345
|
+
)
|
|
346
|
+
} ?: Log.i(TAG, "ID is null")
|
|
347
|
+
}
|
|
348
|
+
|
|
322
349
|
fun setNightVision(
|
|
323
350
|
newMode: String,
|
|
324
351
|
mode: MutableState<String>,
|
|
@@ -1038,7 +1065,7 @@ object DefaultSettings {
|
|
|
1038
1065
|
Tuya.id?.let {
|
|
1039
1066
|
KeylessModule.instance?.sendDataToJS(
|
|
1040
1067
|
eventName = "RESET_DEFAULT_SETTINGS_FLAG",
|
|
1041
|
-
|
|
1068
|
+
value = it,
|
|
1042
1069
|
onSuccess = {
|
|
1043
1070
|
Log.i(TAG, "Reset Default Settings Success")
|
|
1044
1071
|
},
|
|
@@ -44,6 +44,7 @@ object Tuya {
|
|
|
44
44
|
var tuyaProductName: String? = null
|
|
45
45
|
var tuyaProductID: String? = null
|
|
46
46
|
var lastMoveOutDate: String? = null
|
|
47
|
+
var isDoorbellCallEnabled: Boolean = false
|
|
47
48
|
var resetRequired: Boolean? = null
|
|
48
49
|
var isResident: Boolean = true
|
|
49
50
|
var displayRemoveDoorbellButton: Boolean? = null
|
|
@@ -55,6 +56,9 @@ object Tuya {
|
|
|
55
56
|
var eventRecording: Boolean = false
|
|
56
57
|
var setSensitivityLow: Boolean = false
|
|
57
58
|
|
|
59
|
+
// For navigation handling for AOSU charging
|
|
60
|
+
var doorbellSetting: Boolean = false
|
|
61
|
+
|
|
58
62
|
val scope = CoroutineScope(Dispatchers.IO + SupervisorJob())
|
|
59
63
|
|
|
60
64
|
suspend fun login(
|
|
@@ -23,15 +23,27 @@ class KeylessModule(reactContext: ReactApplicationContext) :
|
|
|
23
23
|
|
|
24
24
|
fun sendDataToJS(
|
|
25
25
|
eventName: String,
|
|
26
|
-
|
|
26
|
+
value: String,
|
|
27
|
+
enableValue: Boolean? = null, // only used for ENABLE_DOORBELL_CALL
|
|
27
28
|
onSuccess: (String) -> Unit,
|
|
28
29
|
onFailure: (String) -> Unit
|
|
29
30
|
) {
|
|
30
31
|
try {
|
|
31
32
|
val params = WritableNativeMap()
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
//For reset default settings value , id is passed
|
|
34
|
+
//For reset wifi, tuyaProductName is passed
|
|
35
|
+
val key = when (eventName) {
|
|
36
|
+
"RESET_DEFAULT_SETTINGS_FLAG" -> "id"
|
|
37
|
+
"RESET_WIFI" -> "doorbellType"
|
|
38
|
+
"REMOVE_CAMERA" -> "device_id"
|
|
39
|
+
"ENABLE_DOORBELL_CALL" -> "id"
|
|
40
|
+
else -> "device_id"
|
|
41
|
+
}
|
|
42
|
+
params.putString(key, value)
|
|
43
|
+
|
|
44
|
+
if (eventName == "ENABLE_DOORBELL_CALL" && enableValue != null) {
|
|
45
|
+
params.putBoolean("doorbell_calling_enabled", enableValue)
|
|
46
|
+
}
|
|
35
47
|
|
|
36
48
|
onSuccessListener = onSuccess
|
|
37
49
|
onFailureListener = onFailure
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<string name="tapToSpeak">Tap to Speak</string>
|
|
20
20
|
|
|
21
21
|
<!-- Title -->
|
|
22
|
-
<string name="
|
|
22
|
+
<string name="deviceInformation">Device Information</string>
|
|
23
23
|
<string name="activityStorage">Activity Storage</string>
|
|
24
24
|
<string name="firmwareVersion">Firmware Version</string>
|
|
25
25
|
|
|
@@ -46,12 +46,14 @@
|
|
|
46
46
|
<string name="flipScreenDescription">Flip the doorbell camera preview screen.</string>
|
|
47
47
|
<string name="antiDismantlingAlarm">Anti-Dismantling Alarm</string>
|
|
48
48
|
<string name="antiDismantlingAlarmDescription">Enabling this will trigger an alarm sound if the doorbell is forcibly removed from its mounting case.</string>
|
|
49
|
+
<string name="doorbellCall">Doorbell Call</string>
|
|
50
|
+
<string name="doorbellCallDescription">Enabling this will initiate doorbell call when someone press doorbell ring button.</string>
|
|
49
51
|
<string name="irNightVision">IR Night Vision</string>
|
|
50
52
|
<string name="nightVision">Night Vision</string>
|
|
51
53
|
<string name="nightVisionDescription">Doorbell camera\'s night vision settings.</string>
|
|
52
54
|
<string name="motionDetection">Motion Detection</string>
|
|
53
55
|
<string name="motionDetectionDescription8s">Triggered motion will send push notifications.</string>
|
|
54
|
-
<string name="motionDetectionDescription">If motion detection is enabled and motion is detected, the
|
|
56
|
+
<string name="motionDetectionDescription">If motion detection is enabled and motion is detected, the app will record the event and send a push notification.</string>
|
|
55
57
|
<string name="motionSensitivityLevel">Motion Sensitivity Level</string>
|
|
56
58
|
<string name="storageSettings">Storage Settings</string>
|
|
57
59
|
<string name="storageSetting">Storage Setting</string>
|
|
@@ -15,6 +15,7 @@ struct Dashboard: View {
|
|
|
15
15
|
@Binding var currentScreen: ScreenState
|
|
16
16
|
@State private var isDoorbellControlVisible = true
|
|
17
17
|
@State private var isPermissionDisclaimerAlertVisible = false
|
|
18
|
+
@State private var permissionType: String = "microphone"
|
|
18
19
|
@EnvironmentObject var orientationManager: OrientationManager
|
|
19
20
|
|
|
20
21
|
var body: some View {
|
|
@@ -32,7 +33,8 @@ struct Dashboard: View {
|
|
|
32
33
|
if tuya.isConnected {
|
|
33
34
|
DoorbellControls(
|
|
34
35
|
isDoorbellControlVisible: $isDoorbellControlVisible,
|
|
35
|
-
isPermissionDisclaimerAlertVisible: $isPermissionDisclaimerAlertVisible
|
|
36
|
+
isPermissionDisclaimerAlertVisible: $isPermissionDisclaimerAlertVisible,
|
|
37
|
+
permissionType: $permissionType
|
|
36
38
|
)
|
|
37
39
|
.padding(.bottom, 10)
|
|
38
40
|
.alert(
|
|
@@ -46,7 +48,7 @@ struct Dashboard: View {
|
|
|
46
48
|
}
|
|
47
49
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
48
50
|
|
|
49
|
-
BottomBar(currentScreen: $currentScreen)
|
|
51
|
+
BottomBar(currentScreen: $currentScreen, isPermissionDisclaimerAlertVisible: $isPermissionDisclaimerAlertVisible, permissionType: $permissionType)
|
|
50
52
|
.alert(
|
|
51
53
|
isPresented: $tuya.isRecordingFailure,
|
|
52
54
|
content: {
|
|
@@ -75,6 +77,21 @@ struct Dashboard: View {
|
|
|
75
77
|
)
|
|
76
78
|
}
|
|
77
79
|
|
|
80
|
+
VStack {
|
|
81
|
+
}
|
|
82
|
+
.alert(isPresented: $isPermissionDisclaimerAlertVisible,
|
|
83
|
+
content: {
|
|
84
|
+
getAlert(
|
|
85
|
+
title: "Permission Request",
|
|
86
|
+
message: "Please provide permission to access your \(permissionType)",
|
|
87
|
+
primaryButtonTitle: "Open Settings",
|
|
88
|
+
secondaryButtonTitle: "Cancel") {
|
|
89
|
+
if let url = URL(string: UIApplication.openSettingsURLString) {
|
|
90
|
+
UIApplication.shared.open(url)
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
)
|
|
78
95
|
}
|
|
79
96
|
.background(LocalColor.Monochrome.black)
|
|
80
97
|
.onAppear(perform: handleOnAppear)
|
|
@@ -165,6 +182,7 @@ struct DoorbellControls: View {
|
|
|
165
182
|
@ObservedObject var tuya = Tuya.shared
|
|
166
183
|
@Binding var isDoorbellControlVisible: Bool
|
|
167
184
|
@Binding var isPermissionDisclaimerAlertVisible: Bool
|
|
185
|
+
@Binding var permissionType: String
|
|
168
186
|
@EnvironmentObject var orientationManager: OrientationManager
|
|
169
187
|
|
|
170
188
|
private var batteryIcon: String {
|
|
@@ -228,11 +246,17 @@ struct DoorbellControls: View {
|
|
|
228
246
|
if tuya.isMicOn {
|
|
229
247
|
tuya.stopTalk()
|
|
230
248
|
} else {
|
|
249
|
+
PermissionManager.request(.microphone, granted: {
|
|
250
|
+
tuya.startTalk()
|
|
251
|
+
}, denied: {
|
|
252
|
+
permissionType = "microphone"
|
|
253
|
+
isPermissionDisclaimerAlertVisible = true
|
|
254
|
+
}
|
|
255
|
+
)
|
|
231
256
|
// The speaker needs to be un muted when the mic is turned on.
|
|
232
257
|
if tuya.isMuted {
|
|
233
258
|
tuya.enableMute(enable: false, type: .preview)
|
|
234
259
|
}
|
|
235
|
-
tuya.startTalk()
|
|
236
260
|
}
|
|
237
261
|
}
|
|
238
262
|
.frame(width: 185, height: 70)
|
|
@@ -279,6 +303,8 @@ struct BottomBar: View {
|
|
|
279
303
|
|
|
280
304
|
@ObservedObject var tuya = Tuya.shared
|
|
281
305
|
@Binding var currentScreen: ScreenState
|
|
306
|
+
@Binding var isPermissionDisclaimerAlertVisible: Bool
|
|
307
|
+
@Binding var permissionType: String
|
|
282
308
|
@EnvironmentObject var orientationManager: OrientationManager
|
|
283
309
|
|
|
284
310
|
var body: some View {
|
|
@@ -310,7 +336,12 @@ struct BottomBar: View {
|
|
|
310
336
|
print("Camera not connected. Screenshot action disabled.")
|
|
311
337
|
return
|
|
312
338
|
}
|
|
313
|
-
|
|
339
|
+
PermissionManager.request(.photos) {
|
|
340
|
+
tuya.screenshot()
|
|
341
|
+
} denied: {
|
|
342
|
+
permissionType = "Photos Library"
|
|
343
|
+
isPermissionDisclaimerAlertVisible = true
|
|
344
|
+
}
|
|
314
345
|
}
|
|
315
346
|
)
|
|
316
347
|
|
|
@@ -328,7 +359,12 @@ struct BottomBar: View {
|
|
|
328
359
|
if tuya.isRecording {
|
|
329
360
|
tuya.stopRecording()
|
|
330
361
|
} else {
|
|
362
|
+
PermissionManager.request(.photos) {
|
|
331
363
|
tuya.startRecording()
|
|
364
|
+
} denied: {
|
|
365
|
+
permissionType = "Photos Library"
|
|
366
|
+
isPermissionDisclaimerAlertVisible = true
|
|
367
|
+
}
|
|
332
368
|
}
|
|
333
369
|
}
|
|
334
370
|
)
|
|
@@ -5,7 +5,7 @@ enum ScreenState: String {
|
|
|
5
5
|
case playback = "Playback"
|
|
6
6
|
case messages = "Activity History"
|
|
7
7
|
case settings = "Settings"
|
|
8
|
-
case advancedSettings = "
|
|
8
|
+
case advancedSettings = "Device Information"
|
|
9
9
|
case storageSettings = "Activity Storage"
|
|
10
10
|
case firmwareUpdateSettings = "Firmware Update"
|
|
11
11
|
}
|
|
@@ -27,7 +27,7 @@ struct NavigationController: View {
|
|
|
27
27
|
if isFirmwareUpdateSettings {
|
|
28
28
|
return tuya.isFirmwareUpdateInProgress ? "Update Firmware" : "Firmware Version"
|
|
29
29
|
}
|
|
30
|
-
if isAdvancedSettings { return "
|
|
30
|
+
if isAdvancedSettings { return "Device Information" }
|
|
31
31
|
if isStorageSettings { return "Activity Storage" }
|
|
32
32
|
return currentScreen == .dashboard ? (tuya.device?.deviceModel.name ?? "Doorbell") : currentScreen.rawValue
|
|
33
33
|
}
|
|
@@ -68,8 +68,12 @@ struct NavigationController: View {
|
|
|
68
68
|
} else if currentScreen == .dashboard {
|
|
69
69
|
AppUtility.disconnectAndClose()
|
|
70
70
|
} else {
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
if Tuya.shared.doorbell_setting ?? false {
|
|
72
|
+
AppUtility.disconnectAndClose()
|
|
73
|
+
} else {
|
|
74
|
+
isSettings = false
|
|
75
|
+
currentScreen = .dashboard
|
|
76
|
+
}
|
|
73
77
|
}
|
|
74
78
|
}
|
|
75
79
|
}
|
|
@@ -85,6 +89,11 @@ struct NavigationController: View {
|
|
|
85
89
|
}
|
|
86
90
|
}
|
|
87
91
|
)
|
|
92
|
+
.onAppear {
|
|
93
|
+
if currentScreen == .dashboard && Tuya.shared.doorbell_setting ?? false {
|
|
94
|
+
currentScreen = .settings
|
|
95
|
+
}
|
|
96
|
+
}
|
|
88
97
|
}
|
|
89
98
|
|
|
90
99
|
ZStack {
|
|
@@ -70,17 +70,15 @@ struct OfflineScreen: View {
|
|
|
70
70
|
center: true,
|
|
71
71
|
underLine: true
|
|
72
72
|
) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
AppUtility.disconnectAndClose()
|
|
73
|
+
KeylessListener.emitter.resetWifiForDoorbell(
|
|
74
|
+
withTuyaProductName: tuya.tuyaProductName ?? "") { success, message in
|
|
75
|
+
if success {
|
|
76
|
+
print("Tuya: Successfully navigated to the 'Add Doorbell' screen.")
|
|
77
|
+
AppUtility.disconnectAndClose()
|
|
79
78
|
} else {
|
|
80
79
|
print("Tuya: Failed to navigate to the 'Add Doorbell' screen.")
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
|
-
}
|
|
84
82
|
}
|
|
85
83
|
.frame(maxWidth: .infinity, alignment: .center)
|
|
86
84
|
.padding(.bottom, 5)
|
|
@@ -198,6 +198,26 @@ struct Settings: View {
|
|
|
198
198
|
dpKey: ThingSmartCameraDPKey.init(rawValue: "231")
|
|
199
199
|
)
|
|
200
200
|
}
|
|
201
|
+
SettingsManager.shared.toggleSwitch(
|
|
202
|
+
id: "doorbellCallSwitch",
|
|
203
|
+
title: "Doorbell Call",
|
|
204
|
+
description: "Enabling this will initiate doorbell call when someone press doorbell ring button.",
|
|
205
|
+
isChecked: $tuya.isDoorbellCallEnabled,
|
|
206
|
+
onToggle: { newValue in
|
|
207
|
+
tuya.settingsLoader = true
|
|
208
|
+
if let id = tuya.id {
|
|
209
|
+
KeylessListener.emitter.enableDoorbellCall(withID: id, enabled: newValue) { success, message in
|
|
210
|
+
if success {
|
|
211
|
+
print("Tuya: Doorbell call updated to \(newValue)")
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
print("Tuya: Doorbell call update failed")
|
|
215
|
+
}
|
|
216
|
+
tuya.settingsLoader = false
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
)
|
|
201
221
|
NightVisionPicker
|
|
202
222
|
}
|
|
203
223
|
}
|
|
@@ -233,7 +253,7 @@ struct Settings: View {
|
|
|
233
253
|
SettingsManager.shared.toggleSwitch(
|
|
234
254
|
id: "motionDetectionSwitch",
|
|
235
255
|
title: "Motion Detection",
|
|
236
|
-
description: is8s ? "Triggered motion will send push notifications." : "If motion detection is enabled and motion is detected, the
|
|
256
|
+
description: is8s ? "Triggered motion will send push notifications." : "If motion detection is enabled and motion is detected, the app will record the event and send a push notification.",
|
|
237
257
|
isChecked: is8s || isAosu ? $tuya.isMotionDetectionEnabled : $tuya.isPIRDetectionEnabled,
|
|
238
258
|
dpKey: is8s || isAosu ? ThingSmartCameraDPKey.motionDetectDPName : ThingSmartCameraDPKey.init(rawValue: "240")
|
|
239
259
|
)
|
|
@@ -405,7 +425,7 @@ struct Settings: View {
|
|
|
405
425
|
|
|
406
426
|
HStack {
|
|
407
427
|
Label(
|
|
408
|
-
title: "Reset
|
|
428
|
+
title: "Reset Wi-Fi",
|
|
409
429
|
l: true,
|
|
410
430
|
black: true
|
|
411
431
|
)
|
|
@@ -425,19 +445,17 @@ struct Settings: View {
|
|
|
425
445
|
withCancelButton: true,
|
|
426
446
|
secondaryButtonTitle: "Cancel",
|
|
427
447
|
primaryAction: {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
isResetWifiAlertVisible = false
|
|
438
|
-
}
|
|
448
|
+
KeylessListener.emitter.resetWifiForDoorbell(
|
|
449
|
+
withTuyaProductName: tuya.tuyaProductName ?? "") { success, message in
|
|
450
|
+
if success {
|
|
451
|
+
print("Tuya: Successfully navigated to the 'Add Doorbell' screen.")
|
|
452
|
+
isResetWifiAlertVisible = false
|
|
453
|
+
AppUtility.disconnectAndClose()
|
|
454
|
+
} else {
|
|
455
|
+
print("Tuya: Failed to navigate to the 'Add Doorbell' screen.")
|
|
456
|
+
isResetWifiAlertVisible = false
|
|
439
457
|
}
|
|
440
|
-
|
|
458
|
+
}
|
|
441
459
|
}
|
|
442
460
|
)
|
|
443
461
|
}
|
|
@@ -525,7 +543,7 @@ struct Settings: View {
|
|
|
525
543
|
}
|
|
526
544
|
|
|
527
545
|
private var AdvancedSettingsSection: some View {
|
|
528
|
-
Section(header: Label(title: "
|
|
546
|
+
Section(header: Label(title: "Device Information", s: true, lightGrey: true, bold: true)) {
|
|
529
547
|
HStack {
|
|
530
548
|
Label(
|
|
531
549
|
title: "Device Info",
|
|
@@ -13,6 +13,16 @@
|
|
|
13
13
|
|
|
14
14
|
#import "RNRentlyTuyaSpec.h"
|
|
15
15
|
|
|
16
|
+
|
|
17
|
+
@implementation NativeRentlyTuyaSpecBase
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
|
|
21
|
+
{
|
|
22
|
+
_eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
|
|
23
|
+
}
|
|
24
|
+
@end
|
|
25
|
+
|
|
16
26
|
@implementation RCTCxxConvert (NativeRentlyTuya_SpecInitAirbrakeParams)
|
|
17
27
|
+ (RCTManagedPointer *)JS_NativeRentlyTuya_SpecInitAirbrakeParams:(id)json
|
|
18
28
|
{
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
#import <optional>
|
|
31
31
|
#import <vector>
|
|
32
32
|
|
|
33
|
+
|
|
34
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
33
35
|
namespace JS {
|
|
34
36
|
namespace NativeRentlyTuya {
|
|
35
37
|
struct SpecInitAirbrakeParams {
|
|
@@ -146,10 +148,12 @@ namespace JS {
|
|
|
146
148
|
NSString *serial_no() const;
|
|
147
149
|
NSString *flavour() const;
|
|
148
150
|
bool doorbell_default_settings_updated() const;
|
|
151
|
+
bool doorbell_calling_enabled() const;
|
|
149
152
|
bool motion_detection() const;
|
|
150
153
|
bool continuous_recording() const;
|
|
151
154
|
bool event_recording() const;
|
|
152
155
|
bool set_sensitivity_low() const;
|
|
156
|
+
bool doorbell_setting() const;
|
|
153
157
|
|
|
154
158
|
SpecOpenCameraLivePreviewParams(NSDictionary *const v) : _v(v) {}
|
|
155
159
|
private:
|
|
@@ -249,6 +253,16 @@ namespace JS {
|
|
|
249
253
|
reject:(RCTPromiseRejectBlock)reject;
|
|
250
254
|
|
|
251
255
|
@end
|
|
256
|
+
|
|
257
|
+
@interface NativeRentlyTuyaSpecBase : NSObject {
|
|
258
|
+
@protected
|
|
259
|
+
facebook::react::EventEmitterCallback _eventEmitterCallback;
|
|
260
|
+
}
|
|
261
|
+
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
@end
|
|
265
|
+
|
|
252
266
|
namespace facebook::react {
|
|
253
267
|
/**
|
|
254
268
|
* ObjC++ class for module 'NativeRentlyTuya'
|
|
@@ -403,6 +417,11 @@ inline bool JS::NativeRentlyTuya::SpecOpenCameraLivePreviewParams::doorbell_defa
|
|
|
403
417
|
id const p = _v[@"doorbell_default_settings_updated"];
|
|
404
418
|
return RCTBridgingToBool(p);
|
|
405
419
|
}
|
|
420
|
+
inline bool JS::NativeRentlyTuya::SpecOpenCameraLivePreviewParams::doorbell_calling_enabled() const
|
|
421
|
+
{
|
|
422
|
+
id const p = _v[@"doorbell_calling_enabled"];
|
|
423
|
+
return RCTBridgingToBool(p);
|
|
424
|
+
}
|
|
406
425
|
inline bool JS::NativeRentlyTuya::SpecOpenCameraLivePreviewParams::motion_detection() const
|
|
407
426
|
{
|
|
408
427
|
id const p = _v[@"motion_detection"];
|
|
@@ -423,6 +442,11 @@ inline bool JS::NativeRentlyTuya::SpecOpenCameraLivePreviewParams::set_sensitivi
|
|
|
423
442
|
id const p = _v[@"set_sensitivity_low"];
|
|
424
443
|
return RCTBridgingToBool(p);
|
|
425
444
|
}
|
|
445
|
+
inline bool JS::NativeRentlyTuya::SpecOpenCameraLivePreviewParams::doorbell_setting() const
|
|
446
|
+
{
|
|
447
|
+
id const p = _v[@"doorbell_setting"];
|
|
448
|
+
return RCTBridgingToBool(p);
|
|
449
|
+
}
|
|
426
450
|
inline NSString *JS::NativeRentlyTuya::SpecRegisterForPushNotificationParams::token() const
|
|
427
451
|
{
|
|
428
452
|
id const p = _v[@"token"];
|
|
@@ -463,4 +487,5 @@ inline NSString *JS::NativeRentlyTuya::SpecResetDeviceParams::countryCode() cons
|
|
|
463
487
|
id const p = _v[@"countryCode"];
|
|
464
488
|
return RCTBridgingToString(p);
|
|
465
489
|
}
|
|
490
|
+
NS_ASSUME_NONNULL_END
|
|
466
491
|
#endif // RNRentlyTuyaSpec_H
|
|
@@ -38,8 +38,12 @@ public:
|
|
|
38
38
|
template <typename T>
|
|
39
39
|
class JSI_EXPORT NativeRentlyTuyaCxxSpec : public TurboModule {
|
|
40
40
|
public:
|
|
41
|
-
jsi::Value
|
|
42
|
-
return delegate_.
|
|
41
|
+
jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
42
|
+
return delegate_.create(rt, propName);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
|
|
46
|
+
return delegate_.getPropertyNames(runtime);
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
static constexpr std::string_view kModuleName = "RentlyTuya";
|
|
@@ -14,7 +14,7 @@ open class KeylessListener: RCTEventEmitter {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
open override func supportedEvents() -> [String] {
|
|
17
|
-
return ["REMOVE_CAMERA", "RESET_WIFI", "RESET_DEFAULT_SETTINGS_FLAG"]
|
|
17
|
+
return ["REMOVE_CAMERA", "RESET_WIFI", "RESET_DEFAULT_SETTINGS_FLAG", "ENABLE_DOORBELL_CALL"]
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
@objc static public override func requiresMainQueueSetup() -> Bool {
|
|
@@ -28,10 +28,9 @@ open class KeylessListener: RCTEventEmitter {
|
|
|
28
28
|
self.keylessListenerCallback = callback
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
@objc func resetWifiForDoorbell(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
KeylessListener.emitter.sendEvent(withName: "RESET_WIFI", body: ["device_id": deviceID])
|
|
31
|
+
@objc func resetWifiForDoorbell(withTuyaProductName tuyaProductName: String, callback: @escaping (Bool, String) -> Void) {
|
|
32
|
+
|
|
33
|
+
KeylessListener.emitter.sendEvent(withName: "RESET_WIFI", body: ["doorbellType": tuyaProductName])
|
|
35
34
|
self.keylessListenerCallback = callback
|
|
36
35
|
}
|
|
37
36
|
|
|
@@ -42,6 +41,13 @@ open class KeylessListener: RCTEventEmitter {
|
|
|
42
41
|
self.keylessListenerCallback = callback
|
|
43
42
|
}
|
|
44
43
|
|
|
44
|
+
@objc func enableDoorbellCall(withID id: String, enabled: Bool, callback: @escaping (Bool, String) -> Void) {
|
|
45
|
+
guard !id.isEmpty else { return }
|
|
46
|
+
|
|
47
|
+
KeylessListener.emitter.sendEvent(withName: "ENABLE_DOORBELL_CALL", body: ["id": id, "doorbell_calling_enabled": enabled])
|
|
48
|
+
self.keylessListenerCallback = callback
|
|
49
|
+
}
|
|
50
|
+
|
|
45
51
|
// Callbacks received from react native
|
|
46
52
|
@objc func successCallback(_ command: String) {
|
|
47
53
|
DispatchQueue.main.async {
|
|
@@ -93,10 +93,12 @@ RCT_EXPORT_MODULE()
|
|
|
93
93
|
@"serial_no": params.serial_no(),
|
|
94
94
|
@"flavour": params.flavour(),
|
|
95
95
|
@"doorbell_default_settings_updated": @(params.doorbell_default_settings_updated()),
|
|
96
|
+
@"doorbell_calling_enabled": @(params.doorbell_calling_enabled()),
|
|
96
97
|
@"motion_detection": @(params.motion_detection()),
|
|
97
98
|
@"continuous_recording": @(params.continuous_recording()),
|
|
98
99
|
@"event_recording": @(params.event_recording()),
|
|
99
|
-
@"set_sensitivity_low": @(params.set_sensitivity_low())
|
|
100
|
+
@"set_sensitivity_low": @(params.set_sensitivity_low()),
|
|
101
|
+
@"doorbell_setting": @(params.doorbell_setting())
|
|
100
102
|
};
|
|
101
103
|
|
|
102
104
|
[[RentlyTuyaImpl shared] openCameraLivePreview:paramsDict withResolve:resolve withReject:reject];
|
|
@@ -185,6 +185,7 @@ public class RentlyTuyaImpl: NSObject {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
let lastMoveoutAt = params["last_moveout_at"] as? String
|
|
188
|
+
let isDoorbellCallEnabled = params["doorbell_calling_enabled"] as? Bool ?? false
|
|
188
189
|
let resetRequired = params["resetRequired"] as? Bool
|
|
189
190
|
let isResident = params["isResident"] as? Bool ?? true
|
|
190
191
|
let displayRemoveDoorbellButton = params["display_remove_doorbell_button"] as? Bool
|
|
@@ -197,12 +198,14 @@ public class RentlyTuyaImpl: NSObject {
|
|
|
197
198
|
let continuousRecording = params["continuous_recording"] as? Bool ?? false
|
|
198
199
|
let eventRecording = params["event_recording"] as? Bool ?? false
|
|
199
200
|
let setSensitivityLow = params["set_sensitivity_low"] as? Bool ?? false
|
|
201
|
+
let doorbell_setting = params["doorbell_setting"] as? Bool ?? false
|
|
200
202
|
|
|
201
203
|
// Property Credentials
|
|
202
204
|
let propertyCredentialUsername = params["propertyCredentialUsername"] as? String
|
|
203
205
|
let propertyCredentialPassword = params["propertyCredentialPassword"] as? String
|
|
204
206
|
|
|
205
207
|
Tuya.shared.lastMoveoutAt = lastMoveoutAt
|
|
208
|
+
Tuya.shared.isDoorbellCallEnabled = isDoorbellCallEnabled
|
|
206
209
|
Tuya.shared.resetRequired = resetRequired
|
|
207
210
|
Tuya.shared.isResident = isResident
|
|
208
211
|
Tuya.shared.displayRemoveDoorbellButton = displayRemoveDoorbellButton
|
|
@@ -217,6 +220,7 @@ public class RentlyTuyaImpl: NSObject {
|
|
|
217
220
|
Tuya.shared.eventRecording = eventRecording
|
|
218
221
|
Tuya.shared.setSensitivityLow = setSensitivityLow
|
|
219
222
|
Tuya.shared.flavour = flavour
|
|
223
|
+
Tuya.shared.doorbell_setting = doorbell_setting
|
|
220
224
|
|
|
221
225
|
if !Tuya.shared.continuousRecording && !Tuya.shared.eventRecording {
|
|
222
226
|
Tuya.shared.eventRecording = true
|
package/ios/tuya/Tuya.swift
CHANGED
|
@@ -38,6 +38,8 @@ class Tuya: NSObject, ObservableObject {
|
|
|
38
38
|
@Published var isFlipEnabled: Bool = false
|
|
39
39
|
@Published var isAntiDismantlingAlarmEnabled: Bool = false
|
|
40
40
|
@Published var nightVisionLevel: String = ThingSmartCameraNightvision.auto.rawValue
|
|
41
|
+
@Published var isDoorbellCallEnabled: Bool = false
|
|
42
|
+
|
|
41
43
|
@Published var isMotionDetectionEnabled: Bool = false
|
|
42
44
|
@Published var motionSensitivityLevel: String = ThingSmartCameraMotion.low.rawValue
|
|
43
45
|
@Published var isPIRDetectionEnabled: Bool = false
|
|
@@ -82,6 +84,7 @@ class Tuya: NSObject, ObservableObject {
|
|
|
82
84
|
var serialNumber: String? = nil
|
|
83
85
|
var id: String? = nil
|
|
84
86
|
var flavour: String = "smarthome"
|
|
87
|
+
var doorbell_setting: Bool? = false
|
|
85
88
|
|
|
86
89
|
// Default Settings values
|
|
87
90
|
var isDefaultSettingsUpdated: Bool = false
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import AVFoundation
|
|
2
|
+
import Photos
|
|
3
|
+
|
|
4
|
+
enum AppPermission {
|
|
5
|
+
case microphone
|
|
6
|
+
case photos
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
struct PermissionManager {
|
|
10
|
+
|
|
11
|
+
static func request(
|
|
12
|
+
_ type: AppPermission,
|
|
13
|
+
granted: @escaping () -> Void,
|
|
14
|
+
denied: @escaping () -> Void
|
|
15
|
+
) {
|
|
16
|
+
switch type {
|
|
17
|
+
case .microphone:
|
|
18
|
+
if #available(iOS 17.0, *) {
|
|
19
|
+
AVAudioApplication.requestRecordPermission { ok in
|
|
20
|
+
DispatchQueue.main.async { ok ? granted() : denied() }
|
|
21
|
+
}
|
|
22
|
+
} else {
|
|
23
|
+
AVAudioSession.sharedInstance().requestRecordPermission { ok in
|
|
24
|
+
DispatchQueue.main.async { ok ? granted() : denied() }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
case .photos:
|
|
29
|
+
PHPhotoLibrary.requestAuthorization(for: .readWrite) { status in
|
|
30
|
+
DispatchQueue.main.async {
|
|
31
|
+
if status == .authorized || status == .limited {
|
|
32
|
+
granted()
|
|
33
|
+
} else {
|
|
34
|
+
denied()
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeRentlyTuya.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeRentlyTuya.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAoEpCC,gCAAmB,CAACC,YAAY,CAAO,YAAY,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_NativeRentlyTuya","_interopRequireDefault","require","e","__esModule","default","initAirbrake","params","RentlyTuya","exports","getCurrentWifi","getDeviceData","setTuyaHome","getTokenForQRCode","initActivatorForQRCode","loginWithUid","logout","openCameraLivePreview","registerForPushNotification","renameDevice","resetDevice"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA4C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE5C;;AAMO,MAAMG,YAAY,GAAIC,MAAwB,IAAmB;EACtE,OAAOC,yBAAU,CAACF,YAAY,CAACC,MAAM,CAAC;AACxC,CAAC;;AAED;AAAAE,OAAA,CAAAH,YAAA,GAAAA,YAAA;AACO,MAAMI,cAAc,GAAGA,CAAA,KAAoB;EAChD,OAAOF,yBAAU,CAACE,cAAc,CAAC,CAAC;AACpC,CAAC;;AAED;AAAAD,OAAA,CAAAC,cAAA,GAAAA,cAAA;AAKO,MAAMC,aAAa,GAAIJ,MAAyB,IAAmB;EACxE,OAAOC,yBAAU,CAACG,aAAa,CAACJ,MAAM,CAAC;AACzC,CAAC;;AAED;AAAAE,OAAA,CAAAE,aAAA,GAAAA,aAAA;AAKO,MAAMC,WAAW,GAAIL,MAAuB,IAAmB;EACpE,OAAOC,yBAAU,CAACI,WAAW,CAACL,MAAM,CAAC;AACvC,CAAC;;AAED;AAAAE,OAAA,CAAAG,WAAA,GAAAA,WAAA;AAKO,MAAMC,iBAAiB,GAAG,MAC/BN,MAA6B,IACZ;EACjB,OAAOC,yBAAU,CAACK,iBAAiB,CAACN,MAAM,CAAC;AAC7C,CAAC;;AAED;AAAAE,OAAA,CAAAI,iBAAA,GAAAA,iBAAA;AAQO,MAAMC,sBAAsB,GACjCP,MAAkC,IACjB;EACjB,OAAOC,yBAAU,CAACM,sBAAsB,CAACP,MAAM,CAAC;AAClD,CAAC;;AAED;AAAAE,OAAA,CAAAK,sBAAA,GAAAA,sBAAA;AAOO,MAAMC,YAAY,GAAIR,MAAiB,IAAmB;EAC/D,OAAOC,yBAAU,CAACO,YAAY,CAACR,MAAM,CAAC;AACxC,CAAC;;AAED;AAAAE,OAAA,CAAAM,YAAA,GAAAA,YAAA;AACO,MAAMC,MAAM,GAAG,MAAAA,CAAA,KAA0B;EAC9C,OAAOR,yBAAU,CAACQ,MAAM,CAAC,CAAC;AAC5B,CAAC;;AAED;AAAAP,OAAA,CAAAO,MAAA,GAAAA,MAAA;
|
|
1
|
+
{"version":3,"names":["_NativeRentlyTuya","_interopRequireDefault","require","e","__esModule","default","initAirbrake","params","RentlyTuya","exports","getCurrentWifi","getDeviceData","setTuyaHome","getTokenForQRCode","initActivatorForQRCode","loginWithUid","logout","openCameraLivePreview","registerForPushNotification","renameDevice","resetDevice"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA4C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE5C;;AAMO,MAAMG,YAAY,GAAIC,MAAwB,IAAmB;EACtE,OAAOC,yBAAU,CAACF,YAAY,CAACC,MAAM,CAAC;AACxC,CAAC;;AAED;AAAAE,OAAA,CAAAH,YAAA,GAAAA,YAAA;AACO,MAAMI,cAAc,GAAGA,CAAA,KAAoB;EAChD,OAAOF,yBAAU,CAACE,cAAc,CAAC,CAAC;AACpC,CAAC;;AAED;AAAAD,OAAA,CAAAC,cAAA,GAAAA,cAAA;AAKO,MAAMC,aAAa,GAAIJ,MAAyB,IAAmB;EACxE,OAAOC,yBAAU,CAACG,aAAa,CAACJ,MAAM,CAAC;AACzC,CAAC;;AAED;AAAAE,OAAA,CAAAE,aAAA,GAAAA,aAAA;AAKO,MAAMC,WAAW,GAAIL,MAAuB,IAAmB;EACpE,OAAOC,yBAAU,CAACI,WAAW,CAACL,MAAM,CAAC;AACvC,CAAC;;AAED;AAAAE,OAAA,CAAAG,WAAA,GAAAA,WAAA;AAKO,MAAMC,iBAAiB,GAAG,MAC/BN,MAA6B,IACZ;EACjB,OAAOC,yBAAU,CAACK,iBAAiB,CAACN,MAAM,CAAC;AAC7C,CAAC;;AAED;AAAAE,OAAA,CAAAI,iBAAA,GAAAA,iBAAA;AAQO,MAAMC,sBAAsB,GACjCP,MAAkC,IACjB;EACjB,OAAOC,yBAAU,CAACM,sBAAsB,CAACP,MAAM,CAAC;AAClD,CAAC;;AAED;AAAAE,OAAA,CAAAK,sBAAA,GAAAA,sBAAA;AAOO,MAAMC,YAAY,GAAIR,MAAiB,IAAmB;EAC/D,OAAOC,yBAAU,CAACO,YAAY,CAACR,MAAM,CAAC;AACxC,CAAC;;AAED;AAAAE,OAAA,CAAAM,YAAA,GAAAA,YAAA;AACO,MAAMC,MAAM,GAAG,MAAAA,CAAA,KAA0B;EAC9C,OAAOR,yBAAU,CAACQ,MAAM,CAAC,CAAC;AAC5B,CAAC;;AAED;AAAAP,OAAA,CAAAO,MAAA,GAAAA,MAAA;AA4BO,MAAMC,qBAAqB,GAChCV,MAAiC,IAChB;EACjB,OAAOC,yBAAU,CAACS,qBAAqB,CAACV,MAAM,CAAC;AACjD,CAAC;;AAED;AAAAE,OAAA,CAAAQ,qBAAA,GAAAA,qBAAA;AAKO,MAAMC,2BAA2B,GACtCX,MAAuC,IACtB;EACjB,OAAOC,yBAAU,CAACU,2BAA2B,CAACX,MAAM,CAAC;AACvD,CAAC;;AAED;AAAAE,OAAA,CAAAS,2BAAA,GAAAA,2BAAA;AAMO,MAAMC,YAAY,GAAIZ,MAAwB,IAAmB;EACtE,OAAOC,yBAAU,CAACW,YAAY,CAACZ,MAAM,CAAC;AACxC,CAAC;;AAED;AAAAE,OAAA,CAAAU,YAAA,GAAAA,YAAA;AASO,MAAMC,WAAW,GAAIb,MAAuB,IAAmB;EACpE,OAAOC,yBAAU,CAACY,WAAW,CAACb,MAAM,CAAC;AACvC,CAAC;AAACE,OAAA,CAAAW,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeRentlyTuya.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeRentlyTuya.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAoElD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,YAAY,CAAC","ignoreList":[]}
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RentlyTuya","initAirbrake","params","getCurrentWifi","getDeviceData","setTuyaHome","getTokenForQRCode","initActivatorForQRCode","loginWithUid","logout","openCameraLivePreview","registerForPushNotification","renameDevice","resetDevice"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AACA,OAAOA,UAAU,MAAM,uBAAoB;;AAE3C;;AAMA,OAAO,MAAMC,YAAY,GAAIC,MAAwB,IAAmB;EACtE,OAAOF,UAAU,CAACC,YAAY,CAACC,MAAM,CAAC;AACxC,CAAC;;AAED;AACA,OAAO,MAAMC,cAAc,GAAGA,CAAA,KAAoB;EAChD,OAAOH,UAAU,CAACG,cAAc,CAAC,CAAC;AACpC,CAAC;;AAED;;AAKA,OAAO,MAAMC,aAAa,GAAIF,MAAyB,IAAmB;EACxE,OAAOF,UAAU,CAACI,aAAa,CAACF,MAAM,CAAC;AACzC,CAAC;;AAED;;AAKA,OAAO,MAAMG,WAAW,GAAIH,MAAuB,IAAmB;EACpE,OAAOF,UAAU,CAACK,WAAW,CAACH,MAAM,CAAC;AACvC,CAAC;;AAED;;AAKA,OAAO,MAAMI,iBAAiB,GAAG,MAC/BJ,MAA6B,IACZ;EACjB,OAAOF,UAAU,CAACM,iBAAiB,CAACJ,MAAM,CAAC;AAC7C,CAAC;;AAED;;AAQA,OAAO,MAAMK,sBAAsB,GACjCL,MAAkC,IACjB;EACjB,OAAOF,UAAU,CAACO,sBAAsB,CAACL,MAAM,CAAC;AAClD,CAAC;;AAED;;AAOA,OAAO,MAAMM,YAAY,GAAIN,MAAiB,IAAmB;EAC/D,OAAOF,UAAU,CAACQ,YAAY,CAACN,MAAM,CAAC;AACxC,CAAC;;AAED;AACA,OAAO,MAAMO,MAAM,GAAG,MAAAA,CAAA,KAA0B;EAC9C,OAAOT,UAAU,CAACS,MAAM,CAAC,CAAC;AAC5B,CAAC;;AAED;;
|
|
1
|
+
{"version":3,"names":["RentlyTuya","initAirbrake","params","getCurrentWifi","getDeviceData","setTuyaHome","getTokenForQRCode","initActivatorForQRCode","loginWithUid","logout","openCameraLivePreview","registerForPushNotification","renameDevice","resetDevice"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AACA,OAAOA,UAAU,MAAM,uBAAoB;;AAE3C;;AAMA,OAAO,MAAMC,YAAY,GAAIC,MAAwB,IAAmB;EACtE,OAAOF,UAAU,CAACC,YAAY,CAACC,MAAM,CAAC;AACxC,CAAC;;AAED;AACA,OAAO,MAAMC,cAAc,GAAGA,CAAA,KAAoB;EAChD,OAAOH,UAAU,CAACG,cAAc,CAAC,CAAC;AACpC,CAAC;;AAED;;AAKA,OAAO,MAAMC,aAAa,GAAIF,MAAyB,IAAmB;EACxE,OAAOF,UAAU,CAACI,aAAa,CAACF,MAAM,CAAC;AACzC,CAAC;;AAED;;AAKA,OAAO,MAAMG,WAAW,GAAIH,MAAuB,IAAmB;EACpE,OAAOF,UAAU,CAACK,WAAW,CAACH,MAAM,CAAC;AACvC,CAAC;;AAED;;AAKA,OAAO,MAAMI,iBAAiB,GAAG,MAC/BJ,MAA6B,IACZ;EACjB,OAAOF,UAAU,CAACM,iBAAiB,CAACJ,MAAM,CAAC;AAC7C,CAAC;;AAED;;AAQA,OAAO,MAAMK,sBAAsB,GACjCL,MAAkC,IACjB;EACjB,OAAOF,UAAU,CAACO,sBAAsB,CAACL,MAAM,CAAC;AAClD,CAAC;;AAED;;AAOA,OAAO,MAAMM,YAAY,GAAIN,MAAiB,IAAmB;EAC/D,OAAOF,UAAU,CAACQ,YAAY,CAACN,MAAM,CAAC;AACxC,CAAC;;AAED;AACA,OAAO,MAAMO,MAAM,GAAG,MAAAA,CAAA,KAA0B;EAC9C,OAAOT,UAAU,CAACS,MAAM,CAAC,CAAC;AAC5B,CAAC;;AAED;;AA4BA,OAAO,MAAMC,qBAAqB,GAChCR,MAAiC,IAChB;EACjB,OAAOF,UAAU,CAACU,qBAAqB,CAACR,MAAM,CAAC;AACjD,CAAC;;AAED;;AAKA,OAAO,MAAMS,2BAA2B,GACtCT,MAAuC,IACtB;EACjB,OAAOF,UAAU,CAACW,2BAA2B,CAACT,MAAM,CAAC;AACvD,CAAC;;AAED;;AAMA,OAAO,MAAMU,YAAY,GAAIV,MAAwB,IAAmB;EACtE,OAAOF,UAAU,CAACY,YAAY,CAACV,MAAM,CAAC;AACxC,CAAC;;AAED;;AASA,OAAO,MAAMW,WAAW,GAAIX,MAAuB,IAAmB;EACpE,OAAOF,UAAU,CAACa,WAAW,CAACX,MAAM,CAAC;AACvC,CAAC","ignoreList":[]}
|
|
@@ -45,10 +45,12 @@ export interface Spec extends TurboModule {
|
|
|
45
45
|
serial_no: string;
|
|
46
46
|
flavour: string;
|
|
47
47
|
doorbell_default_settings_updated: boolean;
|
|
48
|
+
doorbell_calling_enabled: boolean;
|
|
48
49
|
motion_detection: boolean;
|
|
49
50
|
continuous_recording: boolean;
|
|
50
51
|
event_recording: boolean;
|
|
51
52
|
set_sensitivity_low: boolean;
|
|
53
|
+
doorbell_setting: boolean;
|
|
52
54
|
}): Promise<boolean>;
|
|
53
55
|
registerForPushNotification(params: {
|
|
54
56
|
token: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeRentlyTuya.d.ts","sourceRoot":"","sources":["../../../../src/NativeRentlyTuya.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAEvE,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,YAAY,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpE,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAElC,aAAa,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;I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CAAC,CAAC;CACtB;;AAED,wBAAoE"}
|
|
@@ -50,10 +50,12 @@ export type openCameraLivePreviewType = {
|
|
|
50
50
|
serial_no: string;
|
|
51
51
|
flavour: string;
|
|
52
52
|
doorbell_default_settings_updated: boolean;
|
|
53
|
+
doorbell_calling_enabled: boolean;
|
|
53
54
|
motion_detection: boolean;
|
|
54
55
|
continuous_recording: boolean;
|
|
55
56
|
event_recording: boolean;
|
|
56
57
|
set_sensitivity_low: boolean;
|
|
58
|
+
doorbell_setting: boolean;
|
|
57
59
|
};
|
|
58
60
|
export declare const openCameraLivePreview: (params: openCameraLivePreviewType) => Promise<any>;
|
|
59
61
|
export type registerForPushNotificationType = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAIvE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAIvE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,QAAQ,gBAAgB,KAAG,OAAO,CAAC,GAAG,CAElE,CAAC;AAGF,eAAO,MAAM,cAAc,QAAO,OAAO,CAAC,GAAG,CAE5C,CAAC;AAGF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,iBAAiB,KAAG,OAAO,CAA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settings_updated: boolean;
|
|
48
|
+
doorbell_calling_enabled: boolean;
|
|
48
49
|
motion_detection: boolean;
|
|
49
50
|
continuous_recording: boolean;
|
|
50
51
|
event_recording: boolean;
|
|
51
52
|
set_sensitivity_low: boolean;
|
|
53
|
+
doorbell_setting: boolean;
|
|
52
54
|
}): Promise<boolean>;
|
|
53
55
|
registerForPushNotification(params: {
|
|
54
56
|
token: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeRentlyTuya.d.ts","sourceRoot":"","sources":["../../../../src/NativeRentlyTuya.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAEvE,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,YAAY,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpE,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAElC,aAAa,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3D,WAAW,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE1D,iBAAiB,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE/D,sBAAsB,CAAC,MAAM,EAAE;QAC7B,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,KAAK,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAErB,YAAY,CAAC,MAA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WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,iCAAiC,EAAE,OAAO,CAAC;QAC3C,wBAAwB,EAAE,OAAO,CAAC;QAClC,gBAAgB,EAAE,OAAO,CAAC;QAC1B,oBAAoB,EAAE,OAAO,CAAC;QAC9B,eAAe,EAAE,OAAO,CAAC;QACzB,mBAAmB,EAAE,OAAO,CAAC;QAC7B,gBAAgB,EAAE,OAAO,CAAC;KAC3B,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAErB,2BAA2B,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzE,YAAY,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAExE,WAAW,CAAC,MAAM,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtB;;AAED,wBAAoE"}
|
|
@@ -50,10 +50,12 @@ export type openCameraLivePreviewType = {
|
|
|
50
50
|
serial_no: string;
|
|
51
51
|
flavour: string;
|
|
52
52
|
doorbell_default_settings_updated: boolean;
|
|
53
|
+
doorbell_calling_enabled: boolean;
|
|
53
54
|
motion_detection: boolean;
|
|
54
55
|
continuous_recording: boolean;
|
|
55
56
|
event_recording: boolean;
|
|
56
57
|
set_sensitivity_low: boolean;
|
|
58
|
+
doorbell_setting: boolean;
|
|
57
59
|
};
|
|
58
60
|
export declare const openCameraLivePreview: (params: openCameraLivePreviewType) => Promise<any>;
|
|
59
61
|
export type registerForPushNotificationType = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAIvE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAIvE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,QAAQ,gBAAgB,KAAG,OAAO,CAAC,GAAG,CAElE,CAAC;AAGF,eAAO,MAAM,cAAc,QAAO,OAAO,CAAC,GAAG,CAE5C,CAAC;AAGF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,iBAAiB,KAAG,OAAO,CAAC,GAAG,CAEpE,CAAC;AAGF,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,QAAQ,eAAe,KAAG,OAAO,CAAC,GAAG,CAEhE,CAAC;AAGF,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,qBAAqB,KAC5B,OAAO,CAAC,GAAG,CAEb,CAAC;AAGF,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CA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eAAO,MAAM,qBAAqB,GAChC,QAAQ,yBAAyB,KAChC,OAAO,CAAC,GAAG,CAEb,CAAC;AAGF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACtC,QAAQ,+BAA+B,KACtC,OAAO,CAAC,GAAG,CAEb,CAAC;AAGF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,QAAQ,gBAAgB,KAAG,OAAO,CAAC,GAAG,CAElE,CAAC;AAGF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,QAAQ,eAAe,KAAG,OAAO,CAAC,GAAG,CAEhE,CAAC"}
|
package/package.json
CHANGED
package/src/NativeRentlyTuya.ts
CHANGED
|
@@ -46,10 +46,12 @@ export interface Spec extends TurboModule {
|
|
|
46
46
|
serial_no: string;
|
|
47
47
|
flavour: string;
|
|
48
48
|
doorbell_default_settings_updated: boolean;
|
|
49
|
+
doorbell_calling_enabled: boolean;
|
|
49
50
|
motion_detection: boolean;
|
|
50
51
|
continuous_recording: boolean;
|
|
51
52
|
event_recording: boolean;
|
|
52
53
|
set_sensitivity_low: boolean;
|
|
54
|
+
doorbell_setting: boolean;
|
|
53
55
|
}): Promise<boolean>;
|
|
54
56
|
|
|
55
57
|
registerForPushNotification(params: { token: string }): Promise<boolean>;
|
package/src/index.tsx
CHANGED
|
@@ -95,10 +95,12 @@ export type openCameraLivePreviewType = {
|
|
|
95
95
|
serial_no: string;
|
|
96
96
|
flavour: string;
|
|
97
97
|
doorbell_default_settings_updated: boolean;
|
|
98
|
+
doorbell_calling_enabled: boolean;
|
|
98
99
|
motion_detection: boolean;
|
|
99
100
|
continuous_recording: boolean;
|
|
100
101
|
event_recording: boolean;
|
|
101
102
|
set_sensitivity_low: boolean;
|
|
103
|
+
doorbell_setting: boolean;
|
|
102
104
|
};
|
|
103
105
|
|
|
104
106
|
export const openCameraLivePreview = (
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"commonjs"}
|
package/lib/module/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"module"}
|