Skip to content

Share Links

Share specific entities (devices, rooms, collections) via link. Supports public, passcode-protected, and user-specific access. Create and manage shares from the dashboard by right-clicking a home, room, or collection → Share.

Permissions: Only home owners and admins can create and manage share links. Members with control or view roles do not have access to sharing features.

Share dialog

Entity types

TypeDescription
accessorySingle device
accessory_groupGroup of devices
roomAll devices in a room
room_groupMultiple rooms
collectionCustom device grouping
collection_groupMultiple collections
homeEntire home
groupGeneric group

Access types

TypeDescription
publicAnyone with the link can access
passcodeRequires a passcode to access
userOnly the specified Homecast user can access

Access roles

RolePermissions
viewRead-only — see device state
controlRead and write — toggle, adjust, execute

Create a share

graphql
# Public share with view access
mutation {
  createEntityAccess(
    entityType: "room"
    entityId: "room-uuid"
    accessType: "public"
    role: "view"
    homeId: "home-uuid"
  ) {
    success
    entityAccess { id }
    shareHash
    shareUrl
  }
}

# Passcode-protected share with control access
mutation {
  createEntityAccess(
    entityType: "accessory"
    entityId: "acc-uuid"
    accessType: "passcode"
    passcode: "1234"
    role: "control"
    homeId: "home-uuid"
    name: "Guest Access"
  ) {
    success
    shareHash
    shareUrl
  }
}

# User-specific share
mutation {
  createEntityAccess(
    entityType: "collection"
    entityId: "coll-uuid"
    accessType: "user"
    userEmail: "friend@example.com"
    role: "control"
    homeId: "home-uuid"
  ) {
    success
  }
}

Share URLs

Share links follow the format: https://homecast.cloud/s/{hash}

The hash encodes the entity type, entity ID, and an HMAC signature. Users visiting the link see a read-only or interactive view depending on the role.

Share state endpoint

Read the current state of all accessories in a share. Works with any role (view or control).

PathMethodDescription
/s/{hash}GETReturns current accessory state as JSON

Query parameters:

ParameterDescription
passcodeRequired for passcode-protected shares
accessoryFilter to a specific accessory by ID prefix

Example:

bash
curl https://api.homecast.cloud/s/{hash}

Response:

json
{
  "success": true,
  "entity_type": "room",
  "role": "view",
  "accessories": [
    {
      "id": "...",
      "name": "Living Room Light",
      "reachable": true,
      "room": "Living Room",
      "services": [
        {
          "serviceType": "lightbulb",
          "characteristics": [
            { "characteristicType": "on", "value": true, "isWritable": true },
            { "characteristicType": "brightness", "value": 75, "isWritable": true }
          ]
        }
      ]
    }
  ]
}

Share control endpoints

For control role shares, devices can be controlled via simple URL paths:

PathDescription
/s/{hash}/onTurn on
/s/{hash}/offTurn off
/s/{hash}/toggleToggle power state
/s/{hash}/lockLock
/s/{hash}/unlockUnlock
/s/{hash}/brightness/{value}Set brightness (0–100)
/s/{hash}/hue/{value}Set hue (0–360)
/s/{hash}/saturation/{value}Set saturation (0–100)
/s/{hash}/temp/{value}Set color temperature
/s/{hash}/position/{value}Set position (0–100)
/s/{hash}/color/{hue}/{saturation}Set color

These endpoints accept both GET and POST requests.

Access schedules

Entity access supports time-based schedules via the accessSchedule field (JSON string). This allows temporary or recurring access windows.

Manage shares

View all shared items from SettingsShared ItemsManage.

Shared items

graphql
# List shares for an entity
{ entityAccess(entityType: "room", entityId: "room-uuid") {
    id accessType role name userEmail hasPasscode createdAt
} }

# Get sharing summary
{ sharingInfo(entityType: "room", entityId: "room-uuid") {
    isShared hasPublic publicRole passcodeCount userCount shareHash shareUrl
} }

# Update a share
mutation { updateEntityAccess(accessId: "access-uuid", role: "view") { success } }

# Delete a share
mutation { deleteEntityAccess(accessId: "access-uuid") { success } }

# List all entities I've shared
{ mySharedEntities { id entityType entityId accessType role createdAt } }

Public entity access (no auth required)

graphql
# View shared entity
{ publicEntity(shareHash: "abc123", passcode: "1234") {
    entityType entityId entityName homeName accessories { id name }
} }

# Get full accessory data
{ publicEntityAccessories(shareHash: "abc123") {
    id name services { type characteristics { type value } }
} }

# Control a device via shared access
mutation {
  publicEntitySetCharacteristic(
    shareHash: "abc123"
    accessoryId: "acc-uuid"
    characteristicType: "on"
    value: true
  ) {
    success
  }
}