
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
motion-project-api
Advanced tools
This library aims to expose a simplistic API for the https://motion-project.github.io/ project.
npm i motion-project-api
Example creating a snapshot with the camera 1.
let motionApi = new MotionApi("http://localhost:7999"); // URL of the motion web server
motionApi.getCamera(1).createSnapshot(); // creates a snapshot for the camera 1
MotionApi(apiUrl)
getCamera(idCamera): Camera
Returns an instance of Camera
.
Camera(id)
getConfigList(): Promise<string>
Lists all the configuration values for the camera.
setConfig(parm, value1): Promise<void>
Set the value for the requested parameter.
getConfig(parm): Promise<string>
Return the value currently set for the parameter.
writeConfig(): Promise<string>
Write the current parameters to the file.
getDetectionStatus(): Promise<MotionDetectionStatus>
Return the current status of the camera. MotionDetectionStatus.ENABLE
is enable or MotionDetectionStatus.DISABLE
if disabled.
getConnectionStatus(): Promise<MotionConnectionStatus>
Return the connection status of the camera. MotionConnectionStatus.OK
if well connected otherwise MotionConnectionStatus.DISCONNECTED
.
startDetection(): Promise<string>
Start or resume motion detection.
pauseDetection(): Promise<string>
Pause the motion detection. When the action of pause is executed, Motion will stop the motion detection processing and of course all events but will continue to process and decode images from the camera. This allows for a faster transition when the user executes a start.
startEvent(): Promise<string>
Trigger a new event.
endEvent(): Promise<string>
Trigger the end of a event.
createSnapshot(): Promise<void>
Create a snapshot
restart(): Promise<string>
Shutdown and restart Motion.
quit(): Promise<string>
Close all connections to the camera. The quit action conversely not only stops the motion detection but also disconnects from the camera and decoding of images. To start motion detection after a quit, the user must execute a restart which will reinitialize the connection to the camera. And since the camera was completely disconnect, it can take more than a few seconds for Motion to fully start and have the camera available for processing or viewing.
end(): Promise<string>
Entirely shutdown the Motion application. This option completely terminates the Motion application. It closes all connections to all the cameras and terminates the application. This may be required when running Motion in daemon mode. Note that there is no way to restart the Motion application from the webcontrol interface after processing a end request.
FAQs
API for https://motion-project.github.io/
The npm package motion-project-api receives a total of 14 weekly downloads. As such, motion-project-api popularity was classified as not popular.
We found that motion-project-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.