Repository: Bestlibre Addons repository

I do not have a spotify account, so my testing will be limited. Your configuration looks good. To be able to call the service, you will need to add the media player to your home assistant configuration.

Thanks for the reply, hmm in case you wonder, you can get premium access to spotify for the first 30 days.
Yeah I have added mopidy as my music player, it works with my TTS, it is also playing file locally stored in my pi. I just cannot get Spotify to work :l

Hi bestlibre,

Just trying to config caddy-proxy v10.8, and am having trouble saving the config I enter.

If I change the default options to include my email and press enter, the config doesn’t save, and gives the following msg:
Missing option vhosts in root for dictionary value @ data[‘options’]. Got {‘homeassistant’: ‘homeassistant.mydomain.com’, ‘email’: ‘[email protected]’}

{
  "homeassistant": "homeassistant.mydomain.com",
  "email": "[email protected]"
}



If I provide more detail such as below, the error message keeps requesting more info "Missing option remote in vhosts for dictionary value @ data['options']" 

```{
  "homeassistant": "homeassistant.mydomain.com",
  "email": "[email protected]",
  "vhosts": [
    {
      "vhost": "homeassistant.mydomain.com",
      "port": "8123"
    }
  ]
}


Ultimately I want to configure multiple vhosts, but having trouble getting the basic config saved.
Any ideas appreciated

Some of my addons (at least caddy proxy and nginx proxy have been reported) doesn’t work anymore without full option definition. I will need to modify the config to specify the optional values which is needed since last hassio update.

I have the caddy proxy addon running fine with homeassistant. Using the vhost list to add an additional local server to proxy works fine. However when I try to proxy a local https unifi server, caddy proxy doesn’t work because the cert on the unifi server is invalid.

I tried adding the additional proxy using raw_config with “insecure_skip_verify” to tell caddy to ignore the certificate problem, but can’t work out the format. I tried the following value for raw_config:

"\nunifi.domain.tld {\n proxy / https://192.168.1.10:8443 {\n    transparent\n    websocket\n   insecure_skip_verify\n }\n    log stdout\n    errors stdout\n   }\n"

but get the error

/tmp/caddy.conf:13 - Error during parsing: Unexpected '}' because no matching opening brace

Any clues on how to format the raw_config string correctly?

Partially corrected version (maybe)

{
  "homeassistant": "homeassistant.mydomain.com",
  "email": "[email protected]",
  "vhosts": [
    {
      "vhost": "homeassistant.mydomain.com",
      "port": "8123"
      "remote":  "xxx.xxx.xxx.xxx"
    }
  ]
}

The error message indicates that the vhost section is missing the “remote” setting, which is the backend server ip or server address. “port” is the backend server port and vhost is the external name of the service being proxied.

You shouldn’t have “homeassistant.mydomain.com” both the “homeassistant” setting and the “vhosts” ->“vhost” section.The “homeassistant” setting will autogenerate a vhosts entry for the local home assistant instance, so it is intended to use the “homeassistant” setting for HA and vhosts for other services that you wish to proxy.

Disclaimer: I don’t understand the templating tools used to generate the caddy file, so this is a best guess based on a quick scan of the code in git.

The problem is (I think) due to the recent change in how hassio cope with optional settings. I will try to have a look at it today.

Thanks for the reply @wackydoo. I’ll definitely change my options, as I will also be looking to vhost my Unifi controller as well. The only difference between our setup is that I don’t have a cert for Unifi.

Will wait until @bestlibre releases his next candidate to test any changes.

@bestlibre FYI, I just plugged in another SD card with an older version of Hass.io (v54) and am receiving the same error message, when I try to save my basic two line config: Missing option vhosts in root for dictionary value @ data[‘options’]

Letting you know, hoping it may help you track down any changes

The problem is with the supervisor, not home assistant. I think that the problem was introduced in 0.71

Yes. Since 0.71 all options are required. You can tag optional options with a ? at the end of type.

-> homeassistant hostname will resolve allways to internal home-assistant instance.

To be clear, I also don’t have a valid cert for the backend unifi controller. For most people the cert will be some default cert which the browser will not recognize, unless they manually upload a valid cert. The problem is that caddy will also not connect to unifi as it also rejects the cert just like the browser does. From caddy logs (with “port”:“8443” and “remote”:“https://ip.address.of.unifi_controller”) I get:

[ERROR 502 /cgi-bin/luci] x509: certificate has expired or is not yet valid

I was just trying to add “insecure_skip_verify” using raw_config to override caddy’s cert check on the unifi controller. I figure this is safe since the caddy to backend connection is only an internal network and I am not expecting a MITM attack from the internal network.

I will probably have some time to look at the various problems this evening (it’s morning here).

It should work better.

Hi @bestlibre, just to confirm, the options are now saving for Caddy-proxy, without prompting for additional information. Thankyou for the addons + the fix(es).

The new update with some settings now optional is working fine for me too.

Does anyone get this warning in the supervisor logs?

WARNING (MainThread) [hassio.addons.data] Can't read /data/addons/git/53caca22/base_debian/config.json -> required key not provided @ data['boot']. Got None

The only addons I have installed are Caddy and the HA supported ssh addon.

Also, as per my earlier question, if any has a working raw_config example (e.g. to define a custom proxy host), it would be great if they could share it, because I couldn’t get anything working.

I get this warning, too

This a base image for my debian based addons, not really an addon. I don’t want it to appear in the list of addons. The warning will probably stay (it’s armless) until I find a better solution.

@wackydoo : I didn’t have any time to look at the raw config. I will check ASAP.

2 Likes

Thanks for us know. It’s never bothered me enough to investigate :wink:

Hi, I have installed influxDB from Bestlibre Addons repository version 0.1.4 however I cannot get http API working. I have tried calling curl for creation DB (curl -i -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE home_assistant" connection refused) .

Update: I was able to create database using Chronograf.
Update2: I was running curl on hassio ssh, however it did not work with localhost. When I changed it to proper IP it works fine.