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!



Smart Home Forum by FIBARO Team

Search the Community

Showing results for tags 'Global Variable'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • FIBARO Community
    • FIBARO Portal and Forum policy
    • FIBARO
    • Say hello!
    • Off-topics
  • FIBARO Update
    • FIBARO System Update
    • FIBARO Mobile Update
  • FIBARO Community Support
    • Scenes and Interface
    • FIBARO Products
    • FIBARO Mobile
    • FIBARO HomeKit
    • FIBARO Assistant Integrations
    • Other Devices / Third-party devices
    • Tutorials and Guides
    • Home Automation
    • Suggestions
  • FIBARO Społeczność
    • FIBARO
    • Przywitaj się!
    • Off-topic
  • FIBARO Aktualizacja
    • FIBARO System Aktualizacja
    • FIBARO Mobile Aktualizacja
  • FIBARO Wsparcie Społeczności
    • Sceny i Interfejs
    • FIBARO Urządzenia
    • FIBARO Mobilnie
    • FIBARO HomeKit
    • Integracja z Amazon Alexa i Google Home
    • Urządzenia Firm Trzecich
    • Poradniki
    • Automatyka Domowa
    • Sugestie


  • Scenes
  • Virtual Devices
  • Quick Apps
  • Icons

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






Website URL





Found 14 results

  1. Can someone help me with Node-Red? I need to tell node-Red to change a global value in HC2. Thanks for the Help
  2. I use the Imperihome as front end for my HC2 and the other devices I have. Imperihome is mostly fine but the amount of custom text able to display is limited to one line. But, Imperhome can show a web page. Therefore, can I make a global variable where I concatenate HC2-values/information and embed HTML-codes. I then call the variable from my Imperihome and a tiny webpage with e.g. four lines of text is generated. Does this sound possible?
  3. I want to trigger a scene whenever the global variable change value. The values of the global variable are are "0" or "1" . The test scene is : --[[ %% properties %% weather %% events %% globals GlobalVariable --]] if ( fibaro:getGlobalValue("GlobalVariable") == "1" ) then fibaro:debug("Variable is 1"); end if ( fibaro:getGlobalValue("GlobalVariable") == "0" ) then fibaro:debug("Variable is 0"); end The scene is not activated automatically by change of the global variable "GlobalVariable". If I run scene manually it reports correctly the value of the global variable. Any hint ... ?
  4. Hello, Tell me, knowing guys) I wrote a scene that tracks the state of light in the room and passes it to a global variable. But this scene constantly reports that too many instances are running ( The room has a physical switch that, depending on this global variable, turns off or turns on the light in the opposite direction. Maybe there is a more elegant way to write this scene? Thanks ) --[[ %% autostart %% properties 15 value -- main light 23 value -- window light 21 value -- inner light 97 value -- outer light %% events %% globals --]] fibaro:debug("Scene START at " .. os.date("%c")) num = fibaro:countScenes() fibaro:debug(num.." scenes running") local startSource = fibaro:getSourceTrigger(); if (fibaro:countScenes() > 1) then fibaro:debug("Too many Scenes running up") fibaro:abort() end while true do if ( tonumber(fibaro:getValue(15, "value")) > 0 -- main light or tonumber(fibaro:getValue(23, "value")) > 0 -- window light or tonumber(fibaro:getValue(21, "value")) > 0 -- inner light or tonumber(fibaro:getValue(97, "value")) > 0 -- outer light or startSource["type"] == "other") then fibaro:setGlobal("LivingLight", "On"); --fibaro:debug("On..."); else fibaro:setGlobal("LivingLight", "Off"); --fibaro:debug("Off..."); end fibaro:sleep(3000) end
  5. Guys, Problem, I have code below, however, change the value of Global variable "regenover" does not trigger the scene. I don't understand why not, someone able to help me out here ? --[[ %% globals regenover -]] local trigger = fibaro:getSourceTrigger() local regentijd = fibaro:getGlobalValue("regenover") if regentijd == "0" then fibaro:call(475, "turnOn") fibaro:call(782, "pressButton", "5"); elseif regentijd == "5" then fibaro:call(475, "turnOff") fibaro:call(782, "pressButton", "4"); elseif regentijd == "15" then fibaro:call(475, "turnOn") fibaro:call(782, "pressButton", "3"); elseif regentijd == "30" then fibaro:call(475, "turnOff") fibaro:call(782, "pressButton", "2"); end
  6. I want to fill a global variable on my HC2 using a http command from another machine Is this possible Thks, John
  7. There was a topic on link Asterisk PBX and HC2 to have telephone caller ID passed to HC2 : The global variables were passed to HC2 via API call as : $url = "http://". $username . ":" . $password . "@" . $HC2serverIP . "/api/globalVariables/" . $variable; where $password = "password" // password for HC2 $username = "username" // username for HC2 $HC2serverIP = "" // IP of HC2 when we had HC2 username as single word it was working fine, but now when we were forced to convert our username to e-mail address we have special character '@' in the username. The special character '@' of the username is passed to HC2 as '%40' so instead the username of the form "[email protected]" we have "user%40mail.com" and of course we are not authorized by HC2 and our variables are not updated. Any advise how to deal with this to have the global variable updated remotely via API call ?
  8. Hi folks, I have a bit of a puzzler. I have a scene that sets to global variables based on light level from a sensor (device 217 ) The two options within the code are either 'day' or 'night' but sometimes it gets set to 'normal' Could anybody offer an explanation Scene code below... Thanks Frank --[[ %% autostart %% properties 217 value %% events %% globals --]] -- Configuration - Scene Info sceneName = "GV Time of Day, inside and outside" sceneVersion = "1.0.1" -- Scene Description -- Sets a global variable called TOD_LightMode depending on lux level from an outside sensor -- Configuration - Device IDs local OutsideLuxSensorID = 217 -- Validate Number of Scene Instance if (fibaro:countScenes()>1) then --fibaro:debug("stop scene") fibaro:abort() end function UpdateEventLog(eventStr) local currDate = (os.date("%b %d - %H:%M")) local updStr = (fibaro:getGlobal("Log_Event") .."".. currDate .." ".. eventStr .." \n") fibaro:setGlobal("Log_Event", updStr) end -- Main Code for the Scene function tempFunc() --set reference for outside lights if tonumber(fibaro:getValue(OutsideLuxSensorID, "value")) == 0 then fibaro:setGlobal("TOD_LightMode", "night") fibaro:debug("Outside = 0 - "..fibaro:getGlobal("TOD_LightMode")) UpdateEventLog("Outside mode set - night mode") else fibaro:setGlobal("TOD_LightMode", "day") fibaro:debug("Outside > 0 - "..fibaro:getGlobal("TOD_LightMode")) UpdateEventLog("Outside mode set - day mode") end fibaro:sleep(5000) fibaro:debug(fibaro:getValue(OutsideLuxSensorID, "value")) -- set refernce for inside lights if tonumber(fibaro:getValue(OutsideLuxSensorID, "value")) < 50 then fibaro:setGlobal("TODModeInside", "night") fibaro:debug("Inside <40 - "..fibaro:getGlobal("TODModeInside")) UpdateEventLog("Inside mode set - night") else fibaro:setGlobal("TODModeInside", "day") fibaro:debug("Inside >40 - "..fibaro:getGlobal("TODModeInside")) UpdateEventLog("Inside mode set - day") end fibaro:debug("Inside - "..fibaro:getGlobal("TODModeInside")) fibaro:debug("Outside - "..fibaro:getGlobal("TOD_LightMode")) end -- Trigger Management local currentDate = os.date("*t") local startSource = fibaro:getSourceTrigger() --Start of Scene Execution if (startSource["type"] == 'property') then fibaro:debug("Started through property") tempFunc() -- this is calling the the function if something happens. elseif (startSource["type"] == 'global') then fibaro:debug("Started through variable") tempFunc() -- this is calling the the function if something happens. elseif (startSource["type"] == "autostart") then fibaro:debug("Started through autostart") tempFunc() -- this is calling the the function if something happens. elseif (startSource["type"] == "other") then fibaro:debug("Scene not started, this can only be started through property, global or autostart!"); end -- End of Scene Execution fibaro:debug("Scene, " .. sceneName .. " v" .. sceneVersion .. " completed.")
  9. Dear Fibaro team, In my HC2 I use many global variables which offer me full flexibility with this great controller :-> Lately I noticed that if you change a global variable on HC2 through a HTTP command then the global variable on HC2 will change, but Scenes that are dependent of this global variable change (.. trigger) are not being executed. For testing purpose I then created a new scene within HC2 which changes the same global variable, and now I notice that the other Scenes (.. that are dependent of this global variable change by trigger) are being executed. So it looks like it only works when the job is executed from within the box, and not from external. Is it normal that it doesn't work this way, or is it maybe a minor SW bug? Or, am I doing something wrong here? Thanks for your valuable support. Best regards, Mark van der Kallen
  10. Morning all! Been trying to figure all the documentation all last night about Global Variables and the API. I can look at the status of a variable but no idea how to set it using the API? Does anyone know the line for setting Global Variables using the API? Thanks!!
  11. Hi! I want to automatically make a new global variable in a scene? How can this be done?
  12. Hi2UAll, I need some help. I'm able to store a table in global variable and read the content. But.. When saving is done, by a webbrowser in the HC2 global variable panel, the data is corrupted! The value in the global variable shows NaN (Not a Number). Before saving a table in a global variable in lua I encoded it first. When reading the global variable I use decode. ( json.decode(MYTABLE) ) Can somebody help me with this to get it right? Thank in advance!
  13. Hi all, Yesterday I received the new Homey controller (www.athom.com) and I would like to somehow integrate this into my existing Fibaro Home Center 2 environment. (.. I'm very happy with my Home Center 2 controller and don't want to replace it by Homey at all). I purely want to use Homey because of its good speech recognition capabilities (.. so Home Center 2 will remain my single and main controller) and am wondering how I could let Homey change a Global Variable within the Home Center 2 controller, so based on this change then scenes could be triggered within Home Center 2. I have no experience with this at all, could it be done by a HTTP call? Any help or ideas are welcome. Thanks and best regards, Mark
  14. I use global variable set with a time string. This works fine if set with a scene. However if set via the control panel - variables it accepts only integer/real numbers. Should the software allow just numbers and strings, so is this an interface issue which should be redirected to Fibaro or is my approach just false?
  • Create New...