Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

[beta SCENE] - RGB Strip Dawn Simulator


AutoFrank
 Share

Question

Hi,

I've been looking to find a way to mimic a dawn awakening using a RGB strip driven by a fibaro RGB module

@petergebruers provided some RBG / HSL translation and I've been working on the colour sequence that is stored in an array

It's essentially burnt orange -> yellow -> blue'ish -> almost white

 

There area few of the transitions I am not 100% happy with but I was looking for a few people to test what I have done to date and see if I am on the right path

The scene has a sleep of 1 second but in reality I'd probably have it close to 10 or 15 which would give an overall start to finish time of -10 minutes to aid a gradual wakeup

 

Comment out line 7 if you don't use a HomeTable

Line 61 contains the reference to the RGB strip, amend as required.

 

@andyp - You expressed an interest in this before

 

All feedback welcome - Feel free to tweak the colors or just pass back comments

 

Thanks

-f

 

Please login or register to see this code.

 

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

Hello @AutoFrank,

 

I just tested your dawn simulator, the script stops at:

Please login or register to see this code.

I thought that is was because i have an RGBW setup but when i configure the controller to RGB it also stop at the same part.

Link to comment
Share on other sites

  • 0
  • Inquirer
  • 40 minutes ago, D-Byte said:

    Hello @AutoFrank,

     

    I just tested your dawn simulator, the script stops at:

    Please login or register to see this code.

    I thought that is was because i have an RGBW setup but when i configure the controller to RGB it also stop at the same part.

     

    Thanks @D-Byte

    I'm sure mine runs to the end

    I'll recheck and also share the spec of the RGB strip I'm using...

     

    -f

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 5 minutes ago, TRicky said:

    I'll gonna try this scene in the coming day's.

    I'll let you know the results.

     

    Thanks @TRicky

    Link to comment
    Share on other sites

    • 0

    @AutoFrank thanks this is exactly what I want to get working, my rgb lights though started at an orange colourish, but green by step 7 and ending up at a bluey white but also stopped at 022.2  022.4 022.7

     

    I'm using a fibaro RGB and only using the RGB channels (white is not used) on a generic led strip.

    Edited by mobbie
    described colours in more detail
    Link to comment
    Share on other sites

    • 0

    Hi @AutoFrank,

     

    Just ran the scene and here are the results:

    B.t.w. I noticed a sudden change from green to blue, not very fluent.

    I also use an RGB strip and not a RGBW.

     

     [DEBUG] 10:31:25: R 63.75 G 63.75 B 63.75
    [DEBUG] 10:31:25: R 127.5 G 127.5 B 127.5
    [DEBUG] 10:31:25: R G B
    [DEBUG] 10:31:25: 000.0 000.0 000.0
    [DEBUG] 10:31:26: 005.1 001.7 001.0
    [DEBUG] 10:31:27: 005.6 002.1 001.1
    [DEBUG] 10:31:28: 006.0 002.9 001.1
    [DEBUG] 10:31:29: 006.5 003.7 001.1
    [DEBUG] 10:31:30: 007.0 004.3 001.2
    [DEBUG] 10:31:31: 007.5 005.0 001.2
    [DEBUG] 10:31:32: 008.0 006.1 001.1
    [DEBUG] 10:31:33: 008.6 006.9 001.1
    [DEBUG] 10:31:34: 009.1 008.3 001.1
    [DEBUG] 10:31:35: 009.0 010.3 001.0
    [DEBUG] 10:31:36: 008.8 010.8 000.9
    [DEBUG] 10:31:37: 008.6 011.4 000.9
    [DEBUG] 10:31:38: 007.7 011.0 000.8
    [DEBUG] 10:31:39: 008.0 012.5 000.7
    [DEBUG] 10:31:40: 007.1 013.6 000.6
    [DEBUG] 10:31:41: 000.8 016.0 007.8
    [DEBUG] 10:31:42: 001.0 016.3 008.1
    [DEBUG] 10:31:43: 001.2 016.6 008.3
    [DEBUG] 10:31:44: 001.4 017.0 009.5
    [DEBUG] 10:31:45: 001.6 017.3 010.7
    [DEBUG] 10:31:46: 001.8 017.5 011.9
    [DEBUG] 10:31:47: 002.0 017.3 011.8
    [DEBUG] 10:31:48: 002.2 018.2 012.4
    [DEBUG] 10:31:49: 002.4 018.5 013.7
    [DEBUG] 10:31:50: 002.7 018.7 013.9
    [DEBUG] 10:31:51: 003.0 019.0 013.2
    [DEBUG] 10:31:52: 003.1 019.3 015.4
    [DEBUG] 10:31:53: 003.4 019.5 015.7
    [DEBUG] 10:31:54: 003.6 019.8 016.9
    [DEBUG] 10:31:55: 004.0 020.0 017.1
    [DEBUG] 10:31:56: 004.2 020.3 018.4
    [DEBUG] 10:31:57: 004.6 020.4 019.4
    [DEBUG] 10:31:58: 005.0 020.5 020.5
    [DEBUG] 10:31:59: 005.5 019.6 020.5
    [DEBUG] 10:32:00: 005.8 018.9 020.7
    [DEBUG] 10:32:01: 006.4 018.1 020.7
    [DEBUG] 10:32:02: 006.7 017.4 020.8
    [DEBUG] 10:32:03: 007.3 016.7 020.8
    [DEBUG] 10:32:04: 007.7 016.1 020.8
    [DEBUG] 10:32:05: 008.1 014.8 020.9
    [DEBUG] 10:32:06: 008.6 014.3 021.0
    [DEBUG] 10:32:07: 009.2 014.6 020.9
    [DEBUG] 10:32:08: 009.6 014.8 021.0
    [DEBUG] 10:32:09: 010.1 014.5 021.0
    [DEBUG] 10:32:10: 010.8 014.8 020.9
    [DEBUG] 10:32:11: 011.6 015.2 020.6
    [DEBUG] 10:32:12: 012.4 015.5 020.2
    [DEBUG] 10:32:13: 012.9 015.4 020.2
    [DEBUG] 10:32:14: 013.5 015.8 020.2
    [DEBUG] 10:32:15: 014.0 016.1 020.2
    [DEBUG] 10:32:16: 014.6 016.5 020.1
    [DEBUG] 10:32:17: 015.0 016.8 020.2
    [DEBUG] 10:32:18: 015.4 017.1 020.3
    [DEBUG] 10:32:19: 015.8 017.4 020.5
    [DEBUG] 10:32:20: 016.2 017.7 020.6
    [DEBUG] 10:32:21: 016.6 018.2 020.7
    [DEBUG] 10:32:22: 017.0 018.5 020.8
    [DEBUG] 10:32:23: 017.4 018.8 020.8
    [DEBUG] 10:32:24: 017.8 019.1 020.9
    [DEBUG] 10:32:25: 018.3 019.4 021.0
    [DEBUG] 10:32:26: 018.9 019.7 020.9
    [DEBUG] 10:32:27: 019.1 019.9 021.2
    [DEBUG] 10:32:28: 019.4 020.2 021.4
    [DEBUG] 10:32:29: 019.9 020.7 022.0
    [DEBUG] 10:32:30: 020.3 021.0 022.0
    [DEBUG] 10:32:31: 020.8 021.3 022.1
    [DEBUG] 10:32:33: 021.2 021.6 022.1
    [DEBUG] 10:32:34: 021.7 021.9 022.1
    [DEBUG] 10:32:35: 021.7 022.1 022.6
    [DEBUG] 10:32:36: 022.2 022.4 022.7


    Onderkant formulier

     

    Link to comment
    Share on other sites

    • 0

    How odd indeed! I copy/pasted the script and it stops with no error at exactly the same RGB value... Fibaro Cluedo on a saturday morning: who did it? I think: type error in the function call with the table definition :-):-):-) 

    Link to comment
    Share on other sites

    • 0

    @TRicky "Miss Scarlet" --- LOL

     

    @AutoFrank You know, there's nothing wrong with the code! Although I'd that "ipairs" would be better than "pairs", because ipairs iterates over an array - never mind!. Not your fault, I wrote it like that ;-) So, what appears to be wrong? The code PRINTS RGB values, while the table holds HSL values. So you think it ends somewhere in the middle of the table, but it doesn't! It's OK.

     

    I'd have to toy with the values too, there is a rather green part at the beginning.

     

    I think *most* of the RGB strips have trouble with low values. Actually, it's not the strips, but it is the 8-bit resolution of the controller. You see, or eyes perceive 1/256 of "full scale" still as rather bright, and the green LEDs appear brighter than the red. Also, the way or eyes work, makes it more difficult. The difference between R=0,1,2 is very noticeable, but try R=90,91,92 and I bet you don't see a difference. You could use some math to linearise this, but it won't solve the low values problem. To dim really low, you need 10 or 12 bit (or 8 bit + 5 bit greyscale value). I don't know of any Z-Wave product that has this resolution. If you like to program an Arduino, try "Neopixel" aka "APA102" LED strips. They're 5V and are not compatible with an RGBW controller. They are pixel addressable, so it's a different kind af beast. And a different hobby. And expensive. ;-)

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @petergebruers

    @mobbie

    @TRicky

    @Jamie mccrostie

     

    firstly thanks for testing.. much appreciated.

    I'm also using a generic RGB strip (no white) and the results look consistent enough which is good. My LED strip is about 3m long, inserted in a diffuser covering and facing a white curved ceiling so the effect is quite good (IMHO :-) ).

    It starts off as a burnt orange and transitions through green, yellow, light blue to white. There is a definite 'bump' around the green which will need tweaking but its deinately easier working in HSL as opposed to RGB (thanks peter)  

    It does step all the way to the end - I added a counter and it completes all 72 steps

    It finishes at a blue/white .. which in my plan and will stay on until we turn on the main bedroom light or the lamp (indicating we are getting up)

    Overall it looks like I'm on the right track, I'll try and 'iron out' the colour bump and finish with a transition to 'off' and will re-post

     

    Many thanks again

    -f

     

     

     

    but would be easy enough to  

    Link to comment
    Share on other sites

    • 0

    Just tried it on by RGBW lights in the bedroom and it stops the same place as everyone else, Im left with a blue white but @AutoFrank you are definitely getting there. Thanks for sharing.

     

    Andy

    Link to comment
    Share on other sites

    • 0
    32 minutes ago, andyp said:

    Just tried it on by RGBW lights in the bedroom and it stops the same place as everyone else, Im left with a blue white but @AutoFrank you are definitely getting there. Thanks for sharing.

     

    Andy

     

    Thanks for testing. @AutoFrank and I are working on a new version.

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

     Share

    ×
    ×
    • Create New...