HB, OTA etc

This commit is contained in:
2026-04-22 20:11:55 +03:00
parent 4100931deb
commit cb1014c950
76 changed files with 3157 additions and 232 deletions

BIN
contract/ingest.zip Normal file

Binary file not shown.

View File

@@ -0,0 +1,29 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "contract/ingest/command.schema.json",
"type": "object",
"required": ["t"],
"additionalProperties": false,
"properties": {
"t": {
"type": "string",
"enum": ["fw"]
}
},
"allOf": [
{
"if": {
"properties": { "t": { "const": "fw" } }
},
"then": {
"required": ["u", "s"],
"properties": {
"u": { "type": "string", "format": "uri" },
"s": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
}
}
}
]
}

View File

@@ -1,38 +1,11 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "contract/ingest/event.schema.json",
"allOf": [
{ "$ref": "contract/ingest/common.schema.json" },
{
"type": "object",
"properties": {
"type": {
"const": "event"
},
"payload": {
"type": "object",
"required": ["name"],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Event identifier, e.g. device.overheat"
},
"severity": {
"type": "string",
"enum": ["debug", "info", "warn", "error", "fatal"]
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"additionalProperties": true
}
}
}
}
"type": "object",
"required": ["type"],
"properties": {
"type": {
"type": "string",
"enum": ["hb"]
}
]
},
"additionalProperties": false
}