Skip to content

tomaae/homeassistant-portainer

Repository files navigation

Portainer integration for Home Assistant

GitHub release (latest by date) hacs_badge Project Stage GitHub all releases

GitHub commits since latest release GitHub commit activity GitHub Workflow Status

Help localize

English

Portainer Logo

Monitor and control Portainer from Home Assistant.

Features:

  • List Endpoints
  • List Containers

Features

Endpoints

List of portainer endpoint.

Endpoints

Containers

List of containers.

Containers

Install integration

This integration is distributed using HACS.

You can find it under "Integrations", named "Portainer"

Get portainer access token

  1. Login into your portainer instance
  2. Click you username at top right and select "My Account"
  3. Under "Access tokens", click "Add access token"
  4. Enter name for your access token (can be anything, for example "homeassistant")
  5. Copy displayed access token for use in integration setup

Setup integration

Setup this integration for your Portainer in Home Assistant via Configuration -> Integrations -> Add -> Portainer. You can add this integration several times for different portainer instances.

  • "Name of the integration" - Friendly name for this Portainer instance
  • "Host" - Use hostname or IP and port (example: 192.168.0.2:9000)
  • "Access token" - Use access token from previous step
  • "Use SSL" - Connect to portainer using SSL
  • "Verify SSL certificate" - Validate SSL certificate (must be trusted certificate)

Configuration

When setup is done, it is possilbe to cunfigure custom attibutes for each entry via Configuration -> Integrations -> Portainer -> Configure.

List of supported custom attibutes:

  • "Health check" - Checks if the container is running correctly by executing a defined command.
  • "Restart policy" - Defines how and when the container restarts after stopping.

Configuration

Development

Translation

To help out with the translation you need an account on Lokalise, the easiest way to get one is to click here then select "Log in with GitHub". After you have created your account click here to join Portainer project on Lokalise.

If you want to add translations for a language that is not listed please open a Feature request.

Enabling debug

To enable debug for Portainer integration, add following to your configuration.yaml:

logger:
  default: info
  logs:
    custom_components.portainer: debug