Commit graph

122 commits

Author SHA1 Message Date
Per Sandström
f0f1fadee1 redirect daemon file descriptors (#2103) 2016-05-19 23:20:07 -07:00
Paulus Schoutsen
e40908d67c Improve config validation error message 2016-05-07 22:31:22 -07:00
Daniel Høyer Iversen
21dd8162b3 Improve error message for invalid key in config (#1975)
* Improve error message for invalid key in config

* Refactor log exception in config validation
2016-05-07 07:35:42 -07:00
Paulus Schoutsen
2e79e9d5bb Correct celcius to celsius (#1860) 2016-04-19 20:30:44 -07:00
Jan Harkes
241735c924 Change local library path from {config_dir}/lib to {config_dir}/deps. (#1799)
Just on the off chance that someone who happens to run as root and also
doesn't correctly parse "just remove config /lib and restart".
2016-04-11 20:07:50 -07:00
Jan Harkes
73859f59f0 Make yaml config parser errors look less like bugs. (#1776)
Instead of nested tracebacks, show a simpler error message.

    Config directory: /home/user/.homeassistant
    ERROR:homeassistant.util.yaml:duplicate key: "script"
      in "/home/user/.homeassistant/configuration.yaml", line 95, column 0
      in "/home/user/.homeassistant/configuration.yaml", line 108, column 0
2016-04-09 15:25:01 -07:00
Paulus Schoutsen
8ef542927f Add automation config validation
* Add automation config validation

* Remove unnecessary dict validator

* Downgrade voluptuous to 0.8.9

* Fix linting

* Address issues
2016-04-04 12:18:58 -07:00
Paulus Schoutsen
f6d584af09 Allow platforms to specify PLATFORM_SCHEMA 2016-04-02 20:10:57 -07:00
Paulus Schoutsen
489c5b8188 bootstrap platform components: adjust instead of replace config 2016-03-31 21:11:14 -07:00
Paulus Schoutsen
ac28228e6b Either validate component config or platform config 2016-03-29 22:51:33 -07:00
Paulus Schoutsen
a35173a5ff Surpress silly warnings 2016-03-28 23:46:19 -07:00
Paulus Schoutsen
5baa98b79f Add initial config validation 2016-03-28 23:46:12 -07:00
Fabian Affolter
897b5c668f Fix PEP257 issues 2016-03-08 00:06:04 +01:00
Paulus Schoutsen
1bfea626ff Handle circular setup dependency 2016-02-19 23:20:14 -08:00
Paulus Schoutsen
e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Ryan Kraus
60dd2d441d Merge remote-tracking branch 'balloob/dev' into automation-decorator
# Conflicts:
#	homeassistant/helpers/service.py
#	tests/helpers/test_service.py
2016-01-24 22:51:00 -05:00
Ryan Kraus
5830da63b1 Moved service decorator to service helpers
Moved the service decorator to the service helpers module and moved the
associated tests.
2016-01-24 22:46:30 -05:00
Ryan Kraus
40dbeb0b60 Another revision on event decorators
This revision of event decorators removes much of the complexity. The
decorated functions are no longer wrapped with a class that tracks
last_run, etc. Bootstrap now gives hass to the event_decorators module
before initializing components so the decorators no longer require
activation.
2016-01-24 17:46:05 -05:00
Ryan Kraus
02e634c6a2 Fixed bugs to allow HA to boot again
1) helpers/event should not import the sun component unless it is
requested. This prevents circular import.
2) fixed import typo in bootstrap
2) bootstrap cannot import event_decorators until it is needed because
this leads to a circular import.
2016-01-24 15:55:47 -05:00
Ryan Kraus
0f937cad74 Initial pass at event decorators
Created event decorators for custom components. Decorators were created
for the events: track_state_change, track_sunrise, track_sunset, and
track_time_change.
2016-01-24 15:28:09 -05:00
Paulus Schoutsen
de08f0afaa Load YAML config into an ordered dict 2016-01-23 22:41:01 -08:00
Paulus Schoutsen
bdd945c1c4 Set default log level to INFO 2015-12-22 18:39:46 -08:00
MartinHjelmare
5ff6eb8b9c Fix logging lowest level
* Set lowest logging level to NOTSET in enable_logging(), bootstrap.py,
	to enable setting a lower logging level than INFO in the logger
	component.
2015-12-10 02:56:05 +01:00
Paulus Schoutsen
fabd0ced3f Make DEPENDENCIES optional for components 2015-11-26 13:11:59 -08:00
Paulus Schoutsen
295f27d259 Only delete lib dir in config upgrade if exists 2015-11-15 02:16:52 -08:00
Paulus Schoutsen
71e4283a2e Remove lib directory in version upgrade 2015-11-15 02:05:46 -08:00
Paulus Schoutsen
e4c3d47dbf Expose API to view error log 2015-11-07 01:44:02 -08:00
Paulus Schoutsen
68c2b539ee More flexible domain config extraction 2015-09-28 23:09:05 -07:00
Paulus Schoutsen
19d40612e6 Add home_range to device tracker 2015-09-20 09:35:03 -07:00
Paulus Schoutsen
f9b17ab026 Device tracker rewrite 2015-09-09 23:37:15 -07:00
Andrew Thigpen
2e636f598e Add option to rotate log file daily.
Adds a command line option to rotate the log daily at midnight and
retain up to the specified amount of days.
2015-09-04 19:52:59 -05:00
Andrew Thigpen
6519e589b5 Add option to skip pip install on startup.
Since the requirements only change when the software is updated,
this adds a command line switch to disable pip installs on
startup.  The default behavior is maintained when the switch is
not specified.  Skipping pip helps a lot with startup on older RPi
hardware.
2015-09-04 16:50:57 -05:00
Ryan Kraus
5b06e8d25e Daemon handling cleanup.
More cleanly handling whether a PID file should be checked.
Fatal Error on PID file IOError.
Pylint fix to bootstrap.
2015-09-01 02:37:52 -04:00
Ryan Kraus
ff470c8ffe Added core daemon function as flags.
Created three additional flags for the hass command:
-v -  Toggle verbose log file output
—pid-file -  Specify PID file path
—daemon -  Launch as daemon (nix only)

The core now binds to SIGQUIT on nix systems to trigger a clean
shutdown.

Modified HTTP server to write logging messages through the logging
module.
2015-09-01 02:12:00 -04:00
Paulus Schoutsen
fb4121d4b4 Fix components being loaded twice 2015-08-30 15:08:03 -07:00
Paulus Schoutsen
a5a1f30798 Make launch more smooth 2015-08-29 23:02:07 -07:00
Ryan Kraus
f5b98c86f0 Mostly PyLint and Flake8 updates.
Rewrote imports of exceptions to be from the exceptions module.
Made nmap scanner check for libnmap dependency without crashing.
Various flake8 and pylint updates.
2015-08-29 22:34:35 -04:00
Ryan Kraus
0b6358e759 Implemented comments from Paulus.
Revised main to use frontend and demo strings rather than importing
their domains.
Removed submodule validation.
Moved local library mounting to the bootstrap module and out of core.
Added requirements_all.txt for all dependencies.
Made core dependencies looser.
Small updates to setup.py.
2015-08-29 22:19:52 -04:00
Ryan Kraus
6fdf9b8d7c Many changes to cleanup config directory and lib installations.
Cleaned up default config directory determination.
Made bootstrap creators for HA always set config directory.
Made bootstrap creators set the local library in the Python Path.
Moved all exceptions to their own file to make imports easier.
Moved default configuration directory be in the users’ profile.
Moved pip installs to be done to a lib folder in the config directory.
Reduced requirements.txt to only the barebones reqs.
2015-08-29 21:11:24 -04:00
Paulus Schoutsen
1b89a502c4 Extract core into own submodule 2015-08-16 20:44:46 -07:00
Paulus Schoutsen
d2b5f429fe Remove deprecated code 2015-08-04 16:21:09 -04:00
Paulus Schoutsen
7870e9a5e2 Minor cleanup core 2015-08-03 17:05:33 +02:00
Paulus Schoutsen
b346f6e8ad Allow installing component dependencies on the fly 2015-07-07 00:00:21 -07:00
eagleamon
bcb4766f95 adds a coloourful log output 2015-06-11 15:01:11 +02:00
Paulus Schoutsen
73dab5a398 Make customize parsing more robust 2015-06-02 21:31:50 -07:00
Paulus Schoutsen
a4e0a7f235 Fix platform discovery not working 2015-05-14 21:36:12 -07:00
Paulus Schoutsen
c523a0b509 Improve error message when prepare_setup_platform fails. 2015-05-11 22:29:53 -07:00
Paulus Schoutsen
4eeaa16f16 Convert some double to single quotes. 2015-05-11 22:23:38 -07:00
Paulus Schoutsen
e630476f9f Allow platforms to specify dependencies 2015-05-11 22:23:20 -07:00
Paulus Schoutsen
e0ecb64a10 Use UTC as the internal datetime format 2015-04-28 19:12:05 -07:00