Last active
October 24, 2023 17:05
-
-
Save 7wells/06aa69f98d8dad2c864ca4a3798dab5f to your computer and use it in GitHub Desktop.
FHEM - How to add menu entries to FHEM's WebGUI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to add menu entries to FHEM's WebGUI: | |
# | |
# Click "Edit files" in navigation bar, then click on fhem.cfg | |
# In the new window, add following line to fhem.cfg (consider making a backup of fhem.cfg first): | |
attr WEB menuEntries Update,cmd=update,UpdateCheck,cmd=update+check,Restart,cmd=shutdown+restart | |
# To also add a menu entry for log file deletion, define an alias for the deletion command and add the menu entry, e.g.: | |
# | |
define c_dellog cmdalias dellog AS {qx(truncate $currlogfile --size 0);;Log 1, "logfile deleted";;} | |
attr WEB menuEntries Update,cmd=update,UpdateCheck,cmd=update+check,Restart,cmd=shutdown+restart,DeleteLog,cmd=dellog | |
# To add to the menu a link that opens in a new tab, use this (it is "hacky" but seems to work), e.g. two links: | |
# | |
attr WEB menuEntries Link1,http://name.domain.com:1234' target='_blank,Link2,http://name.domain.com:5678' target='_blank |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment