Skip to content

Error when trying to set up a Hue Dimmer Switch #1075

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

Open
TheFou opened this issue Mar 19, 2025 · 0 comments
Open

Error when trying to set up a Hue Dimmer Switch #1075

TheFou opened this issue Mar 19, 2025 · 0 comments

Comments

@TheFou
Copy link

TheFou commented Mar 19, 2025

Issue does not already exist?

I have searched and found no existing issue

Select Environment

Docker

Home Assistant related?

No

Description

When I try to set up a Hue Dimmer Switch (v1 or v2) through the official Hue App, I get the following error :
Couldn't save the configuration for your <device_name>
Plus, the app then stays freezed on this screen with the close button doing nothing, but I think this part is the app's fault.

I also tried to configure every button manually and save, but I also get an error message (Failed to edit the light).

Either way, it logs the same thing.

Errorlog:

2025-03-19 23:10:46,031 - flaskUI.v2restapi - 439 - INFO - {'type': 'behavior_instance', 'metadata': {'type': 'instance_metadata', 'name': '0x001788010e7746a8'}, 'script_id': '67d9395b-4403-42cc-b5f0-740b699d67c6', 'enabled': True, 'configuration': {'device': {'rtype': 'device', 'rid': 'c5bb9faf-5f99-4993-8340-09a4d4c5f078'}, 'buttons': {'fb2fb902-12aa-59d7-93ff-10b8a53dce60': {'where': [{'group': {'rtype': 'room', 'rid': 'b74831a0-816c-510c-9591-de4afee668b5'}}], 'on_short_release': {'time_based_extended': {'slots': [{'start_time': {'hour': 7, 'minute': 0}, 'actions': [{'action': {'recall': {'rtype': 'scene', 'rid': 'b663852c-eb82-435b-b752-06d94e0e7a86'}}}]}, {'start_time': {'hour': 10, 'minute': 0}, 'actions': [{'action': {'recall': {'rtype': 'scene', 'rid': '1d85425c-3c21-4a02-853a-44088cdc6242'}}}]}, {'start_time': {'hour': 17, 'minute': 0}, 'actions': [{'action': {'recall': {'rtype': 'scene', 'rid': '47c5b87b-39dc-4b5d-9148-ca08f8b060d2'}}}]}, {'start_time': {'hour': 20, 'minute': 0}, 'actions': [{'action': {'recall': {'rtype': 'scene', 'rid': '76ec0605-e20c-4be8-8b85-f419b4b43118'}}}]}, {'start_time': {'hour': 23, 'minute': 0}, 'actions': [{'action': {'recall': {'rtype': 'scene', 'rid': '8e2f34df-ece4-47c1-8846-4e3da119a242'}}}]}], 'repeat_timeout': {'seconds': 3}, 'with_off': {'enabled': True}}}, 'on_long_press': {'action': 'do_nothing'}}, '07ce1347-e992-552c-931b-9bcb394fa140': {'where': [{'group': {'rtype': 'room', 'rid': 'b74831a0-816c-510c-9591-de4afee668b5'}}], 'on_repeat': {'action': 'dim_up'}}, '2f220707-3088-5ccb-bec3-27a3a5b9f12d': {'where': [{'group': {'rtype': 'room', 'rid': 'b74831a0-816c-510c-9591-de4afee668b5'}}], 'on_repeat': {'action': 'dim_down'}}, '8c33192b-d0b1-5549-ab34-25e6fcc96ae0': {'where': [{'group': {'rtype': 'room', 'rid': 'b74831a0-816c-510c-9591-de4afee668b5'}}], 'on_short_release': {'scene_cycle_extended': {'with_off': {'enabled': False}, 'repeat_timeout': {'seconds': 3}, 'slots': [[{'action': {'recall': {'rtype': 'scene', 'rid': 'b663852c-eb82-435b-b752-06d94e0e7a86'}}}], [{'action': {'recall': {'rtype': 'scene', 'rid': '1d85425c-3c21-4a02-853a-44088cdc6242'}}}], [{'action': {'recall': {'rtype': 'scene', 'rid': '47c5b87b-39dc-4b5d-9148-ca08f8b060d2'}}}], [{'action': {'recall': {'rtype': 'scene', 'rid': '76ec0605-e20c-4be8-8b85-f419b4b43118'}}}], [{'action': {'recall': {'rtype': 'scene', 'rid': '8e2f34df-ece4-47c1-8846-4e3da119a242'}}}]]}}, 'on_long_press': {'action': 'do_nothing'}}}, 'model_id': 'RWL022'}}
[2025-03-19 23:10:46,032] ERROR in app: Exception on /clip/v2/resource/behavior_instance [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/usr/local/lib/python3.8/site-packages/flask_restful/__init__.py", line 467, in wrapper
    resp = resource(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask/views.py", line 84, in view
    return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask_restful/__init__.py", line 582, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/opt/hue-emulator/flaskUI/v2restapi.py", line 501, in post
    newObject = BehaviorInstance.BehaviorInstance(postDict)
  File "/opt/hue-emulator/HueObjects/BehaviorInstance.py", line 19, in __init__
    "data": [self.getV2Api()],
  File "/opt/hue-emulator/HueObjects/BehaviorInstance.py", line 51, in getV2Api
    for resource in self.configuration["where"]:
KeyError: 'where'
2025-03-19 23:10:46,033 - HueObjects.BehaviorInstance - 32 - INFO - 0x001788010e7746a8 behaviour instance was destroyed.
2025-03-19 23:10:46,033 - werkzeug - 225 - INFO - 192.168.10.35 - - [19/Mar/2025 23:10:46] "POST /clip/v2/resource/behavior_instance HTTP/1.1" 500 -

Steps to reproduce

Go to Settings / Devices / Switches / <device_name>
Click Reset / Reset
Check a room / Next
Error message.

OR

Go to Settings / Devices / Switches / <device_name>
For each button, Check a room
Click Save
Error message (Failed to edit the light)

Please enter your operating system details here

Hue-Emulator Version: 2025-03-15 14:15:43.000000000
WebUI Version: 2025-03-15 14:15:45.000000000
Architecture: x86_64
OS: Linux
Linux version: #1 SMP PREEMPT_DYNAMIC Mon Mar 17 11:16:31 UTC 2025
Linux release: 6.12.18-haos

Upload debug tar

N/A

What DiyHue version(branch) are you using?

master (latest)

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

1 participant