Cloud backend for the thingy.rocks IoT dashboard developed using AWS CDK in TypeScript.
Provide your AWS credentials, for example using the .envrc
(see
the example).
Install the dependencies:
npm ci
Set the Wirepas 5G Mesh Gateway endpoint:
aws ssm put-parameter --name thingy-rocks-backend-Wirepas5GMeshGatewayEndpoint --type String --value $GATEWAY_MQTT_ENDPOINT
npx cdk deploy
Create a thing type wirepas-5g-mesh-gateway
.
Configure the gateway settings using the .envrc
(see
the example).
Run:
npx tsx wirepas-5g-mesh-gateway/gateway.ts
Run as a service using systemd:
systemd-run -E GATEWAY_MQTT_ENDPOINT=${GATEWAY_MQTT_ENDPOINT} -E GATEWAY_AWS_ACCESS_KEY_ID=${GATEWAY_AWS_ACCESS_KEY_ID} -E GATEWAY_REGION=${GATEWAY_REGION} -E GATEWAY_AWS_SECRET_ACCESS_KEY=${GATEWAY_AWS_SECRET_ACCESS_KEY} --working-directory ${PWD} npx tsx wirepas-5g-mesh-gateway/gateway.ts
Configure these SSM parameters:
aws ssm put-parameter --name /thingy-rocks-backend/memfault/organizationAuthToken --type String --value <Memfault Organization Auth Token>
aws ssm put-parameter --name /thingy-rocks-backend/memfault/organizationId --type String --value <Memfault Organization ID>
aws ssm put-parameter --name /thingy-rocks-backend/memfault/projectId --type String --value <Memfault Project ID>