Last Updated on : 2022-06-21 01:47:33download
After the feeder is defined, the corresponding functions need to be abstracted into different DP function points to realize data transmission and control. For pet feeders, take the public version product definition as an example. The corresponding relationship between functions and DP is shown in the following table.
DP ID |
DP | Identifier | Data transmission type |
DP type |
DP property |
Remarks |
---|---|---|---|---|---|---|
1 | Meal plan | meal_plan | Send/report | RAW | - | Synchronize to the local device of the device, even if the device is offline, it can still feed and deliver food normally. The meal plan supports up to 10 meal plans. |
2 | Fast feeding | quick_feed | Send/report | Bool | - | Fast feeding: Fast feeding function. Click to send feeding. The specific number of servings is determined by the MCU and the default parameters |
3 | Manual feeding | manual_feed | Send/report | Integer | The value ranges from 1 to 12, with a pitch of 1 and a scale of 0. Unit: serving. |
Manual feeding: Manually select the number of feeding portions. |
4 | Feeding status | feed_state | Report only | Enum | Enum value standby feeding done |
Feeding status: The feeding status of the device, including standby, feeding, and feeding completion, etc.; |
supports custom feeding status. | ||||||
5 | Unit conversion | unit | Send/report | Enum | Enum value cup oz grid |
Unit conversion: Used to switch food units. |
6 | Slow feeding | slow_feed | Send/report | Bool | - | Enable the switch and turn on the device to perform slow feeding. |
7 | Calibration of output grain | export_calibrate | Send/report | Bool | - | Click on the disbursement calibration switch and the device will automatically execute it. After the execution is completed, it will automatically close. |
8 | Calibration of remaining grain | weight_calibrate | Send/report | Bool | - | Click on the remaining food calibration switch and the device will automatically execute it. After the execution is completed, it will automatically close. |
9 | Restore to factory defaults | factory_reset | Send/report | Bool | - | Restore to factory settings: Restore the device to factory settings. |
10 | Calibration status of output grain | export_state | Report only | Enum | Enum value true false |
Calibration status report of output grain |
11 | Battery capacity | battery_percentage | Report only | Integer | The value ranges from 0 to 100, with a pitch of 1 and a scale of 0. Unit: serving. |
When the device is powered off, it will automatically switch to battery mode, supporting the display of battery power. |
12 | Charging status | charge_state | Report only | Bool | - | Charging status display. Charging or fully charged. |
13 | Status of feeding cover | cover_state | Report only | Enum | Enum value on off |
Report the status of the feeding cover, and the app can display the opening status of the feeding cover. |
14 | Fault alarm | fault | Report only | Fault | Fault value e1 e2 e3 |
Displays fault alerts of the device. |
15 | Feeding result report | feed_report | Report only | Integer | The value ranges from 1 to 12, with a pitch of 1 and a scale of 0. Unit: serving. |
Report the feeding results for data statistics. |
16 | Remaining grain in the bucket | surplus_grain | Report only | Integer | The value ranges from 0 to 100, with a pitch of 1 and a scale of 0. Unit: serving. |
Report remaining percentage. |
17 | Weight of remaining grain | weight | Report only | Integer | The value ranges from 0 to 10,000, with a pitch of 1 and a scale of 0. Unit: serving. |
Report the remaining grain weight and support unit switching. |
18 | Voice prompt times | voice_times | Send/report | Integer | The value ranges from 1 to 12, with a pitch of 1 and a scale of 0. Unit: serving. |
Set the play times, voice call pets to come and eat before each feeding. |
19 | Night light | light | Send/report | Bool | - | Night light switch. |
20 | Switch | switch | Send/report | Bool | - | Device master switch. |
RAW format convention: Implement local timing according to period, time, the number of servings and switch. It is shown as follows:
In the above example, the result issued by the app terminal time is 0112320c01, which means that on Sunday, 18:50, 12 servings are fed, and it is turned on.
The device reports the number of servings per feeding through the feeding result report DP, and Tuya Cloud will record each feeding record and display it on the app.
When the number of servings is not selected on the app, click the Feed button to issue the Fast Feeding DP. When the number of servings is not selected on the app, click the Feed button to issue the Manual Feeding DP.
Local timing (meal plan): When adding meal plan DP, regardless of whether the cloud timing function is checked or not, the device local timing is enabled at this time.
Cloud timing: When the meal plan DP is not added and the cloud timing function is checked, the cloud timing function is enabled at this time. Supported comments and push notifications of scheduled tasks.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback