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


Question

Posted (edited)

Say you want to use a RGBW module to control other dimmer2 devices in your set up.

The following scene and settings will let you do just that.

Useful also if you are trying to upgrade a old bus wired smart home systems with home run controlled circuits

 to zwave system.

Mount RGBW modules in old system switch locations. Use old bus wiring as 12v/24v RGBW supply.

Replace old din mounted dimmer and switch modules at control cabinet  with zwave devices giving you up to 4 switches

per RGBW module.  

 

 

Solved, thanks @ReneNL

and @Soporte Life2Better for response time hint

Use this scene, set module to output mode, set parameter 10 to 1 sec

488 = RGBW module id

122  to 118 =  controlled  remote dimmers id's 

 

 

--[[
%% properties
488 value
%% events
%% globals
--]]

rgb = 488
dimmer1 = 122
dimmer2 = 152
dimmer3 = 156
dimmer4 = 118

function split(source, delimiters)
    local elements = {}
    local pattern = '([^'..delimiters..']+)'
    string.gsub(source, pattern, function(value) elements[#elements + 1] = value; end);
    return elements
end 
colorstatus = split(fibaro:getValue(rgb, "color"),",")


fibaro:call(dimmer1,"setValue", math.floor (100*(colorstatus[1]/255)))
fibaro:call(dimmer2,"setValue", math.floor(100*(colorstatus[2]/255)))
fibaro:call(dimmer3,"setValue", math.floor(100*(colorstatus[3]/255)))
fibaro:call(dimmer4,"setValue", math.floor(100*(colorstatus[4]/225)))

 

Edited by Jamie mccrostie

6 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted

    Thinking about this....

    Im actually after input to  channel 1 as a dimmer value when RGB is in input/ output mode with all channels set to input.

    dimmedvalue = tonumber(fibaro:getValue(122,”value”)) — where do I insert the channel 1 bit?

                                                  fibaro:call(125,”setValue”, dimmedvalue)

    • 0
  • Inquirer
  • Posted

    What Im trying to figure out is how to use a remote RGBW module connected to 4 push button switches and thru lua have them control 4 seperate dimmer2s.

    ?

    • 0
    Posted (edited)

    Hi @Jamie mccrostie,

     

    The LUA commands to set the individual color channels are:

    Please login or register to see this code.

    With RGBWid your device ID, dimlevel a value between 0 and 255 (i.e. not 100). Instead of "setG" you have "setR", "setB" and "setW" for the other channels/colors.

     

    To read the value is a bit more tricky (at least I did not find an easier way, maybe I missed something...):

     

    Get the current status of all 4 channel:

    Please login or register to see this code.

    Please login or register to see this code.

    Please login or register to see this code.

    And now you can access the value of each channel by using colorstatus[1] for red, colorstatus[2] for green, colorstatus[3] for blue and colorstatus[4] for white. As the RGBW color status is a number from 0-255 we need to convert to 0-100 for the dimmer (and round it to get integer values):

     

    Please login or register to see this code.

     

    Hope this help.

     

    Rene.

     

    Edited by ReneNL
    • 0
  • Inquirer
  • Posted

    @ReneNL

    Thanks for your efforts not quite what im after though.

    Im trying to use the 4 imputs  on rgb module via attached push buttons to control

    4 seperate dimmer 2s in the system

    The rgb has no strip attached so Im just using it for remote dimmer control.

     

    Maybe this has to be done in input mode?

    • 0
    Posted (edited)

    Apologies if I'm still wrong, but I think the above should work for your purpose. It seems you need to get the dimvalue of the 4 RGBW channels and set the dimmer2 dimvalue accordingly, right?

     

    So the code would be something like (have not tested):

     

    Please login or register to see this code.

     

     

    Edited by ReneNL
    • Thanks 1
    • 0
  • Inquirer
  • Posted (edited)

    Cool I’ll dive into it tomorrow morning.

    Thanks again for the help

    I’ll report back if I have  success.

    Edited by Jamie mccrostie

    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.

    ×
    ×
    • Create New...