(EDGE Driver-Mc): Zigbee Light Multifunction Mc

Hi,

Could you add this Ikea lamp (bulb) to this driver

Ikea Bulb LED2103G5

Manufacturer Code
IKEA of Sweden

Model
TRADFRI bulb E27 WW globe 806lm

Device Profile
switch-level

New version of Zigbee Light Multifunction Mc driver

  • At the request of @TapioX , the operation of the level change by external steps function has been modified:
    • Added a preference to choose the operating mode of this function: The description does not appears in App due to smartthings design for this enumeration type of preference
- name: "levelExtStepsMode"
    title: "External Level Steps Operation Mode"
    description: "External Level Steps Operation Mode. (Default: Change in +/- value step). The received value is increased or decreased in one step or varied at the rate of the received value for each second, until receiving value = 0 or reaching 0% or 100%"
    required: false
    preferenceType: enumeration
    definition:
      options:
        "Step": "Change in +/- value step"
        "Continuos": "Change in +/- value rate level"
      default: "Step"

  • Current operation: Increment and decrement in steps of +/- % level

  • New, Continuous increase or decrease of +/- % of the level at the rate per second specified in the capability value.

  • This continuous level movement stops when:

    • a 0% value is received in the capability
    • when level 100% is reached
    • Level 0% is reached and the bulb goes out.
  • For the continuous level movement to work at slow rates, the bulbs must have hardware with variable rate level motion and cheap bulbs, like the Tuya ones, do not have it and move at a fixed default rate of about 64 units/sec (2 or 3 sec 0% to 100%).

  • Tested with Osram classic and Ikea (Thanks to @TapioX) bulbs works well. The Tuya bulbs, which I have, move at a fixed rate of about +/- 64 units / sec ( +/- 33% / sec).

  • Tested with differents ikea buttons (Thanks to TapioX,) and fibaro Z-wave keyFob

  • 2 routines are required to use this function, one to start the level change and another to stop the level change.
    For example, I have tried it with a remote with a button held to send the rate value and start the level change and when the button is released, a value of 0 is sent and the level change stops.

  • At the request of @adamldavid and @Subramanian_Swaminat, two preferences have been added to set the start and end time of the Circadian function period. By default it is still from 6 am to 6 pm (6h to 18h).


  • At the request of @Beno951, a new custom capability has been added to establish Hue Color changes by external steps. Range is -75 to 75


  • I have only added the Continuous operating mode for the level capability since for Color Temperature and Hue the MoveColorTemperature and MoveHue commands are optional, according to the zigbee 3.0 documentation. In fact, the Tuya bulbs I have do not support it.

This diver version will be updated automatically in 12 hours maximum

Due to the latest changes in the platform in the management of Hub, app and other caches, it is possible that updating profiles will require deleting app cache or waiting a while for everything to work well, it is a shame, but it is what what’s up!!!

───────────────────────────────────────────────────
 Name         Zigbee Light Multifunction Mc
 Version      2024-03-23T17:29:41.003559791
───────────────────────────────────────────────────
4 Likes

@Mariano_Colmenarejo, Many thanks Marianno. So, am I right in saying that if I set the start of the circadian time to 6 AM and the end time as 10 PM, the colour temp will be 6500K (max my bulb can go to) at 6 AM and 2700K (min my bulb can go to) at 10PM?

No,
The circadian function adapts the color temperature and brightness according to the elevation of the sun:

  • At 6 am you will have the minimum color temperature and brightness chosen. (sunrise)

  • The maximum brightness and color temperature will be at 2 pm. ((start time + end time) / 2), ((6+22)/2)= 14 = 2 pm.
    In the standard circadian cycle it is at 12 am, (noon), On a standard 12-hour day (Equinox).

  • At 10 pm the brightness and color temperature will be the minimum (sunset), the same as at 6 am.

I used in tests Ikea Bulbs LED2103G5 and LED1836G9.

I tested this continuous level movement using Ikea Rodret Remote.
I used this driver

This driver supports also Held and Toggled Up on release functions. This made it easier to do routines.

Here are sample routines to use the continuous level movement:


and similar routines for -5% External Steps.

Remove from action auto-add Turn on.

I think this 10% was an suitable value for External Steps.

2 Likes

@Mariano_Colmenarejo Clear now thanks. Ideally, I want 6500K (cool white) at sunrise, 4000K (day white) around 2 pm circa and finally get to 2700K (warm white) on or after sunset. Is it possible to achieve this within the settings somehow?

You also mentioned, this is according to the elevation of the sun so is it based on the sun or the time I specify for circadian start and end?

That is amazing!! Great work!! I don’t have Zigbee lights to test it but continuous dimming as well as step dimming should be a default feature of any smart home platform.

Let’s go! I’m so glad it is useful.

The driver for RODRET, SOMRIG and STYRBAR can expose the release as Toggled Up (they also have auto-fire on held to repeat the Held action and use with the old step by step method but that was kind of a hack).

The SYMFONISK gen 2 however works differently, by default it sends lots of Held events each 400ms, so it would work better with the step by step approach. In recent firmware versions (1.0.35+) the dots can expose the release too though.

By the way @TapioX , if the Toggled Up action to β€œpause” the brightness change is the same for both buttons, it’s better to use the Toggled Up action of the Main component. Not only you’ll have one less automation, it is also more reliable :slightly_smiling_face:

1 Like

Yes
I noticed the same thing and I only did three Rules API rules.

1 Like

Sorry, this has nothing to do with circadian function.

This would require a different function.

1 Like

As I mentioned, circadian lighting is based on establishing the color temperature and brightness of the light equivalent to each moment of the day, from sunrise (minimum sun elevation) to midday (maximum sun elevation) to sunset (sun minimum elevation).

In the previous version, what is the correct for me to understand, the schedule was fixed to equivalent to a standard 12-hour day (equinox) and in which the location had the local time equivalent to sun noon being at 12 am. Total period 6 am to 6 pm
This is equivalent to the sun moving at rate 15ΒΊ/h from east to west, 180ΒΊ in 12 hours.

By allowing the start and end time to be customized, the 180ΒΊsun motion must be divided by the number of total hours, to simulate that the sunrise and sunset match with the hours that the user has chosen.

To do what you want to do you can use 3 routines and a virtual Timer of Second device:

what you want to do:

  • Start time: 6 am
  • Initial color temperature 6500k
  • End time: 10 pm
  • Final color temperature 2700k
  • Temperature Difference 6500 -2700 = 3800k
  • Total period: 10 p.m. - 6 p.m. = 16 h
  • Color temperature to decrease in steps of 5 minutes (300 sec): (3800k / (16h * 60min)) * 5 min = 19.79k rounding (20 k)
  1. You create a virtual Timer of Seconds device with Aplicaciones Virtuales Mc driver:
    • timer value: 300 sec
    • Timer type: Permanent value
    • Number of loops: 0 (infinite loops)

  1. You create a routine to start the timer at 6 am and set color temperature to 6500k

  1. You create a routine so that every time the 300 sec is up and the timer switch turns off, then it sends a step of -20k color temperature to the bulb

  1. You create a routine so that the timer goes off at 10:02 pm:

3 Likes

Many thanks @Mariano_Colmenarejo, looks like a solid solution to what I wanted to achieve.

You can skip routine 3, if you enter the number of loops needed in the timer.
16h x 60 min / 5 min = 192 loops

The timer will be stopped when reach 192 loops

1 Like

Not sure if I can set the color when the bulb is off as it will not be on for all of the time but let me give it a shot with the routines.

Yes, the color temperature in the bulb changes even if it is Off and when it is turned On it will do so with the color temperature it had at that time of day.

Turned off without removing power from the bulb!

I tested it before publishing it

1 Like

Thank you so much for doing this! -I wasn’t sure if you’d respond, let alone add the feature to edit the circadian timing!

I’m excited to try it out, but it looks even though my driver is reporting the update, it doesn’t have the new circadian setting. Is there an issue on my end that I can address to see the setting? Screenshots of my settings page attached.



Hi @adamldavid

Sorry for my error

Fixed in this driver version

Thanks for report

───────────────────────────────────────────────────
 Name         Zigbee Light Multifunction Mc            
 Version      2024-03-22T18:36:17.674212818        
───────────────────────────────────────────────────
1 Like

All working fine now @Mariano_Colmenarejo, thanks.

1 Like

@Mariano_Colmenarejo, Just noticed one more thing, I had to enable the circadian to set the colour but I want it to start at 100% so two things I noticed,

  1. Using the β€˜switch on Forced brightness’ setting - I can only set it to 99 and not 100 (as I get an error) but can live with this
  2. The bulb glows in circadian brightness to start with and then adjusts to the 99% brightness so it switches on and changed brightness every time. Can we make it appear in the set brightness straight away?

This capability is shared with some Zwave devices and is limited to 99%, the presentation show the range 0 to 100, but it is already corrected to show 0 to 99. It will be updated automatically over time or by clearing the app’s cache.

In any case, this capability is not designed for circadian function, for the minimum and maximum levels of circadian function they are adjusted in preferences. and On forced level = 0

@Mariano_Colmenarejo, This might be a dumb question but does the minimum and maximum levels denote brightness? If yes, what does min and max mean?