diyhue / diyHue

Main diyHue software repo
https://diyhue.org/
Other
1.52k stars 274 forks source link

DIYHue overwrites gateway in config file #943

Closed sosheskaz closed 4 months ago

sosheskaz commented 8 months ago

Issue does not already exist?

I have searched and found no existing issue

Select Environment

Docker

Home Assistant related?

No

Description

When starting up, diyhue overwites any previous entries to gateway in config.yml, replacing it with a default.

Based on behavior, I suspect it is defaulting to the first (zero-indexed) IP address in the /24 subnet of the host IP.

This prevents configuration of a non-default gateway.

Errorlog:

N/A not an error.

Steps to reproduce

Install as a home assistant container via Hassio.

  1. Read config file. Note gateway value.
  2. Change value of gateway. Note value.
  3. Restart diyhue.
  4. Read config file again. Note gateway value. It is now the same value as step 1.

Please enter your operating system details here

HAOS. Linux 6.1.56 x86_64

What DiyHue version(branch) are you using?

master (latest)

sosheskaz commented 8 months ago

https://github.com/diyhue/diyHue/blob/8666478a2c64cc1791119782ca915047c92f0558/BridgeEmulator/configManager/configInit.py#L14

Yeah, not a reliable way to configure gateway

sosheskaz commented 8 months ago

I believe this is causing linking to fail for me, due to the configured network settings being incorrect.

cibrenvenuti commented 7 months ago

Same issue here