mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
cd7523c23d
git-svn-id: https://svn.fhem.de/fhem/trunk@274 2b470e98-0d58-463d-a4d8-8e2adae1ed80 |
||
---|---|---|
.. | ||
01_FHEMWEB.pm | ||
98_SVG.pm | ||
98_weblink.pm | ||
cpulog.gplot | ||
cul_em.gplot | ||
cul_ws.gplot | ||
em.gplot | ||
fht.gplot | ||
fs20.gplot | ||
FS20.off.gif | ||
FS20.on.gif | ||
garden.gplot | ||
hms_tf.gplot | ||
ks300_1.gplot | ||
ks300_2.gplot | ||
ks300_3.gplot | ||
ks300_4.gplot | ||
mpiri.gplot | ||
Next.png | ||
piri.gplot | ||
Prev.png | ||
README | ||
style.css | ||
svg_style.css | ||
Zoom-in.png | ||
Zoom-out.png |
Installation: ============= - copy the gif files to the destination directory cp *.gif /home/httpd/icons - copy docs/commandref.html to the doc directory cp ../..docs/commandref.html /home/httpd/html - check if the above directories are set correctly in 01_FHEMWEB.pm vi 01_FHEMWEB.pm - copy 01_FHEMWEB.pm to the fhem module directory cp *.pm /usr/local/lib/FHEM - restart fhem.pl - define a new FHEMWEB instance in fhem define WEB FHEMWEB 8080 global Now you can access it from the web browser via http://<yourhost>:8080/fhem Additional features: ==================== - Rooms: If you have more than 10 devices/logs/notifies/etc. then it make sense to divide them into "rooms". For this purpose assign the attribute room to each device. - hide devices: Devices in the room "hidden" will not be shown. Devices without a room attribute go to the room "Unsorted". - Title: You can set the title of the webpage with attr global title "My-Title" - If you set the attribute model of an FS20 device, and the device is an FS20-sender, then you will not be able to switch it from the frontend. - You can first set an attribute to an arbitrary (wrong) value, then click on the attribute: you will be guided to the correct place in the documentation; now you can chnage the attribute value to the correct one. - To log the HTTP requests in the logfile, either set the global verbose to a value greater than 3 or set the HTTP device loglevel to a lower value attr <FHEMWEBDEVICE> loglevel 2 Graphs for plotted logs (gnuplot): ================================== - Set FHEMWEB_gnuplot in 01_FHEMWEB.pm to the gnuplot binary - copy the gnuplot files to the gnuplot scripts to the gnuplot directory cp *.gplot /home/httpd/cgi-bin - copy 99_weblink.pm to the FHEM modules directory and restart fhem.pl - assign the logtype attribute to your FileLog device. Look at the XXX.gplot file, how the FileLog should be defined, and set the corresponding logtype attribute to XXX. You can use more than one logtype, see commandref.html for more. - To show more than one plot on one page, convert them to weblink, and assign each weblink the same room. If a weblink is created for the CURRENT logfile, it will always use the CURRENT logfile. Password/HTTPS: =============== - These features are implemented by apache, and apache must be configured to redirect the page to 01_FHEMWEB.pm. For this purpose add the following lines to your httpd.conf: <Proxy *> AuthType Basic AuthName "Password Required" AuthUserFile /home/httpd/etc/passwd Require valid-user Allow from 127.0.0.1 </Proxy> ProxyPass /fhem http://localhost:<FHEMPORT>/fhem ProxyPassReverse /fhem http://localhost:<FHEMPORT>/fhem and then restart httpd with apachectl graceful. To create the password file, execute htpasswd -c /home/httpd/etc/passwd <username> - To enable HTTPS, please check the web. In essence: - Edit httpd.conf, add: LoadModule ssl_module lib/apache/mod_ssl.so Include /etc/httpd/conf/ssl.conf - Create a server certificate - Start httpd with the startssl option (SSL or the like must be set in one of your system files, look at /etc/init.d/httpd).