chore: improve schema

This commit is contained in:
janishutz committed 2026-08-23 14:54:30 +02:00
1 parent 16b8e583f6
commit f665027373
2 files changed
+19 -6

No files matched your search

+4
View File
@@ -1,2 +1,6 @@
# mqtt-remote-gpio # mqtt-remote-gpio
Control GPIO pins using MQTT on Raspberry Pi and more Control GPIO pins using MQTT on Raspberry Pi and more
## Notice
This project is in very early development and I have not previously worked with MQTT.
I also have little experience in Rust, so the code quality will initially be low and improve quite rapidly.
+15 -6
View File
@@ -63,7 +63,8 @@
"type": "string" "type": "string"
}, },
"pin": { "pin": {
"type": "number" "type": "number",
"description": "The pint that is controlled by this topic"
}, },
"mode": { "mode": {
"type": "string", "type": "string",
@@ -71,7 +72,8 @@
"in", "in",
"out" "out"
], ],
"description": "" "description": "The type of the pin. When set to IN, changes to this pin will be published to this topic, setting it to OUT, updates sent to this topic will make the pin change state to the specified state"
}
} }
}, },
"if": { "if": {
@@ -85,9 +87,10 @@
"properties": { "properties": {
"pollInterval": { "pollInterval": {
"type": "number", "type": "number",
"description": "The time between polls of the value of the GPIO pin, in milliseconds. Updates are only sent if state changes", "description": "The time between polls of the value of the GPIO pin, in cycles (as configured in general)",
"minimum": 100, "minimum": 1,
"maximum": 65535 "maximum": 65535,
"default": 1
} }
}, },
"required": [ "required": [
@@ -103,7 +106,13 @@
"pin", "pin",
"mode" "mode"
] ]
} },
"cycleInterval": {
"type": "number",
"minimum": 50,
"maximum": 65535,
"default": 100,
"description": "How many miliseconds should ellapse between polls of the pin states. Updates are only sent when the state actually changes"
} }
} }
} }