-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: only list asset models for the requested engine group (#367)
* fix: only list asset models for the requested engine group * test: ensure asset model definition parity with the IoT Platform
- Loading branch information
Showing
12 changed files
with
234 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { AssetModelDefinition } from "../../../index"; | ||
|
||
export const roomAssetDefinition: AssetModelDefinition = { | ||
measures: [ | ||
{ | ||
name: "temperature", | ||
type: "temperature", | ||
}, | ||
{ | ||
name: "humidity", | ||
type: "humidity", | ||
}, | ||
{ | ||
name: "co2", | ||
type: "co2", | ||
}, | ||
{ | ||
name: "illuminance", | ||
type: "illuminance", | ||
}, | ||
], | ||
metadataMappings: { | ||
floor: { type: "integer" }, | ||
width: { type: "integer" }, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { AssetModelDefinition } from "../../../index"; | ||
|
||
export const streetLampAssetDefinition: AssetModelDefinition = { | ||
measures: [ | ||
{ | ||
name: "brightness", | ||
type: "brightness", | ||
}, | ||
{ | ||
name: "powerConsumption", | ||
type: "powerConsumption", | ||
}, | ||
], | ||
metadataMappings: { | ||
position: { type: "geo_point" }, | ||
street: { type: "keyword" }, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { MeasureDefinition } from "lib/modules/measure"; | ||
|
||
export const brightnessMeasureDefinition: MeasureDefinition = { | ||
valuesMappings: { lumens: { type: "float" } }, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { MeasureDefinition } from "lib/modules/measure"; | ||
|
||
export const co2MeasureDefinition: MeasureDefinition = { | ||
valuesMappings: { co2: { type: "float" } }, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { MeasureDefinition } from "lib/modules/measure"; | ||
|
||
export const illuminanceMeasureDefinition: MeasureDefinition = { | ||
valuesMappings: { illuminance: { type: "float" } }, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { MeasureDefinition } from "lib/modules/measure"; | ||
|
||
export const powerConsumptionMeasureDefinition: MeasureDefinition = { | ||
valuesMappings: { watt: { type: "float" } }, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.