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

LED under the bed


elev8john

Question

Hi Guys,

 

I have a need to create a scene that will be controlling some LED rigid RGB bars under the bed, via and RGBW module and using a Fibaro Sensor.

 

The LED bars x 3 will be fixed under the bed. The sensor will also be fixed under the bed. 

 

My idea is that during the hours of 20:00 and 6:00, the scene will work otherwise it will be ignored.

 

When the sensor detects movement (ie I or my wife puts their feet on the floor) the LED will come on, thereby illuminating the floor around the bed sufficiently for I or my wide to see their way but not so bright that it wakes the other person.

 

The LED's will stay on for 60 seconds then automatically go off.

 

It sounds fairly simple but I am not a LUA programmer. However the graphic building block option was the way I was going to approach it.

 

Has anyone some tips before I rush head on in please?

 

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

First, create a variable call LED Bed Sensor with ON/OFF.

Using a scene to toggle the variable, for example when time is 20:00, set variable LED Bed Sensor to ON. When time is 06:00, set variable LED Bed Sensor to OFF.

 

Using a scene with motion sensor breached as a trigger, turn on the led followed by a turning off of led 60 seconds later.

 

It's pretty much straight forward if you list out the steps of the scene that you want before coding it.

Link to comment
Share on other sites

  • 0
  • Inquirer
  • So I have the scene working but it only works once and I cant get it to loop...or come on again. Meaning the sensor is breached, the LED comes on, then off automatically 30 seconds later. I try to set it off a subsiquent time but it doesnt work?

     

    Here is my LUA code, and help appreciated

     

    --[[
    %% autostart
    %% properties
    54 value
    %% globals
    --]]
     
    local startSource = fibaro:getSourceTrigger();
    if (
     ( tonumber(fibaro:getValue(54, "value")) > 0 )
    or
    startSource["type"] == "other"
    )
    then
    fibaro:call(63, "turnOn");
    setTimeout(function()
    fibaro:call(63, "turnOff");
    end, 30000)
    end
    Link to comment
    Share on other sites

    • 0

    Check parameter on fibaro sensor. Have the same problem. But one parameter is maby wrong. Blind time maby?

    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.

    ×
    ×
    • Create New...