athena-test/docs/Dipal/Backend/Fox/Database explanation.md

59 lines
1.1 KiB
Markdown

The database stores all the information about the devices. It is stored inside the devices collection. Each device contains information and configuration with key-value pair.
Device information and configuration example:
```json
{
"info": [
{
"key": "TITLE",
"value": "Door lock"
},
{
"key": "CATEGORY",
"value": "smart_home"
},
{
"key": "TYPE",
"value": "door_lock"
},
{
"key": "SUBTYPE",
"value": "dipal_smart_lock"
},
{
"key": "EUI",
"value": "3F375BFEFFE20A68"
},
{
"key": "CONTRIBUTER_NAME",
"value": "Dipal"
},
{
"key": "DEVICE_MODEL",
"value": "Dipal Smart Lock"
},
{
"key": "SOFTWARE_VERSION",
"value": "v0.1"
},
{
"key": "PROTOCOL",
"value": "zigbee"
}
],
"config": [
{
"key": "ROOM_ID",
"value": "6217490c15e4d085ed463dd2"
},
{
"key": "OPENING_TIME",
"value": 3000
}
]
}
```
There is also outdated collections such as intercom and cameras. It's unknown if the akita collection will be used, but I need to notice that each akita should have own `mqtt_topic_suffix`.