This project provides a cloud-based data acquisition service for collecting thermal camera data from an IP camera in the BPPTKG network. Since a direct connection to the IP camera is not possible, data is acquired in the cloud and sent to a webhook in the BPPTKG network.
- Connects to an Axis camera via WebSocket
- Uses Digest Authentication to obtain a session ID
- Subscribes to temperature detection events
- Sends acquired data to a webhook
- Node.js (v16+ recommended)
- A publicly accessible webhook endpoint to receive data
-
Clone the repository:
git clone https://github.com/yourusername/bpptkg-thermal-acquisition.git cd bpptkg-thermal-acquisition -
Install dependencies:
npm install
-
Configure environment variables: Create a
.envfile and add the following:CAMERA_IP=your_camera_ip USERNAME=your_camera_username PASSWORD=your_camera_password CALLBACK_URL=https://your-webhook-endpoint.com
-
Run the application:
npm start
- The application fetches a session ID using Digest Authentication.
- A WebSocket connection is established with the Axis camera.
- Temperature detection events are received and forwarded to the webhook endpoint.
The application sends data to the webhook in the following format:
{
"TemperatureUnit": "Celsius",
"MaxTempPositionX": "100",
"MaximumTemp": "75.2",
"MinTempPositionY": "50",
"AverageTemp": "70.5",
"MinTempPositionX": "120",
"MaxTempPositionY": "60",
"AreaName": "Merapi_Site_1",
"MinimumTemp": "68.1"
}Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature/fix.
- Make your changes and commit them.
- Open a pull request.
This project is licensed under the MIT License.