-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.php
58 lines (53 loc) · 1.56 KB
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/*
* This is an KISS (Keep It Simple and Stupid) web monitor for
* printrun / pronterface written in PHP.
* Copyright (C) 2016 Jaroslav Škarvada <[email protected]>
* The code is copied under GPLv3+. Use it on your own risk.
*/
// RPC defaults
$host = "localhost";
$path = "/";
$def_port = 7978;
$delay = 2; // how long to cache cameras output before new shot is captured
$cache_delay = 2; // how long to cache in browser in seconds before refresh is needed
$video_dev_glob = "/dev/video*";
//$video_dev_blacklist = array("/dev/video0", "/dev/video1");
$video_dev_blacklist = array();
$page_title = "3D printer status";
// resolution of images
$img_res_preview = "320x240";
$img_res_full = "1280x720";
$rulesets = [
[
'match_rules' => [
["ID_MODEL", "Integrated_Camera"]
],
'action' => 'ignore'
],
[
'match_rules' => [
["ID_V4L_CAPABILITIES", ":"],
],
'action' => 'ignore'
],
[
'match_rules' => [
["ID_V4L_CAPABILITIES", ":capture:"],
["ID_MODEL_ID", "704d"],
["ID_VENDOR_ID", "0458"],
],
'fswebcam_args' => [
"--s", "45"
],
]
];
// safety stop when searching for pronterfaces, if anything goes bad
// do not probe for more than NUM pronterfaces, under normal conditions
// it stops probing earlier
$printers_max = 100;
$status_cache = "data/status-cache";
$v4l_lock = "/tmp/printrun-webmon-v4l.lock";
$status_cache_lock = "/tmp/printrun-webmon-status-cache.lock";
// project home page for self-advertising :) empty string to disable
$homepage = "https://github.com/yarda/printrun-webmon";