Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dale3h/hassctl
Simple command line utility to help debug Home Assistant configuration
https://github.com/dale3h/hassctl
home-assistant linux raspberry-pi raspbian systemd ubuntu
Last synced: 2 days ago
JSON representation
Simple command line utility to help debug Home Assistant configuration
- Host: GitHub
- URL: https://github.com/dale3h/hassctl
- Owner: dale3h
- License: mit
- Created: 2016-12-12T14:16:42.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-28T22:13:52.000Z (over 6 years ago)
- Last Synced: 2024-10-31T02:12:21.763Z (8 days ago)
- Topics: home-assistant, linux, raspberry-pi, raspbian, systemd, ubuntu
- Language: Shell
- Size: 24.4 KB
- Stars: 80
- Watchers: 11
- Forks: 15
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-home-assistant - hassctl - Simple command line utility to help debug your configuration. (Uncategorized / Twitter)
README
A command line utility to simplify the management of Home Assistant
## Compatibility
This utility has been tested on the following platforms:
* Raspberry Pi
* Manual install (with `systemd` service)
* AIO/One-Step Installer
* HASSbian Image
* Ubuntu Server 16.04.1
* Manual install (with `systemd` service)## Installation
`sudo curl -o /usr/local/bin/hassctl https://raw.githubusercontent.com/dale3h/hassctl/master/hassctl && sudo chmod +x /usr/local/bin/hassctl`
## Updating Home Assistant
The safest way to update Home Assistant in a production environment is to run:
`hassctl update-hass && hassctl config && hassctl restart`
This set of commands will update Home Assistant, run a configuration check, and then restart.
If the update fails, the configuration check will not run.
If the configuration check fails, Home Assistant will not be restarted.
If you would like to install a specific version of Home Assistant, run:
`hassctl update-hass 0.43.1` (replace `0.43.1` with the version you wish to install)
## Updating `hassctl`
To update `hassctl` to the latest stable version, run `hassctl update-hassctl` or `hassctl update-hassctl master`
To update `hassctl` to a custom branch on this repo, run `hassctl update-hassctl branch-name`
## Usage
### You can update Home Assistant using:
**`$ hassctl update-hass`** - Update Home Assistant to the latest version on PyPi
**`$ hassctl update-hass 0.47.0`** - Update Home Assistant to version 0.47.0
### You can control Home Assistant using:
**`$ hassctl start`** - Start the Home Assistant service
**`$ hassctl stop`** - Stop the Home Assistant service
**`$ hassctl restart`** - Restart the Home Assistance service
**`$ hassctl kill`** - Send a SIGKILL (-9) signal to the Home Assistant service
**`$ hassctl log`** - Follow the Home Assistant logs (errors are highlighted)
**`$ hassctl error`** - Follow the Home Assistant error logs
**`$ hassctl debug`** - Follow the Home Assistant debug logs
**`$ hassctl zwave`** - Follow the Open Z-Wave logs
**`$ hassctl config`** - Run the configuration check script
**`$ hassctl update-hassctl [branch]`** - Update `hassctl` to the latest version
## Configuration Examples
The configuration file is located at `/etc/hassctl.conf`.
### HASSbian
```
HASSCTL_BRANCH=masterVIRTUAL_ENV=/srv/homeassistant
PIP_EXEC=$VIRTUAL_ENV/bin/pip3
HASS_EXEC=$VIRTUAL_ENV/bin/hassHASS_CONFIG=/home/homeassistant/.homeassistant
HASS_USER=homeassistant
[email protected]OZW_LOG=$HASS_CONFIG/OZW_Log.txt
```### Current AIO Installer
```
HASSCTL_BRANCH=masterVIRTUAL_ENV=/srv/homeassistant/homeassistant_venv
PIP_EXEC=$VIRTUAL_ENV/bin/pip3
HASS_EXEC=$VIRTUAL_ENV/bin/hassHASS_CONFIG=/home/homeassistant/.homeassistant
HASS_USER=homeassistant
HASS_SERVICE=home-assistant.serviceOZW_LOG=$HASS_CONFIG/OZW_Log.txt
```### Pre-December 2016 AIO Installer
```
HASSCTL_BRANCH=masterVIRTUAL_ENV=/srv/hass/hass_venv
PIP_EXEC=$VIRTUAL_ENV/bin/pip3
HASS_EXEC=$VIRTUAL_ENV/bin/hassHASS_CONFIG=/home/hass/.homeassistant
HASS_USER=hass
HASS_SERVICE=home-assistant.serviceOZW_LOG=$HASS_CONFIG/OZW_Log.txt
```