User Tools

Site Tools


settings

This is an old revision of the document!


settings.json

Latest stable

To alter the default behavior of the daemon, a settings file can be created / edited. The default location of this file is /etc/pilight/settings.json. All options and its default values are shown below:

{
	"port": 5000,
	"standalone": 0,
	"log-level": 4,
	"pid-file": "/var/log/daemon/pilight.pid",
	"config-file": "/etc/pilight/config.json",
	"hardware-file": "/etc/pilight/hardware.json",
	"log-file": "/var/log/pilight.log",
	"send-repeats": 10,
	"receive-repeats": 1,
	"webserver-enable": 1,
	"webserver-root": "/usr/local/share/pilight/",
	"webserver-port": 5001,
	"webgui-template": "default",
	"webserver-cache": 1,
	"webserver-authentication": [ "username", "password" ],
	"webserver-user": "",
	"whitelist": "",
	"update-check": 1,
	"update-mirror": "http://apt.pilight.org/mirror.txt",
	"update-development": 1
}

Settings List

The following settings can be set in the settings file. If you leave a setting out, then the default value will be used:

Descriptions

NameDescription
portchange the default port the daemon will run at
standaloneshould the daemon run in standalone mode
log-levelthe default log level of the daemon
pid-filethe default location of the process id file
config-filethe default location of the config file
hardware-filethe default location of the hardware file
send-repeatshow many times should a code be send
receive-repeatshow many times should a code be received
webserver-enableenable the built-in webserver
webserver-portwebserver port
webserver-rootwebserver root path
webserver-cacheread webgui files from memory
webserver-authenticationenable protected login to webgui
webserver-userwebserver user permissions
webgui-templatethe webgui template in use
whitelistallow only certain ip (ranges) to connect to pilight
update-checkcheck for updates
update-mirrorlocation of the apt mirror file
update-developmentcheck for developmental updates

Format and Defaults

NameFormatDefault
portnumber5000
standalone1 or 00
log-level1 till 54
pid-filepath/var/run/pilight-daemon.pid
config-filepath/etc/pilight/config.json
hardware-filepath/etc/pilight/hardware.json
send-repeatsnumber10
receive-repeatsnumber1
webserver-enable1 or 01
webserver-portnumber5001
webserver-rootpath/usr/local/share/pilight/
webserver-cache1 or 01
webserver-authentication
webserver-userwww-data (linux) / www (FreeBSD)
webgui-template default
whitelist x.x.x.x, x.x.x.x, …127.0.0.1
update-check1 or 01
update-mirrorurlhttp://apt.pilight.org/mirror.txt
update-development1 or 00

Conflicts and Requirements

NameConflictRequires
port
standalone
log-level
pid-file
config-file
hardware-file
send-repeats
receive-repeats
webserver-enable
webserver-port “webserver-enable”: 1
webserver-root “webserver-enable”: 1
webserver-cache “webserver-enable”: 1
webserver-authentication “webserver-enable”: 1
webserver-user “webserver-enable”: 1
webgui-template “webserver-enable”: 1
whitelist
update-check
update-mirror “update-check”: 1
update-development “update-check”: 1

Nightly

To alter the default behavior of the daemon, the settings object in the config.json can be editor. The default location of this file is /etc/pilight/config.json. All options and its default values are shown below:

...
"settings": {
	"port": 5000,
	"standalone": 0,
	"log-level": 4,
	"pid-file": "/var/log/daemon/pilight.pid",
	"log-file": "/var/log/pilight.log",
	"send-repeats": 10,
	"receive-repeats": 1,
	"webserver-enable": 1,
	"webserver-root": "/usr/local/share/pilight/",
	"webserver-port": 5001,
	"webgui-template": "default",
	"webgui-websockets": 1,
	"webserver-cache": 1,
	"webserver-authentication": [ "username", "password" ],
	"webserver-user": "",
	"whitelist": "",
	"protocol-root": "/usr/local/lib/pilight/protocols",
	"hardware-root": "/usr/local/lib/pilight/hardware",
	"action-root": "/usr/local/lib/pilight/action",
	"operator-root": "/usr/local/lib/pilight/operator",
	"firmware-update": 1,
	"firmware-gpio-reset": 10,
	"firmware-gpio-sck": 14,
	"firmware-gpio-mosi": 12,
	"firmware-gpio-miso": 13,
	"watchdog-enable": 1
}
...

Settings List

The following settings can be set in the settings file. If you leave a setting out, then the default value will be used:

Descriptions

NameDescription
portchange the default port the daemon will run at
standaloneshould the daemon run in standalone mode
log-levelthe default log level of the daemon
pid-filethe default location of the process id file
send-repeatshow many times should a code be send
receive-repeatshow many times should a code be received
webserver-enableenable the built-in webserver
webserver-portwebserver port
webserver-rootwebserver root path
webserver-cacheread webgui files from memory
webserver-authenticationenable protected login to webgui
webserver-userwebserver user permissions
webgui-templatethe webgui template in use
webgui-websocketsenable websockets or use AJAX calls (for older browser)
whitelistallow only certain ip (ranges) to connect to pilight
protocol-rootpath to loadable protocol modules
hardware-rootpath to loadable hardware modules
action-rootpath to loadable action modules
operator-rootpath to loadable operator modules
firmware-updateshould pilight automatically upgrade the filter firmware
firmware-gpio-resetgpio pin used for firmware reset
firmware-gpio-sckgpio pin used for firmware sck
firmware-gpio-mosigpio pin used for firmware mosi
firmware-gpio-misogpio pin used for firmware miso
watchdog-enableenable internal CPU and RAM watchdog

Format and Defaults

NameFormatDefault
portnumber5000
standalone1 or 00
log-level1 till 54
pid-filepath/var/run/pilight-daemon.pid
send-repeatsnumber10
receive-repeatsnumber1
webserver-enable1 or 01
webserver-portnumber5001
webserver-rootpath/usr/local/share/pilight/
webserver-cache1 or 01
webserver-authentication [ “user”, “password” ]
webserver-userwww-data (linux) / www (FreeBSD)
webgui-template default
webgui-websockets1 or 01
whitelist x.x.x.x, x.x.x.x, …127.0.0.1
protocol-rootpath/usr/local/lib/pilight/protocols/
hardware-rootpath/usr/local/lib/pilight/hardware/
action-rootpath/usr/local/lib/pilight/actions/
operator-rootpath/usr/local/lib/pilight/operators/
firmware-update1 or 01
firmware-gpio-resetnumber10
firmware-gpio-scknumber14
firmware-gpio-mosinumber12
firmware-gpio-misonumber13
watchdog-enable1 or 01

Conflicts and Requirements

NameConflictRequires
port
standalone
log-level
pid-file
config-file
hardware-file
send-repeats
receive-repeats
webserver-enable
webserver-port “webserver-enable”: 1
webserver-root “webserver-enable”: 1
webserver-cache “webserver-enable”: 1
webserver-authentication “webserver-enable”: 1
webserver-user “webserver-enable”: 1
webgui-template “webserver-enable”: 1
webgui-websockets “webserver-enable”: 1
whitelist
protocol-root
hardware-root
action-root
operator-root
firmware-update
firmware-gpio-reset
firmware-gpio-sck
firmware-gpio-mosi
firmware-gpio-miso
watchdog-enable
settings.1422464057.txt.gz · Last modified: 2015/11/27 21:08 (external edit)