CodeLabs
  • Introduction
  • Cities
    • Cover
    • Summary
    • Introduction
      • Getting Started
      • Resources
      • Naming Convention
    • Caracol
      • Architecture
        • Intel
        • Operating Systems
        • Hardware Platform
        • Field Requirements
        • Software Development
        • Video Conference Station
          • Applications
          • Entertainment System
            • Services
              • Graphics
              • Video
              • Camera
              • Text To Speech
              • Speech To Text
              • Photography
              • Gaming
                • Super Nintendo Emulators
                • Super Nintendo ROMs
              • Twitter
              • Keyboard
              • Google Drive
              • WiFi
            • Modules
            • Tbd
        • Functionality
        • Bill Of Materials
        • Open Questions
        • Future
    • Chacmultun
      • JHD1313M1
        • Background
          • Inter-Integrated Circuit
          • Linux I2C Subsystem
        • Device Drivers
          • User Space Library UPM
          • User Space Library MRAA
          • User Space I2C Library
          • Kernel Space I2C Driver
    • Chicanna
      • OpenCV
        • Face Recognition
        • Web Streaming
    • Chichen Itza
      • Audio
        • Advanced Linux Sound Architecture
        • PortAudio
        • PyAudio
          • Record
          • Play
      • Text To Speech
        • eSpeak
          • pyttsx
        • VoiceRss
          • VoiceRss Text To Speech Python SDK
      • Speech To Text
        • CMU Sphinx
          • Sphinx Knowledge Base Tool
          • PocketSphinx
          • PyAudio
        • SpeechRecognition
    • Coba
      • Linux Kernel Source Code
        • Git Source Code Management
      • Linux Kernel Development Process
        • A Guide To The Linux Kernel Development Process
        • Challenge
      • Linux Kernel Compilation
      • Linux Kernel Modules
      • Linux Kernel Build System
        • Compilation Kernel Object
        • Compilation Built-In
      • Linux Kernel Patch
        • Patchset
      • Linux Kernel Developer
      • Learn More
    • Dos Pilas
    • Dzibilchaltun
    • Edzna
      • MQ Telemetry Transport
        • MQTT Broker
      • Home Assistant
        • Setup
        • Default Configuration
        • Hello
      • Home Automation
        • Device
          • Light ESP8266
          • Intel Edison
        • Server
          • MQTT
            • Light
            • Sensor
            • Binary Sensor
            • Alarm
          • Dweet
          • Weather
          • Binary Sensor
          • Telegram
          • Camera
          • Automation
      • Shack Automation
        • Configuration Yaml
    • Ek Balam
      • Google Cloud Platform
        • Google API Keys
        • Google Application Default Credentials
      • Google Cloud Translation API
      • Google Cloud Vision API
      • Google Cloud Speech
    • Hochob
      • Introduction
      • Accounts
      • Areas
        • Naming Conventions
      • Digital Media Players
        • Chromecast
      • Keypads
      • Mobile Device
      • Amikoo
        • Architecture
          • Hardware Components
            • Intel® Edison Breakout Board
        • Amikoo
          • Setup
          • Git Repositories
          • Audio
          • Main Intel Edison
          • Main x86
        • Sandbox
          • Tbd
      • Server
        • Setup
          • Root
          • PulseAudio
        • Architecture
        • Media
        • Services
          • Automation
            • Home Assistant
              • Setup
          • Calendar
          • Camera
          • Communications
          • Games
            • Loteria Mexicana
            • Caras Y Gestos
            • Sopa De Letras
          • Image
          • Institution
          • Keypad
          • Messaging
          • Motion
          • Robot
          • Sound
            • Play
            • Speech Synthetizer
          • Stream
          • Usb
          • Survey
        • Applications
          • Captain Maya Lands
          • Southern Maya Highlands
          • Amikoo Maya Lands
          • Central Maya Lowlands
          • Northern Maya Lowlands
          • Console Maya Lands
          • Media Maya Lands
          • Calendar Maya Lands
          • Tradition Maya Lands
          • Techie Maya Lands
          • NohochTata Maya Lands
      • Stations
      • Architecture
      • Release Notes
        • v0.1
        • v0.2
    • Hormiguero
    • Kaminaljuyu
      • WRI Workshop
        • Environmental Protection Agency
      • Arquitecture
        • Bill Of Materials
      • Intel
    • Kanki
      • Device
      • Gateway
    • Kinich KaK Moo
    • Kohunlich
    • La Ruta Puuc
    • Mayapan
    • Mixco Viejo
    • Muyil
    • Palenque
    • Qumarkaj
      • Amazon
      • Amazon Echo
        • Lifx
        • IFTTT
      • Amazon Alexa
        • Alexa Skills Kit
          • Training: Developing Alexa Skills - Hello, Alexa!
          • Training: Alexa - A Free Introduction
          • Projects
            • Intel GDC Visitor Center
              • Cloudy
              • Geek
              • Trivia
              • Kit
            • Voice Control Intel Edison
        • Alexa Voice Service
          • Intel Edison
    • Seibal
    • Tabasqueno
    • Tikal
      • Mexican Red Cross
      • Emergency Medical Services
        • Prehospital Care Strategies
      • Intel
      • Bitalino
      • My Signals
      • Architecture
        • Objectives
    • Tulum
      • Introduction
      • Device
        • Development Board
        • Telegram Bot
        • Bootup
        • Text Editors
        • Setup
        • Main
        • IoT101 Inc
        • Mqtt Clients
        • Sensors
      • Server
        • Setup
        • Dashboard
        • Mqtt Broker
      • Challenge
    • Uxmal
    • Xcambo
    • Xpuhil
    • Xunantunich
    • Sandbox
      • Text To Speech
      • Face Recognition Web Streaming
      • Web Server Flask
      • Speech To Text
      • Image Webpage Flask
      • Audio Capture Playback
      • Image Capture OpenCV
    • Tbd
      • Tbd
      • Linux Kernel Architecture
      • Linux Kernel Device Drivers
      • Tbd
  • Gods
    • Acat
      • Node-RED
        • Installation
          • General
          • Base
          • Npm Packages
          • Node-RED Packages
        • Autostart
      • Projects
        • GPIO
        • MQTT
        • Intel GDC Visitor Center
      • Sandbox
    • Ah Puch
      • Recon Instruments
        • ReconJet
          • Get Started
        • ReconEngage
        • Uplink
        • Intel Developer Zone
          • Recon Dev Kit for Jet™
      • Bicycles
    • Akna
      • Hardware
        • Intel Edison
        • Sphero
        • Bluetooth Dongle
      • Software
        • Javascript
        • Cylon.js
          • Cylon.js Intel Edison
          • Cylon.js Intel Edison Sphero
            • Examples
        • Sphero Linux API
    • Alom
    • Bacab
      • Getting Started
        • Inventory
        • Accounts
        • Software
      • Proof Of Concepts
        • Doorbell
    • Bitol
      • Drone Software Development Environment
        • PX4
        • JMAVSim
        • Ardupilot
        • SITL Simulator
        • DroneKit
        • QGroundControl
        • MAVLink
        • OpenCV
        • Git Source Code Management
      • Drone Solution Architect
        • Companies
      • Dronecode Project
      • Base Drone Solution
        • Flight Controller Hardware
          • PixHawk
          • Intel® Aero Ready to Fly Drone
          • Emlid
          • Erle Brain
        • Flight Controller Operating System
        • Autopilot
          • Px4
            • Architecture
              • NuttX
              • DriverFramework
            • Shell
          • Ardupilot
          • Software In The Loop
            • jMAVSim
            • DroneKit SITL
        • Communications
          • Mavlink
            • PyMAVLink
        • Ground Control Station
          • QGroundControl
        • Developer APIs
      • Hybrid Drone Solution
      • Autonomous Drone Solution
      • Drone Solutions
        • Erle Robotics
        • Emlid
      • Training
        • Drone Solution Architect
          • Demos
            • Ka’an
            • Múuyal
            • lik’
            • Chak iik’
    • Chaac
    • Bolon Ts'akab
    • Buluc Chabtan
      • Challenge
    • Chaac Uayab Xoc
    • Cacoch
      • Background
        • Open Source
        • Do It Yourself Communities
      • The Project
        • History
        • Career Profile
        • Education Strategy
        • Courses
        • Infrastructure
Powered by GitBook
On this page
  • HomeAssistant Setup
  • HomeAssistant Execution
  • HomeAssistant Configuration
  • Check Config
  • HomeAssistant Automatic Startup @ Debian Jessie with existing file
  • HomeAssistant Automatic Startup @ Debian Jessie with unexisting file
  1. Cities
  2. Edzna
  3. Home Assistant

Setup

HomeAssistant Setup

user@server:~$ sudo apt-get install python3-setuptools
user@server:~$ sudo apt-get install python3-pip
user@server:~$ sudo pip3 install homeassistant
user@server:~$ hass --open-ui

HomeAssistant Execution

user@server:~$ hass --open-ui
Unable to find configuration. Creating default one in /home/xe1gyq/.homeassistant
Config directory: /home/xe1gyq/.homeassistant
INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: service=turn_off, domain=homeassistant>
...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hello, and welcome to Home Assistant!

We'll hope that we can make all your dreams come true.

Here are some resources to get started:

- Configuring Home Assistant:
https://home-assistant.io/getting-started/configuration/

- Available components:
https://home-assistant.io/components/

- Troubleshooting your configuration:
https://home-assistant.io/getting-started/troubleshooting-configuration/

- Getting help:
https://home-assistant.io/help/

This message is generated by the introduction component. You can
disable it in configuration.yaml.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...

HomeAssistant Configuration

user@server:~$ ls ~/.homeassistant
configuration.yaml deps home-assistant.db home-assistant.log
user@server:~$ nano ~/.homeassistant/configuration.yaml

Check Config

user@server:~$ hass --script check_config
Testing configuration at /root/.homeassistant
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up sun
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up group
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up switch
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up conversation
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up updater
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up http
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up notify
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up automation
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up recorder
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up websocket_api
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up api
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up media_player
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up tts
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up config
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up history
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up frontend
17-03-19 08:03:19 INFO (MainThread) [homeassistant.setup] Setting up logbook
user@server:~$

HomeAssistant Automatic Startup @ Debian Jessie with existing file

root@server:~# cd /etc/init.d
root@server:/etc/init.d#
root@server:/etc/init.d# wget https://raw.githubusercontent.com/home-assistant/home-assistant/dev/script/hass-daemon
--2016-10-24 03:02:12-- https://raw.githubusercontent.com/home-assistant/home-assistant/dev/script/hass-daemon
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.32.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.32.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2783 (2.7K) [text/plain]
Saving to: ‘hass-daemon’

100%[===========================================================================================================>] 2,783 --.-K/s in 0s      

2016-10-24 03:02:12 (25.6 MB/s) - ‘hass-daemon’ saved [2783/2783]

root@server:/etc/init.d# sudo service hass-daemon start
hass-daemon: unrecognized service
root@server:/etc/init.d# chmod +x /etc/init.d/hass-daemon
root@server:/etc/init.d# sudo update-rc.d hass-daemon defaults
Adding system startup for /etc/init.d/hass-daemon ...
/etc/rc0.d/K20hass-daemon -> ../init.d/hass-daemon
/etc/rc1.d/K20hass-daemon -> ../init.d/hass-daemon
/etc/rc6.d/K20hass-daemon -> ../init.d/hass-daemon
/etc/rc2.d/S20hass-daemon -> ../init.d/hass-daemon
/etc/rc3.d/S20hass-daemon -> ../init.d/hass-daemon
/etc/rc4.d/S20hass-daemon -> ../init.d/hass-daemon
/etc/rc5.d/S20hass-daemon -> ../init.d/hass-daemon
root@server:/etc/init.d# sudo service hass-daemon install
Installing Home Assistant Daemon (hass-daemon)
chown: invalid user: ‘USER’
chown: invalid user: ‘USER’
root@server:/etc/init.d# nano hass-daemon
root@server:/etc/init.d# sudo update-rc.d hass-daemon defaults
System start/stop links for /etc/init.d/hass-daemon already exist.
root@server:/etc/init.d# sudo service hass-daemon install
Installing Home Assistant Daemon (hass-daemon)
root@server:/etc/init.d#

HomeAssistant Automatic Startup @ Debian Jessie with unexisting file

user@server:~$ sudo nano /etc/init.d/hass-daemon
#!/bin/sh
### BEGIN INIT INFO
# Provides: hass
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Home\ Assistant
### END INIT INFO

# /etc/init.d Service Script for Home Assistant
# Created with: https://gist.github.com/naholyr/4275302#file-new-service-sh
#
# Installation:
# 1) If any commands need to run before executing hass (like loading a
# virutal environment), put them in PRE_EXEC. This command must end with
# a semicolon.
# 2) Set RUN_AS to the username that should be used to execute hass.
# 3) Copy this script to /etc/init.d/
# sudo cp hass-daemon /etc/init.d/hass-daemon
# sudo chmod +x /etc/init.d/hass-daemon
# 4) Register the daemon with Linux
# sudo update-rc.d hass-daemon defaults
# 5) Install this service
# sudo service hass-daemon install
# 6) Restart Machine
#
# After installation, HA should start automatically. If HA does not start,
# check the log file output for errors.
# /var/opt/homeassistant/home-assistant.log

PRE_EXEC=""
RUN_AS="root"
PID_FILE="/var/run/hass.pid"
#CONFIG_DIR="/var/opt/homeassistant"
CONFIG_DIR="/root/.homeassistant/"
FLAGS="-v --config $CONFIG_DIR --pid-file $PID_FILE --daemon"
REDIRECT="> $CONFIG_DIR/home-assistant.log 2>&1"

start() {
if [ -f $PID_FILE ] && kill -0 $(cat $PID_FILE) 2> /dev/null; then
echo 'Service already running' >&2
return 1
fi
echo 'Starting service…' >&2
local CMD="$PRE_EXEC hass $FLAGS $REDIRECT;"
su -c "$CMD" $RUN_AS
echo 'Service started' >&2
}

stop() {
if [ ! -f "$PID_FILE" ] || ! kill -0 $(cat "$PID_FILE") 2> /dev/null; then
echo 'Service not running' >&2
return 1
fi
echo 'Stopping service…' >&2
kill $(cat "$PID_FILE")
while ps -p $(cat "$PID_FILE") > /dev/null 2>&1; do sleep 1;done;
echo 'Service stopped' >&2
}

install() {
echo "Installing Home Assistant Daemon (hass-daemon)"
echo "999999" > $PID_FILE
chown $RUN_AS $PID_FILE
mkdir -p $CONFIG_DIR
chown $RUN_AS $CONFIG_DIR
}

uninstall() {
echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] "
local SURE
read SURE
if [ "$SURE" = "yes" ]; then
stop
rm -fv "$PID_FILE"
echo "Notice: The config directory has not been removed"
echo $CONFIG_DIR
update-rc.d -f hass-daemon remove
rm -fv "$0"
echo "Home Assistant Daemon has been removed. Home Assistant is still installed."
fi
}

case "$1" in
start)
start
;;
stop)
stop
;;
install)
install
;;
uninstall)
uninstall
;;
restart)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart|install|uninstall}"
esac
user@server:~$ sudo chmod 755 /etc/init.d/hass-daemon
user@server:~$ sudo chown root:root /etc/init.d/hass-daemon
user@server:~$ sudo update-rc.d hass-daemon defaults
user@server:~$ sudo update-rc.d hass-daemon enable
user@server:~$ sudo service hass-daemon status
user@server:~$ sudo service hass-daemon start
user@server:~$ hass --open-ui
  1. xe1gyq.sytes.net

  2. Install noip client

  3. whatismyip.org

PreviousHome AssistantNextDefault Configuration

Last updated 7 years ago

Go to

http://192.168.1.70:8123/