Install assistant mac os

MacOS

Install Home Assistant Operating System

Download the appropriate image

Follow this guide if you already are running a supported virtual machine hypervisor. If you are not familiar with virtual machines we recommend installation Home Assistant OS directly on a Raspberry Pi or an ODROID.

Create the Virtual Machine

Load the appliance image into your virtual machine hypervisor. (Note: You are free to assign as much resources as you wish to the VM, please assign enough based on your add-on needs)

Minimum recommended assignments:

All these can be extended if your usage calls for more resources.

Hypervisor specific configuration

  1. Create a new virtual machine
  2. Select “Other Linux (64Bit)
  3. Select “Use an existing virtual hard disk file”, select the VDI file from above
  4. Edit the “Settings” of the VM and go “System” then Motherboard and Enable EFI
  5. Then “Network” “Adapter 1” Bridged and your adapter.
  1. Create a new virtual machine in virt-manager
  2. Select “Import existing disk image”, provide the path to the QCOW2 image above
  3. Choose “Generic Default” for the operating system
  4. Check the box for “Customize configuration before install”
  5. Select your bridge under “Network Selection”
  6. Under customization select “Overview” -> “Firmware” -> “UEFI x86_64: …”.****

Start up your Virtual Machine

  1. Start the Virtual Machine
  2. Observe the boot process of Home Assistant Operating System
  3. Once completed you will be able to reach Home Assistant on homeassistant.local:8123. If you are running an older Windows version or have a stricter network configuration, you might need to access Home Assistant at homeassistant:8123 or http://X.X.X.X:8123 (replace X.X.X.X with your ’s IP address).

With the Home Assistant Operating System installed and accessible you can continue with onboarding.

Install Home Assistant Core

This guide assumes that you already have an operating system setup and have installed Python 3.8 (including the package python3-dev ) or newer.

Install dependencies

Before you start make sure your system is fully updated, all packages in this guide are installed with apt , if your OS does not have that, look for alternatives.

Install the dependencies:

Create an account

Add an account for Home Assistant Core called homeassistant . Since this account is only for running Home Assistant Core the extra arguments of -rm is added to create a system account and create a home directory.

Create the virtual environment

First we will create a directory for the installation of Home Assistant Core and change the owner to the homeassistant account.

Next up is to create and change to a virtual environment for Home Assistant Core. This will be done as the homeassistant account.

Once you have activated the virtual environment (notice the prompt change to (homeassistant) [email protected]:/srv/homeassistant $ ) you will need to run the following command to install a required Python package.

Once you have installed the required Python package it is now time to install Home Assistant Core!

Start Home Assistant Core for the first time. This will complete the installation for you, automatically creating the .homeassistant configuration directory in the /home/homeassistant directory, and installing any basic dependencies.

You can now reach your installation via the web interface on http://homeassistant.local:8123 .

If this address doesn’t work you may also try http://localhost:8123 or http://X.X.X.X:8123 (replace X.X.X.X with your machines’ IP address).

Читайте также:  Battery bar для windows

When you run the hass command for the first time, it will download, install and cache the necessary libraries/dependencies. This procedure may take anywhere between 5 to 10 minutes. During that time, you may get “site cannot be reached” error when accessing the web interface. This will only happen for the first time, and subsequent restarts will be much faster.

Источник

One more thing…

Wow, what a birthday week it has been! We’ve had a new supervisor release, one of the largest and most user-driven core releases, thanks to the month of What The Heck?!. We even got RFID tags right into the heart of Home Assistant, but we’re not done yet! We have “One more thing…”

Introducing Home Assistant Companion for macOS

Home Assistant Companion is a new application for Mac to control your Home Assistant instance, exposing your Mac sensors to Home Assistant and to receive notifications.

Like many recent updates to the iOS app, we have @zacwest to thank for this. Zac has ported the iOS app over to Mac and added some great new features specifically for the Mac.

If you’re a Windows user, don’t worry, you can integrate your PC with the great IOT Link tool.

Home Assistant Companion running on a 16-inch Mac Book Pro

Trigger automations with your Mac

Home Assistant Companion for macOS adds several new binary sensors for your Mac, showing whether it is active and whether a particular microphone or webcam is in use.

Each camera and microphone has its own binary_sensor showing whether it is active or not. These can enable some really useful automations, especially for those home working at the moment. You could automatically turn off the radio when answering a call or close the blinds behind you to improve your video quality. To see just how useful this can be in the real world, check out this video of how our very own Frenck is using these sensors in his streaming set up.

The “active” sensor reports whether the Mac is being actively used. In other words that it is not sleeping, not showing a screensaver, not locked and not just sat idle. You can configure the “Time Until Idle” in one-minute steps from a minimum of 1 minute. You’ll find this option in the Sensors section of Preferences.

One huge advantage of running on a Mac compared to a mobile device is the much larger battery. This means we are not constrained by battery-saving measures and can address one of the most common gripes with the iOS app, update intervals. On a Mac, entity updates are immediately triggered when something changes. You will see this reported by the sensor.DEVICE_NAME_last_update_trigger reporting Signaled .

Home Assistant Widgets (Big Sur only)

Home Assistant Companion for macOS already supports widgets in Big Sur. Right now, we have an Actions Widget where you can have up to eight actions. You can also create multiple widgets with different sets of actions. If you have an idea for other widgets you’d like to see, pop over to the community forums and let us know.

The large Home Assistant Actions widget in Big Sur.

Interface

The Mac app is definitely a Mac app. The App Configuration page has been removed from Home Assistant’s sidebar. Instead, the configuration options and preferences are on the menu bar right where you’d expect to find them for any other app and all the standard shortcuts work too (like ⌘, for Preferences). You can even open multiple Lovelace windows via File > New.

You can have multiple Home Assistant Companion windows open.

In the menu bar, you will also find an option to manually send an update to Home Assistant and a new Actions menu where you can see all your actions and fire them.

Notifications

Just like the iOS app, you can send notifications to your Mac with services like notify.mobile_app_DEVICE_NAME . One small difference is that critical notifications are not yet available for the Mac app. However, all our other notifications features like actionable notifications work on the Mac app. To see what is possible, take a look at the docs.

Читайте также:  Как посмотреть список запущенных служб linux

Documentation and Support

We are updating the Companion App docs with details for the Mac app. You can also pop over to the Discord channel. If you find a bug or have an idea for a feature, please open up an issue on the GitHub repository.

Getting the beta

You can get the beta right now from the home-assistant/ios repository: download the home-assistant-mac.zip file from the latest release, unzip and drag it over to your Applications folder. Done!

That’s it. All that’s left is to wish Home Assistant Happy Birthday one last time and to wait and see what amazing developments the next year brings.

Источник

Installing Home Assistant On Mac OS X (The Complete Guide)

Frustrated trying to install Home Assistant on Mac OS X? Looking for a complete step-by-step installation guide that simplifies the process? Look no further!

It became apparent to me that a combination of the numerous installation methods and lack of complete information meant that the process of installing Home Assistant on Mac would be frustrating, even for those who are technically adept.

Prerequisite

You will of course need a Mac running its native OS X operating system. At the time of writing I am running Mojave so I would recommend that you have this as a minimum to avoid and issues.

You will also need to have Python 3 installed on your system, you can download and install it from the Python website.

If you are unsure, goto the applications > utilities folder and open the Terminal app. Then type the following command.

If the version 3.x.x is returned then you already have it. If not then simply download the installer and follow the installation instructions.

Why run Home Assistant On Mac?

Aside from wanting to have a play with Home Assistant on your local machine, why would you want to install Home Assistant on your Mac?

In general Home Assistant is meant to be a server-based application, meaning it runs on a remote computer hidden away in your home and is accessed remotely via a web browser or the companion app. The most common weapon of choice is to use a Raspberry Pi.

However there is one superb reason to install Home Assistant on Mac! I have had several old MacBook Pro’s lying around since forever, which do not have enough value to bother listing on eBay but that have too much sentimental value to dispose of.

If you have an old Mac that you wish to recycle, you can give it a second life as a Home Assistant server! A machine almost a decade old will still compete with the latest Raspberry Pi and can double up as a network hard drive.

This is exactly what I have done with an old 2009 MacBook Pro, now running headless in the TV cabinet as the “TekHouse” Home Assistant server!

What is Virtualenv?

What on earth is Virtualenv? To understand this we need to understand what Python is. Python is a programming language that can be used to develop apps for all different kinds of platforms.

There are many packages available that Python developers can use in their applications, which give various functionality without having to re-write the same code over and over again. These are stored globally in a directory called site-packages.

This can however cause a problem if different versions of the same package are required for different applications. In order to solve this problem, we can install a Python program and all of the necessary packages locally.

Our program can then use the correct local version of each package rather than referencing the global site-packages directory. The relevant Python program and all of the necessary packages are bundled together in one neat little package called a virtual environment.

Virtualenv is the tool required to create a virtual environment for a Python program. It is very easy to use and we will cover the installation and setup of our Home Assistant virtual environment step-by-step.

Читайте также:  Linux сколько памяти занимает процесс process

Install Virtualenv

First we need to goto the application > utilities folder and open up a Terminal window. Then simply type the following command to install Virtualenv.

All of the necessary files will be downloaded and Virtualenv will be installed automatically, nice and easy!

Create virtual environment

Next we need to create a virtual environment from which we wish to run Home Assistant. This exists simply as a folder on the hard drive so we can think of it as the installation directory.

First navigate to the location that you wish to install Home Assistant. I will use the Documents folder but you can choose a different location if you like. Go ahead and type the following command.

Now we can create the virtual environment. This will also create the folder where we will install Home Assistant. Go ahead and type the following command.

Once we have created the virtual environment, we need to activate it. This is done by simply entering the following command.

Install Home Assistant

Now that our virtual environment is setup and activated, we can install Home Assistant by typing the following command.

Pip will download and install all of the necessary files so perhaps go make a nice beverage while the script runs. Once complete we need to change to the directory containing the hass script so go ahead and type the following command.

Run Home Assistant from the terminal

If you wish to just run Home Assistant in the current terminal window, you can type the following command.

You will see the terminal spring into action, reporting a long list of information as it starts up. Note that you will not be returned to the command prompt whilst it runs as it is not running in the background.

If you want to stop Home Assistant and return to the command prompt, simply press ctrl + C.

Run Home Assistant as a system service

Alternatively if you would like Home Assistant to run in the background as a system service you can type the following command.

This will start Home Assistant in the background of your system and it will also setup your system to start Home Assistant on boot up. Note that it takes a minute or two for Home Assistant to work following a reboot.

Once you have run the script you will be presented with the following message and then returned to the command prompt.

Accessing Home Assistant

We are all done! Go ahead and enter the exit command into terminal and close the window. You can now navigate to Home Assistant in your browser by typing the following address.

If you want to access your Home Assistant from a remote browser, just use the local IP address of your machine instead. You can see your local IP address in the network utility, which you can find by typing it into Spotlight Search.

Conclusion

Home Assistant is a very versatile program and can be run on a variety of operating systems.

With a few simple commands and by making use of Virtualenv, we can easily install and run it on Mac OS, possibly saving a once-loved and aging Mac from the scrap heap!

Now that you have Home Assistant up and running, go ahead and check out one of my other awesome tutorials showing you some of the cool things that you can do with Home Assistant!

Источник

Оцените статью