Camera camera.1
A camera that keeps sending photos (JPEG). The app card shows the latest photo.
Use
For devices that take and send photos, such as an ESP32-CAM.
On the device
On connecting, the device announces this type with t= in @$ui and sends @$state whenever its state changes. Apps send commands to <cid>@.
@$name My Camera:Living room
@$ui t=camera.1
@$state on=1;interval=100
State keys @$state
| Key | Values | Meaning |
|---|---|---|
on | 0 / 1 | 1 while sending photos, 0 when stopped |
interval | 100 / 200 / 500 / 1000 / 2000 / 5000 | Interval between photos (ms) |
Commands <cid>@
| Command | Meaning |
|---|---|
on | Start sending |
off | Stop sending |
interval={v} | Set the interval to {v} ms |
{v} is the slider or color value. Even for an unknown command the device should send its current state, so the app does not wait.
Implementation notes
- Photos are not state: they go to the
<cid>@imagetag as binary JPEG (io.signal("@image", buf, len)). Without $, the server does not keep them, and only apps with the card open receive them. - With an E2E key, send
io.signal_e2e("@image", buf, len, key). The app needs the same key in the card to see photos, and the key stays in that browser. A JPEG sent without a key shows as is. - An anonymous connection may send 256 KiB per message and 100 messages per second. A VGA (640x480) JPEG is usually 20–40 KB.
- A very short interval can slow other devices on the same router. The default of one second is recommended.
Default picture
This type has no default picture.
Examples
- esp32cam — example page on arduino.iosignal.net
Type file
iosignal/devices/types/camera.1.json (rev 2) · CDN
The screen labels in the type file are in Korean; apps show them as written.