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

Need some help with some scene problems


Question

Posted

Hi Guys,

Thanks for reading this :)..   but i tried alot of stuff myself but somehow it doesnt work or i dont understand it..

 

The problem is for you guys simple i think, but for me it causes a headache.

 

What i want is to activate a scene i made (ID1199) with the S2 switch from my dimmer 2 module (ID1498)

 

I already set the parameter 28 to 1.

I've been reading forum posts but im affraid im stuck, ive read somewhere i need to fill in the id somewhere but i cant figure out where. 

Im not good in LUA so im using Block mode..  it should be possiible in that aswell right?

 

Anyway i hope someone could help with it.. 

 

Thanks

 

Greetings Martijn

12 answers to this question

Recommended Posts

  • 0
Posted (edited)

Just add dimmer as trigger in scene and then select scene activation. In green box write SCENE ID value which depend switch configuration. See pictures bellow:

 

 

For example, if you use momentary switches and you want switch S2 to activate scene when clicked two times then you put 24.

Enjoy!

 

Edited by Sankotronic
Attachment quota filled up / deleting older stuff sorry :-(
  • 0
  • Inquirer
  • Posted

    Thanks Sankotronic for your quick reply, im gonna test is out tonight!! 

     

    Thanks!!

    • 0
  • Inquirer
  • Posted (edited)

    Hmm  it doesnt work...  i must have done something wrong..

    I made 2 scenes to test it. both work when i use the app.

     

    I made some screenshots including the lua code..  i hope you can see something odd

     

    Thanks:-)

     

    Greetings Martijn

     

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Edited by Doki391
    • 0
  • Inquirer
  • Posted

    Anyone?

    • 0
    Posted

    Can you add the following line above the line "local startSource" in the lua code:

    fibaro:debug(fibaro:getValue(1498, "sceneActivation"))

     

    Press the button and see in the debug window if something happens.

    • 0
  • Inquirer
  • Posted

    The only thing is see in the window under the code is this:

     

    pressed the button once, double and triple..

    Doesnt look like its working.. :(

    Please login or register to see this attachment.

    • 0
    Posted (edited)

    This should work:

    Please login or register to see this code.

    but this scene IDs are for switch S2!! For switch S1 values are 16 for 1 click and 14 for 2 clicks and there is no 3 clicks for it. Also this values are if you use momentary switch (the one with spring that gives contact only while it is pushed!). If you use toggle switch then you must use different ID values. Also you need to setup properly parameters on dimmer 2 depending on what type of switch you using check parameter 20.

     

    After setting parameter 28 to 1 and parameter 20 to proper type of switches this should work. It works for me on several dimmer 2 like a charm.

     

    Edited by Sankotronic
    • 0
  • Inquirer
  • Posted

    Thanks Guys!

     

    Getting close!

    Sankotronic i copied your code, and i now get in the debug window 1, 2 and 3 clicks.at least we can see the switch is working :-)

    But looking at the code, but doesnt it need to know what scene to activate? where do i have to type that?

    Please login or register to see this attachment.

    • 0
    Posted

    Hi @Doki391

     

    I edited above code with comments where you can put your code. If you just want to call another scene you can add

    Please login or register to see this code.

    Where sceneID you need to replace with ID number of scene you want to run. Scene ID you can see on General tab:

    Please login or register to see this attachment.

    but you can also see ID number if you hover mouse pointer over tool sing, same as devices explained bellow.

    Or if you want to press button on virtual device you can add:

    Please login or register to see this code.

    Where device ID you replace with virtual device ID number which you can see by hovering mouse pointer over tool icon 

    Please login or register to see this image.

    /monthly_2016_12/58490abf3cf67_Toolicon.jpg.e01cc5c7647ce788b0d6d3f551863d75.jpg" alt="Tool icon.jpg" /> of the VD and browser will show link where you can see ID:

    Please login or register to see this attachment.

     

    "buttonNO" you need to replace with button number which you can get by counting objects on the VD like this:

    Please login or register to see this attachment.

    So if you want to press "Brew" button on the VD then "buttonNO" replace with "2" including quotation marks. It will work without quotes but then fibaro functions prefer strings so if you use quotes is better.

    Please, don't blame me for this detailed info if you know all this. This is forum and I believe that there are members that will find this info useful.

     

    Enjoy coding!

     

    • 0
    Posted

    for my is excellent all detailed, thank you very much. very useful for me.

    • 0
  • Inquirer
  • Posted (edited)

    hey Sankotronic,

     

    Thanks alot for your help..  it works now!! I very happy with it... Awesome :-)

     

    And indeed its very usefull for other peeps aswell

     

    Thanks

    Edited by Doki391
    • 0
    Posted

    Always happy to help!

     

    Enjoy!

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