Camera
Camera component.
Camera.GetCapabilitiesto obtain the camera's hardware and software capabilitiesCamera.GetStatusto obtain the component's statusCamera.GetConfigto obtain the component's configurationCamera.SetConfigto update the component's configurationCamera.Setto arm/disarm the camera or toggle privacy modeCamera.CaptureImageto capture a snapshotCamera.StartRecordingto start a video recordingCamera.StopRecordingto stop a video recordingCamera.AddZoneto create a CameraZoneCamera.DeleteZoneto delete a CameraZoneCamera.PlaySoundto play a sound through the camera's speaker
Methods
Camera.GetCapabilities
Returns the supported resolutions, detection types, and zone limitations.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Id of the camera component |
Response
Attributes in the result:
| Property | Type | Description |
|---|---|---|
| array of strings | List of supported stream resolutions and frame rates (e.g. |
| array of numbers | Two numbers |
| array of strings | List of supported detection types (currently |
| number | Maximum number of CameraZone instances that can be created. |
| array of strings | List of supported zone shapes (currently |
Camera.GetStatus
Obtain current status (streamer state, motion, active streams and recordings).
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Id of the camera component |
Response
See the status section.
Camera.GetConfig
Obtain the camera configuration.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Id of the camera component |
Response
See the configuration section.
Camera.SetConfig
Update the camera configuration. Only the fields included in the request are modified; omitted fields are left unchanged. Setting a field to null resets it to the device default.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Id of the camera component |
| object | Configuration to apply (see the configuration section). The |
Response
| Property | Type | Description |
|---|---|---|
| boolean |
|
Camera.Set
Arm/disarm the camera and/or turn privacy mode on or off. At least one of arm or privacy must be provided; omitted parameters are left unchanged. The new values are persisted and reflected in the status. Turning privacy on suspends the streamer: video and audio capture stop and the speaker is disabled; turning it off resumes it.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Id of the camera component |
| boolean | Optional. Whether the camera is armed. |
| boolean | Optional. Privacy mode. When enabled, the streamer is suspended: video and audio capture stop, the speaker is disabled, and no streams or recordings can be served until privacy mode is turned off. |
Response
The result from this method is null.
Camera.CaptureImage
Capture a single still image from a stream. The image is uploaded to the cloud and, if local storage is mounted, also stored on the SD card. The returned media_id can be used to retrieve the image once it has been processed (see the media_ready notification).
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Id of the camera component |
| number | Optional. Stream id to capture from (default |
Response
Attributes in the result:
| Property | Type | Description |
|---|---|---|
| string | Unique identifier (UUID) for the captured image |
Camera.StartRecording
Start a video recording. The recording is uploaded to the cloud and, if local storage is mounted, also stored on the SD card. The returned rec_id is used to identify the recording in subsequent Camera.StopRecording calls and in the recordings field of Camera.GetStatus.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Id of the camera component |
| number | Optional. Recording duration in seconds (default |
| number | Optional. Stream id to record from (default |
Response
Attributes in the result:
| Property | Type | Description |
|---|---|---|
| string | Unique identifier (UUID) of the new recording |
Camera.StopRecording
Stop one or all active recordings.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Id of the camera component |
| string | Optional. Unique identifier of the recording to stop, as returned by |
Response
The result from this method is null.
Camera.AddZone
Create a new CameraZone. The zone definition is supplied directly as parameters of the call.
Request
Parameters (the parameters object is the zone definition; see CameraZone configuration for full details):
| Property | Type | Description |
|---|---|---|
| number | Id of the camera component |
| boolean | Whether the zone is active. |
| string | Zone type. See accepted values. |
| array of numbers | Polygon coordinates |
| array of numbers | Optional. Preview color |
| string | Optional. Human-readable zone name. |
null is not accepted for enable, type, coordinates, color or name; either omit the field or provide a value of the correct type.
| Value | Description |
|---|---|
| Motion-detection zone. Motion events inside the zone are reported via |
| Privacy zone. The area is blacked out in all video streams; no motion is reported for this zone. |
Response
Attributes in the result:
| Property | Type | Description |
|---|---|---|
| number | Id of the newly created CameraZone |
Camera.DeleteZone
Delete a previously-created CameraZone. The default zone (created automatically when the camera is initialized) cannot be deleted.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Id of the camera component |
| number | Id of the CameraZone to delete |
Response
The result from this method is null.
Camera.PlaySound
Plays a sound through the camera's speaker. Exactly one of sound or file must be provided:
soundplays one of the built-in sounds by name.fileplays an.opusfile stored on the camera's SD card.
Playing sounds requires sounds.enable to be true (see Configuration); otherwise the method returns an error. The camera must also not be in privacy mode — the streamer is suspended while privacy is on, so the speaker is disabled and the call fails. The call completes once the streamer reports the playback result, so a missing or unplayable file is reported as an error rather than a false success.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Id of the camera component |
| string | Name of a built-in sound to play. Mutually exclusive with |
| string | Path of an |
| Value | Description |
|---|---|
| Alert tone. |
| Doorbell chime. |
| Notification tone. |
Response
The result from this method is null.
Configuration
The Camera configuration controls audio, video, night-vision and per-stream parameters. Arming and privacy mode are not part of the configuration; they are reported in the status and changed with Camera.Set.
Properties:
| Property | Type | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| number | Id of the camera component | ||||||||||||||||||||||||||||||
| string | Name of the camera. | ||||||||||||||||||||||||||||||
| object | LED settings.
| ||||||||||||||||||||||||||||||
| object | Audio settings.
| ||||||||||||||||||||||||||||||
| object | Event sound settings.
| ||||||||||||||||||||||||||||||
| object | Motion detection settings.
| ||||||||||||||||||||||||||||||
| object | Night-vision (IR-cut filter and IR LEDs) settings.
| ||||||||||||||||||||||||||||||
| object | RTSP server settings.
| ||||||||||||||||||||||||||||||
| object | Video image settings.
| ||||||||||||||||||||||||||||||
| object | Per-stream configuration. The object is keyed by stream id (e.g.
|
| Value | Description |
|---|---|
| Switch between day and night mode automatically based on the configured thresholds. |
| Force day mode. |
| Force night mode. |
| Value | Description |
|---|---|
| Anti-flicker tuned for 50 Hz mains (Europe, Asia, Africa, Australia). |
| Anti-flicker tuned for 60 Hz mains (North America, parts of South America). |
Status
The status of the Camera component reports the arm and privacy state, the streamer state, current motion state, the number of active live streams, and any ongoing recordings. Use Camera.Set to change arm and privacy.
Properties:
| Property | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| number | Id of the camera component | |||||||||||||||
| boolean | Whether the camera is armed. | |||||||||||||||
| boolean | Privacy mode. When enabled, the streamer is suspended: video and audio capture stop, the speaker is disabled, and no streams or recordings can be served until privacy mode is turned off. | |||||||||||||||
| string | Current state of the streamer. See accepted values. | |||||||||||||||
| string | Optional. Version string reported by the streamer; absent if the streamer has not reported one yet. | |||||||||||||||
| boolean |
| |||||||||||||||
| number | Number of currently active live streams. | |||||||||||||||
| object | Recording encryption state.
| |||||||||||||||
| object | Active recordings. Present only when at least one recording is in progress. The object is keyed by recording id (UUID).
| |||||||||||||||
| array of strings | Optional. Currently active error conditions. Absent when there are no errors. See accepted values. |
| Value | Description |
|---|---|
| The streamer is not running. |
| The streamer is starting up. |
| The streamer is running and ready to serve streams, snapshots and recordings. |
| The streamer is shutting down (e.g. after entering privacy mode or before a reboot). |
| The streamer state could not be determined. |
| Value | Description |
|---|---|
| The streamer's filesystem version does not match the expected version and may need to be reflashed. |
HTTP endpoints
In addition to the JSON-RPC methods, the Camera component exposes the following HTTP endpoint:
GET /camera/<id>/snapshot
Returns a single live JPEG snapshot from the camera. The camera must be enabled, not in privacy mode, and have its streamer status equal to "running" (see Status).
The endpoint is protected by the device's standard HTTP digest authentication; the same credentials used for JSON-RPC apply.
- Methods:
GET,HEAD - Path parameter:
id— id of the camera component (e.g.0). - Response:
200 OKwithContent-Type: image/jpegand the JPEG bytes in the body.502 Bad Gatewayis returned if a snapshot cannot be produced.
Example:
curl --digest -u "admin:<password>" \
-o snapshot.jpg \
http://<device>/camera/0/snapshot
WHEP (WebRTC-HTTP Egress Protocol)
The Camera component also exposes a WHEP endpoint for establishing a WebRTC session over plain HTTP. This is a standards-based alternative to the Streamer.* JSON-RPC signaling and is directly compatible with WHEP-capable clients (e.g. browsers, go2rtc).
The signaling operates in non-trickle mode: all ICE candidates are embedded in the SDP. Trickle ICE (PATCH) is not supported.
Token-based authentication is not currently supported for the WHEP endpoint, so it is not usable when the device is password-protected.
The WHEP URL to use in an NVR or other WHEP client is /camera/<id>/whep/<stream>, where id is the camera component id and stream is the stream id to receive (the available stream ids are reported by Camera.GetConfig). For example:
http://<device>/camera/0/whep/0— high-resolution stream.http://<device>/camera/0/whep/1— lower-resolution stream.
Webhook Events
Available events from Camera component that can trigger webhooks:
camera.motion- produced when the global motion status changes totrue(motion detected in any active zone).camera.motion_end- produced when the global motion status changes tofalse(motion is no longer detected in any active zone).camera.armed- produced when the camera becomes armed (thearmstatus changes totrue).camera.disarmed- produced when the camera becomes disarmed (thearmstatus changes tofalse).camera.privacy_on- produced when privacy mode is turned on (theprivacystatus changes totrue); video and audio capture stop and the speaker is disabled.camera.privacy_off- produced when privacy mode is turned off (theprivacystatus changes tofalse); capture resumes.
Notifications
This section describes notifications for events specific to the Camera component. For general information please see this page.
Instances of the Camera component can send notifications for the following events:
| Property | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| event | Emitted when a media file (image or video) has been finalized on the device and is ready to be retrieved or uploaded.
| |||||||||||||||
| event | Emitted when a media file has been successfully uploaded to the cloud.
| |||||||||||||||
| event | Emitted when uploading a media file to the cloud fails.
|
Examples
Camera.GetCapabilities example
- Camera.GetCapabilities HTTP GET Request
- Camera.GetCapabilities Curl Request
- Camera.GetCapabilities Mos Request
http://192.168.33.1/rpc/Camera.GetCapabilities?id=0
curl -X POST -d '{"id":1,"method":"Camera.GetCapabilities","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Camera.GetCapabilities '{"id":0}'
Response
- Camera.GetCapabilities HTTP GET Response
- Camera.GetCapabilities Curl Response
- Camera.GetCapabilities Mos Response
{
"resolutions": [
"1920x1080@25",
"1280x720@25"
],
"bitrate_range": [
512,
2048
],
"detect": [
"motion"
],
"max_zones": 10,
"zone_type": [
"rectangle"
]
}
{
"id": 1,
"src": "shellycamera-xxx",
"params": {
"resolutions": [
"1920x1080@25",
"1280x720@25"
],
"bitrate_range": [
512,
2048
],
"detect": [
"motion"
],
"max_zones": 10,
"zone_type": [
"rectangle"
]
}
}
{
"resolutions": [
"1920x1080@25",
"1280x720@25"
],
"bitrate_range": [
512,
2048
],
"detect": [
"motion"
],
"max_zones": 10,
"zone_type": [
"rectangle"
]
}
Camera.GetStatus example
- Camera.GetStatus HTTP GET Request
- Camera.GetStatus Curl Request
- Camera.GetStatus Mos Request
http://192.168.33.1/rpc/Camera.GetStatus?id=0
curl -X POST -d '{"id":1,"method":"Camera.GetStatus","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Camera.GetStatus '{"id":0}'
Response
- Camera.GetStatus HTTP GET Response
- Camera.GetStatus Curl Response
- Camera.GetStatus Mos Response
{
"id": 0,
"arm": true,
"privacy": false,
"streamer": "running",
"streamer_version": "1.2.3",
"motion": true,
"streams": 1,
"recording_encryption": {
"configured": false
},
"recordings": {
"019abff8-1550-7b01-9384-39ef40145209": {
"ts": 1722887500,
"stream": 0,
"duration": 30,
"trigger": {
"component": "camerazone:200",
"event": "motion_detected",
"ts": 1722887500
}
}
}
}
{
"id": 1,
"src": "shellycamera-xxx",
"params": {
"id": 0,
"arm": true,
"privacy": false,
"streamer": "running",
"streamer_version": "1.2.3",
"motion": true,
"streams": 1,
"recording_encryption": {
"configured": false
},
"recordings": {
"019abff8-1550-7b01-9384-39ef40145209": {
"ts": 1722887500,
"stream": 0,
"duration": 30,
"trigger": {
"component": "camerazone:200",
"event": "motion_detected",
"ts": 1722887500
}
}
}
}
}
{
"id": 0,
"arm": true,
"privacy": false,
"streamer": "running",
"streamer_version": "1.2.3",
"motion": true,
"streams": 1,
"recording_encryption": {
"configured": false
},
"recordings": {
"019abff8-1550-7b01-9384-39ef40145209": {
"ts": 1722887500,
"stream": 0,
"duration": 30,
"trigger": {
"component": "camerazone:200",
"event": "motion_detected",
"ts": 1722887500
}
}
}
}
Camera.GetConfig example
- Camera.GetConfig HTTP GET Request
- Camera.GetConfig Curl Request
- Camera.GetConfig Mos Request
http://192.168.33.1/rpc/Camera.GetConfig?id=0
curl -X POST -d '{"id":1,"method":"Camera.GetConfig","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Camera.GetConfig '{"id":0}'
Response
- Camera.GetConfig HTTP GET Response
- Camera.GetConfig Curl Response
- Camera.GetConfig Mos Response
{
"id": 0,
"name": "Front door",
"led": {
"enable": true
},
"audio": {
"input": {
"enable": true
},
"output": {
"volume": 100
}
},
"sounds": {
"enable": true
},
"motion": {
"sensitivity": "medium",
"recording": {
"enable": true
}
},
"night_vision": {
"mode": "auto",
"ir_leds": true,
"light_threshold": 50,
"sensitivity": 50
},
"rtsp": {
"enable": true
},
"video": {
"brightness": 50,
"contrast": 50,
"flip": false,
"mirror": false,
"saturation": 50,
"sharpness": 50,
"tint": 0,
"temperature": 0,
"antiflicker": "50Hz"
},
"streams": {
"0": {
"resolution": "1920x1080@25",
"bitrate": 2048
},
"1": {
"resolution": "1280x720@25",
"bitrate": 1024
}
}
}
{
"id": 1,
"src": "shellycamera-xxx",
"params": {
"id": 0,
"name": "Front door",
"led": {
"enable": true
},
"audio": {
"input": {
"enable": true
},
"output": {
"volume": 100
}
},
"sounds": {
"enable": true
},
"motion": {
"sensitivity": "medium",
"recording": {
"enable": true
}
},
"night_vision": {
"mode": "auto",
"ir_leds": true,
"light_threshold": 50,
"sensitivity": 50
},
"rtsp": {
"enable": true
},
"video": {
"brightness": 50,
"contrast": 50,
"flip": false,
"mirror": false,
"saturation": 50,
"sharpness": 50,
"tint": 0,
"temperature": 0,
"antiflicker": "50Hz"
},
"streams": {
"0": {
"resolution": "1920x1080@25",
"bitrate": 2048
},
"1": {
"resolution": "1280x720@25",
"bitrate": 1024
}
}
}
}
{
"id": 0,
"name": "Front door",
"led": {
"enable": true
},
"audio": {
"input": {
"enable": true
},
"output": {
"volume": 100
}
},
"sounds": {
"enable": true
},
"motion": {
"sensitivity": "medium",
"recording": {
"enable": true
}
},
"night_vision": {
"mode": "auto",
"ir_leds": true,
"light_threshold": 50,
"sensitivity": 50
},
"rtsp": {
"enable": true
},
"video": {
"brightness": 50,
"contrast": 50,
"flip": false,
"mirror": false,
"saturation": 50,
"sharpness": 50,
"tint": 0,
"temperature": 0,
"antiflicker": "50Hz"
},
"streams": {
"0": {
"resolution": "1920x1080@25",
"bitrate": 2048
},
"1": {
"resolution": "1280x720@25",
"bitrate": 1024
}
}
}
Camera.SetConfig example
- Camera.SetConfig HTTP GET Request
- Camera.SetConfig Curl Request
- Camera.SetConfig Mos Request
http://192.168.33.1/rpc/Camera.SetConfig?id=0&config={"video":{"brightness":60,"mirror":true},"streams":{"1":{"bitrate":1500}}}
curl -X POST -d '{"id":1,"method":"Camera.SetConfig","params":{"id":0,"config":{"video":{"brightness":60,"mirror":true},"streams":{"1":{"bitrate":1500}}}}}' http://${SHELLY}/rpc
mos --port ${PORT} call Camera.SetConfig '{"id":0,"config":{"video":{"brightness":60,"mirror":true},"streams":{"1":{"bitrate":1500}}}}'
Response
- Camera.SetConfig HTTP GET Response
- Camera.SetConfig Curl Response
- Camera.SetConfig Mos Response
{
"restart_required": false
}
{
"id": 1,
"src": "shellycamera-xxx",
"params": {
"restart_required": false
}
}
{
"restart_required": false
}
Camera.Set example
- Camera.Set HTTP GET Request
- Camera.Set Curl Request
- Camera.Set Mos Request
http://192.168.33.1/rpc/Camera.Set?id=0&arm=true&privacy=false
curl -X POST -d '{"id":1,"method":"Camera.Set","params":{"id":0,"arm":true,"privacy":false}}' http://${SHELLY}/rpc
mos --port ${PORT} call Camera.Set '{"id":0,"arm":true,"privacy":false}'
Response
- Camera.Set HTTP GET Response
- Camera.Set Curl Response
- Camera.Set Mos Response
null
{
"id": 1,
"src": "shellycamera-xxx",
"params": null
}
null
Camera.CaptureImage example
- Camera.CaptureImage HTTP GET Request
- Camera.CaptureImage Curl Request
- Camera.CaptureImage Mos Request
http://192.168.33.1/rpc/Camera.CaptureImage?id=0&stream=0
curl -X POST -d '{"id":1,"method":"Camera.CaptureImage","params":{"id":0,"stream":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Camera.CaptureImage '{"id":0,"stream":0}'
Response
- Camera.CaptureImage HTTP GET Response
- Camera.CaptureImage Curl Response
- Camera.CaptureImage Mos Response
{
"media_id": "019abff8-3bfa-7475-af43-89b0a792d705"
}
{
"id": 1,
"src": "shellycamera-xxx",
"params": {
"media_id": "019abff8-3bfa-7475-af43-89b0a792d705"
}
}
{
"media_id": "019abff8-3bfa-7475-af43-89b0a792d705"
}
Camera.StartRecording example
- Camera.StartRecording HTTP GET Request
- Camera.StartRecording Curl Request
- Camera.StartRecording Mos Request
http://192.168.33.1/rpc/Camera.StartRecording?id=0&duration=30&stream=0
curl -X POST -d '{"id":1,"method":"Camera.StartRecording","params":{"id":0,"duration":30,"stream":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Camera.StartRecording '{"id":0,"duration":30,"stream":0}'
Response
- Camera.StartRecording HTTP GET Response
- Camera.StartRecording Curl Response
- Camera.StartRecording Mos Response
{
"rec_id": "019abff8-1550-7b01-9384-39ef40145209"
}
{
"id": 1,
"src": "shellycamera-xxx",
"params": {
"rec_id": "019abff8-1550-7b01-9384-39ef40145209"
}
}
{
"rec_id": "019abff8-1550-7b01-9384-39ef40145209"
}
Camera.StopRecording example
- Camera.StopRecording HTTP GET Request
- Camera.StopRecording Curl Request
- Camera.StopRecording Mos Request
http://192.168.33.1/rpc/Camera.StopRecording?id=0&rec_id="019abff8-1550-7b01-9384-39ef40145209"
curl -X POST -d '{"id":1,"method":"Camera.StopRecording","params":{"id":0,"rec_id":"019abff8-1550-7b01-9384-39ef40145209"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Camera.StopRecording '{"id":0,"rec_id":"019abff8-1550-7b01-9384-39ef40145209"}'
Response
- Camera.StopRecording HTTP GET Response
- Camera.StopRecording Curl Response
- Camera.StopRecording Mos Response
null
{
"id": 1,
"src": "shellycamera-xxx",
"params": null
}
null
Camera.AddZone example
- Camera.AddZone HTTP GET Request
- Camera.AddZone Curl Request
- Camera.AddZone Mos Request
http://192.168.33.1/rpc/Camera.AddZone?id=0&enable=true&type="motion"&coordinates=[1000,2000,5000,2000,5000,8000,1000,8000]&color=[255,0,0]&name="Entrance"
curl -X POST -d '{"id":1,"method":"Camera.AddZone","params":{"id":0,"enable":true,"type":"motion","coordinates":[1000,2000,5000,2000,5000,8000,1000,8000],"color":[255,0,0],"name":"Entrance"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Camera.AddZone '{"id":0,"enable":true,"type":"motion","coordinates":[1000,2000,5000,2000,5000,8000,1000,8000],"color":[255,0,0],"name":"Entrance"}'
Response
- Camera.AddZone HTTP GET Response
- Camera.AddZone Curl Response
- Camera.AddZone Mos Response
{
"zone_id": 200
}
{
"id": 1,
"src": "shellycamera-xxx",
"params": {
"zone_id": 200
}
}
{
"zone_id": 200
}
Camera.DeleteZone example
- Camera.DeleteZone HTTP GET Request
- Camera.DeleteZone Curl Request
- Camera.DeleteZone Mos Request
http://192.168.33.1/rpc/Camera.DeleteZone?id=0&zone_id=201
curl -X POST -d '{"id":1,"method":"Camera.DeleteZone","params":{"id":0,"zone_id":201}}' http://${SHELLY}/rpc
mos --port ${PORT} call Camera.DeleteZone '{"id":0,"zone_id":201}'
Response
- Camera.DeleteZone HTTP GET Response
- Camera.DeleteZone Curl Response
- Camera.DeleteZone Mos Response
null
{
"id": 1,
"src": "shellycamera-xxx",
"params": null
}
null
Camera.PlaySound example (built-in sound)
- Camera.PlaySound HTTP GET Request
- Camera.PlaySound Curl Request
- Camera.PlaySound Mos Request
http://192.168.33.1/rpc/Camera.PlaySound?id=0&sound="ding-dong"
curl -X POST -d '{"id":1,"method":"Camera.PlaySound","params":{"id":0,"sound":"ding-dong"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Camera.PlaySound '{"id":0,"sound":"ding-dong"}'
Response
- Camera.PlaySound HTTP GET Response
- Camera.PlaySound Curl Response
- Camera.PlaySound Mos Response
null
{
"id": 1,
"src": "shellycamera-xxx",
"params": null
}
null
Camera.PlaySound example (uploaded file)
- Camera.PlaySound HTTP GET Request
- Camera.PlaySound Curl Request
- Camera.PlaySound Mos Request
http://192.168.33.1/rpc/Camera.PlaySound?id=0&file="audio/doorbell.opus"
curl -X POST -d '{"id":1,"method":"Camera.PlaySound","params":{"id":0,"file":"audio/doorbell.opus"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Camera.PlaySound '{"id":0,"file":"audio/doorbell.opus"}'
Response
- Camera.PlaySound HTTP GET Response
- Camera.PlaySound Curl Response
- Camera.PlaySound Mos Response
null
{
"id": 1,
"src": "shellycamera-xxx",
"params": null
}
null
Notifications example
- Media ready
{
"src": "shellycamera-068df8bc340f",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1764157298,
"events": [
{
"component": "camera:0",
"event": "media_ready",
"ts": 1764157298,
"rec_id": "019abff8-1550-7b01-9384-39ef40145209",
"media_id": "019abff8-3bfa-7475-af43-89b0a792d705",
"mime_type": "video/mp4"
}
]
}
}
- Upload complete
{
"src": "shellycamera-068df8bc340f",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1764157305,
"events": [
{
"component": "camera:0",
"event": "upload_complete",
"ts": 1764157305,
"rec_id": "019abff8-1550-7b01-9384-39ef40145209",
"media_id": "019abff8-3bfa-7475-af43-89b0a792d705",
"rec_key_enc": "base64-encoded-encrypted-key"
}
]
}
}
- Upload failed
{
"src": "shellycamera-068df8bc340f",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1764157310,
"events": [
{
"component": "camera:0",
"event": "upload_failed",
"ts": 1764157310,
"rec_id": "019abff8-1550-7b01-9384-39ef40145209",
"media_id": "019abff8-3bfa-7475-af43-89b0a792d705"
}
]
}
}