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

Add support for Home Assistant lights #1014

Merged
merged 11 commits into from
Dec 14, 2024
Merged

Add support for Home Assistant lights #1014

merged 11 commits into from
Dec 14, 2024

Conversation

awawa-dev
Copy link
Owner

@awawa-dev awawa-dev commented Dec 10, 2024

Work is finished. Unique features for this implementation:

  • proper Web wizards including scanning of devices & lamps capabilities
  • Support for dynamic and constant brightness
  • Support for RGB and HSL model
  • Support for saving & restoring state of lamps

Implements #918

Home Assistant configuration

I assume you've already configured your lights in Home Assistant. The photo below shows Philips Hue lights connected via a ZigBee adapter.


If the lights work properly in Home Assistant, you need to create one more thing necessary to support them in HyperHDR: Long Lived Access Token.
You will find the required option in the Home Assistant user security settings as in the screenshot below.
You must copy it immediately when creating and save it.


HyperHDR configuration

Open HyperHDR and go to LED Hardware. Select "Home Assistant" from the tab and then click the button to launch the configuration wizard.


By clicking the Select Home Assistant button you can see the list of instances that HyperHDR has found and choose the one you are interested in. Then below you need to enter the Long Lived Access Token that you created earlier in Home Assistant. When finished click the Continue button.


On the next page HyperHDR will display all the supported lights it found in the Home Assistant instance. Now you can assign them a default position to the screen and intuit each of them (it will be turned off and on) so you can see which lamp you are configuring. You can always fix this configuration later in the LED layout editor. When you are done, save your changes.


Congratulations! That's all. In the options you can also:

  • choose between the RGB or HSL model. Each of them behaves slightly differently and it also depends on the lamp model how/whether it supports it or not

  • set transition time which will provide smoother color transitions at the expense of delay

  • by default brightness is dynamic and depends on the brightness of the selected color. However, you can change it and force it to be fixed

  • if you want HyperHDR to restore to the original state it found at startup when turned off, check the option: restore default state

@awawa-dev awawa-dev linked an issue Dec 10, 2024 that may be closed by this pull request
@awawa-dev awawa-dev merged commit f1e847f into master Dec 14, 2024
18 checks passed
@awawa-dev awawa-dev deleted the home_assistant_lights branch December 14, 2024 16:21
@satgit62
Copy link

satgit62 commented Dec 15, 2024

@awawa-dev Hello,

Have tested Home Assistant implementation. If you have only two lights under Home Assistant and use the wizard, everything is as it should be and user-friendly.
Since I operate several lamps under Home Assistant, all lamps are offered to me in Wizard, but there is no possibility (checkbox) to select only one or the other.

Home Assistant wizard

After I have determined and saved the position for my two lamps, I find myself in the Lamp(s) overview page again. Now all lamps from Wizard are also here.

Home Assistants Light (s)

I have removed the lamps that I don't want, but in the LED visualization and layout preview they appear as top lamps.

LED Visualization Layout

You can delete them one by one in the context menu under lamp layout, but I think it would be better if I could only select the lamps that I really need in the wizard.

Layout Lamp Delete

Ah yes, all lamps found by the Wizard are also switched on, even if only two lamps are actually used.

Otherwise, great work, and thank you for the implementation.

@awawa-dev
Copy link
Owner Author

Have you checked the delays in the logs? If HyperHDR is installed on another unit, then for each lamp each POST command takes about 20ms (if HyperHDR is installed on a unit with HA, then it would be a bit less). So if we have 10 lamps on one instance, then refreshing the instance would take 200ms :-/ You can try to get around this and put each of them on a separate instance, but then Home Assistance will probably freeze or get clogged anyway. Unfortunately, this HA API and the entire Zigbee/MQTT was not designed for streaming colors and the Philips Hue bridge with UDP still beats it hands down.

@satgit62
Copy link

@awawa-dev Hello,
In my first tests, I only dealt with the configuration and handling of the Home Assistant integration and reported on this and not on the lag.
Only now have I found time for a visual lag test, the group lights (left and right).
My test environment:
PicCap and HyperHDR on LG TV with root and a main instance of HyperSerialPico with 266 LEDs SK6812RGBW.
Home Assistant on Raspberry Pi 4 in the same network, with several RGB lamps.
With the two additionally selected left and right lamps in a separate instance, the delay is 44 to 56 ms, depending on the lamp type. Unfortunately, I don't have two identical lamps to be able to subjectively distinguish between the left and right selected lamps.
I also believe that if you can spread individual lamps across multiple instances, you will get better refresh times and cause less delay.
This was my experience with the Home Assistant integration in Hyperion.NG.
For those running HyperHDR and Home Assistant on the same device, for example on a Raspberry Pi, will probably have better refresh times and therefore less lag.
Nevertheless, there are still many users who do not have a real Ambilight with LED strips as an instance, but would like to use one or the other RGB lamp from Home Assistant.

When I switch off my first instance with HyperSerialPico on the SK6812RGBW and no real Ambilight is available as a comparison, the lamps defined as left and right under Home Assistant look very nice and the small lag no longer bothers you at all.
The fact that there is a delay here is well known and is tolerated by users.

2024-12-15T18:21:10.437Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (44 ms): [http://192.168.2.75:8123/api/services/light/turn_on] [{"brightness":136,"entity_id":"light.smoking","rgb_color":[131,137,135]}]
2024-12-15T18:21:10.437Z [LEDDEVICE] (ProviderRestApi.cpp:203) Reply OK [200]
2024-12-15T18:21:10.437Z [LEDDEVICE] (ProviderRestApi.cpp:174) POST begin: [http://192.168.2.75:8123/api/services/light/turn_on] [{"brightness":146,"entity_id":"light.hue_bloom_1","rgb_color":[143,146,153]}]
2024-12-15T18:21:10.493Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (56 ms): [http://192.168.2.75:8123/api/services/light/turn_on] [{"brightness":146,"entity_id":"light.hue_bloom_1","rgb_color":[143,146,153]}]
2024-12-15T18:21:10.493Z [LEDDEVICE] (ProviderRestApi.cpp:203) Reply OK [200]

Repository owner deleted a comment from satgit62 Dec 15, 2024
@awawa-dev
Copy link
Owner Author

Thank you @satgit62 very much for your tests and comments. I will try to take them into account in the near future. BTW if you have a delay of 40-50ms you can set the transition to 30-40ms then it should work a bit smoother.

@schwatter
Copy link

Any chance to get that working with z2m only?
Because i use Fhem and not HA.

@awawa-dev
Copy link
Owner Author

@schwatter In such a configuration, is z2m connected directly to the mqtt broker like mosquitto? Can you provide a link to an article that describes in detail the each step of configuring such a setup?

@satgit62
Copy link

@awawa-dev Hello,
A user has reported that his lamp (https://www.zigbee2mqtt.io/devices/14158804L.html), which is controlled in Home Assistant via zigbee2mqtt and previously worked in Hyperion.NG, is recognized by HyperHDR Wizard, but cannot be controlled. See log. Is there a way to fix this?

0x04cd15fffe8de6e9 is exactly the Zigbee lamp it wants to control.

Zigbee
Lamp

2024-12-19T14:09:37.331Z [LEDDEVICE] (ProviderRestApi.cpp:174) POST begin: [turn_on] [{"brightness":18,"entity_id":"0x04cd15fffe8de6e9","rgb_color":[83,0,0]}]2024-12-19T14:09:37.342Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (11 ms): [turn_on] [{"brightness":18,"entity_id":"0x04cd15fffe8de6e9","rgb_color":[83,0,0]}]2024-12-19T14:09:37.343Z [LEDDEVICE] Reply error. Reason: [400 Bad Request] - Check Request Body2024-12-19T14:09:37.343Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:380) Stopping refresh timer2024-12-19T14:09:37.343Z [LEDDEVICE1_HOME_ASSISTANT] Device 'home_assistant' is disabled due to an error: '[400 Bad Request] - Check Request Body'2024-12-19T14:09:37.343Z [COMPONENTCTRL1] LED device: disabled2024-12-19T14:09:42.276Z [LEDDEVICE1_HOME_ASSISTANT] The LED device is not ready... trying to reconnect (try 1/60).2024-12-19T14:09:42.276Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:63) Switch on2024-12-19T14:09:42.276Z [LEDDEVICE] (ProviderRestApi.cpp:174) POST begin: [turn_on] [{"entity_id":["0x04cd15fffe8de6e9"]}]2024-12-19T14:09:42.289Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (13 ms): [turn_on] [{"entity_id":["0x04cd15fffe8de6e9"]}]2024-12-19T14:09:42.289Z [LEDDEVICE] (ProviderRestApi.cpp:203) Reply OK [200]2024-12-19T14:09:42.290Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:391) Stopping retry timer2024-12-19T14:09:42.290Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:366) Starting timer with interval = 40ms2024-12-19T14:09:42.290Z [COMPONENTCTRL1] LED device: enabled2024-12-19T14:09:42.330Z [LEDDEVICE] (ProviderRestApi.cpp:174) POST begin: [turn_on] [{"brightness":18,"entity_id":"0x04cd15fffe8de6e9","rgb_color":[83,0,0]}]2024-12-19T14:09:42.342Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (11 ms): [turn_on] [{"brightness":18,"entity_id":"0x04cd15fffe8de6e9","rgb_color":[83,0,0]}]2024-12-19T14:09:42.342Z [LEDDEVICE] Reply error. Reason: [400 Bad Request] - Check Request Body2024-12-19T14:09:42.342Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:380) Stopping refresh timer2024-12-19T14:09:42.342Z [LEDDEVICE1_HOME_ASSISTANT] Device 'home_assistant' is disabled due to an error: '[400 Bad Request] - Check Request Body'

@awawa-dev
Copy link
Owner Author

awawa-dev commented Dec 20, 2024

@satgit62 There is no such entity on the first screen with name "0x04cd15fffe8de6e9". It is even in an unusual format, did the user manually edit the configuration later by the hand? typically it should be something with the light prefix, for example light.0x04cd15fffe8de6e9

@thueringer01
Copy link

@awawa-dev ,
I´m the user with the zigbee-lamps.
I'll show you the individual steps again here:
grafik
The right lamp iss: light.lampe_links_gr_fenster. In the wizzard I take it to "Left" The other both I delete.
There is now only 1 light in the configuration:
grafik
the LED-Layout show me this:
grafik
Manualy i correct it to "left"
No reaction of the light. What make I wrong?
thueri01

@awawa-dev
Copy link
Owner Author

Still it's unclear for me from where entity "0x04cd15fffe8de6e9" appeared in the logs. Did the lamp work before you started to edit its layout.

@thueringer01
Copy link

Unfortunately, none of the lamps worked, and there was no color change. Without adjusting the layout, it didn't work either. I then tried different layouts without success. I use a test file on the TV with RGB colors.

@awawa-dev
Copy link
Owner Author

awawa-dev commented Dec 20, 2024

Start the wizard again, do not edit them manually, then in the HyperHDR remote tab set a solid color for them. Save the full logs!

@awawa-dev
Copy link
Owner Author

awawa-dev commented Dec 20, 2024

Before that reset the HA lamp layout completely. Maybe it's broken after manually edition and providing not existing entity. To do that set LED driver to 'Debug', save it, refresh page F5 and set the HA lamps again.

@thueringer01
Copy link

I remove my Test_zigbee. Than refresh with F5. Make a new Instanz. The LED-Layout is clear. Start the wizzard. 3 Lamps recocnize. In the LED-Layout is only on the top marked. Colour manuell set. No rection.Lamp is still on another colour.
grafik
grafik
Log1 after F5:
2024-12-20T13:31:23.933Z [LEDDEVICE] (ProviderRestApi.cpp:174) POST begin: [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":183,"entity_id":"light.gruppe_licht_stube","rgb_color":[0,255,2]}] 2024-12-20T13:31:23.979Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (45 ms): [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":183,"entity_id":"light.gruppe_licht_stube","rgb_color":[0,255,2]}] 2024-12-20T13:31:23.979Z [LEDDEVICE] (ProviderRestApi.cpp:203) Reply OK [200] 2024-12-20T13:31:23.979Z [LEDDEVICE] (ProviderRestApi.cpp:174) POST begin: [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":183,"entity_id":"light.0x04cd15fffea26a11","rgb_color":[0,255,2]}] 2024-12-20T13:31:23.997Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (18 ms): [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":183,"entity_id":"light.0x04cd15fffea26a11","rgb_color":[0,255,2]}] 2024-12-20T13:31:23.997Z [LEDDEVICE] (ProviderRestApi.cpp:203) Reply OK [200] 2024-12-20T13:31:23.997Z [LEDDEVICE] (ProviderRestApi.cpp:174) POST begin: [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":183,"entity_id":"light.lampe_links_gr_fenster","rgb_color":[0,255,2]}] 2024-12-20T13:31:24.015Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (18 ms): [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":183,"entity_id":"light.lampe_links_gr_fenster","rgb_color":[0,255,2]}] 2024-12-20T13:31:24.015Z [LEDDEVICE] (ProviderRestApi.cpp:203) Reply OK [200] 2024-12-20T13:31:24.016Z [LEDDEVICE] (ProviderRestApi.cpp:174) POST begin: [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":183,"entity_id":"light.gruppe_licht_stube","rgb_color":[0,255,2]}] 2024-12-20T13:31:24.035Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (20 ms): [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":183,"entity_id":"light.gruppe_licht_stube","rgb_color":[0,255,2]}] 2024-12-20T13:31:24.035Z [LEDDEVICE] (ProviderRestApi.cpp:203) Reply OK [200]
Log after restart Hyperhdr (TV restart):
2024-12-20T13:40:14.298Z [CORE] TTY is not attached to the log output 2024-12-20T13:40:14.361Z [MAIN] Database path: '/home/root/.hyperhdr/db/hyperhdr.db', readonlyMode = disabled 2024-12-20T13:40:14.361Z [MAIN] Starting HyperHdr - 21.0.0.0beta1, master (GitHub-b488c0b/f1e847f-1734193311), built: Dec 14 2024:18:16:04 2024-12-20T13:40:14.361Z [MAIN] Set user data path to '/home/root/.hyperhdr' 2024-12-20T13:40:14.361Z [INSTANCE_CFG] Loading instance configuration 2024-12-20T13:40:14.368Z [DB] Database opened: /home/root/.hyperhdr/db/hyperhdr.db 2024-12-20T13:40:14.499Z [INSTANCE_CFG] Settings database initialized 2024-12-20T13:40:14.529Z [SOUND_GRABBER] Sound device is disabled 2024-12-20T13:40:14.560Z [DAEMON] The AVF grabber can not be instantiated, because it has been left out from the build 2024-12-20T13:40:14.560Z [DAEMON] The MF grabber can not be instantiated, because it has been left out from the build 2024-12-20T13:40:14.560Z [DAEMON] !The v4l2 grabber can not be instantiated, because it has been left out from the build 2024-12-20T13:40:14.595Z [DAEMON] The USB grabber was disabled during build. FlatbufferServer now controlls the HDR state. 2024-12-20T13:40:14.595Z [JSONSERVER] (JsonServer.cpp:26) Created new instance 2024-12-20T13:40:14.598Z [JSONSERVER] Started on port 19444 2024-12-20T13:40:14.600Z [SSDP] (SSDPHandler.cpp:31) SSDPHandler is initialized 2024-12-20T13:40:14.562Z [HYPERHDR0] Starting the instance 2024-12-20T13:40:14.562Z [INSTANCE_CFG0] Loading instance configuration 2024-12-20T13:40:14.562Z [DB] Database opened: /home/root/.hyperhdr/db/hyperhdr.db 2024-12-20T13:40:14.574Z [HYPERHDR1] Starting the instance 2024-12-20T13:40:14.749Z [INSTANCE_CFG0] Settings database initialized 2024-12-20T13:40:14.749Z [INSTANCE_CFG1] Loading instance configuration 2024-12-20T13:40:14.749Z [COMPONENTCTRL0] (ComponentController.cpp:27) ComponentController is initialized. Components are ENABLED 2024-12-20T13:40:14.749Z [DB] Database opened: /home/root/.hyperhdr/db/hyperhdr.db 2024-12-20T13:40:14.761Z [MUXER0] (Muxer.cpp:54) Muxer initialized 2024-12-20T13:40:14.761Z [BLACKBORDER] Set mode to: default 2024-12-20T13:40:14.762Z [COMPONENTCTRL0] Blackborder detector: enabled 2024-12-20T13:40:14.762Z [IMAGETOLED_MNG0] (ImageToLedManager.cpp:176) setSparseProcessing to 0 2024-12-20T13:40:14.762Z [IMAGETOLED_MNG0] (ImageToLedManager.cpp:103) ImageToLedManager initialized 2024-12-20T13:40:14.764Z [COLORSPACE_CALIBRATION0] classicMode: yes, gammas:[1.40, 1.40, 1.40], saturation: 1.80, luminance: 1.80, backLight: [enabled, threshold: 0, colored: no] 2024-12-20T13:40:14.764Z [LED_CALIBRATION0] (LedCalibration.cpp:101) Calibration config '0' for LED segment: [0, 246] 2024-12-20T13:40:14.772Z [HYPERHDR0] Led strip RGB order is: rgb 2024-12-20T13:40:14.773Z [SMOOTHING0] High resolution clock is NOT STEADY! 2024-12-20T13:40:14.774Z [SMOOTHING0] Creating config (0) => type: Alternative, pause: false, settlingTime: 150ms, interval: 40ms (25Hz), antiFlickTres: 0, antiFlickStep: 0, antiFlickTime: 0 2024-12-20T13:40:14.774Z [SMOOTHING0] Clearing queued colors before: disabling. Smoothing configuration changed: restarting timer. 2024-12-20T13:40:14.774Z [SMOOTHING0] Smoothing queue is cleared 2024-12-20T13:40:14.774Z [SMOOTHING0] Selecting config (0) => type: Alternative, pause: false, settlingTime: 150ms, interval: 40ms (25Hz), antiFlickTres: 0, antiFlickStep: 0, antiFlickTime: 0 2024-12-20T13:40:14.774Z [SMOOTHING0] Selecting config (0) => type: Alternative, pause: false, settlingTime: 150ms, interval: 40ms (25Hz), antiFlickTres: 0, antiFlickStep: 0, antiFlickTime: 0 2024-12-20T13:40:14.776Z [HYPER_MANAGER] HyperHDR instance 'LG_TV' has been started 2024-12-20T13:40:14.776Z [HYPERHDR0] The instance is running 2024-12-20T13:40:14.776Z [MUXER0] Register new input 'System/VIDEOGRABBER' with priority 240 as inactive 2024-12-20T13:40:14.776Z [COMPONENTCTRL0] Video capture device: enabled 2024-12-20T13:40:14.776Z [EFFECTENGINE0] Run effect "Rainbow swirl fast" on channel 254 2024-12-20T13:40:14.776Z [EFFECTENGINE0] (EffectEngine.cpp:92) Start the effect: name [Rainbow swirl fast] 2024-12-20T13:40:14.776Z [MUXER0] Register new input 'System/EFFECT' with priority 254 as inactive 2024-12-20T13:40:14.776Z [HYPERHDR0] Background effect: animation set to 'Rainbow swirl fast' [started] 2024-12-20T13:40:14.783Z [INSTANCE_CFG1] Settings database initialized 2024-12-20T13:40:14.783Z [COMPONENTCTRL1] (ComponentController.cpp:27) ComponentController is initialized. Components are ENABLED 2024-12-20T13:40:14.785Z [LEDDEVICE0_WLED] Start LedDevice 'wled'. 2024-12-20T13:40:14.785Z [LEDDEVICE0_WLED] (DriverNetWled.cpp:35) Initializing WLED 2024-12-20T13:40:14.785Z [LEDDEVICE0_WLED] (LedDevice.cpp:336) deviceConfig: [{"brightnessMax":true,"brightnessMaxLevel":255,"colorOrder":"rgb","currentLedCount":247,"host":"192.168.220.141","maxRetry":60,"refreshTime":0,"restoreOriginalState":false,"smoothingRefreshTime":0,"type":"wled"}] 2024-12-20T13:40:14.785Z [LEDDEVICE0_WLED] (LedDevice.cpp:432) Refresh interval updated to 0ms 2024-12-20T13:40:14.786Z [LEDDEVICE0_WLED] (DriverNetWled.cpp:44) DeviceType : wled 2024-12-20T13:40:14.786Z [LEDDEVICE0_WLED] (DriverNetWled.cpp:45) LedCount : 247 2024-12-20T13:40:14.786Z [LEDDEVICE0_WLED] (DriverNetWled.cpp:48) Override brightness : true 2024-12-20T13:40:14.786Z [LEDDEVICE0_WLED] (DriverNetWled.cpp:51) Set brightness level: 255 2024-12-20T13:40:14.786Z [LEDDEVICE0_WLED] (DriverNetWled.cpp:54) Restore WLED : false 2024-12-20T13:40:14.786Z [LEDDEVICE0_WLED] (DriverNetWled.cpp:57) Max retry : 60 2024-12-20T13:40:14.786Z [LEDDEVICE0_WLED] (DriverNetWled.cpp:95) 2024-12-20T13:40:14.786Z [LEDDEVICE0_WLED] (DriverNetWled.cpp:106) [1] 2024-12-20T13:40:14.786Z [LEDDEVICE0_WLED] (LedDevice.cpp:336) deviceConfig: [{"brightnessMax":true,"brightnessMaxLevel":255,"colorOrder":"rgb","currentLedCount":247,"host":"192.168.220.141","maxRetry":60,"port":21324,"refreshTime":0,"restoreOriginalState":false,"smoothingRefreshTime":0,"type":"wled"}] 2024-12-20T13:40:14.786Z [EFFECT0(Rainbo...)] Begin playing the effect with priority: 254 2024-12-20T13:40:14.787Z [MUXER1] (Muxer.cpp:54) Muxer initialized 2024-12-20T13:40:14.787Z [LEDDEVICE0_WLED] (LedDevice.cpp:432) Refresh interval updated to 0ms 2024-12-20T13:40:14.787Z [BLACKBORDER] Set mode to: default 2024-12-20T13:40:14.787Z [LEDDEVICE0_WLED] (ProviderUdp.cpp:64) Successfully parsed 192.168.220.141 as an IP-address. 2024-12-20T13:40:14.787Z [LEDDEVICE0_WLED] (ProviderUdp.cpp:94) UDP socket will write to 192.168.220.141:21324 2024-12-20T13:40:14.787Z [LEDDEVICE0_WLED] (DriverNetWled.cpp:84) Hostname/IP : 192.168.220.141 2024-12-20T13:40:14.787Z [LEDDEVICE0_WLED] (DriverNetWled.cpp:85) Port : 21324 2024-12-20T13:40:14.787Z [LEDDEVICE0_WLED] (DriverNetWled.cpp:89) [1] 2024-12-20T13:40:14.788Z [LEDDEVICE0_WLED] (LedDevice.cpp:246) Enable the device 2024-12-20T13:40:14.788Z [IMAGETOLED_MNG1] (ImageToLedManager.cpp:192) Set LED mapping type to advanced 2024-12-20T13:40:14.788Z [IMAGETOLED_MNG1] (ImageToLedManager.cpp:176) setSparseProcessing to 0 2024-12-20T13:40:14.788Z [IMAGETOLED_MNG1] (ImageToLedManager.cpp:103) ImageToLedManager initialized 2024-12-20T13:40:14.788Z [LEDDEVICE0_WLED] (LedDevice.cpp:63) Switch on 2024-12-20T13:40:14.788Z [LEDDEVICE0_WLED] (DriverNetWled.cpp:126) 2024-12-20T13:40:14.788Z [LEDDEVICE] (ProviderRestApi.cpp:174) GET begin: [http://192.168.220.141:80/json] [] 2024-12-20T13:40:14.789Z [COLORSPACE_CALIBRATION1] classicMode: no, gammas:[1.50, 1.50, 1.50], saturation: 1.00, luminance: 1.00, backLight: [enabled, threshold: 1, colored: yes] 2024-12-20T13:40:14.789Z [LED_CALIBRATION1] (LedCalibration.cpp:101) Calibration config '0' for LED segment: [0, 2] 2024-12-20T13:40:14.790Z [HYPERHDR1] Led strip RGB order is: rgb 2024-12-20T13:40:14.790Z [MUXER0] Priority 254 is now active 2024-12-20T13:40:14.790Z [MUXER0] Set visible priority to 254 2024-12-20T13:40:14.791Z [HYPERHDR0] New priority[254], previous [255] 2024-12-20T13:40:14.791Z [HYPERHDR0] New source available -> switch LED-Device on 2024-12-20T13:40:14.791Z [SMOOTHING0] Clearing queued colors before: enabling 2024-12-20T13:40:14.791Z [SMOOTHING0] Smoothing queue is cleared 2024-12-20T13:40:14.791Z [COLORSPACE_CALIBRATION0] (ColorSpaceCalibration.cpp:224) setBackLightEnabled: 0 2024-12-20T13:40:14.791Z [SMOOTHING1] High resolution clock is NOT STEADY! 2024-12-20T13:40:14.791Z [SMOOTHING1] Clearing queued colors before: enabling 2024-12-20T13:40:14.791Z [SMOOTHING1] Smoothing queue is cleared 2024-12-20T13:40:14.791Z [COMPONENTCTRL1] Smoothing: enabled 2024-12-20T13:40:14.791Z [SMOOTHING1] Creating config (0) => type: Alternative, pause: false, settlingTime: 150ms, interval: 20ms (50Hz), antiFlickTres: 32, antiFlickStep: 2, antiFlickTime: 250 2024-12-20T13:40:14.791Z [IMAGETOLED_MNG0] Total index number is: 496 (memory: 496). User sparse processing is: disabled, image size: 80 x 45, area number: 247 2024-12-20T13:40:14.791Z [SMOOTHING1] Clearing queued colors before: enabling. Smoothing configuration changed: restarting timer. 2024-12-20T13:40:14.792Z [SMOOTHING1] Smoothing queue is cleared 2024-12-20T13:40:14.792Z [SMOOTHING1] Selecting config (0) => type: Alternative, pause: false, settlingTime: 150ms, interval: 20ms (50Hz), antiFlickTres: 32, antiFlickStep: 2, antiFlickTime: 250 2024-12-20T13:40:14.792Z [SMOOTHING1] Selecting config (0) => type: Alternative, pause: false, settlingTime: 150ms, interval: 20ms (50Hz), antiFlickTres: 32, antiFlickStep: 2, antiFlickTime: 250 2024-12-20T13:40:14.793Z [LEDDEVICE1_HOME_ASSISTANT] Start LedDevice 'home_assistant'. 2024-12-20T13:40:14.793Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:336) deviceConfig: [{"colorOrder":"rgb","currentLedCount":3,"homeAssistantHost":"192.168.220.15:8123","lamps":[{"colorModel":"rgb","defaultPosition":"top","name":"light.gruppe_licht_stube"},{"colorModel":"rgb","defaultPosition":"top","name":"light.0x04cd15fffea26a11"},{"colorModel":"rgb","defaultPosition":"top","name":"light.lampe_links_gr_fenster"}],"longLivedAccessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhMzIxMmZlZGY5NGM0MDk2OTZiZTFkNDM4NGZjYWNlZCIsImlhdCI6MTczNDYxMTgzMSwiZXhwIjoyMDQ5OTcxODMxfQ.nM1P1ufigVuRYVbGvH6S-als_Xo2wcieEKRhcS_QC90","maxRetry":60,"refreshTime":0,"restoreOriginalState":false,"smoothingRefreshTime":20,"transition":0,"type":"home_assistant"}] 2024-12-20T13:40:14.793Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:422) Refresh rate = 50.00 Hz 2024-12-20T13:40:14.793Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:372) Device is not ready to start a timer 2024-12-20T13:40:14.794Z [HYPER_MANAGER] HyperHDR instance 'Test_zigbee' has been started 2024-12-20T13:40:14.795Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:432) Refresh interval updated to 20ms 2024-12-20T13:40:14.795Z [LEDDEVICE1_HOME_ASSISTANT] (DriverNetHomeAssistant.cpp:36) HomeAssistantHost : 192.168.220.15:8123 2024-12-20T13:40:14.795Z [LEDDEVICE1_HOME_ASSISTANT] (DriverNetHomeAssistant.cpp:37) RestoreOriginalState : no 2024-12-20T13:40:14.795Z [LEDDEVICE1_HOME_ASSISTANT] (DriverNetHomeAssistant.cpp:38) Transition (ms) : disabled 2024-12-20T13:40:14.795Z [LEDDEVICE1_HOME_ASSISTANT] (DriverNetHomeAssistant.cpp:39) ConstantBrightness : disabled 2024-12-20T13:40:14.795Z [LEDDEVICE1_HOME_ASSISTANT] (DriverNetHomeAssistant.cpp:40) Max retry : 60 2024-12-20T13:40:14.794Z [HYPERHDR1] The instance is running 2024-12-20T13:40:14.795Z [LEDDEVICE1_HOME_ASSISTANT] (DriverNetHomeAssistant.cpp:51) Configured lamp (RGB) : light.gruppe_licht_stube 2024-12-20T13:40:14.795Z [MUXER1] Register new input 'System/VIDEOGRABBER' with priority 240 as inactive 2024-12-20T13:40:14.795Z [LEDDEVICE1_HOME_ASSISTANT] (DriverNetHomeAssistant.cpp:51) Configured lamp (RGB) : light.0x04cd15fffea26a11 2024-12-20T13:40:14.795Z [COMPONENTCTRL1] Video capture device: enabled 2024-12-20T13:40:14.795Z [LEDDEVICE1_HOME_ASSISTANT] (DriverNetHomeAssistant.cpp:51) Configured lamp (RGB) : light.lampe_links_gr_fenster 2024-12-20T13:40:14.796Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:246) Enable the device 2024-12-20T13:40:14.796Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:63) Switch on 2024-12-20T13:40:14.796Z [WEBSERVER] Initialize Webserver 2024-12-20T13:40:14.796Z [LEDDEVICE] (ProviderRestApi.cpp:174) POST begin: [http://192.168.220.15:8123/api/services/light/turn_on] [{"entity_id":["light.gruppe_licht_stube","light.0x04cd15fffea26a11","light.lampe_links_gr_fenster"]}] 2024-12-20T13:40:14.806Z [FLATBUFSERVER] Tone mapping: 1 2024-12-20T13:40:14.806Z [FLATBUFSERVER] LUT file is not found here: /home/root/.hyperhdr/flat_lut_lin_tables.3d 2024-12-20T13:40:14.806Z [FLATBUFSERVER] LUT file is not found here: /media/developer/apps/usr/palm/services/org.webosbrew.hyperhdr.loader.service/hyperhdr/flat_lut_lin_tables.3d 2024-12-20T13:40:14.806Z [FLATBUFSERVER] LUT file is not found here: /home/root/.hyperhdr/lut_lin_tables.3d 2024-12-20T13:40:14.806Z [FLATBUFSERVER] (LutLoader.cpp:59) LUT file found: /media/developer/apps/usr/palm/services/org.webosbrew.hyperhdr.loader.service/hyperhdr/lut_lin_tables.3d 2024-12-20T13:40:14.806Z [FLATBUFSERVER] (LutLoader.cpp:79) Index 0 for HDR RGB 2024-12-20T13:40:14.832Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (36 ms): [http://192.168.220.15:8123/api/services/light/turn_on] [{"entity_id":["light.gruppe_licht_stube","light.0x04cd15fffea26a11","light.lampe_links_gr_fenster"]}] 2024-12-20T13:40:14.833Z [LEDDEVICE] (ProviderRestApi.cpp:203) Reply OK [200] 2024-12-20T13:40:14.833Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:366) Starting timer with interval = 20ms 2024-12-20T13:40:14.833Z [COMPONENTCTRL1] LED device: enabled 2024-12-20T13:40:14.833Z [SMOOTHING1] Using alternative smoothing input (0) 2024-12-20T13:40:14.834Z [EFFECTENGINE1] Run effect "Rainbow swirl fast" on channel 0 2024-12-20T13:40:14.834Z [EFFECTENGINE1] (EffectEngine.cpp:92) Start the effect: name [Rainbow swirl fast] 2024-12-20T13:40:14.834Z [MUXER1] Register new input 'System/EFFECT' with priority 0 as inactive 2024-12-20T13:40:14.834Z [HYPERHDR1] Boot effect: animation set to 'Rainbow swirl fast' [started] 2024-12-20T13:40:14.838Z [EFFECT1(Rainbo...)] Begin playing the effect with priority: 0 2024-12-20T13:40:14.847Z [MUXER1] Priority 0 is now active 2024-12-20T13:40:14.847Z [MUXER1] Set visible priority to 0 2024-12-20T13:40:14.847Z [SMOOTHING1] Clearing queued colors before: enabling. Smoothing configuration changed: restarting timer. 2024-12-20T13:40:14.848Z [SMOOTHING1] Smoothing queue is cleared 2024-12-20T13:40:14.848Z [SMOOTHING1] Selecting config (1) => type: Linear, pause: false, settlingTime: 200ms, interval: 40ms (25Hz), antiFlickTres: 0, antiFlickStep: 0, antiFlickTime: 0 2024-12-20T13:40:14.848Z [SMOOTHING1] Using linear smoothing input (1) 2024-12-20T13:40:14.848Z [HYPERHDR1] New priority[0], previous [255] 2024-12-20T13:40:14.848Z [HYPERHDR1] New source available -> switch LED-Device on 2024-12-20T13:40:14.848Z [SMOOTHING1] Clearing queued colors before: enabling 2024-12-20T13:40:14.848Z [SMOOTHING1] Smoothing queue is cleared 2024-12-20T13:40:14.848Z [COLORSPACE_CALIBRATION1] (ColorSpaceCalibration.cpp:224) setBackLightEnabled: 0 2024-12-20T13:40:14.848Z [IMAGETOLED_MNG1] Total index number is: 1512 (memory: 1512). User sparse processing is: disabled, image size: 80 x 45, area number: 3 2024-12-20T13:40:14.848Z [SMOOTHING1] Using linear smoothing input (1) 2024-12-20T13:40:14.848Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:380) Stopping refresh timer 2024-12-20T13:40:14.848Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:422) Refresh rate = 25.00 Hz 2024-12-20T13:40:14.848Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:366) Starting timer with interval = 40ms 2024-12-20T13:40:14.848Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:432) Refresh interval updated to 40ms 2024-12-20T13:40:14.848Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:447) LED refresh interval adjustment caused by smoothing configuration change to 40ms (proposed: 40ms) 2024-12-20T13:40:14.848Z [LEDDEVICE1_HOME_ASSISTANT] (LedDevice.cpp:246) Enable the device 2024-12-20T13:40:14.863Z [WEBSERVER] Apply Webserver settings 2024-12-20T13:40:14.863Z [WEBSERVER] Set document root to: :/www 2024-12-20T13:40:14.863Z [WEBSERVER] Started: 'HyperHDR WebServer (HTTP)' on port: 8090 2024-12-20T13:40:14.863Z [SSDP] (SSDPHandler.cpp:93) The local address is empty 2024-12-20T13:40:14.864Z [WEBSERVER] Initialize Webserver 2024-12-20T13:40:14.864Z [WEBSERVER] Apply Webserver settings 2024-12-20T13:40:14.864Z [WEBSERVER] Set document root to: :/www 2024-12-20T13:40:14.890Z [WEBSERVER] Setup SSL certificate 2024-12-20T13:40:14.890Z [WEBSERVER] Setup private SSL key 2024-12-20T13:40:14.890Z [WEBSERVER] Started: 'HyperHDR WebServer (HTTPS)' on port: 8092 2024-12-20T13:40:14.890Z [SSDP] (SSDPHandler.cpp:42) SSDPHandler is initializing 2024-12-20T13:40:14.891Z [SSDP] (SSDPHandler.cpp:196) The local address is: 192.168.220.120 2024-12-20T13:40:14.891Z [SSDP] (SSDPServer.cpp:94) Initialize the SSDP server 2024-12-20T13:40:14.898Z [SSDP] Starting the SSDP server 2024-12-20T13:40:14.929Z [SMOOTHING1] Using linear smoothing procedure (1) 2024-12-20T13:40:14.929Z [LEDDEVICE] (ProviderRestApi.cpp:174) POST begin: [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":118,"entity_id":"light.gruppe_licht_stube","rgb_color":[253,83,71]}] 2024-12-20T13:40:14.998Z [LEDDEVICE] (ProviderRestApi.cpp:198) GET end (210 ms): [http://192.168.220.141:80/json] [] 2024-12-20T13:40:14.998Z [LEDDEVICE] (ProviderRestApi.cpp:203) Reply OK [200] 2024-12-20T13:40:14.998Z [LEDDEVICE0_WLED] WLED info => wifi quality: 92%, wifi channel: 11, leds: 247, arch: esp8266, ver: 0.15.0, uptime: 9158s, port: 21324, power limit: 0mA 2024-12-20T13:40:14.998Z [LEDDEVICE] (ProviderRestApi.cpp:174) PUT begin: [http://192.168.220.141:80/json/state] [{"on":true,"live":true,"bri":255}] 2024-12-20T13:40:15.054Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (125 ms): [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":118,"entity_id":"light.gruppe_licht_stube","rgb_color":[253,83,71]}] 2024-12-20T13:40:15.054Z [LEDDEVICE] (ProviderRestApi.cpp:203) Reply OK [200] 2024-12-20T13:40:15.054Z [LEDDEVICE] (ProviderRestApi.cpp:174) POST begin: [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":118,"entity_id":"light.0x04cd15fffea26a11","rgb_color":[253,83,71]}] 2024-12-20T13:40:15.074Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (20 ms): [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":118,"entity_id":"light.0x04cd15fffea26a11","rgb_color":[253,83,71]}] 2024-12-20T13:40:15.074Z [LEDDEVICE] (ProviderRestApi.cpp:203) Reply OK [200] 2024-12-20T13:40:15.074Z [LEDDEVICE] (ProviderRestApi.cpp:174) POST begin: [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":118,"entity_id":"light.lampe_links_gr_fenster","rgb_color":[253,83,71]}] 2024-12-20T13:40:15.091Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (17 ms): [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":118,"entity_id":"light.lampe_links_gr_fenster","rgb_color":[253,83,71]}] 2024-12-20T13:40:15.091Z [LEDDEVICE] (ProviderRestApi.cpp:203) Reply OK [200] 2024-12-20T13:40:15.091Z [LEDDEVICE] (ProviderRestApi.cpp:174) POST begin: [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":125,"entity_id":"light.gruppe_licht_stube","rgb_color":[252,94,60]}] 2024-12-20T13:40:15.111Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (19 ms): [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":125,"entity_id":"light.gruppe_licht_stube","rgb_color":[252,94,60]}] 2024-12-20T13:40:15.111Z [LEDDEVICE] (ProviderRestApi.cpp:203) Reply OK [200] 2024-12-20T13:40:15.111Z [LEDDEVICE] (ProviderRestApi.cpp:174) POST begin: [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":125,"entity_id":"light.0x04cd15fffea26a11","rgb_color":[252,94,60]}] 2024-12-20T13:40:15.128Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (17 ms): [http://192.168.220.15:8123/api/services/light/turn_on] [{"brightness":125,"entity_id":"light.0x04cd15fffea26a11","rgb_color":[252,94,60]}] 2024-12-20T13:40:15.128Z [LEDDEVICE] (ProviderRestApi.cpp:203) Reply OK [200]

@thueringer01
Copy link

thueringer01 commented Dec 20, 2024

The lamps can be operated perfectly only via home automation. Thank you for your help!!

@satgit62
Copy link

@thueringer01

According to log [{’brightness":118, “entity_id”: “light.lampe_links_gr_fenster”, “rgb_color”:[253,83,71]}] 2024-12-20T13:40:15.091Z [LEDDEVICE] (ProviderRestApi.cpp:198) POST end (17 ms): [http://192.168.220.15:8123/api/services/light/turn_on] [{‘brightness’:118,‘entity_id’:‘light.lampe_links_gr_fenster’,‘rgb_color’:[253,83,71]}] 2024-12-20T13:40:15.091Z [LEDDEVICE] (ProviderRestApi. cpp:203) Reply OK [200] 2024-12-20T13:40:15.091Z [LEDDEVICE] (ProviderRestApi.cpp:174) POST begin: [http://192.168.220.15:8123/api/services/light/turn_on] the lamp is now addressed without errors.

Does it now light up as it should?

@thueringer01
Copy link

I'm taking a break for a few days now. I'll be in touch on December 27th or 28th. again. First of all, I wish you a Merry Christmas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Home Assistant Lights support
4 participants