HTTP Image Data Source
The HTTP Image data source retrieves images from HTTP-accessible endpoints at a configurable poll interval. It is designed to capture snapshots from IP cameras, webcams, weather cameras, and any other device or service that provides images via HTTP or HTTPS URLs. Each captured image is stored as an image-type data point value in Mango, enabling historical image review, dashboard display, and event-triggered image capture.
This data source is commonly used for visual monitoring of equipment, facilities, and environmental conditions -- providing a visual record alongside the numeric sensor data collected by other data sources.
Overview
| Property | Value |
|---|---|
| Module | mangoAutomation-HttpImage |
| Protocol | HTTP/HTTPS |
| Direction | Polling |
| Typical Use | Capturing images from IP cameras and webcams |
Prerequisites
- An IP camera or HTTP image endpoint accessible from the Mango server over the network. The endpoint must return an image file (JPEG, PNG, GIF, or BMP) in response to an HTTP GET request.
- The URL of the image endpoint. For IP cameras, this is typically a snapshot URL provided in the camera's documentation (e.g.,
http://192.168.1.100/snapshot.jpg). - Network connectivity between the Mango server and the image source.
- If the image endpoint requires authentication, the appropriate credentials (username and password) for HTTP Basic or Digest authentication.
Configuration
Data Source Settings
| Setting | Description |
|---|---|
| Name | A descriptive name for the data source. |
| Update period | How frequently Mango retrieves a new image from the endpoint. |
| Timeout | Maximum time (in milliseconds) to wait for the HTTP response. IP cameras on slow networks may require a longer timeout. |
| Retries | Number of retry attempts when an image retrieval fails. |
Data Point Configuration
Each data point represents a single image source (URL).
| Setting | Description |
|---|---|
| Name | A descriptive name for the image point (e.g., "Lobby Camera", "Parking Lot North"). |
| URL | The full HTTP or HTTPS URL to the image endpoint. |
| Data type | Image (automatically set for this data source type). |
| Scale mode | How to handle image scaling. Options typically include: None (store original size), Percent (scale by percentage), or Fixed Size (scale to specific pixel dimensions). |
| Scale percent | (If Scale mode is Percent) The percentage to scale the image to. 100 = original size, 50 = half size. |
| Width / Height | (If Scale mode is Fixed Size) The target pixel dimensions. |
| Read limit | Maximum number of bytes to read from the HTTP response. Prevents excessive memory usage if the endpoint returns unexpectedly large images. |
Authentication
If the image endpoint requires authentication:
| Setting | Description |
|---|---|
| Username | The HTTP authentication username. |
| Password | The HTTP authentication password. |
Most IP cameras support HTTP Basic authentication. Some may require Digest authentication, which is also supported.
Image retrieval runs as a high-priority work item (HttpImageRetriever) in Mango's internal task queue. This ensures that image capture does not delay other polling data sources, but it also means that a large number of image data sources can consume high-priority work item threads.
Common Patterns
Facility Visual Monitoring
Place IP cameras at key locations in a facility (entrances, equipment rooms, loading docks) and configure the HTTP Image data source to capture snapshots at regular intervals. Display these images on Mango dashboards alongside sensor data from the same areas. This provides operators with both visual and data-driven situational awareness.
Equipment Condition Monitoring
Point a camera at equipment that has visual indicators (gauges, indicator lights, display panels) and capture periodic images. This creates a visual log that can be reviewed when investigating equipment issues or comparing displayed values against electronically collected data.
Time-Lapse Recording
Configure a short poll period (e.g., every 30 seconds or every minute) to create a time-lapse sequence of images. This is useful for monitoring construction progress, tracking weather patterns, or observing slow-moving processes.
Event-Triggered Image Capture
While the HTTP Image data source polls at a fixed interval, you can combine it with Mango's event system: configure a fast poll rate and use event detectors on other data points to mark important moments. The captured images provide visual context for alarm events.
Multi-Camera Dashboards
Create multiple data points on a single HTTP Image data source, each pointing to a different camera URL. Display all camera feeds on a single dashboard page for centralized visual monitoring.
Troubleshooting
No Image Retrieved
- URL incorrect -- verify the image URL by opening it in a web browser. The URL should return a raw image file, not an HTML page containing an embedded image.
- Authentication required -- if the browser prompts for credentials, configure the username and password in the data point settings.
- Firewall blocking -- ensure the Mango server can reach the camera's IP address and port.
- Camera-specific URL format -- IP cameras use vendor-specific snapshot URLs. Common formats include:
- Axis:
http://<ip>/axis-cgi/jpg/image.cgi - Hikvision:
http://<ip>/ISAPI/Streaming/channels/101/picture - Dahua:
http://<ip>/cgi-bin/snapshot.cgi - Generic MJPEG:
http://<ip>/snapshot.jpgorhttp://<ip>/cgi-bin/image.jpg - Consult your camera's documentation for the correct snapshot URL.
- Axis:
Images Are Black or Corrupted
- Camera not ready -- some cameras take several seconds to initialize after power-on. If the first few images are black, the camera may still be starting up.
- Concurrent access -- some low-end cameras cannot serve images to multiple clients simultaneously. Ensure no other application is continuously streaming from the same camera.
- Read limit too low -- if the Read limit is set lower than the actual image file size, the image will be truncated and appear corrupted. Increase the read limit or remove the limit.
High Memory Usage
- Image size -- high-resolution cameras produce large image files. If many cameras are polled at a fast rate, image storage can consume significant memory and disk space.
- Scale mode -- use the Percent or Fixed Size scale mode to reduce image dimensions before storage. Storing scaled-down images significantly reduces storage requirements.
- Purge settings -- configure point value purge settings to automatically remove old images and prevent unbounded storage growth.
Timeout Errors
- Increase the Timeout value if the camera or network is slow.
- Verify that the camera is not overloaded. Some cameras slow down or stop responding when too many concurrent requests are made.
- Check network routing between the Mango server and the camera -- intermediate switches, routers, or VPN tunnels can add latency.
Work Item Queue Growth
If the Internal data source shows the high-priority work item queue growing when the HTTP Image data source is running, there may be too many image points polling too frequently. Each image retrieval occupies a high-priority thread. Reduce the number of image points, increase the poll interval, or both.
Related Pages
- Data Sources Overview — General data source and data point concepts
- HTTP Retriever Data Source — Retrieve text and numeric data from HTTP endpoints
- Data Source Performance — Tuning poll intervals for HTTP-based data collection