docker-voltronic-homeassistant icon indicating copy to clipboard operation
docker-voltronic-homeassistant copied to clipboard

Hass.IO - Addon

Open raph2i opened this issue 4 years ago • 1 comments

Hey guys,

i've tried to create a hass.io-addon from this container. But we have to change a lot to achieve this.

Goal: open hass.io userbase to use this addon without need for a second host / supervised installation.

To-do:

  • Use hassio alpine base image (https://github.com/home-assistant/docker-base)
  • We would need to read in all configuration via bashio (https://developers.home-assistant.io/docs/add-ons/configuration/)
  • Find a possibility to mount /dev/hidrawX via hassio into the docker-container

raph2i avatar Dec 21 '20 19:12 raph2i

I was able to get this working by mainly just adding the following config file to the repo (although it did take me a couple weeks to figure out what needs to go in this file):

config.yaml

# Home Assistant addon configuration

name: "Voltronic"
description: "Monitor and control Voltronic based inverters from Home Assistant."
version: "1.0.0"
slug: "voltronic"
init: false
udev: true
devices:
  - /dev/hidraw0
  - /dev/hidraw1
  - /dev/hidraw2
arch:
  - aarch64
  - amd64
  - armhf
  - armv7
  - i386

I also had to rename Dockerfile.dev to Dockerfile since unfortunately it does not seem possible to specify a custom Dockerfile path for an addon.

So basically to summarize, the steps I took were as follows:

  1. Cloned the repo into the addons folder
  2. Added the above config file
  3. Renamed Dockerfile.dev to Dockerfile
  4. Configured inverter.conf and mqtt.json as per normal

The next step would probably be to make it possible configure mqtt and inverter options from the addon config page, but I have already spent too much time on this for now, maybe I will come back to it later.

bruceborrett avatar Jan 18 '23 07:01 bruceborrett