Skip to content

Commit

Permalink
fix: use asset_tracker_v2+AWS as model
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Feb 28, 2024
1 parent 931f6d3 commit 44fd954
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lambda/publishLwM2MShadowsToJSON.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { IoTClient } from '@aws-sdk/client-iot'
import { fetchLwM2MShadows } from '../lwm2m/fetchLwM2MShadows.js'
import { S3Client, PutObjectCommand } from '@aws-sdk/client-s3'
import { fromEnv } from '@nordicsemiconductor/from-env'
import { models } from '@hello.nrfcloud.com/proto-lwm2m'

const iot = new IoTClient({})
const fetchShadows = fetchLwM2MShadows(iot)
Expand All @@ -20,7 +21,7 @@ export const handler = async (): Promise<void> => {
devices: (await fetchShadows(30)).map(({ deviceId, objects }) => ({
'@context': 'https://github.com/hello-nrfcloud/proto/map/device',
id: deviceId,
model: 'world.thingy.rocks',
model: models['asset_tracker_v2+AWS'].id,
state: objects,
})),
}),
Expand Down

0 comments on commit 44fd954

Please sign in to comment.