da-anda / hass-io-addons

19 stars 22 forks source link

custom_config issue #14

Closed zhujisheng closed 3 years ago

zhujisheng commented 3 years ago

When I use custom_config in configeration:

custom_config: |-
  [main]
  addr = 0.0.1
  client-addrs = 0.0.2:10
  connections = server,A.tcp,interface
  logfile = /dev/stdout

  [A.tcp]
  server = knxd_tcp

  [server]
  server = ets_router
  tunnel = tunnel
  router = router
  discover = true
  name = knxd

  [interface]
  driver = ncn5120
  ip-address = 192.168.1.3
  dest-port = 5120

the log is:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 2-init-config: executing... 
[09:34:09] INFO: Using custom configuration:
[09:34:09] INFO: [main]
addr = 0.0.1
client-addrs = 0.0.2:10
connections = server,A.tcp,interface
logfile = /dev/stdout
[A.tcp]
server = knxd_tcp
[server]
server = ets_router
tunnel = tunnel
router = router
discover = true
name = knxd
[interface]
driver = ncn5120
ip-address = 192.168.1.3
dest-port = 5120
[cont-init.d] 2-init-config: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
E00000084: [ 1:main] There is no KNX addr= in section 'main'.
F00000109: [ 1:main] Error setting up the KNX router.
E00000084: [ 1:main] There is no KNX addr= in section 'main'.
F00000109: [ 1:main] Error setting up the KNX router.

And in the docker container, the file /etc/knxd.ini has only one line:

bash-5.0# cat /etc/knxd.ini
[main] addr = 0.0.1 client-addrs = 0.0.2:10 connections = server,A.tcp,interface logfile = /dev/stdout [A.tcp] server = knxd_tcp [server] server = ets_router tunnel = tunnel router = router discover = true name = knxd [interface] driver = ncn5120 ip-address = 192.168.1.3 dest-port = 5120
da-anda commented 3 years ago

should be fixed in latest release. Thanks for reporting.

da-anda commented 3 years ago

once the visual editor in HA matures and the device selector can finally can also be optional (have a blank value) I can add settings for the ip-address and dest-port, so that you don't need to use a custom config anymore.

da-anda commented 3 years ago

if you want you can give my test branch a try. I added new drivers select options there which should cover your use case. Since you still need to select a device in the dropdown atm, just pick any, it will be ignored