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

Question

Posted

I'm reprogramming scenes after implementing a second house with a HC2 and trying to follow a different approach.

 

The approach is driven on global variables. If the value is changed the trigger should start. But it doesn't.

 

I have a global variable "avondverlAan" and after changing the value via the admin panel nothing is being triggered. What am I doing wrong? I did the same before with "properties" based on the value of a PIR from Satel which is also a device in HC2. But nothing happens. It only works if an original device from Fibaro is declared at properties, like "5 value", then the scene is triggered as it should be.

 

--[[

%% properties
5 value
 
%% globals
avondverlAan
--]]
 
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
  

3 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted

    seems like it does work when one of the scripts is changing the variable. It is NOT being triggered when the value is changed via the admin panel/variables. Weird...! How do you see this?

    • 0
    Posted

    Yes, thats right. You have to change the value with a scene. It doesn't work if you change it manually 

    • 0
    Posted

    I noticed that too. I also made a script to turn on garden lights based on the change of a global variable. I spend a lot of time debugging what was wrong, because nothing happened when I changed the global variable manually. But when I used a script to update the variable it did work. Unfortunately Fibaro hasn't implemented this correctly.

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