ตัวอย่างสมบูรณ์ — โครง JSON ของโมเดล (แนวคิด)
{
"deviceId": "tesa-edge-demo-01",
"sensors": [
{ "id": "temp", "type": "temperature", "unit": "C", "default": 25.0, "min": -10.0, "max": 85.0 },
{ "id": "btn_user", "type": "switch", "default": 0 }
],
"actuators": [
{ "id": "led_status", "type": "led", "default": 0 }
],
"behaviors": [
{ "when": "command.led == on", "then": "actuators.led_status = 1" },
{ "when": "sensors.temp > 40", "then": "emit event threshold_exceeded" }
]
}
เป็น template แนวคิดสำหรับเรียน — ฟิลด์จริงของเครื่องมืออาจชื่อต่างกัน ดูฉบับเต็ม (รวมเซ็นเซอร์ IMU) ใน README.md หัวข้อ 1.1