User Tools

Site Tools


settings

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
settings [2013/12/04 10:27]
curlymo
settings [2015/11/27 21:09] (current)
Line 1: Line 1:
-**settings.json**+======= Settings =======
  
-To alter the default behavior of the daemon, ​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:+In pilight >5.0 the settings.json file has been merged into [[config|config.json]] 
 + 
 +===== Latest Stable ===== 
 + 
 +To alter the default behavior of the daemon, ​the settings ​object in the ''​config.json'' ​can be edited. The default location of this file is ''/​etc/​pilight/​config.json''​. All options and its default values are shown below (in alphabetical order):
  
 <​code>​ <​code>​
-+... 
- "port": ​5000+"​settings": ​
- "mode": "server",+ "action-root": ​"/​usr/​local/​lib/​pilight/​action",​ 
 + "​firmware-gpio-miso":​ 13, 
 + "​firmware-gpio-mosi":​ 12, 
 + "​firmware-gpio-reset":​ 10, 
 + "​firmware-gpio-sck":​ 14, 
 + "​firmware-update":​ 1, 
 + "​function-root":​ "/​usr/​local/​lib/​pilight/​function",​ 
 + "​hardware-root":​ "/​usr/​local/​lib/​pilight/​hardware"​
 + "log-file": "/​var/​log/​pilight.log",
  "​log-level":​ 4,  "​log-level":​ 4,
 + "​operator-root":​ "/​usr/​local/​lib/​pilight/​operator",​
  "​pid-file":​ "/​var/​log/​daemon/​pilight.pid",​  "​pid-file":​ "/​var/​log/​daemon/​pilight.pid",​
- "config-file": "/etc/pilight/config.json", + "port": 5000, 
- "log-file": "/​var/​log/​pilight.log", + "​protocol-root": "/usr/​local/​lib/pilight/protocols", 
- "send-repeats": ​10,+ "ntp-servers": ​"server1", "​server2",​ ... ]
 + "ntp-sync": ​1,
  "​receive-repeats":​ 1,  "​receive-repeats":​ 1,
- "hw-socket": "/dev/lirc0", + "smtp-sender": "...@...", 
- "hw-mode": "gpio", + "smtp-user": "...@...", 
- "gpio-sender": 0, + "smtp-password":​ "​abdcd",​ 
- "gpio-receiver": 1,+ "​smtp-host":​ "​smtp.abcd.com",​ 
 + "​smtp-port":​ 25, 
 + "​standalone": 0, 
 + "stats-enable":​ 1, 
 + "​watchdog-enable":​ 1, 
 + "​webgui-template":​ "​default",​ 
 + "​webgui-websockets":​ 1, 
 + "​webserver-authentication":​ [ "​username",​ "​password"​ ], 
 + "​webserver-cache": 1,
  "​webserver-enable":​ 1,  "​webserver-enable":​ 1,
 + "​webserver-port":​ 5001,
  "​webserver-root":​ "/​usr/​local/​share/​pilight/",​  "​webserver-root":​ "/​usr/​local/​share/​pilight/",​
- "​webserver-port": ​5001+ "​webserver-ssl-port": ​5002
- "​webserver-cache":​ 1, + "​webserver-user": "",​ 
- "​whitelist": "",​ + "whitelist": ""​
- "update-check": ​1, +
- "update-mirror": "​http://​apt.pilight.org/​mirror.txt",​ +
- "​update-development":​ 1+
 } }
 +...
 </​code>​ </​code>​
  
-However, not all settings options are compatible with each other. The two most important settings are those used with the different ''​hw-mode''​. So, first an example of the default settings for each ''​hw-mode'':​ +==== Settings List ====
- +
-Examples +
- +
-//GPIO// +
- +
-<​code>​ +
-+
-        "​port":​ 5000, +
-        "​mode":​ "​server",​ +
-        "​log-level":​ 4, +
-        "​pid-file":​ "/​var/​run/​pilight-daemon.pid",​ +
-        "​config-file":​ "/​etc/​pilight/​config.json",​ +
-        "​log-file":​ "/​var/​log/​pilight-daemon.log",​ +
-        "​send-repeats":​ 10, +
-        "​receive-repeats":​ 1, +
-        "​hw-mode":​ "​gpio",​ +
-        "​gpio-receiver":​ 1, +
-        "​gpio-sender":​ 0, +
-        "​webserver-enable":​ 1, +
-        "​webserver-root":​ "/​usr/​local/​share/​pilight/",​ +
-        "​webserver-port":​ 5001, +
- ​ "​webserver-cache":​ 1,        +
- "​whitelist":​ "",​ +
- "​update-check":​ 1 +
-+
-</​code>​ +
- +
-//​Module//​ +
- +
-<​code>​ +
-+
-        "​port":​ 5000, +
-        "​mode":​ "​server",​ +
-        "​log-level":​ 4, +
-        "​pid-file":​ "/​var/​run/​pilight-daemon.pid",​ +
-        "​config-file":​ "/​etc/​pilight/​config.json",​ +
-        "​log-file":​ "/​var/​log/​pilight-daemon.log",​ +
-        "​send-repeats":​ 10, +
-        "​receive-repeats":​ 1, +
-        "​hw-mode":​ "​module",​ +
-        "​hw-socket":​ "/​dev/​lirc0",​ +
-        "​webserver-enable":​ 1, +
-        "​webserver-root":​ "/​usr/​local/​share/​pilight/",​ +
-        "​webserver-port":​ 5001, +
-        "​webserver-cache":​ 1, +
- "​whitelist":​ "",​ +
- "​update-check":​ 1 +
-+
-</​code>​ +
- +
-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: The following settings can be set in the settings file. If you leave a setting out, then the default value will be used:
- 
-//​Descriptions//​ 
  
 ^Name^Description^ ^Name^Description^
-|port|change the default port the daemon will run at+|action-root|path to loadable action modules
-|mode|should the daemon be ran as the main server or as a client+|firmware-update|should ​pilight automatically upgrade ​the filter firmware
-|server|the server the client should connect ​to|+|firmware-gpio-miso|gpio pin used for firmware miso| 
 +|firmware-gpio-mosi|gpio pin used for firmware mosi| 
 +|firmware-gpio-reset|gpio pin used for firmware reset| 
 +|firmware-gpio-sck|gpio pin used for firmware sck| 
 +|function-root|path to loadable function modules| 
 +|hardware-root|path to loadable hardware modules| 
 +|log-file|file ​to store pilight logs|
 |log-level|the default log level of the daemon| |log-level|the default log level of the daemon|
 +|operator-root|path to loadable operator modules|
 |pid-file|the default location of the process id file| |pid-file|the default location of the process id file|
-|config-file|the default ​location of the config file+|port|change ​the default ​port the daemon will run at
-|send-repeats|how many times should a code be send|+|protocol-root|path to loadable protocol modules| 
 +|ntp-servers|A list of ntp servers to sync our time with| 
 +|ntp-sync|Sync the ntp time|
 |receive-repeats|how many times should a code be received| |receive-repeats|how many times should a code be received|
-|hw-mode|what sender ​/ receiving (interface) are we using+|smtp-sender|The sender ​of pilight mail messages
-|hw-socket|what lirc socket should we read from+|smtp-user|The mail server authentication username
-|gpio-sender|to what pin is the sender connected+|smtp-password|The mail server authentication password| 
-|gpio-receiver|to what pin is the receiver connected|+|smtp-host|The mail server host| 
 +|smtp-port|The mail server port| 
 +|standalone|don't connect ​to other pilight daemons| 
 +|stats-enable|enable internal pilight CPU/RAM stat generation| 
 +|watchdog-enable|enable internal CPU and RAM watchdog| 
 +|webgui-template|the webgui template in use
 +|webgui-websockets|enable websockets or use AJAX calls (for older browser)| 
 +|webserver-authentication|enable protected login to webgui|
 |webserver-enable|enable the built-in webserver| |webserver-enable|enable the built-in webserver|
 +|webserver-cache|read webgui files from memory|
 |webserver-port|webserver port| |webserver-port|webserver port|
 |webserver-root|webserver root path| |webserver-root|webserver root path|
-|webserver-cache|read webgui files from memory| +|webserver-ssl-port|webserver ​ssl port
-|**webserver-authentication**|enable protected login to webgui+|webserver-user|webserver ​user permissions|
-|**webserver-password**|webgui password| +
-|**webserver-username**|webgui username|+
 |whitelist|allow only certain ip (ranges) to connect to pilight| |whitelist|allow only certain ip (ranges) to connect to pilight|
-|update-check|check for updates| 
-|update-mirror|location of the apt mirror file| 
-|update-development|check for developmental updates| 
  
-//Format and Defaults//+==== Format and Defaults ​====
  
 ^Name^Format^Default^ ^Name^Format^Default^
-|port|number|5000+|action-root|path|/​usr/​local/​lib/​pilight/​actions/​| 
-|mode|"​client" ​"​server"​|"​server"​+|firmware-gpio-miso|number|13
-|server|[ x.x.x.x, xxxx ]| |+|firmware-gpio-mosi|number|12| 
 +|firmware-gpio-reset|number|10| 
 +|firmware-gpio-sck|number|14| 
 +|firmware-update|1 or 0|1| 
 +|function-root|path|/​usr/​local/​lib/​pilight/​function/| 
 +|hardware-root|path|/​usr/​local/​lib/​pilight/​hardware/​
 +|log-file|path|/​var/​log/​pilight.log|
 |log-level|1 till 5|4| |log-level|1 till 5|4|
 +|operator-root|path|/​usr/​local/​lib/​pilight/​operators/​|
 |pid-file|path|/​var/​run/​pilight-daemon.pid| |pid-file|path|/​var/​run/​pilight-daemon.pid|
-|config-file|path|/etc/pilight/config.json+|port|number|5000| 
-|send-repeats|number|10|+|protocol-root|path|/usr/​local/​lib/pilight/protocols/
 +|ntp-servers|array of servers| | 
 +|ntp-sync|1 or 0|1|
 |receive-repeats|number|1| |receive-repeats|number|1|
-|hw-mode|gpio / module|gpio+|smtp-sender|valid mail address| | 
-|hw-socket|dev path|/dev/lirc0+|smtp-user| | | 
-|gpio-sender|gpio|0| +|smtp-password| | 
-|gpio-receiver|gpio|1|+|smtp-host|a valid mail server| | 
 +|smtp-port| |25, 465, 587| 
 +|standalone|1 or 0|0| 
 +|stats-enable|1 or 0|1| 
 +|watchdog-enable|1 or 0|1| 
 +|webgui-template| |default| 
 +|webgui-websockets|1 or 0|1| 
 +|webserver-authentication| [ "​user",​ "​password"​ ] | | 
 +|webserver-cache|1 or 0|1|
 |webserver-enable|1 or 0|1| |webserver-enable|1 or 0|1|
 |webserver-port|number|5001| |webserver-port|number|5001|
 |webserver-root|path|/​usr/​local/​share/​pilight/​| |webserver-root|path|/​usr/​local/​share/​pilight/​|
-|webserver-cache|1 or 0|1| +|webserver-ssl-port|number|5002
-|**webserver-authentication**|1 or 0|0+|webserver-user|www-data (linux) / www (FreeBSD) ​| |
-|**webserver-password**| | +
-|**webserver-username**| ​| |+
 |whitelist| x.x.x.x, x.x.x.x, ...|127.0.0.1| |whitelist| x.x.x.x, x.x.x.x, ...|127.0.0.1|
-|update-check|1 or 0|1| 
-|update-mirror|url|http://​apt.pilight.org/​mirror.txt| 
-|update-development|1 or 0|0| 
- 
-//Conflicts and Requirements//​ 
- 
-^Name^Conflict^Requires^ 
-|port| | | 
-|mode| | | 
-|server| |"​mode":​ "​client"​| 
-|log-level| | | 
-|pid-file| | | 
-|config-file|"​mode":​ "​client"​| | 
-|send-repeats| | | 
-|receive-repeats| | | 
-|hw-mode| | | 
-|hw-socket|"​hw-mode":​ "​gpio"​|"​hw-mode":​ "​module"​| 
-|gpio-sender|"​hw-mode":​ "​module"​|"​hw-mode":​ "​gpio"​| 
-|gpio-receiver|"​hw-mode":​ "​module"​|"​hw-mode":​ "​gpio"​| 
-|webserver-enable| | | 
-|webserver-port| |"​webserver-enable":​ 1| 
-|webserver-root| |"​webserver-enable":​ 1| 
-|webserver-cache| |"​webserver-enable":​ 1| 
-|**webserver-authentication**||"​webserver-enable":​ 1| 
-|**webserver-password**| |"​webserver-enable":​ 1| 
-|**webserver-username**| |"​webserver-enable":​ 1| 
-|whitelist| | | 
-|update-check| | | 
-|update-mirror| |"​update-check":​ 1| 
-|update-development| |"​update-check":​ 1| 
  
-**The bold settings are part of the developmental versions of pilight** 
settings.1386152877.txt.gz · Last modified: 2015/11/27 21:08 (external edit)