https://github.com/biotinker/viam-camera-host
A Viam module to host a camera image via http
https://github.com/biotinker/viam-camera-host
Last synced: 11 months ago
JSON representation
A Viam module to host a camera image via http
- Host: GitHub
- URL: https://github.com/biotinker/viam-camera-host
- Owner: biotinker
- License: apache-2.0
- Created: 2024-01-22T16:15:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-17T15:48:33.000Z (almost 2 years ago)
- Last Synced: 2025-01-17T20:02:23.076Z (over 1 year ago)
- Language: Python
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# viam-camera-host
A Viam module for hosting the image returned by a Viam camera via http
This module will start a simple HTTP server on the designated port, and will host a temp directory whose contents will be an image named `current.jpg`. This image will be updated with the current output of a Viam camera at a user defined cadence (default 5 seconds).
## Setup
Add the module to your robot from the Viam registry. The component may then be added to your configuration as follows
```
...
"components": [
...,
{
"name": "componentNameHere",
"model": "biotinker:generic:camerahost",
"type": "generic",
"namespace": "biotinker",
"attributes": {
"port": 9003,
"camera": "cameraName"
},
"depends_on": [
"cameraName"
],
},
...,
],
...
```
The `camera` field must be the name of the camera to host and is required. The `port` field is the port on which the http server should run an is required. The `refresh` field is optional and specifies the number of seconds between image updates. If absent, or less than or equal to 0, will default to 5.