Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config-UI-X wipes out "users" portion of Homebridge-Hue settings when editing Hue settings using Config-UI-X #417

Closed
powneill opened this issue Nov 18, 2019 · 2 comments

Comments

@powneill
Copy link

Describe The Bug:
When using the Config-UI-X UI for editing Homebridge-Hue plugin settings, Config-ui-X wipes out any Homebridge-Hue "users" data.
To Reproduce:
Starting out with a config.json that contains "users" data, Within Config-UI-X UI, click Plug-ins, then click Settings under Homebridge Hue, make any simple change, and click Save. Now view config.json - all settings/data for Hue "users" is gone.. Upon restart of Homebridge, you have to either manually re-enter "users" data, or click the button on all Hue bridges to generate a new user and enter that.

Expected behavior:
Config-UI-X should not remove or corrupt Homebridge-Hue "users" data
Logs:
No error data is written to the log the I can see

Show the Homebridge / Homebridge Config UI X logs here.

Homebridge Config:
Below are before and after versions of my config.json. The only change I made was to exclude "Built In Daylight Sensor"

Before:
{
"bridge": {
"name": "Homebridge",
"username": "CC:12:3D:69:CE:30",
"port": 45559,
"pin": "031-45-169"
},
"description": "Bitchin",
"platforms": [
{
"platform": "BigAssFans",
"name": "Big Ass Fan",
"fan_count": 1
},
{
"platform": "cmdSwitch2",
"name": "CMD Switch",
"switches": [
{
"name": "PiHole1",
"on_cmd": "curl -X GET 'http://an.ip.address/admin/api.php?enable'",
"off_cmd": "curl -X GET 'http://an.ip.address/admin/api.php?disable=3600&auth='",
"state_cmd": "curl -s GET 'http://an.ip.address/admin/api.php?status' | grep -ci 'enabled'"
}
]
},
{
"name": "Hue",
"excludeSensorTypes": [
"Geofence",
"CLIP"
],
"hosts": [
"anipadrdess",
"anipaddress"
],
"users": {
"001788FFFEB21483": "YfIj7qMY2JazJtWT9z7Dopak6pyPiBZxv4oGDAm2",
"00212EFFFF0404CB": "F691CC19AC"
},
"lights": true,
"nativeHomeKitLights": true,
"nativeHomeKitSensors": true,
"nupnp": true,
"parallelRequests": 10,
"resource": true,
"sensors": true,
"platform": "Hue"
},
{
"platform": "config",
"name": "Config",
"port": 8080,
"restart": "sudo -n systemctl restart homebridge",
"sudo": true,
"log": {
"method": "systemd",
"service": "homebridge"
}
}
],
"accessories": [
{
"accessory": "PiTemperature",
"name": "Raspberry PI Temperature"
},
{
"accessory": "UniFi Occupancy Sensor",
"name": "Ozone Occupancy Sensor",
"unifi": {
"controller": "https://an.ip.address",
"username": "ausername",
"password": "apassword",
"site": "default",
"secure": false
},
"watch": [
"amacaddress"
],
"watchGuests": false,
"mode": "any"
},
{
"accessory": "webostv",
"name": "MBR TV",
"ip": "an.ip.address",
"mac": "amacaddress",
"keyFile": "/var/homebridge/lgtvmbrKeyFile",
"pollingInterval": 5,
"volumeControl": true,
"mediaControl": true,
"inputs": [
{
"appId": "com.webos.app.livetv",
"name": "Live TV"
},
{
"appId": "com.webos.app.hdmi3",
"name": "AppleTV"
}
]
},
{
"accessory": "webostv",
"name": "LR TV",
"ip": "an.ip.address",
"mac": "amacaddress",
"keyFile": "/var/homebridge//lgtvlrKeyFile",
"pollingInterval": 5,
"volumeControl": true,
"mediaControl": true,
"inputs": [
{
"appId": "com.webos.app.livetv",
"name": "Live TV"
},
{
"appId": "com.webos.app.hdmi3",
"name": "AppleTV"
}
]
}
]
}

After:

{
"bridge": {
"name": "Homebridge",
"username": "CC:12:3D:69:CE:30",
"port": 45559,
"pin": "031-45-169"
},
"description": "Bitchin",
"platforms": [
{
"platform": "BigAssFans",
"name": "Big Ass Fan",
"fan_count": 1
},
{
"platform": "cmdSwitch2",
"name": "CMD Switch",
"switches": [
{
"name": "PiHole1",
"on_cmd": "curl -X GET 'http://anipaddress/admin/api.php?enable'",
"off_cmd": "curl -X GET 'http://anipaddress/admin/api.php?disable=3600&auth='",
"state_cmd": "curl -s GET 'http://anipadrdess/admin/api.php?status' | grep -ci 'enabled'"
}
]
},
{
"name": "Hue",
"excludeSensorTypes": [
"Daylight",
"Geofence",
"CLIP"
],
"hosts": [
"anipaddress",
"anipaddress"
],
"lights": true,
"nativeHomeKitLights": true,
"nativeHomeKitSensors": true,
"nupnp": true,
"parallelRequests": 10,
"resource": true,
"sensors": true,
"platform": "Hue"
},
{
"platform": "config",
"name": "Config",
"port": 8080,
"restart": "sudo -n systemctl restart homebridge",
"sudo": true,
"log": {
"method": "systemd",
"service": "homebridge"
}
}
],
"accessories": [
{
"accessory": "PiTemperature",
"name": "Raspberry PI Temperature"
},
{
"accessory": "UniFi Occupancy Sensor",
"name": "Ozone Occupancy Sensor",
"unifi": {
"controller": "https://anipaddress:8443",
"username": "ausername",
"password": "apassword",
"site": "default",
"secure": false
},
"watch": [
"amacaddress"
],
"watchGuests": false,
"mode": "any"
},
{
"accessory": "webostv",
"name": "MBR TV",
"ip": "anipaddress",
"mac": "amacaddress",
"keyFile": "/var/homebridge/lgtvmbrKeyFile",
"pollingInterval": 5,
"volumeControl": true,
"mediaControl": true,
"inputs": [
{
"appId": "com.webos.app.livetv",
"name": "Live TV"
},
{
"appId": "com.webos.app.hdmi3",
"name": "AppleTV"
}
]
},
{
"accessory": "webostv",
"name": "LR TV",
"ip": "anipaddress",
"mac": "amacaddress",
"keyFile": "/var/homebridge//lgtvlrKeyFile",
"pollingInterval": 5,
"volumeControl": true,
"mediaControl": true,
"inputs": [
{
"appId": "com.webos.app.livetv",
"name": "Live TV"
},
{
"appId": "com.webos.app.hdmi3",
"name": "AppleTV"
}
]
}
]
}

Screenshots:

Environment:

  • Node.js Version: 10.16.3
  • NPM Version: 6.11..3
  • Homebridge Version: 0.4.50
  • Homebridge Config UI X Version: 4.6.3
  • Operating System: Raspbian
  • Process Supervisor: Systemd
@powneill powneill added the bug label Nov 18, 2019
@oznu
Copy link
Member

oznu commented Nov 18, 2019

"User-Defined Keys", are not possible via the UI form generator as the underlying libraries do not support this.

https://github.com/oznu/homebridge-config-ui-x/wiki/Developers:-Plugin-Settings-GUI#user-defined-keys

@stale
Copy link

stale bot commented Dec 18, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 18, 2019
@stale stale bot closed this as completed Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants