Page 1 of 2

Ikea lamp does work work correctly

Posted: Monday 09 January 2023 16:06
by manjh
I am using three Ikea LED lamps, type TRADFRIbulbE14WScandleopal470lm.
Since a week ago an update to the Zigbee-for-Domoticz plugin was applied to support this lamp.

Switching on/off works OK, and so does changing the color temperature.
But dimming does not work: sometimes it does, but most of the times there is no change when I move the slider in Domoticz.

Edit: when playing a little with the devices and a group, I noticed that the dimmer works OK when the lamp is controlled from a group device!
Edit 2: I also noticed a difference between the two sliders. When I open the device I can see the circle for color adjestment, and the vertical sider to the right of that. This slider does not work correctly.
Byt when I use the slider on the device icon (so without opening the device), it seems to work OK!

Re: Ikea lamp does work work correctly

Posted: Monday 09 January 2023 16:11
by waltervl
What ZfD plugin version are you on (pipiche will need this info)?

Re: Ikea lamp does work work correctly

Posted: Monday 09 January 2023 16:17
by manjh
waltervl wrote: Monday 09 January 2023 16:11 What ZfD plugin version are you on (pipiche will need this info)?
Plugin version is Version 6.4.137.

I tried to update from the ZfD panel, but get an error:

Code: Select all

Upgrade the plugin to the most up to date version in the branch you are.
If the upgrade goes well, you will be asked to restart the plugin, otherwise you'll have to do the upgrade manually.

Starting Zigbee for Domoticz plugin Upgrade process.
----------------------------------------------------
(1) updating Zigbee for Domoticz plugin

Setup submodule.recurse

ERROR while running command 'git pull --recurse-submodules'.
Git Status:

Re: Ikea lamp does work work correctly

Posted: Monday 09 January 2023 16:39
by pipiche
If you have a different behaviour between Group command and "device" command, this could be linked to the Zigbee network itself.
Group is quiet often better because the coordinator is simply broadcasting the command to ALL devices able to receive messages ( routers), and only the device which belongs to the group will execute the command.

So in your case if you feel that the direct command are slower, this could be related to a not optimized Zigbee network.

Do you have Wifi 2.4 Ghz ? This could create some interferences to the Zigbee as they share the same frequency

https://github.com/zigbeefordomoticz/Do ... sions/1042 is a good source of information
https://github.com/zigbeefordomoticz/wi ... nd-Wifi.md (for the wifi co-exhistence)

Re: Ikea lamp does work work correctly

Posted: Monday 09 January 2023 16:42
by manjh
I am getting confused, as the sliders behave differently...
Tomorrow I will do some more structural testing.

Meanwhile, what is the best way to get the plugin up to date? I tried the admin function, but that threw an error...

Re: Ikea lamp does work work correctly

Posted: Monday 09 January 2023 16:49
by pipiche
you can go to the plugin home folder and do

Code: Select all

Tools/plugin-auto-upgrade.sh
If you have any errors, please let me know

Alternative is

Code: Select all

git pull --recurse-submodules
sudo python3 -m pip --no-input install -r requirements.txt
if you have access right which might be the case, as in some system Domoticz run under root you might have to do 'sudo' for all commands

Re: Ikea lamp does work work correctly

Posted: Monday 09 January 2023 23:15
by manjh
I tried the auto-upgrade, works without errors. Version is 6.4.139.
Then restarted Domoticz. But result is the same: slider on the device icon works OK, slider next to the color selector does not.

Re: Ikea lamp does work work correctly

Posted: Tuesday 10 January 2023 0:09
by waltervl
manjh wrote: Monday 09 January 2023 23:15 I tried the auto-upgrade, works without errors. Version is 6.4.139.
Then restarted Domoticz. But result is the same: slider on the device icon works OK, slider next to the color selector does not.
What slider does not work? Can you make a screenshot?

Re: Ikea lamp does work work correctly

Posted: Tuesday 10 January 2023 13:08
by manjh
I took two screenshots. The lamp is "lampje openhaard 1".
The slider that works OK is the one that is shown on the device icon.
this slider is on the device icon, works OK
this slider is on the device icon, works OK
2023-01-10.png (351.12 KiB) Viewed 1010 times


When I click on the device icon, a popup screen opens with the color selector, a vertical slider, and the on/off switches.
This slider does not work properly.
When I slide it up or down, I can see a slight reaction in the lamp. When I click on the slider path the lamp reacts better.
this is the slider that does not work
this is the slider that does not work
2023-01-10 (1).png (385.06 KiB) Viewed 1010 times
Also, when I set a timer on the device, the on/off function and the color selection works OK, but the level does not.

Re: Ikea lamp does work work correctly

Posted: Wednesday 11 January 2023 11:50
by pipiche
I never took much attention to the slider inside the Color widget, may be there is a different beaviour on the way Domoticz is sending the information to the plugin , may be it has changed .

I'll setup a test environment and check that

Didn't you set any parameter to get a smooth move of the level control ?
Screenshot 2023-01-11 at 11.56.46.png
Screenshot 2023-01-11 at 11.56.46.png (64.02 KiB) Viewed 990 times
You can eventually enable debugCommand ( in the debug parameters) this will increase the level of debug when doing commands from Domoticz, and you might check if they are different

Re: Ikea lamp does work work correctly

Posted: Wednesday 11 January 2023 12:05
by pipiche
Here is my analysis.

When you slide up or down and you don't release, it looks like Domoticz is sending a command event to the plugin which is them executing the corresponding command.
So if you are moving the slider slowly you'll execute a series of commands which then will be send to the bulb.
When clicking you'll send only once.

I didn't see any behaviour differences between the two level control sliders. They work well on my system Dz 2022.2 (build 14855)

the remaining thing, is if you have set the moveToLevel parameter to 200 for exemple, it will take 20 ms for the bulb to move from its current level to the requested one in a smooth transition.

I didn't see anything on the Group side either

Re: Ikea lamp does work work correctly

Posted: Thursday 12 January 2023 17:13
by manjh
Tried to upgrade just now, getting this on the console:

Code: Select all

sudo Tools/plugin-auto-upgrade.sh
Starting Zigbee for Domoticz plugin Upgrade process.
----------------------------------------------------
(1) updating Zigbee for Domoticz plugin

Setup submodule.recurse

Fetching submodule external/bellows
Fetching submodule external/zigpy
Fetching submodule external/zigpy-deconz
Fetching submodule external/zigpy-zigate
Fetching submodule external/zigpy-znp
Already up to date.
(2) update python3 modules if needed


Usage:
  /usr/bin/python3 -m pip <command> [options]

no such option: --ignore-requires-python
ERROR while running command 'sudo python3 -m pip --ignore-requires-python --no-input install -r requirements.txt'.
Is sudo available for this user without password ?

What did I do wrong?

Also, updating from the dashboard gives me an error. See earlier post.

Re: Ikea lamp does work work correctly

Posted: Thursday 12 January 2023 17:20
by manjh
pipiche wrote: Wednesday 11 January 2023 12:05 Here is my analysis.

When you slide up or down and you don't release, it looks like Domoticz is sending a command event to the plugin which is them executing the corresponding command.
So if you are moving the slider slowly you'll execute a series of commands which then will be send to the bulb.
When clicking you'll send only once.

I didn't see any behaviour differences between the two level control sliders. They work well on my system Dz 2022.2 (build 14855)

the remaining thing, is if you have set the moveToLevel parameter to 200 for exemple, it will take 20 ms for the bulb to move from its current level to the requested one in a smooth transition.

I didn't see anything on the Group side either
The two sliders behave differently. The one on the Domoticz device icon seems to work OK now. But the vertical slider after opening the icon does not.
But what worries me more, is the behaviour from timed events. Applying a timer on the device is not easy: color and on/off switching is no problem, setting the desired level does not work. I can set whatever I want, but when the time comes to auto-switch, it does not set the right level.
Same is true when switching from a scene.

Re: Ikea lamp does work work correctly

Posted: Friday 13 January 2023 8:23
by manjh
I tried setting the timed events using the percentage setting.
When the time comes to start the event, it switches the lamp on and to the right color, but not the level!

Re: Ikea lamp does work work correctly

Posted: Saturday 14 January 2023 12:58
by manjh
The slider within the color widget does not work OK, but I can live with that.
Problem that is really troubling me is the behaviour from timed events.
I set up a test case to check. Created 5 timer settings, starting at a specific time, and the next ones a minute later.
1. switch on, color warm, level 5%
2. switch on, color cool, level 30%
3. switch on, color warm, level 100%
4. switch on, color cool, level 5%
5. switch off

When the timed events ran, I concluded that switching on/off works, color selection works, but level does NOT work at all.

I will do a similar test using scenes,, will come back with results.

Re: Ikea lamp does work work correctly

Posted: Saturday 14 January 2023 13:07
by manjh
Created a scene, with two entries:
1. switch lamp on, warm, 5%
2. switch lamp on with 10 sec on-delay, cool, 100%

As I expected: switch on/off works OK, color selection works OK, level setting does not work at all.

Is there anything else that I can test in order to help find the root cause of this?

In the ZIgbee2MQTT plugins that I used before, this was never an issue.
But the Zigbee-for-Domoticz plugin has a much nicer user interface, and it handles the Zigbee PIR sensor. So I would rather stay with this.

Re: Ikea lamp does work work correctly

Posted: Saturday 14 January 2023 14:35
by pipiche
please provides your script.
plase describe as well the Domoticz version you are running, as I don't have such issues with Domoticz 2022.2

Re: Ikea lamp does work work correctly

Posted: Saturday 14 January 2023 19:40
by pipiche
manjh wrote: Monday 09 January 2023 16:17
waltervl wrote: Monday 09 January 2023 16:11 What ZfD plugin version are you on (pipiche will need this info)?
Plugin version is Version 6.4.137.

I tried to update from the ZfD panel, but get an error:

Code: Select all

Upgrade the plugin to the most up to date version in the branch you are.
If the upgrade goes well, you will be asked to restart the plugin, otherwise you'll have to do the upgrade manually.

Starting Zigbee for Domoticz plugin Upgrade process.
----------------------------------------------------
(1) updating Zigbee for Domoticz plugin

Setup submodule.recurse

ERROR while running command 'git pull --recurse-submodules'.
Git Status:
Are you using a shared filesystem ?

Re: Ikea lamp does work work correctly

Posted: Sunday 15 January 2023 9:24
by manjh
pipiche wrote: Saturday 14 January 2023 14:35 please provides your script.
plase describe as well the Domoticz version you are running, as I don't have such issues with Domoticz 2022.2
Domoticz:
Version: 2022.2
Build Hash: eea9db734
Compile Date: 2022-11-05 13:05:35
dzVents Version: 3.1.8
Python Version: 3.7.3 (default, Oct 31 2022, 14:04:00) [GCC 8.3.0]

The tests I did were not based on scripts, just timers set to a device, and scene.

Re: Ikea lamp does work work correctly

Posted: Sunday 15 January 2023 9:47
by manjh
Remark about the scripts gives me an idea: is it possible to fully control this type of device from a LUA script?
If so, then I could circumvent the problem by switching from LUA only...