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


Search the Community

Showing results for tags 'variable'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Facebook


Google+


Skype


Website URL


WhatsApp


Country


Gateway/s


Interests

Found 26 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. How do I put a GET status from Hue lamp into variable to store? HueGtw = Net.FHttp("IP-address",portNumber) HueGtw:GET('/api/xxxxxx/lights/3) Help would be appreciated?
  3. Hi I have this function function getHueLight(id) local hueIP = 'xxx.xxx.xxx.xxx' local huePort = '80' local hueKey = '--------------------------------' local requestUrl = "http://"..hueIP..":"..huePort.."/api/"..hueKey.."/lights/"..id; local httpClient = net.HTTPClient(); httpClient:request(requestUrl, { options = { headers={}, method='GET' }, success = function (response) fibaro: debug (response. data) end, error = function (err) fibaro: debug ("Error:" .. err) end }); end and i want to assign output of this to variable i've tried somthing like this local var = getHueLight(id) but it's get nil value
  4. I have the following scene set up with fibaro sensor and fibaro dimmer. It all works fine except the events log shows that the sensor keeps reverting to 'safe' seconds after sending a 'breached' message so the light does not stay on. After doing this a few times it finally stays on for the full 900s set. Is there a parameter I need to set on the sensor, or perhaps make two separate scenes?
  5. Version 1.2

    172 downloads

    Due to lack of global functions, we're adding more and more global variables. In some cases after a while we find a way to do it differently, but the global variables are still there. Usually we quite afraid to delete the variable because we're not sure if the variable is not in use somewhere in code. So, this code scans scenes and virtual devices and finds where the variable is in use. Scenes displayed (blue color) by name and scene ID. Virtual devices displayed (wheat color) by name, button name, device ID and button ID. The program execution has four options: 1. Scan for all variables and display scenes and virtual devices where every variable is in use. (make sure findVar=nil and findString=nil) 2. Find where specific variable is in use by defining findVar. 3. Find where specific string (phrase) is in use by defining findString. Some characters, called magic characters, have special meanings when used in a pattern. The magic characters are ( ) . % + - * ? [ ^ $ The character `%´ works as an escape for those magic characters. So, '%.' matches a dot; '%%' matches the character `%´ itself. You can use the escape `%´ also for all other non-alphanumeric characters. When in doubt, play safe and put an escape. For example if you're searching for string "match(" you should use "match%(". 4. To find not in use variables only. Press "start" twice within 1 second. --================= User configurable parameters ============================ findVar = nil --------- Name of specific variable to search. findString = nil ------ Any string to search. --============================================================================ Notes: In case findVar and findString are both defined, the code will scan for findString. Make sure when findVar and findString are not in use to set to nil As usual hope it helps...
  6. What I want? I want to show and edit Global Varibles via my device (Iphone) on the Fibaro App. What have I done so far? 1 / I have made a global variabel called "Counter" in the panel section of HC2 2 / I have made som LUA code that can count fibaro:setGlobal("Counter", fibaro:getGlobalValue("Counter")+1) fibaro:debug(fibaro:getGlobalValue("Counter”)) So far it works - I can count! 3 / Now I want to show the variable in my interface device I have tried to make a Virtuel Device, but it seems like it is only possible 2 set a value through a slider or by programming a button. Not what I want. 4 / It seems to be a basic an very relevant think to enable edit and show variables in a user interface using HC2 and Iphone apps in Fibaro. I have search on different Fibaro Forums, looked after tutorials and asked Danish resellers, but found no help. Can anybody help me with a simple example? BR Uffe Rasmussen
  7. Hello guys, I have some trouble with creating scene, which has to TURN ON a Fibaro Plug at exact time, but only when variable is met. The problem is, if i tell scene to TURN ON plug at exact time, it works fine. But, when I add variable next to the time with "And", scene completely ignores the time and runs every time the variable is met. So if I or a different scene change variable to OFF, this scene will automatically trigger despite it shouldnt untill 18:00. Anyone knows why please? Thank you!
  8. By making a scene, how to set a variable after the HC2 has been restarted? With other words, how does the system HC2 know when it has been restarted.... as after this I want to set a variable Restart_HC2 > RUNNING or RESTART Any ideas? I would to run a scene to set some variables after Restart of the HC2
  9. I can't get my head around a problem I am having with variables triggering scenes. So, turning to the forum to see if anyone has any idea. The problem I am having is that a scene is triggered by a variable even if the variable is not named in the LUA trigger section. I created a scene with the following trigger definition: --[[ %% autostart %% properties %% globals Var1 Var2 --]] The scene worked fine. It is triggered by changes in Var1 and Var2 as should be and the LUA code is executed. My debug code verfies it. I can see that both Var1 and Var2 are triggering the scene. Next, I wanted to change the logic a little and no longer wanted Var2 to trigger the scene, only Var1. I still used Var2 in the code however, just not as scene trigger. The new trigger definition looked as follows: --[[ %% autostart %% properties %% globals Var1 --]] But, to my surprise, the scene is still triggered by Var2! My debug code reports that Var2 is indeed the trigger source. I am confused! Restarting the HC2 does the trick though. After restarting, the scene works as designed and Var2 no longer triggers the scene. The same behaviour also applies to block scenes. I have created a block scene using Var1 and Var2 in the if-statement and then unchecked Var2 it in the "Triggering variables" list. Same thing happens - Var2 keeps triggering the scene despite the fact that I have unchecked it. If I convert the block scene to LUA code I can see that Var2 is not in trigger definition and hence should not trigger the scene. But it still does! Surely this must be a bug in the system right? Or I am missing something? Thanks Software version 4.160
  10. I need help to understand why the below described HC2 Scene does not trigger when set to "Automatic" and the Variable "ATest" is set to "True". I can trigger the Scene manually wherafter the Device "Test" turns off as expected. Below follows the details: In order to understand the difference between "Automatic" and "Manual" and the effect of having av Scene turned "On" or "Off" in HC2, I made the following very simple test Scene in the Graphic Block editor: IF Variable "ATest" == "True" THEN Device "Test" = "Turn Off" The Variable "ATest" was created in the HC2 Variable Panel as a "Predefined Variable" with to defined values, namely "True" or "False". The Device "Test" is a Fibaro Wallplug In precise LUA code: --[[ %% properties %% weather %% events %% globals ATest --]] local startSource = fibaro:getSourceTrigger(); if ( ( fibaro:getGlobalValue("ATest") == "True" ) or startSource["type"] == "other" ) then fibaro:call(182, "turnOff"); end Any help to explain why the Scene does not turn off the device will be highly appreciated!
  11. Hi What I want to do is to show from a variable to a ipad fibre display - for example i have setup a variable that changes on a scene called Alarm at Home - I want to display this as a on or off state some how on the iPad in fibre display so that you can see if the alarm in home mode is on or off (active or not active) Just need a simple way to show the state of a variable visually - have tried doing it through a virtual device with no luck.... any help would be greatly appreciated..
  12. amatt

    Guest presence

    Has anyone been able to create a functioning Guest "mode"? I was thinking about making my guest mode do something like the following but is not functioning correctly. everytime a guest is present add 1 to the "guests" variable then everytime a guest is not present minus 1 from the "guests" variable I already have the presence setup with a VD that finds the guests phone via Mac address. the problem is that when it detects that the guest is present it adds 1 to the variable everytime it finds the guests phone (I have it looking every 30min) has anyone found a better solution or can give some advise on how to keep a more accurate track of how many guests are present. Thanks!
  13. Can someone explain me why this scene gives me the warning of to many instances. I have several similar looking scenes that sometimes gives the notification of to many intances. Max running instances is set to 2
  14. I am still testing around the usage of variables and tried the following simple thing. I do have a predefined variable having two values being ON and OFF. I do have a scene (automatic) which switches on a wall plug, when the variable is in its OFF status and sets the variable to ON. If variable=ON the "switch on" and set variable to ON nothing happens. Only when I restart HCL, the scene is triggered. When I then switch the variable to OFF in the variable panel, nothing happens. What I also noticed. when the variable is switched ON and I manually trigger the scene, the wall plug is switched ON, even the trigger condition of the variable being OFF is not fulfilled, how comes? this somehow makes the usage of variables as trigger conditions useless. anyone having a clue?
  15. Hi I would like to know the best practises to map a device id (based upon the known 'hometable' and another variable)? For example, see partial scene below. Each device has a specific timeout. The way I did in the main scene doesn't seems to be a best practise since I'm repeating again the device id, gathered from the hometable. Using the name (for example local BuzzerId = (jT.Woongedeelte.Buzzer)) neither (I think). But how should you do it in a way you can link the device id with a timeout value in your configuration setting of a scene so you an use it in a loop. Hope it's clear. Thanks. -- Main scene ---- -- loop through DevicesID's for i, id in ipairs(DevicesIDs) do -- Mapping between ID's and timeout if id == 76 then timeout = TimeOutBuzzer else if id == 91 then timeout = TimeOutFonteinSwitch else if id == 97 then timeout = TimeOutFontein else if id == 120 then timeout = TimeOutStroomBuiten else if id == 138 then timeout = TimeoutAlarmRGB end end end end end -- Check if the device is on, else end if (( tonumber(fibaro:getValue(id, "value")) > 0 )) then log("Device "..fibaro:getName(id).." With Id " ..id.." is active (On)") local tempDeviceState0, deviceLastModification0 = fibaro:get(id, "value"); -- Check if the device is on for longer then timeOuts, the switch off device. if (( tonumber(fibaro:getValue(id, "value")) > 0 ) and (os.time() - deviceLastModification0) >= timeout) then fibaro:call(id, "turnOff"); local Message = "Device " ..fibaro:getName(id).." With Id " ..id.." on for too long. Stopped." info("[INFO] Message is "..Message) fibaro:startScene(SMsgHsceneID, {Message, targetMail}) -- send SmMsg e-mail end end end
  16. Hi. I need help with setting global variable via api calls. I have HC lite. My variable is "Pocitnice" and value can be "Da" or "Ne". In webbrowser i put this string: http://192.168.1.48/api/globalVariables/Pocitnice and I get this: {"name":"Pocitnice","value":"Ne","readOnly":false,"isEnum":true,"enumValues":["Da","Ne"],"created":1490736622,"modified":1490891810} So, what i must add to this url (http://192.168.1.48/api/globalVariables/Pocitnice) to set value "Da" to Pocitnice??? Please, help.
  17. Hi there, I got the next setting but it does not work properly can someone explane to me whats wrong? I made a variable "timeOfDay" with 3 options "day" "evening" "night" Then I made three scenes on time: 06h30 set variable to day, 18h30 set variable to evening, 23h30 set variable to night. after this I made a scene to turn on the lights in my livingroom asfollow: If sensor livingroom detects motion check variable equals to evening. and lux value < 35 then turn on lights I only checked the triggering device "motion" so this scene will only run if motion is detected en then checks if all statements are true. somehow this works if I manualy activates the "evening" variable I want this because when I go to the bathroom at night I walk though the livingroom and do not want the lights to turn on. So I guess the problem is not in this scene but in de variable scene that sets the variable on time. Or is this thought al wrong? Where can I see witch state the varibale has at this time and do i need to check the "start when home center 2 starts" box? You can see the attach for more details (it's in Dutch) Thanks in advance. Maurice ***UPDATE*** I got it to work now. 2 things I have changed. First I forgot to check the box "start when home center2 starts" and "do not allow alarm to stop scene while alarm is running" Second I had 3 states the variable could be in, "day, evening, night" I brought this back to 2 states "day and night" Now the scene works like a charm. Good luck.
  18. How to add a variable "BathroomSetTemp" to a scene I made a variable in varaibles panel = BathroomSetTemp write a temperature to variable "BathroomSetTemp" read the temperature from the vairaible "BathroomSetTemp" This is my code: Wondering what i am doing wrong... as in the debug window in my scene, i am getting: [DEBUG] 13:40:57: Previous Target Temperature: nil < NIL instead of a temperature reading from my variable -- Thermostat ID local FloorHeating = 262 -- Heatit Unit -- Get Temp (Target) Readings local FloorBathroomSetTemp = tonumber(fibaro:getValue(262, "value")); -- Get Variables local NewSetTemp = fibaro:getGlobalValue("BathroomSetTemp"); log("Set Target Temperature: "..FloorBathroomSetTemp); fibaro:setGlobal("BathroomSetTemp", FloorBathroomSetTemp); log("Previous Target Temperature: "..NewSetTemp); Thanks in advance
  19. 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!!
  20. 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!!
  21. Hi everyone, Is it possible to create a virtual device to view my current variable values? I've seen guys do this with LUA, but not on an HCL which doesn't have the option. Using LUA and HC2 http://forum.fibaro.com/index.php?/topic/21002-variable-status/ Thank you.
  22. Hello, I thought it was time to start learning some simple lua coding. Anyhow, thought I could get some help here. I am trying to make a slider adjusting a variable that controls two different wall plugs. I want to make a slider for behaving like a thermostat. I've got two electric heating panels which is connected to two wall plugs. My thought was that if I set slider value to 21 then it would cut the power to the wall plug when netatmo reaches that temperatur. I don't really know where to begin, help would be much appreciated. Thanks!
  23. How can I read a keypress from a Z-WaveMe switch and then make a variable change. Button 1 = set variable as "home" Button 2 = set varaibel as "away" and so on..
  24. Hi Is there anyway i can update a global variable in HC2 with a HTTP call from vera lite?
  25. I use some variable to set time for morning day etc.... When rebooting the home center it's loosing the number afet the ":" for example "08:00" becomes "8".
×
×
  • Create New...