This is a module for displaying snapshots from a H.VIEW security camera in a iframe. There many different modules available to do the same, but no module fits to my needs. So i decided to develop my own module for it. 【ツ】
This image shows you how this module could work.
Tell me what have to be done.
In your terminal, go to your MagicMirror's Module folder:
cd ~/MagicMirror/modules
Clone this repository:
git clone https://github.com/coderpussy/MMM-HVIEW-Snapshot.git
Configure the module in your config/config.js
file.
If you want to update your module to the latest version, use your terminal to go to your MMM-HVIEW-Snapshot module folder and type the following command:
git pull
If you haven't changed the modules, this should work without any problems.
Type git status
to see your changes, if there are any, you can reset them with git reset --hard
. After that, git pull should be possible.
To use this module, add it to the modules array in the config/config.js
file:
modules: [
{
module: "MMM-HVIEW-Snapshot",
position: "bottom_left", // This can be any of the regions.
config: {
id: "camera01",
url: "http://192.168.XXX.XXX/action/snap?cam=0&user=admin&pwd=xxxxxxx",
updateInterval: 60000,
wrapperWidth: "640px",
wrapperHeight: "360px",
iframeWidth: "1920px",
iframeHeight: "1080px",
grayscale: 1,
scale: "0.33"
}
}
]
The following properties can be configured:
Option | Description |
---|---|
id |
A unique id for multiple instances of this module. Example: 'camera01' Default value: 'camera01' |
url |
URL of this H.VIEW camera. Example: 'http://192.168.XXX.XXX/action/snap?cam=0&user=admin&pwd=xxxxxxx' Default value: '' |
updateInterval |
Duration time to update snapshot. Example: 60000 Default value: 60000 |
wrapperWidth |
Outer iframe wrapper width. Example: '640px' Default value: '640px' |
wrapperHeight |
Outer iframe wrapper height. Example: '360px' Default value: '360px' |
iframeWidth |
Iframe width. Example: '1920px' Default value: '1920px' |
iframeHeight |
Iframe height. Example: '1080px' Default value: '1080px' |
grayscale |
Colored or grayscaled snapshot. Example: 1 Default value: 1 |
scale |
Use this to scale down the iframe to fit into wrapper size. Example: '0.33' Default value: '0.33' |
Stop and start your Magic Mirror (your exact method may vary)
pm2 restart mm
ℓ٥ﻻ ﻉ√٥υ all ❤◦.¸¸.◦✿
This project is maintained by Maja Aurora Pieper.