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

Rgbw and lua


trackingnewtech
 Share

Question

Hi in lua the only thing i do is to change the value ON/OFF.

But is it possible to change the color or to lauch a program of colors

Please login or register to see this image.

/emoticons/default_icon_question.gif" alt=":?:" />

Is there somewhere any lua reference about this module ?

Best regards

Link to comment
Share on other sites

Recommended Posts

  • 0

Very strange issue, so I have two question for fibaro because I really don't understand:

If I do that

Please login or register to see this code.

The led turn on.

But if I do that:

Please login or register to see this code.

The led stay off.

Can you confirm.

Other problem, when you call back the last color with

Please login or register to see this code.

your return a value like 50,50,50,0. So to put " you must do

Please login or register to see this code.

So not very easy.

After maybe I make a mistake but if somebody can confirm if you can or not turn on led stip with a local at the place of normal value.

Thanks

Link to comment
Share on other sites

  • 0

Domodial, Shad, you can try this:

Please login or register to see this code.

the same as method:

Please login or register to see this code.

Shad, i think fibaro:getValue(354, "lastColorSet") would have had to return a "table" in the place of a "string"

Please login or register to see this image.

/emoticons/default_icon_idea.gif" alt=":idea:" /> , if Fibaro can confirm...

Link to comment
Share on other sites

  • 0

@Krikroff

Debug return if I turn green ON (163) :

[DEBUG] 11:54:19: R:0

[DEBUG] 11:54:19: G:163

[DEBUG] 11:54:19: B:0

[DEBUG] 11:54:19: W:0

Link to comment
Share on other sites

  • 0

Strange that way work and not my. It is the same value.

Nevermind, if that is ok.

Link to comment
Share on other sites

  • 0

Shad, you do not do the same thing

Please login or register to see this image.

/emoticons/default_icon_wink.gif" alt=";-)" />

For

Please login or register to see this code.

i think the arguments are fixed and you try to put a string that represent the arguments R, G, B, W.

but I may be mistaken

Please login or register to see this image.

/emoticons/default_icon_wink.gif" alt=";-)" />

Link to comment
Share on other sites

  • 0
This is my code

Please login or register to see this code.

Is that okay? What is your question...

Link to comment
Share on other sites

  • 0

non, du coup je ne sais plus ou mettre mon programme pour voir si la couleur initial repasse ou pas... je deviens fou

Please login or register to see this image.

/emoticons/default_icon_rolleyes.gif" alt=":roll:" />

Link to comment
Share on other sites

  • 0

try:

Please login or register to see this code.

Link to comment
Share on other sites

  • 0

Wouaaah! Thank you very much it works the first time!

You write LUA as the river flowing! Again thank you 1000 times!

[ Added: 2013-11-16, 16:23 ]

There was one last detail, if the color is fixed, the scene starts and after time, the color returns. By cons, if it is a scene that is launched and not a fixed color, the module switches to OFF and do not come back to the previous scene.

[ Added: 2013-11-18, 09:42 ]

@KriKoff

Have you un best code line idea for working on program ?

Regards

Domodial

[ Added: 2013-11-19, 10:54 ]

up

Please login or register to see this image.

/emoticons/default_icon_mrgreen.gif" alt=":mrgreen:" />

Link to comment
Share on other sites

  • 0

I want to set the dim level of an RGB module. If I run this code then the colour never changes, instead the rgb module just dims to 60%

fibaro:call(245, "setColor", "255", "255", "0", "0");

fibaro:call(245, "setValue", "55");

But if I put a 1 second wait in the code it works perfectly:

fibaro:call(245, "setColor", "255", "255", "0", "0");

fibaro:sleep(1*1000);

fibaro:call(245, "setValue", "55");

Any ideas as to why this is happening?

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...