From e56e21d170c928e13d6a8aed48e199fe3bcf0e11 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Wed, 10 Mar 2021 00:42:42 +0100 Subject: [PATCH] Add a cleaning robot interface --- libnymea/interfaces/cleaningrobot.json | 29 ++++++++++++++++++++++++++ libnymea/interfaces/interfaces.qrc | 1 + 2 files changed, 30 insertions(+) create mode 100644 libnymea/interfaces/cleaningrobot.json diff --git a/libnymea/interfaces/cleaningrobot.json b/libnymea/interfaces/cleaningrobot.json new file mode 100644 index 00000000..e99a467f --- /dev/null +++ b/libnymea/interfaces/cleaningrobot.json @@ -0,0 +1,29 @@ +{ + "description": "An interface for cleaning robots. A paused robot is unpaused by calling pauseCleaning again. Calling startCleaning on a paused robot should restart the activity (or start a different one) if possible, else it should unpause the current activity. Cleaning robots may be browsable for \"maps\" to return a list of maps with map images in their thumbnail urls and \"zones\" (as child items of maps) returning a list of zones that can be cleaned by executing the according browser items. Zone items should provide JSON objects in their description, containing \"vertices\" to draw the zones in the image and \"color\" properties", + "states": [ + { + "name": "robotState", + "type": "QString", + "possibleValues": ["docked", "cleaning", "paused", "traveling", "stopped", "error"] + }, + { + "name": "errorMessage", + "type": "QString", + "optional": true + } + ], + "actions": [ + { + "name": "startCleaning" + }, + { + "name": "pauseCleaning" + }, + { + "name": "stopCleaning" + }, + { + "name": "returnToBase" + } + ] +} diff --git a/libnymea/interfaces/interfaces.qrc b/libnymea/interfaces/interfaces.qrc index 89d82f1e..b833d009 100644 --- a/libnymea/interfaces/interfaces.qrc +++ b/libnymea/interfaces/interfaces.qrc @@ -80,5 +80,6 @@ venetianblind.json update.json watersensor.json + cleaningrobot.json