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

centralSceneEvent


Question

Posted

Hey Fibaro

for what puposes are you  check type of keyAttribute

Hey, listen up!?

 

test scene

{
  conditions = { {
      id = 1974,
      isTrigger = true,
      operator = "!=",
      property = "centralSceneEvent",
      type = "device",
      value = {}
    } },
  operator = "all"
}
 
test QA
 
-- magic cube
 
    self:updateProperty("centralSceneSupport",  {
        { keyAttributes = { "Flip90","Flip180","Slide","DoubleTap","Rotate""Shake" }, keyId = 1 },
        { keyAttributes = { "Flip90","Flip180","Slide","DoubleTap","Rotate""Shake" }, keyId = 2 },
        { keyAttributes = { "Flip90","Flip180","Slide","DoubleTap","Rotate""Shake" }, keyId = 3 },
        { keyAttributes = { "Flip90","Flip180","Slide","DoubleTap","Rotate""Shake" }, keyId = 4 },
        { keyAttributes = { "Flip90","Flip180","Slide","DoubleTap","Rotate""Shake" }, keyId = 5 },
        { keyAttributes = { "Flip90","Flip180","Slide","DoubleTap","Rotate""Shake" }, keyId = 6 },
    })
 

 

function QuickApp:onTestButton()
  local modifier = "DoubleTap"
  -- local modifier = "Pressed" 
  local data = {
    type =  "centralSceneEvent",
    source = self.id,
    data = { keyAttribute = modifier, keyId = 1 }
  }
  api.post("/plugins/publishEvent", data)
end
 
NOTHING!
 
function QuickApp:onTestButton()
  local modifier = "Pressed"
 
  local data = {
    type =  "centralSceneEvent",
    source = self.id,
    data = { keyAttribute = modifier, keyId = 1 }
  }
  api.post("/plugins/publishEvent", data)
end

 

as expected

 

Please login or register to see this attachment.

 

 

 

 

3 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted

    @A.Socha also question why you drop user data?!

      local modifier = "Pressed" 
      local data = {
        type =  "centralSceneEvent",
        source = self.id,
        data = { keyAttribute = modifier, keyId = 1, info = {aaa = 5, bbb = "aaaa", ccc= 3.123} }
      }
      api.post("/plugins/publishEvent", data)
     
     
    [19.08.2020] [18:16:50] [DEBUG] [SCENE85]: {"id":1974,"value":{"keyAttribute":"Pressed","keyId":1},"type":"device","property":"centralSceneEvent"}
    • Like 1
    • 0
    Posted (edited)

    that will not work like you think, e.g. will not generate anything (that example should send something, because it is based on working KEyFob QA, but id does not, because of unknown trigger names, liek these you tried).

    Please login or register to see this attachment.

     

     Additionally i think remote control QAs are not properly working, when they just generic remote, however they works if one use known remote, e.g

    Please login or register to see this link.

    Please login or register to see this attachment.

     

    That part is responsible for what one see in Block Scenes, when names are known the proper BUI name (1x, 2x, hold, etc) will be displayed, when the name is unknown the string with centralscene...name will be displayed (just test both attched and you will understand what i mean)

     

    Please login or register to see this code.

    keyID 6 till 12 are normally not known for keyfob, i remember i saw them in HC3 sources, so added to my QA.

     

     

    Edited by tinman
    • 0
  • Inquirer
  • Posted (edited)

    @tinman thnak you. ok drop it. here are in the back of beyond!.

    just trying port my code from Node-red to Hc3... but not destiny.

     

     

    node-red. zigbee 

     

     

     

     

     

    Edited by 10der
    • Like 1

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