@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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.0.62",
3
+ "version": "1.0.64",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
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" |
package/unit_gateway.ts CHANGED
@@ -25,7 +25,7 @@ export class UnitGateway extends Object {
25
25
  },
26
26
  update: (
27
27
  unit: Unit,
28
- type: "heatLamp",
28
+ type: "HeatLamp",
29
29
  config: {
30
30
  [key: string]: any;
31
31
  }