Skip to content

Latest commit

 

History

277 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

thingy.rocks IoT dashboard backend

GitHub Actions semantic-release Renovate Mergify Status @commitlint/config-conventional code style: prettier ESLint: TypeScript

Cloud backend for the thingy.rocks IoT dashboard developed using AWS CDK in TypeScript.

Node & NPM

This project requires Node.js >=24.19.0 <25 and npm >=12.0.2 <13 (enforced via check-node-version on npm install and npm ci). The check is skipped during npm publish and npm pack, because semantic-release bundles its own npm and runs the release with that version rather than the one installed in CI.

Installation in your AWS account

Setup

Provide your AWS credentials, for example using the .envrc (see the example).

Install the dependencies:

npm ci

Configure

Set the Wirepas 5G Mesh Gateway endpoint:

aws ssm put-parameter --name thingy-rocks-backend-Wirepas5GMeshGatewayEndpoint --type String --value $WIREPAS_GATEWAY_MQTT_ENDPOINT

Deploy

Note

Requires go to be installed.

npm run build:container
# export the environment variable UDP_INGEST_CONTAINER_TAG as printed
npx cdk deploy

Enable AWS IoT Thing Index

Enable AWS IoT Thing indexing for the lwm2m named shadow and Thing connectivity.

Running the Wirepas 5G Mesh Gateway

Create a thing type wirepas-5g-mesh-gateway.

Configure the gateway settings using the .envrc (see the example).

Run:

node --experimental-transform-types --no-warnings wirepas-5g-mesh-gateway/gateway.ts

Run as a service using systemd:

systemd-run -E WIREPAS_GATEWAY_MQTT_ENDPOINT=${WIREPAS_GATEWAY_MQTT_ENDPOINT} -E WIREPAS_GATEWAY_AWS_ACCESS_KEY_ID=${WIREPAS_GATEWAY_AWS_ACCESS_KEY_ID} -E WIREPAS_GATEWAY_REGION=${WIREPAS_GATEWAY_REGION} -E WIREPAS_GATEWAY_AWS_SECRET_ACCESS_KEY=${WIREPAS_GATEWAY_AWS_SECRET_ACCESS_KEY} --working-directory ${PWD} node --experimental-transform-types --no-warnings wirepas-5g-mesh-gateway/gateway.ts

Memfault integration

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>

UDP ingress

udp.ingress.thingy.rocks receives UDP packages on the following ports:

  • Port 6666: Plain text CSV format (IMEI, timestamp, ping, rsrp, band, ue_mode, operator, latitude, longitude, accuracy, battery, temp, pressure, humidity)
  • Port 6667: CBOR-encoded SenML containing LwM2M objects

API domain

A hosted Zone is created by the deployment.

Create a NS record in the DNS settings for thingy.rocks (in CloudFlare), with the ingress.thingy.rocks as the name and the list of nameservers from the output.

About

Cloud backend for the thingy.rocks AWS IoT dashboard developed using AWS CDK in TypeScript.

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages