-
Notifications
You must be signed in to change notification settings - Fork 0
Monitor
This page is for Monitor
version 1.
"Monitor" is a Web application which show current data and pictures posted from the "Slider".
- php
- composer
- git clone https://github.com/UedaTakeyuki/monitor.git
- sudo chown -R www-data monitor
(or appropriate user running as Web server process) - cd monitor
- composer install
- ./setup.js.sh
prepare data folder for "Slider"
make data folder of your slider with same name of your slider's serial_id.
- get your slider's serial_id. on
slider
as:
$ python -m piserialnumber
000000000abcdefgh
in this case, serial_id is 000000000abcdefgh.
- return back to
monitor
, then
cd uploads
- cp -rf org YOUR-SERIAL-ID
for example:
cp -rf org 000000000abcdefgh
- grant write permission to the Web Server on this folder, for example:
sudo chmod -R www-data 000000000abcdefgh
remark: DON'T grant write permission to "USER", like sudo chmod a+w
because the file with USER write permission is cause of taking over!
-
at
slider
set monitor url. -
et voila!
Sensor and image settings is in the .dini
files.
monitor read all .dini file and make a views, get data and draw it on the view.
View is cleated in order of the .dini filename alphabetically, for example, in case there are 1_temp.dini
2_humidity.dini
500_video0.dini
, view is cleated in order temp
, humidity
, video0
. So, you can change view order by changing name of .dini file.
for example:
pname=気温
fname=temp
dname=temp
unit=℃
- pname:
print name of this sensor on the view. - fname:
base file name (without expansion) of this sensor's logging data. With above example, data file is
temp.csv
. - dname:
device name of this sensor, should be same as the device name on theslider
. - unit:
The unit of this data.
pname=video0
dname=video0
image_type=jpeg
- pname: print name of this sensor on the view.
- device name of this sensor, should be same as the device name on the
slider
. - image_type:
This element should bejpeg
. Other settings (like movie) is reserved for the next version ofmonitor2 & slider2
.