The Viam integration allows you to turn your smart home into a smart machine! Use images and data from your Home Assistant setup to train custom machine learning models that run on the device as part of your automation workflow.
In order to use this integration, you will need a Viam account and a device with viam-server
installed.
For authentication, you can use an organization API key and API key ID or machine API key and API key ID.
To use the classification and detection services, you will need a configured vision service for the integration.
This component will set up the following platforms.
Platform | Description |
---|---|
image_processing |
Create automations using images from cameras |
- Using the tool of choice open the directory (folder) for your HA configuration (where you find
configuration.yaml
). - If you do not have a
custom_components
directory (folder) there, you need to create it. - In the
custom_components
directory (folder) create a new folder calledviam
. - Download all the files from the
custom_components/viam/
directory (folder) in this repository. - Place the files you downloaded in the new directory (folder) you created.
- Restart Home Assistant
- In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Viam"
Using your HA configuration directory (folder) as a starting point you should now also have this:
custom_components/viam/translations/en.json
custom_components/viam/__init__.py
custom_components/viam/config_flow.py
custom_components/viam/const.py
custom_components/viam/icons.json
custom_components/viam/manager.py
custom_components/viam/manifest.json
custom_components/viam/services.py
custom_components/viam/services.yaml
custom_components/viam/strings.json
Send arbitrary tabular data to Viam to view and analyze.
Parameter | Description |
---|---|
config_entry |
Viam machine to associate with the service. |
values |
List of data objects to send to Viam. |
component_name |
Name of the sensor or other component to which the data is associated. |
component_type |
Type of the sensor or other component to which the data is associated. |
Send images to Viam for analytics and machine learning model training.
Parameter | Description |
---|---|
config_entry |
Viam machine to associate with the service. |
filepath |
Local file path to the image to be uploaded. |
camera |
The camera entity from which an image is captured. |
file_name |
The name of the file that will be displayed in the metadata within Viam. |
component_name |
Name of the sensor or other component to which the data is associated. |
Get a list of classifications from an image.
Parameter | Description |
---|---|
config_entry |
Viam machine to associate with the service. |
classifier_name |
Name of classifier vision service configured in Viam. |
confidence |
Threshold for filtering results returned by the service. |
count |
Number of classifications to return from the service. |
filepath |
Local file path to the image to be analyzed. |
camera |
The camera entity from which an image is captured and analyzed. |
Get a list of detected objects from an image.
Parameter | Description |
---|---|
config_entry |
Viam machine to associate with the service. |
detector_name |
Name of detection vision service configured in Viam. |
confidence |
Threshold for filtering results returned by the service. |
filepath |
Local file path to the image to be analyzed. |
camera |
The camera entity from which an image is captured and analyzed. |
If you want to contribute to this please read the Contribution guidelines
This project was generated from @oncleben31's Home Assistant Custom Component Cookiecutter template.
Code template was mainly taken from @Ludeeus's integration_blueprint template