Skip to content

Instantly share code, notes, and snippets.

@depau
Last active August 31, 2023 15:50
Show Gist options
  • Save depau/0a98c369e4bae66ed538948fa0cc5d71 to your computer and use it in GitHub Desktop.
Save depau/0a98c369e4bae66ed538948fa0cc5d71 to your computer and use it in GitHub Desktop.
Hoppscotch Valetudo API v2 requests

Hoppscotch collection for Valetudo

https://hoppscotch.io

To import

  • Open Collections tab
  • Click Import/Export
  • Click the 3-dot menu and select Import from Gist
  • Paste this Gist URL

Make sure you then go into Environments and create environments for Valetudo running on the vacuum and for local development.

Inside each environment create a variable VALE_HOST and set it to Valetudo's IP:PORT.

You can then select which environment you want to work on with the menu under the environments tab.

[
{
"name": "Valetudo",
"folders": [
{
"name": "Basic control",
"requests": [
{
"url": "http://<<VALE_HOST>>",
"path": "/api/v2/robot/capabilities/BasicControlCapability",
"method": "PUT",
"auth": "None",
"httpUser": "",
"httpPassword": "",
"passwordFieldType": "password",
"bearerToken": "",
"headers": [],
"params": [],
"bodyParams": [],
"rawParams": "{\"action\": \"home\"}",
"rawInput": true,
"contentType": "application/json",
"requestType": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"testScript": "// pw.expect('variable').toBe('value');",
"label": "",
"name": "Go home",
"collection": 0
},
{
"url": "http://<<VALE_HOST>>",
"path": "/api/v2/robot/capabilities/BasicControlCapability",
"method": "PUT",
"auth": "None",
"httpUser": "",
"httpPassword": "",
"passwordFieldType": "password",
"bearerToken": "",
"headers": [],
"params": [],
"bodyParams": [],
"rawParams": "{\"action\": \"start\"}",
"rawInput": true,
"contentType": "application/json",
"requestType": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"testScript": "// pw.expect('variable').toBe('value');",
"label": "",
"name": "Start",
"collection": 0
},
{
"url": "http://<<VALE_HOST>>",
"path": "/api/v2/robot/capabilities/BasicControlCapability",
"method": "PUT",
"auth": "None",
"httpUser": "",
"httpPassword": "",
"passwordFieldType": "password",
"bearerToken": "",
"headers": [],
"params": [],
"bodyParams": [],
"rawParams": "{\"action\": \"stop\"}",
"rawInput": true,
"contentType": "application/json",
"requestType": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"testScript": "// pw.expect('variable').toBe('value');",
"label": "",
"name": "Stop",
"collection": 0
},
{
"url": "http://<<VALE_HOST>>",
"path": "/api/v2/robot/capabilities/BasicControlCapability",
"method": "PUT",
"auth": "None",
"httpUser": "",
"httpPassword": "",
"passwordFieldType": "password",
"bearerToken": "",
"headers": [],
"params": [],
"bodyParams": [],
"rawParams": "{\"action\": \"pause\"}",
"rawInput": true,
"contentType": "application/json",
"requestType": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"testScript": "// pw.expect('variable').toBe('value');",
"label": "",
"name": "Pause",
"collection": 0
}
],
"folders": []
},
{
"name": "Fan speed control",
"requests": [
{
"url": "http://<<VALE_HOST>>",
"path": "/api/v2/robot/capabilities/FanSpeedControlCapability/presets",
"method": "GET",
"auth": "None",
"httpUser": "",
"httpPassword": "",
"passwordFieldType": "password",
"bearerToken": "",
"headers": [],
"params": [],
"bodyParams": [],
"rawParams": "",
"rawInput": true,
"contentType": "",
"requestType": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"testScript": "// pw.expect('variable').toBe('value');",
"label": "",
"name": "Get fan presets",
"collection": 0
},
{
"url": "http://<<VALE_HOST>>",
"path": "/api/v2/robot/capabilities/FanSpeedControlCapability/preset",
"method": "PUT",
"auth": "None",
"httpUser": "",
"httpPassword": "",
"passwordFieldType": "password",
"bearerToken": "",
"headers": [],
"params": [],
"bodyParams": [],
"rawParams": "{\"name\": \"low\"}",
"rawInput": true,
"contentType": "application/json",
"requestType": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"testScript": "// pw.expect('variable').toBe('value');",
"label": "",
"name": "Set fan preset",
"collection": 0
}
],
"folders": []
},
{
"name": "Wi-Fi configuration",
"requests": [
{
"url": "http://<<VALE_HOST>>",
"path": "/api/v2/robot/capabilities/WifiConfigurationCapability",
"method": "GET",
"auth": "None",
"httpUser": "",
"httpPassword": "",
"passwordFieldType": "password",
"bearerToken": "",
"headers": [],
"params": [],
"bodyParams": [],
"rawParams": "",
"rawInput": true,
"contentType": "",
"requestType": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"testScript": "// pw.expect('variable').toBe('value');",
"label": "",
"name": "Get Wi-Fi config",
"collection": 0
}
],
"folders": []
},
{
"name": "Locate",
"requests": [
{
"url": "http://<<VALE_HOST>>",
"path": "/api/v2/robot/capabilities/LocateCapability",
"method": "PUT",
"auth": "None",
"httpUser": "",
"httpPassword": "",
"passwordFieldType": "password",
"bearerToken": "",
"headers": [],
"params": [],
"bodyParams": [],
"rawParams": "{\"action\": \"locate\"}",
"rawInput": true,
"contentType": "application/json",
"requestType": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"testScript": "// pw.expect('variable').toBe('value');",
"label": "",
"name": "Locate",
"collection": 0
}
],
"folders": []
},
{
"name": "Sensor calibration",
"requests": [
{
"requestType": "",
"contentType": "",
"headers": [],
"passwordFieldType": "password",
"label": "",
"params": [],
"url": "http://<<VALE_HOST>>",
"method": "GET",
"httpPassword": "",
"rawInput": true,
"httpUser": "",
"testScript": "// pw.expect('variable').toBe('value');",
"bearerToken": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"auth": "None",
"name": "Get sensors",
"path": "/api/v2/robot/capabilities/SensorCalibrationCapability/",
"bodyParams": [],
"collection": 0,
"rawParams": ""
},
{
"requestType": "",
"contentType": "application/json",
"headers": [],
"passwordFieldType": "password",
"label": "",
"params": [],
"url": "http://<<VALE_HOST>>",
"method": "PUT",
"httpPassword": "",
"rawInput": true,
"httpUser": "",
"testScript": "// pw.expect('variable').toBe('value');",
"bearerToken": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"auth": "None",
"name": "Calibrate sensor",
"path": "/api/v2/robot/capabilities/SensorCalibrationCapability/accelerometer",
"bodyParams": [],
"collection": 0,
"rawParams": "{\"action\": \"calibrate\"}"
}
],
"folders": []
},
{
"name": "Manual control",
"requests": [],
"folders": []
},
{
"name": "Viomi voice packs raw commands",
"requests": [
{
"url": "http://<<VALE_HOST>>",
"path": "/api/v2/robot/capabilities/RawCommandCapability",
"method": "PUT",
"auth": "None",
"httpUser": "",
"httpPassword": "",
"passwordFieldType": "password",
"bearerToken": "",
"headers": [],
"params": [],
"bodyParams": [],
"rawParams": "{\"method\":\"download_voice\",\n\"args\":[\"it\",\"http://192.168.3.58:8000/it.zip\",\"fffff9dcb2c756e3e0e0dd30b6d26ef8\"]}",
"rawInput": true,
"contentType": "application/json",
"requestType": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"testScript": "// pw.expect('variable').toBe('value');",
"label": "",
"name": "Download voice pack",
"collection": 0
},
{
"url": "http://<<VALE_HOST>>",
"path": "/api/v2/robot/capabilities/RawCommandCapability",
"method": "PUT",
"auth": "None",
"httpUser": "",
"httpPassword": "",
"passwordFieldType": "password",
"bearerToken": "",
"headers": [],
"params": [],
"bodyParams": [],
"rawParams": "{\"method\":\"get_downloadstatus\",\"args\":[]}",
"rawInput": true,
"contentType": "application/json",
"requestType": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"testScript": "// pw.expect('variable').toBe('value');",
"label": "",
"name": "Get voice info",
"collection": 0
}
],
"folders": []
},
{
"name": "Voice packs",
"requests": [
{
"url": "http://<<VALE_HOST>>",
"path": "/api/v2/robot/capabilities/VoicePackManagementCapability",
"method": "GET",
"auth": "None",
"httpUser": "",
"httpPassword": "",
"passwordFieldType": "password",
"bearerToken": "",
"headers": [],
"params": [],
"bodyParams": [],
"rawParams": "",
"rawInput": true,
"contentType": "",
"requestType": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"testScript": "// pw.expect('variable').toBe('value');",
"label": "",
"name": "Get status",
"collection": 0
},
{
"url": "http://<<VALE_HOST>>",
"path": "/api/v2/robot/capabilities/VoicePackManagementCapability",
"method": "PUT",
"auth": "None",
"httpUser": "",
"httpPassword": "",
"passwordFieldType": "password",
"bearerToken": "",
"headers": [],
"params": [],
"bodyParams": [
{
"key": "",
"value": "",
"active": true
}
],
"rawParams": "{\"action\": \"download\", \"language\": \"en\", \"url\": \"local\", \"hash\": \"local\"}",
"rawInput": true,
"contentType": "application/json",
"requestType": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"testScript": "// pw.expect('variable').toBe('value');",
"label": "",
"name": "Set Viomi built-in language",
"collection": 0
},
{
"url": "http://<<VALE_HOST>>",
"path": "/api/v2/robot/capabilities/VoicePackManagementCapability",
"method": "PUT",
"auth": "None",
"httpUser": "",
"httpPassword": "",
"passwordFieldType": "password",
"bearerToken": "",
"headers": [],
"params": [],
"bodyParams": [
{
"key": "",
"value": "",
"active": true
}
],
"rawParams": "{\n \"action\": \"download\",\n \"language\": \"it\",\n \"hash\": \"viomi doesn't even bother blabla\",\n \"url\": \"http://192.168.3.58:8000/it.zip\"\n}",
"rawInput": true,
"contentType": "application/json",
"requestType": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"testScript": "// pw.expect('variable').toBe('value');",
"label": "",
"name": "Download custom voice pack",
"collection": 0
}
],
"folders": []
}
],
"requests": [
{
"url": "http://<<VALE_HOST>>",
"path": "/api/v2/",
"method": "GET",
"auth": "None",
"httpUser": "",
"httpPassword": "",
"passwordFieldType": "password",
"bearerToken": "",
"headers": [],
"params": [],
"bodyParams": [],
"rawParams": "",
"rawInput": true,
"contentType": "",
"requestType": "",
"preRequestScript": "// pw.env.set('variable', 'value');",
"testScript": "// pw.expect('variable').toBe('value');",
"label": "",
"name": "Get APIs",
"collection": 0
},
{
"httpPassword": "",
"requestType": "",
"params": [
{
"key": "/api/v2/robot/capabilities/RawCommandCapability",
"value": "",
"active": true
}
],
"rawParams": "{\"method\": \"miIO.info\"}",
"method": "PUT",
"name": "Raw miio command",
"headers": [],
"path": "/api/v2/robot/capabilities/RawCommandCapability",
"testScript": "// pw.expect('variable').toBe('value');",
"bearerToken": "",
"contentType": "application/json",
"collection": 0,
"bodyParams": [],
"rawInput": true,
"passwordFieldType": "password",
"auth": "None",
"httpUser": "",
"label": "",
"preRequestScript": "pw.env.set('VALE_HOST', '192.168.3.202');\n",
"url": "http://<<VALE_HOST>>"
}
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment