Skip to content

This repo provides a custom component which will allow HomeAssistant to pull down components from Viam and make use of them

Notifications You must be signed in to change notification settings

biotinker/viam-homeassistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

Viam Home Assistant Integration

hacs ![maintainer][maintenance-shield]

This component requires HA Core version 2021.6.0 or greater!

This is a Custom Integration for Home Assistant.It uses the Viam Python SDK to control and monitor your robots with Home Assistant.

There currently is support for Cover and Sensor device type within Home Assistant.

Currently supported features

Currently this component will connect to a robot that has some number of motors or sensors configured.

For motors: it will attempt to create a cover from each one. Continuously running motors (fans) are not yet supported.

For sensors: it will create one Homeassistant sensor per sensor. Sensor readings are stored in that sensor's attributes. In order to create a sensor for an individual value from your sensor readings, you must create a template sensor in your sensors.yaml and generate your own unique id. Example follows:

- platform: template
  sensors:
    feed_scale:
      friendly_name: Chicken Feed Scale
      unit_of_measurement: "kg"
      unique_id: this_must_be_unique
      value_template: '{{ states.sensor.feedscale.attributes.mass_kg }}'

This is an unofficial integration and is not officially supported by Viam, Inc (but I try to keep it up to date)

Installation

Note: Home Assistant OS runs on Alpine Linux, which is based on musl as a replacement for libc. This means that python packages which include pre-compiled code (such as the Viam SDK) must be compiled specifically for musl. Unfortunately, due to limitations with github actions, it's currently very difficult to set up automated creation of musl builds for the aarch64 architecture. For this reason, musl is limited to x86_64 only for now.

If you do not use Homeassistant OS and instead run Homeassistant standalone on a more mainstream Linux distribution, aarch64 should work fine for you.

From HACS

  1. Install HACS if you haven't already (see installation guide).
  2. Add custom repository https://github.com/biotinker/viam-homeassistant as "Integration" in the settings tab of HACS.
  3. Find and install "Viam" intergration in HACS's "Integrations" tab.
  4. Restart your Home Assistant.
  5. Add "Viam" integration in Home Assistant's "Configuration -> Integrations" tab.

Manual

  1. Download and unzip the repo archive. (You could also click "Download ZIP" after pressing the green button in the repo, alternatively, you could clone the repo from SSH add-on).
  2. Copy contents of the archive/repo into your /config directory.
  3. Restart your Home Assistant.
  4. Add "Viam" integration in Home Assistant's "Configuration -> Integrations" tab.

Configuration

You will need the Viam payload and address information. You can your information from the Connect tab of the Viam App for each robot you’d like to track and control in Home Assistant.

The cover provides the following attributes:

  • close
  • open
  • stop

About

This repo provides a custom component which will allow HomeAssistant to pull down components from Viam and make use of them

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages