-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
- Implement Astarte client component
- For now, Astarte client should be able to fetch data from Edgehog related interfaces
Data to be retrieved:
- CPU architecture
- CPU model code
- CPU model name
- CPU vendor
- Total memory
These data can be retrieved from the following Astarte interfaces:
io.edgehog.devicemanager.HardwareInfofor CPU model name, architecture, totalBytes, CPU vendor and model(model code)
Full interface definition is:
{
"interface_name": "io.edgehog.devicemanager.HardwareInfo",
"version_major": 0,
"version_minor": 1,
"type": "properties",
"ownership": "device",
"description": "General hardware capabilities",
"mappings": [
{
"endpoint": "/cpu/vendor",
"type": "string",
"description": "CPU Vendor"
},
{
"endpoint": "/cpu/modelName",
"type": "string",
"description": "CPU Model Display Name"
},
{
"endpoint": "/cpu/architecture",
"type": "string",
"description": "CPU Architecture "
},
{
"endpoint": "/cpu/model",
"type": "string",
"description": "CPU Model Code"
},
{
"endpoint": "/mem/totalBytes",
"type": "longinteger",
"description": "Total RAM quantity (Bytes)"
}
]
}Curl request example is:
curl -X GET \
'https://api.eu1.astarte.cloud/appengine/v1/realm_name/devices/some_device_id/interfaces/io.edgehog.devicemanager.HardwareInfo' \
-H 'Authorization: Bearer YOUR_BEARER_TOKEN'Response is(some data is missing but it should be enough to finish the task):
{"data":{"cpu":{"architecture":"aarch64"},"mem":{"totalBytes":2076966912}}}