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

Trigger A scene in a scene


Mad-Cat

Question

Hi I have a questions i have two Minimotew working well (Yippy) 

 

they are both stuck to the bed ither side setup the same. 

 

so in this example i have button 1 set to turn off lots of devices around the house 10+

 

i have the same script set on button 1 on the other remote

 

and for laughts i have it set in the theater room to

 

now this is getting annoying when i add a device i have to change them all.,

 

 

is there a way a way to make one scene that turns off everything and then link it to both buttons? that way i only change 1 scene and dose 3 things.

 

 

thanks

 

Dave 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Yo can start scenes from other scenes: 

Please login or register to see this link.

Link to comment
Share on other sites

  • 0

I'm a newbie but couldn't you do that with a variable? use a variable to launch your scene then set this variable back to previous state in the scene? 

Link to comment
Share on other sites

  • 0

I'm a newbie but couldn't you do that with a variable? use a variable to launch your scene then set this variable back to previous state in the scene? 

 

Yes, here's an example. Here's a scene that acts upon change of a global variable:

Please login or register to see this code.

And You can trigger it with a simple "set global":

Please login or register to see this code.

Link to comment
Share on other sites

  • 0

Hi Guys,

 

Does this actually work in v4[n] ?

 

I'm still on 3.590 and triggering from global variables doesn't work. Just tested it to be sure. You HAVE to put in the module number followed by "value" otherwise scene is not triggerd.

 

I hope it does work in v4[n] because it means you don't have to worry about multiple changes of id's if you need to reinstall a sensor.

 

Looking forward to the answer!

 

KR, Dave

Link to comment
Share on other sites

  • 0

Hi Guys,

 

Does this actually work in v4[n] ?

 

I'm still on 3.590 and triggering from global variables doesn't work. Just tested it to be sure. You HAVE to put in the module number followed by "value" otherwise scene is not triggerd.

 

I hope it does work in v4[n] because it means you don't have to worry about multiple changes of id's if you need to reinstall a sensor.

 

Looking forward to the answer!

 

KR, Dave

 

I tested it. I'm using 4.040. Triggering from the variables panel doesn't work, you must use fibaro:setGlobal("ActionForScene", "AllBlindsUp"). I'm confused when you talk about IDs of sensors and how this relates to global variables. I don't see a link between sensor IDs and global variables. It's not like you can make a global variable "Main Light" and set it to ID = 51 (whatever it is) then put that in a header. Enlighten me 

Please login or register to see this image.

/emoticons/default_icon_wink.gif" alt=";-)" />

Link to comment
Share on other sites

  • 0

Hi Peter:)

 

I meant as follows. I currently have @50 physical devices, of which 11-15 are motion sensors. Running on 3.590 at least I have continual issues with those, in that they constantly and for no particular reason like to turn from type = motion_sensor into type = temperature_sensor or humidity_sensor etc.

 

So, as I have written an elaborate alarm system to 'collaborate' with the Fibaro one but also suit our needs here at home, it would be an enormous pain to constantly have to go through ALL the code every time a motion sensor decides to have a sex change. So, what I did is something Edwin did (at least I'm pretty sure we both did the same thing) i.e 'SDeath'

 

Say I have a motion sensor with an id = 50. I create a global variable with the value 50. Then, at the start of any scene/vd, I simple get the global and use it wherever in the code is needed.

 

So normally you would have the following say at the top of your scene:

 

--[[
%% properties
50 value
%% globals
--]]

 

-- then reference id 50 EVERY time I need to setArmed() or whatever....which can be many times depending on complexity, meaning many many changes

 

I do the following:

 

--[[
%% properties

50 value
%% globals
--]]

 

-- check only 1 instance running
if (fibaro:countScenes() > 1) then
  fibaro:abort()
end

-- ********************* Get Globals ****************************************

local _motionDeviceID  = tonumber(fibaro:getGlobalValue('motionDeviceID'));

 

-- then use _motionDeviceID in code wherever appropriate. This negates having to use the

 

What I would like to do is the following; if at all possible:

 

--[[
%% properties
%% globals

motionDeviceID value -- which references any value changes, 0 or 1, to, what is, id=50
--]]

 

Unsure if it 'would' work but it would be nice if it did.

 

I'd just like a way to not have to repeat the same id many many times and have to change it many many times (up to 40) because my FGMS sensors want a sex change!

 

KR, Dave

Please login or register to see this image.

/emoticons/default_icon_biggrin.gif" alt=":-D" /> 
 

Link to comment
Share on other sites

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