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

Fibaro Universal Binary Sensor and scene activation


Question

Posted

Hello,

I have an Fibaro Universal Binary Sensor in my alarm clock. On the side of the alarm clock I have a switch. With this switch I could (in 3.6 and before) activate scenes (for sleeping for example). But in 4.031 I cannot manage this. I did a soft reconfigure, but that didn't do the trick. In paramater three the momentary input switch is selected. I have created an simple lua script to debug the click I do on the binary sensor. But I see nothing in the debug window. I known for sure that I am using the right ID. In the HC2 I see an icon of the motion activated when I click on the button, but don't see it in my code...

Here is a part of my code.

Please login or register to see this code.

Anybody an idea what I doing wrong?

5 answers to this question

Recommended Posts

  • 0
Posted

As I said in another thread, check if there is scene activation property in API. Get Json Viewer addon installed and go to HC_IP/api/devices/idOfDevice and check if there is scene activation visible. If not, perform reconfiguration, first soft and then regular one if needed.

  • 0
Posted

Did you succeed yet?

I've also installed a universal sensor in my alarm clock. I got a scene responding to the snooze button click. No I want to use double and triple clicks.

I already got this:

 

if ( (fibaro:getGlobalValue("TimeOfDay") ~= "Morning")

    and
  -- press snooze
    ( tonumber(fibaro:getValue(188, "sceneActivation")) == 20 )
or
startSource["type"] == "other"
)
then.....
 
I already set the parameters of the universal sensor. Simply changing 20 in to 24 for a double click doesn't work.
What am I doing wrong?
  • 0
Posted

Can you please use this simple lua script to test if the device sends scene activation commands to your HC2, and if the HC2 has correct "sceneActivation" interface?

 

Replace YOU_HAVE_TO_PUT_THE_SLAVE_ID_HERE below (two occurrences) with the ID of your IN1 or IN2 *slave* device. The slave is the one that does not look like a cardboard box.

 

Please login or register to see this code.

It should print something like this when you single and double click on IN1:

[DEBUG] 07:29:42: 10

[DEBUG] 07:29:59: 14

If it doesn't, please exclude & include and if that doesn't help either please post the results of the api (like Mr. Nowacki asked a few posts back. Use the master device ID in the api call) - sometimes we can find the problem from that data.

If this works, we can start debugging your scripts...

  • 0
Posted

It works, thanks. My alarm clock is very old and the snooze button isn't functioning as it supposed to do. That's why it doesn't respond tot the double click.

  • 0
Posted

Aha! That explains. ... thanks for your feedback!

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