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

SceneID


Question

Posted

Hello. Can someone help me with a Lua code? I want to start a scene via a SceneID - but I can not get it ... The SceneID is 820. If this ID is used a device should be turned on. So the SceneID should be the trigger. It's about the new POPP Keypad. There each user gets a SceneID. If you enter the code, you can start with the ID scenes - if you know how ... :-) Have already searched on the Fibaro page, just found no commands for the ID. Would be really grateful if someone could help me. Thank you

3 answers to this question

Recommended Posts

  • 0
Posted (edited)

I'm not familiar with POPP Keypad, but I've took a look on POPP keypad manual (

Please login or register to see this link.

) and looks like you need to use Central Scene event as a trigger. 

The SceneID is not a trigger, it just and ID of keypad event (in your case key pressed). 

 

Entering a valid key code (Scene ID 20 is issued). Its possible to issue the key code number as scene ID by setting the configuration parameter #5 accordingly

Please login or register to see this attachment.

--[[
%% properties
%% events
591 CentralSceneEvent
-%% globals

--]]

local trigger = fibaro:getSourceTrigger()
fibaro:debug(json.encode(trigger))

 

(please change number 591 to your real device ID of keypad)

Now according to debug information (json table) you can extract the data that you need or to simplify a little bit the data extraction by adding known data fields. For example:

local trigger = fibaro:getSourceTrigger()["event"]["data"]

 

I think in my system I have Fibaro Swipe which might be similar to your keypad, so see below part of LUA code for that

Please login or register to see this code.

 

Edited by cag014
  • 0
  • Inquirer
  • Posted

    Please login or register to see this code.

    Please login or register to see this attachment.

    • 0
    Posted

    looks like you have it and it works, now just write your code.

    By the way using 

    838 CentralSceneEvent 1

    Means that the scene will be triggered by pressing key 1 only. I think will be better to catch all events and to select them inside the code.

    Any how glad it helps.

     

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