@cpzxrobot/sdk 1.0.62 → 1.0.64
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/device_types/feedtower.ts +14 -0
- package/dist/device_types/feedtower.js +6 -0
- package/package.json +1 -1
- package/readme.md +1 -0
- package/unit_gateway.ts +1 -1
|
@@ -131,6 +131,20 @@ export class FeedTowerGateway extends DeviceFilter<FeedTower> {
|
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
async updateAlarmParam(
|
|
135
|
+
deviceId: number,
|
|
136
|
+
param: {
|
|
137
|
+
zeroPeriod: number;
|
|
138
|
+
zeroValue: number;
|
|
139
|
+
alertDays: number[];
|
|
140
|
+
}
|
|
141
|
+
) {
|
|
142
|
+
return this.context.axios.post(`/api/v2/device/config/feedTowerAlert/update`, {
|
|
143
|
+
deviceId,
|
|
144
|
+
config: param,
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
|
|
134
148
|
//获取报警参数
|
|
135
149
|
async getAlarmParam(deviceId: number) {
|
|
136
150
|
return this.context.axios.get(`/api/v2/device/config/feedTowerAlert/${deviceId}`);
|
|
@@ -106,6 +106,12 @@ class FeedTowerGateway extends device_filter_1.DeviceFilter {
|
|
|
106
106
|
config: param,
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
+
async updateAlarmParam(deviceId, param) {
|
|
110
|
+
return this.context.axios.post(`/api/v2/device/config/feedTowerAlert/update`, {
|
|
111
|
+
deviceId,
|
|
112
|
+
config: param,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
109
115
|
//获取报警参数
|
|
110
116
|
async getAlarmParam(deviceId) {
|
|
111
117
|
return this.context.axios.get(`/api/v2/device/config/feedTowerAlert/${deviceId}`);
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -88,6 +88,7 @@ baseURL: "/"
|
|
|
88
88
|
| cpzxrobot().pigfarm.heatlamp.xxx | 操作保温灯 |
|
|
89
89
|
| cpzxrobot().device.feedTower.stat | 获得料塔设备的料耗,饲料重量 |
|
|
90
90
|
| cpzxrobot().device.feedTower.setAlarmParam | 设置料塔设备的报警参数 |
|
|
91
|
+
| cpzxrobot().device.feedTower.getAlarmParam | 获得料塔设备的报警参数 |
|
|
91
92
|
| cpzxrobot().pigfarm.unitStat | 获得单元的统计信息,包括每日料耗,饲料消耗,日龄,存栏量等 |
|
|
92
93
|
| cpzxrobot().pigfarm.heatlamp.set | 设置保温灯的当前工作日龄,调用时,action传"dayage",argc传天数 |
|
|
93
94
|
| cpzxrobot().pigfarm.heatlamp.switch | 设置保温灯的当前工作日龄,调用时,action"on"或"off" |
|