File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -27,19 +27,21 @@ export const fetchLwM2MShadows = (
2727 return (
2828 await Promise . all < LwM2MShadow > (
2929 ( things ?? [ ] ) . map ( async ( { thingName, shadow } ) => {
30- const alias = ( await deviceInfo ( thingName as string ) ) . alias
30+ const { alias, type } = await deviceInfo ( thingName as string )
3131 const reported = JSON . parse ( shadow ?? '{}' ) . name . lwm2m . reported
3232 if ( reported === undefined )
3333 return {
3434 deviceId : thingName as string ,
3535 alias,
36+ deviceType : type ,
3637 objects : [ ] ,
3738 }
3839
3940 try {
4041 return {
4142 deviceId : thingName as string ,
4243 alias,
44+ deviceType : type ,
4345 objects : shadowToObjects ( reported ) . filter ( ( instance ) => {
4446 const updateTs = instanceTs ( instance )
4547 return (
@@ -62,6 +64,7 @@ export const fetchLwM2MShadows = (
6264 return {
6365 deviceId : thingName as string ,
6466 alias,
67+ deviceType : type ,
6568 objects : [ ] ,
6669 }
6770 }
You can’t perform that action at this time.
0 commit comments