docs.zenspace.io
  1. RaspberryPi
docs.zenspace.io
  • 🧭 Introduction
  • 🧱 System Components
  • 🧰 Tech Stack
  • 🏗️ System Architecture
  • 🌐 Deployment Architecture
  • 🗄️ Database Design Documentation
  • API Endpoints
    • RaspberryPi
      • Heartbeat API
        GET
      • Retrieve all active sensors and device permissions
        GET
      • Control a device (e.g., turn on/off, adjust intensity)
        POST
      • Enable or disable a device
        POST
      • Register a meeting space ID and retrieve network details
        POST
    • Meeting Space
      • Schedule meeting space state
      • Get meeting spaces by customer
      • Get meeting space state by ID
      • Get meeting space state by device ID
      • Disable meeting space state
      • Send meeting space state by meeting space ID
      • Store meeting space availability
      • Create Google Calendar
    • Device Management
      • Create device
      • Create device sensors
      • Create or update admin unlock codes
      • Upload meeting space screenshot
    • Authentication
      • Create authorization token
    • Messaging
      • Send message to Android device
    • Booking
      • Send meeting space state by booking ID
      • Create or update booking
  1. RaspberryPi

Control a device (e.g., turn on/off, adjust intensity)

POST
/device_control/
RaspberryPi
Last modified:2025-05-29 12:54:08
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/device_control/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": 13,
    "operate": 0
}'
Response Response Example
{
    "success": true,
    "message": "Device operation received successfully.",
    "device_id": 13,
    "updated_value": 1
}

Request

Body Params application/json
id
integer 
required
Example:
13
operate
integer 
required
Operation code (e.g., 0 for off, 1 for on)
Example:
0
Examples

Responses

🟢200OK
application/json
Device operation response
Body
success
boolean 
optional
Example:
true
message
string 
optional
Example:
Device operation received successfully.
device_id
integer 
optional
Example:
13
updated_value
integer 
optional
Example:
1
Previous
Retrieve all active sensors and device permissions
Next
Enable or disable a device
Built with