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

No triggers fired


Question

Posted

Hello!

 

This is probably a real newbie problem, but I spent all evening with no luck.

I made a LUA script as below, but NOTHING triggers it by events. I can turn on wathever switch I want or move in front of the motion detectors but nothing triggers.

In the code below I just show the first 11 id:s but I have tested with all my 70 Id:s, and nothing triggers.

 

I even checked "Do not allow alarm to stop scene while alarm is running" but it does not help.

 

If I start the script manually it shows the text below, as it should.

[DEBUG] 22:45:13: Other source.

 

Yes, I restared my HC2!

 

Please help!?

 

Best regards, Mikael

 

 

--[[
%% properties
1
2
3
5
6
7
8
9
10
11
%% globals
–]]
 
local trigger = fibaro:getSourceTrigger()
 
if (trigger['type'] == 'property') then
  fibaro:debug('Source device = ' .. trigger['deviceID'])
elseif (trigger['type'] == 'global') then
  fibaro:debug('Global variable source = ' .. trigger['name'])
elseif (trigger['type'] == 'other') then
  fibaro:debug('Other source.')
end
 

fibaro:call(18, "turnOff") -- Trying to turn of my testlamp on whatever event

 

4 answers to this question

Recommended Posts

  • 0
Posted

the id's on the properties need to have a value its suppose to check on the ID, your missing that.

The global is only used if you set a global variable in the panels and update that somehow (scene/vd/whatever) then it will trigger the global one, but you must also indicate the name of that variable below the %%globals.

--[[ %% properties 1 nameofproperty %% globals suncomesupat –]]

Please login or register to see this code.

To give you an idea, also see 

Please login or register to see this link.

  • 0
  • Inquirer
  • Posted

    Thanks, now it works!

     

    • 0
  • Inquirer
  • Posted

    One more thing, if I want to catc ALL events for an ID, is there any wildcard Catch?

    like:

     

    --[[
    %% properties
    1 *
    –]]

     

    Best regards, Mikael

     

    • 0
    Posted

    Not that i am aware off, perhaps try just "1" without any options.

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