Digital Capacitive Touch Sensor Template
We provide a built-in template for Digital Capacitive Touch Sensor (SONY Spresense). Use this template for quick setup instead of manual configuration.
-
Click "Add device" in the top right corner, then select "Template" from the dropdown menu. In the popup form, select the template for your device.
-
If you don't have a LwM2M server, you can use LeShan server demo as your LwM2M server. If you already have a LwM2M server, skip this step.
Visit Leshan server to get a demo LwM2M server address.
-
Click "SECURITY" in the top right corner, then set encryption mode to DTLS, security mode to PSK, and configure Identity and Key fields to match server settings.
-
In Gateway configuration form, enter LwM2M server address and endpoint name (must match LeShan server settings). Example:
Server address: leshan.eclipseproject.io:5684
Endpoint name: touch-sensor -
In Gateway configuration form, configure LwM2M security settings (must match LeShan server). Example:
Security mode: DTLS
DTLS mode: PSK
PSK identity: touch-sensor
PSK key: AABBCC -
Enter the name of the device, and the name will be used to connect the device in the cluster. The device name follows RFC 1123 label name convention.
-
Click on "Deploy" button, and the device will be added into your workspace. Copy and paste the command from the pop-up to deploy the device into your Kubernetes cluster.
-
View device deployment status in the cluster through
kubectl get po -n deviceshifu
. -
In the cluster, get device service address and port by running
kubectl get svc -n deviceshifu
, then use this endpoint to push value '1' to the device. -
Access the device service through the LwM2M server.In LwM2M server interface, check the string-type resource to confirm the value has been updated.