Last Updated on : 2024-11-20 08:51:46download
This topic describes the pet camera configurations for smart pet feeders. Built on top of the IP camera (IPC), the pet camera enables features including feeding schedule, manual feeding, feeding record, and voice message recording.
Go to Tuya Developer Platform > Product > Tuya OS > Development, and click Create > Standard Category > IP Camera > Smart Camera > Custom Solution. Then, complete the required product information. The platform will automatically generate a product IP (PID).
For more information about product creation, see Create Products.
You can select the standard function as needed. The icon of the selected function will be displayed on the control panel and device setting page in the mobile app.
The DP definitions are described in the following table.
DP name | Identifier | Data transfer type | Data type | Property | Remarks |
---|---|---|---|---|---|
DP 115 Motion detected |
movement_detect_pic | Report only (read-only) | Raw | N/A | For more information about the DP implementation, see Motion detection (general). |
DP 134 Motion alert |
motion_switch | Send and report (read-write) | Boolean | N/A | N/A |
DP 134 controls the motion detection switch. When moving objects are detected, the SDK and DP 115 are used to report the motion detection images. The user can then receive and view the motion alerts on the Message tab of the app. The motion alerts need to be configured in Device Notification. DP 115 can be replaced with DP 185.
You can add more standard functions. For more information, see IPC Basic Configurations.
The features including feeding schedule, manual feeding, feeding record, and voice message recording are custom functions. You need to manually configure the DPs to implement these features on the app. For more information, see Custom Function.
The DP definitions are described in the following table.
DP name | Identifier | Data transfer type | Data type | Property | Remarks |
---|---|---|---|---|---|
Send feeding | feed_publish | Send only (write-only) | Value | 1 to 20 1 0 |
Send the DP to define the number of servings for feeding. |
Report feeding | feed_report | Report only (read-only) | Value | 0 to 20 1 0 |
Description of return values:
|
Weight per serving | food_weight | Report only (read-only) | Value | 1 to 100 1 1 |
The weight of food to be delivered per serving. Unit: g. |
Fed successfully
Failed to feed
The DP definitions are described in the following table.
DP name | Identifier | Data transfer type | Data type | Property | Remarks |
---|---|---|---|---|---|
Feeding record | history_data | Send and report (read-write) | Boolean | Add this DP to show the Record icon. | |
Report feeding | feed_report | Report only (read-only) | Value | 0 to 20 1 0 |
Description of return values:
|
Control with the app:
Tap the Record icon to view the feeding records. The feeding statistics can be calculated by day, week, and month.
These records are reported by the DP identifier feed_report
. You need to contact Tuya’s project manager to add this identifier to implement the statistics.
The DP definitions are described in the following table.
DP name | Identifier | Data transfer type | Data type | Property | Remarks |
---|---|---|---|---|---|
Voice message recording | feed_voice_record | Send and report (read-write) | Enumeration | Enum values: 0 and 1 |
1 : enable recording0 : disable recording |
Control panel
Two types of feeding schedules are supported: online and offline. Their differences are described as follows:
feed_puslish
and feed_report
.Description of offline feeding schedule
The DP definitions are described in the following table.
DP name | Identifier | Data transfer type | Data type | Property | Remarks |
---|---|---|---|---|---|
Schedule | schedule | Send and report (read-write) | String | The panel represents a command with 15 bytes, converts the command into the string type, and then sends it to the device. The first 9 bytes are valid bytes and the last 6 bytes are 000000 . |
After the command arrives, the device processes its format first: byte2 to byte8 are converted into decimal integers and byte0 to byte1 are converted into hexadecimal numbers.
These bytes are described in the following table.
Field | Property | Description |
---|---|---|
byte0 to byte1 | Week | Treat byte0 to byte1 as a byte in the hexadecimal format and parse the bits of the byte. |
byte2 to byte3 | Hour | Byte2 × 10 + byte3. |
byte4 to byte5 | Minute | Byte4 × 10 + byte5. |
byte6 to byte7 | Number of servings | A value from 01 to 20 represents the number of servings. |
byte8 | Task on/off | 1 : The task is valid.0 : The task is invalid. |
byte9 | Reserved | 0 |
byte10 | Reserved | 0 |
byte11 | Reserved | 0 |
byte12 | Reserved | 0 |
byte13 | Reserved | 0 |
byte14 | Reserved | 0 |
byte0 to byte1 are described in the following table.
bit0 | bit1 | bit2 | bit3 | bit4 | bit5 | bit6 |
---|---|---|---|---|---|---|
Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday |
0
, the task is run only once.Example:
Send the following command to the device:
002325121000000
00
: only once23
: the hour number 2325
: the minute number 2512
: 12 servings1
: valid task000000
: reserved, unusedMeaning: 12 servings are delivered at 23:25 on the current day.
Open the product development wizard and go to the Device Interaction step.
Select Panel Control > All-in-One Panel > IPC General Panel (App minimum version 3.17.0).
The IPC SDK must be integrated to implement a pet camera. Perform the following steps:
You can set rules to trigger an automated push notification. For example, set a threshold for a function. If the preset value is reached, the user will receive an alert from the mobile phone.
The following figure shows how to access push notification settings on the Tuya Developer Platform:
Push notification is available to accounts of the premium version or ultimate version.
Configure the push notification as needed and adapt to the firmware. After you finish the configuration, contact the project manager for approval. For more information, see Configure Push Notification.
Successful manual feeding (DP feed_report)
Failed manual feeding (DP feed_report)
Insufficient food (DP realtime_data)
The custom DP definitions are described in the following table.
DP name | Identifier | Data transfer type | Data type | Property | Remarks |
---|---|---|---|---|---|
Real-time data | realtime_data | Send and report (read-write) | Enumeration | Enum values: 0 and 1 |
1 : An error has occurred while dispensing food.0 : The remaining food is insufficient. |
Examples of trigger conditions
Food dispensing error (DP realtime_data)
Check out the Pet Camera solution. Click Start OEM to get started.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback