Welcome to Smart Home Forum by FIBARO
Search the Community
Showing results for tags 'global variables'.
Hi all, I'm a newbie at this and stuck on something which should probably be simple. I have created a Global Variable "HomeAway" with three values (home), (Away) and (Workweek). I have then created a virtual device so that i can make a button to set this variable. Once done I will use this to manage a range of things in the house like hot water, heating, blinds and lighting. But I just cant get the virtual device to change the variable. I have found plenty about this online but all solutions i read don't work. It seems i need to add code into the virtual device. but what code. The LUA manual says this line should work "fibaro:setGlobal(‘HomeAway’, ‘Home’);" but nothing happens. Any help greatly appreciated.
Hi Is there a way in LUA to make values in global variables appear as values for native sensors? This can be temperature, current consumption, etc Say I have a number of temperature sensors in a room and want to make an algorithm to present a more representative temperature for the room. I would then make som LUA code, but the result is only a numeric value in a global variable. I have other examples also, but the main thing here is to use all the features a native sensor provides when I make a function in LUA.
I'd like to see an optional parameter added that will disable triggering scenes when setting a global variable in LUA. The HTTP API has this functionality albeit in reverse (default to false) Something along the lines of: fibaro:setGlobal( varName, value [, invokeScenes] ) Where: varName: The name of the global variable value: The new value of the global variable invokeScenes: Boolean, default true