Zigbee2MqttAssistant
Zigbee2MqttAssistant copied to clipboard
Support secrets.yaml
HA 0.99 brings support of secrets.yaml to addons. It appears this addons still doesn't support !secret to username and password of MQTT
This is a new feature and there's very little documentation about this. The configuration is in json but the secret is in yaml. I was under the impression it's automatic and there's nothing to do in the add-on to support it.
Did you try it?
HI, well I thought that the replacement should be automatic and addons don't need to change anything but i might be wrong - I tried exactly same configuration but manual credentials work and secrets don't; FYI other addons i have use same keys.
Tried on the latest release too.
Let me know if i can help in any way, maybe testing?
The !secret
is a yaml tag (https://yaml.org/spec/1.1/current.html#id858600). I don't know how it should be supported on JSON...
I am interested in this feature as well. 😇
Isn't it possible to do it like https://github.com/danielwelch/hassio-zigbee2mqtt/ is doing it since it is using JSON (for zigbee2mqtt) under the hood as well and needs to deal with a YAML config provided from HassIO? 🙈
Not sure if this helps... 🤔
To be honest, I really don't know how this feature is working.
From my point of view, there's nothing to do in Z2MA (or any other add-on) to use it, but I don't know how.
@carldebilly I have never developed a Hassio addon yet but did some research on this and found out that all repos / addons supporting secrets provide a config.json
, for example:
https://github.com/danielwelch/hassio-zigbee2mqtt/blob/master/zigbee2mqtt/config.json
This file seems to describe the possible entries in the config or is at least responsible for allowing a validation (schema
). Maybe this enables secrets?
Here is the official doc/tutorial from HA: https://developers.home-assistant.io/docs/en/hassio_addon_config.html#options--schema
This also seems to be a hint: https://github.com/hassio-addons/addon-ftp/pull/5
Hopefully, I am not completely wrong... 🙈😁?!
@CodeFinder2 It would be nice to try it :-). The config.json
(https://github.com/yllibed/hassio/blob/master/zigbee2mqttassistant-dev/config.json) is not providing any schema right now.
I'll give this a try and make a PR, if possible 😎
Edit: hopefully, I will have the time today in the eventing to take a look at this. 🙈
Heya! Just tried the same, any update on this? :)
I am still planning to take a look at this but the problem is that I am not used to. NET, Docker and the architecture / environment of this addon. (And yes, time is another thing...)
@carldebilly would you mind giving me a short overview of how I should start? 🙈 I mean a working dev environment would be sufficient for now, and an overview of how things work together, what are the relevant repos etc would even be more helpful. I am kind of experienced in C++ and Python but not in .NET although this shouldn't be much of a problem (just another programming language 😊). I have a dev machine running Ubuntu 18.04 and Windows 10 with VS 2019. What would be the simpliest/most efficient way to start? I was not able to find any 'meta info' on how to contribute (rgd. how things interact and what's important for you wrt. coding style, architecture design, etc.).
Z2MA is currently running on an Odroid XU4 but it's my daily driver for my (smart) home so I don't want to work with that for development. 😅
We can also talk about this via mail/Telegram, whatever fits your needs. 🙂
Hi, in this commit it was added to the Grafana add-on: https://github.com/hassio-addons/addon-grafana/commit/2848651a84acc1a21fc8dbab0ba6797198d3f36a
I thought that might be helpful
@cmitz thanks for that link. Unfortunately, it seems that this is not the correct way to do it anymore since those lines are not present in the current revision.
Hi, Any movement on this Topic?
Hi, Any movement on this Topic?
interested as well
still interested
Such a secret.yaml might also help in my issue: the documented docker Z2MA startup command line fails on my mqtt password since this contains special bash shell characters. I could not figure out how to escape these properly to make the command line work regardless of the actual password characters in use.
I'd be interested in a solution as well.