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

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

Categories

  • Scenes
  • Virtual Devices
  • Quick Apps
  • Icons

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

  1. Finally I have found a way to nicely format the label on virtual device. It works perfectly on HC2 UI, but it totally distorted on mobile devices (Android and iOS). Here how it looks on UI: On mobile you can see nothing, just the beginning of the format Fibaro team or anyone any idea why it works this way? Any workaround?
  2. hi, This tutorial is based on an idea that i believe originated to @cag014 some time back and has been adopted by many. So well deserved kudos to @cag014 and others that helped originate and develop the concept. I am merely a scribe that has benefited from this. I decided to write a quick tutorial for two reasons... I implemented this over christmas and and found it very useful and much easier than I thought It would appear that we have some new forum members that got HC2 devices from Santa The core of this approach is to store all the reference ID's to your devices, virtual devices, scenes, etc in a json encoded table. The references like jT.kitchen.light are used in the scene or vd and device ID can easily be changed in the table. One important benefit is that it you need to exclude/include a device the device ID will change. With this approach you simple change the reference in the Home table and your done. Without this approach you wll need to go through your code and change the device ID where appropriate. ** This doesn't get over the need to enter ID as triggers in the scene headers as fibaro doesn't allow variable in the header ** The solution has two parts to it. The home table itself where the data is stored. - this is held in a predefined variable (lower part of variables panel) The references in your scenes and virtual devices use this table HOME TABLE This can be created and maintained through either a scene or a virtual device. I chose a VD but there is no advantage I can thing of using one way or the other. Go to Panel, Variables Panel and create a new predefined variable (lower part of panel) called HomeTable. When you create a predefined variable it has two values. Name the variable and save. Edit the variable and simply delete the second value. Using either a scene or a vd create your table and store it. This is lua from my VD. I create one button and enter the code below. The top part shows the format of the table. I opted to place each element I am looking to store into rooms and/or other natural groupings but you can choose any way to structure. I'll attached a copy of my full table at the end of this to show what I use it for. The next part encodes and stores the data The last part is where I read back one entry to show the table stored okay. -- HOME TABLE FOR ALL DEVICES, SCENES ETC. jsonHome = { hall = { Lights=88,Lamp=1421,Temp=1,Motion=1,Humidity=1,Lux=1,ZRC90=1447,SmallBathLight=147,SmallBathMotion=1, SmallBathTemp=1,SmallBathLux=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, kitchen = { Pendant=176,Table=174,Spotlights=90,Temp=1549,Motion=1548,Humidity=1551,Lux=1550,UV=1552,XmasLight=1531, WineFridgeTemp=1,Dishwasher=1,rcTV=1490,rcSonos=1561,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, } jHomeTable = json.encode(jsonHome) -- ENCODES THE DATA IN JSON FORMAT BEFORE STORING fibaro:setGlobal("HomeTable", jHomeTable) -- THIS STORES THE DATA IN THE VARIABLE fibaro:debug("global jTable created") -- STANDARD DEBUG LINE TO DISPLAY A MESSAGE -- I then like to read back a entry from the table to show that the table didnt get corrupt in the process. local jT = json.decode(fibaro:getGlobalValue("HomeTable")) -- REFERENCE TO DECODE TABLE fibaro:debug(jT.kitchen.Motion) -- DISPLAY ONE VARIALE the output of this when I click the button (or run the scene is as follows) It is reading back the ID (1548) stored for Motion under the kitchen grouping I would recommend using an external editor like Notepad++ or Zerobrane to edit/manage the code in the vd and then copy back to the vd when ready to update as the HC2 lua editor is very small At this stage you now have your table REFERENCING THE TABLE CONTENTS IN YOUR SCENES AND VIRTUAL DEVICES For this you need to place the following line of code in each scene or vd local jT = json.decode(fibaro:getGlobalValue("HomeTable")) and then use references instead of device ID's in the scene code. The easiest way to explain this is with an example. This scene switches on a light in my kitchen if it is dark, motion is detected and no light is on already --[[ %% properties 1548 value %% events %% global --]] local jT = json.decode(fibaro:getGlobalValue("HomeTable")) -- KITCHEN AUTOLIGHTS if (tonumber(fibaro:getGlobalValue("Darkness")) == 1 ) and (tonumber(fibaro:getValue(jT.kitchen.Motion, "value")) > 0 ) and (tonumber(fibaro:getValue(jT.kitchen.Spotlights, "value")) == 0 ) and (tonumber(fibaro:getValue(jT.kitchen.Pendant, "value")) == 0 ) and (tonumber(fibaro:getValue(jT.kitchen.Table, "value")) == 0 ) and (tonumber(fibaro:getValue(jT.sunroom.Light, "value")) == 0 ) and (tonumber(fibaro:getValue(jT.sunroom.Lamp, "value")) == 0 ) then fibaro:call(jT.kitchen.Pendant, "setValue", "40") UpdateEventLog("kitchen lights auto on") end It's easy enough to see how the references are built up if you examine the scene v the table at the top of this post and that it !! Addition: If you need to adjust a single parameter in the table you can use the following. This can be useful if you don't want to adjust one value and then copy the whole table back into the vd and update or more useful if you want to adjust the value in the fly in a script. -- NEW PARAMETER VALUE jT.kitchen.Motion=2000 -- TO SAVE THE CHANGE jSonosTable = json.encode(jT) fibaro:setGlobal("SonosTable", jSonosTable) fibaro:debug("global jTable created") Hopefully this will help some users If you have any suggestions as to how to improve this please let me know and I'll edit -frank ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Copy of my table to show how flexible this approach can be jsonHome = { system = { Sunset_SunRise=1560,houseStatus=1507,alarmStatus=881,HouseTemps=1236,sonosSummary=1407,sonosTTS=1452, sonosSequences=1536,TVSequences=1545,lightingSequences=1534,powerConsump=1484,specialHouseMode=1538 }, hall = { Lights=88,Lamp=1421,Temp=1,Motion=1,Humidity=1,Lux=1,ZRC90=1447,SmallBathLight=147,SmallBathMotion=1, SmallBathTemp=1,SmallBathLux=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, playroom = { Light=84,TVLight=1438,XmasLight=1518,Motion=1595,Temp=1596,rcPlayroomTV=1487,rcSonos=1574,Lux=1597,Humidity=1598,UV=1598,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, living_room = { Light=231,libraryLight=164,libraryTopSocket=166,Temp=1584,Lamp=1423,Lux=1585,Motion=1583,Humidity=1,UV=1,TVLight=1499,XmasLight=1513,rcSonos=1,rcLivingRoomTV=1506,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, utility_room = { Light=141,Temp=1194,Motion=1270,Humidity=1,Lux=1,UV=1,FreezerTemp=1,Washer=1,Dryer=1 }, equipment_rack = { RackSummary=1453,Rack1Temp=1192,Rack2Temp=1193,fanUpper1=1432,fanLower2=1434,powerAmpLower=1269, powerAmpUpper=1267,heatingFlowTemp=1199,rcSatBox=1491,SatBoxPresets=1492,rcHdmiMatrix=1489,rcAppleTV=1539, rcAppleTvSystem=1540,rcBluRay=1544,rcDroidBox=1541,networkMonitor=1493,avDeviceMonitor=1494,haDeviceMonitor=1495,hc2Resources=1391 }, kitchen = { Pendant=176,Table=174,Spotlights=90,Temp=1549,Motion=1548,Humidity=1551,Lux=1550,UV=1552,XmasLight=1531, WineFridgeTemp=1,Dishwasher=1,rcTV=1490,rcSonos=1561,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, sunroom = { Light=172,Lamp=6,projectionScreenPower=1509,rcProjector=1542,rcProjectorScreen=1543 }, dining_room = { Light=25,Lamp=1,Motion=1,Temp=1202,Lux=1,Humidity=1,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, pizza_bbq_area = { CenterLights=253,Spotlight=710,Lanterns=712,HeaterSwitch=255,LEDLights=238,Motion=705,Heaters=250,Temp=1,Lux=1, Humidity=1,rcSonos=1,PizzaBbqCam=761,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, garage = { Light=895,BenchLight=1,DoorOpener=80,DoorStatus=778,Temp=1578,Humidity=1590,Lux=1589,Motion=1587,UV=1591, GarageControl=1559,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, driveway = { porchLight=68,pillarLights=145,Spotlight=893,Motion=1429,GateTemp=958,GateOpener=94,GateStatus=956,GateControl=1537,DrivewayCam=1556,FrontDoorCam=1557 }, back_garden = { patioLight=64,utilityLight=76,sidePatioLights=60,boundaryLights=62,Spotlight=58,Motion=1427,Humidity=218,Lux=217,Temp=958,XmasLight=1523,BackGardenCam=1558 }, hotpress = { Light=143,DoorStatus=888,Temp=890 }, bathroom = { Light=162,MirrorLight=1468,MirrorDemist=1470,Temp=1170,Humidity=1,Motion=1 }, guest_bedroom = { Light=31,Lamp=718,Temp=1588,Motion=1587,Lux=1589,Humidity=1590,UV=1591,BathLight=1,BathTemp=1,BathMotion=1,BathHumidity=1,BathFan=1,BathMirrorLight=1460,BathMirrorDemist=1462,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, master_bedroom = { Light=56,LampDad=29,LampMum=1,Temp=1,Motion=1247,Lux=1, Humidity=1,BathLight=1,BathTemp=871,BathMotion=870,BathHumidity=1,BathLux=872,BathFan=1,BathMirrorLight=1464,BathMirrorDemist=1466,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, lau_eth_bedroom = { Light=52,Temp=1185,Motion=1253,Lamp=1440,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, frank_bedroom = { Light=54,Temp=1200,Motion=1255,Lamp=1450,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, office = { Light=33,Temp=1186,Motion=1251,Lamp=720,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, Landing_Stairs = { stairsLight=92,landingLight=168,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, scene = { MainScene=614,AlarmControl=598,rebootHC2=593,goodMorning=463,goodNight=331,LeavingHome=483,welcomeHome=488,quietMorning=499,kidsToBed=490,plaroomTvOn=580,firstFloorMusicOn=579,firstFloorAllOff=578, hallSceneControl=519,StairsLight30=556,GateOpen5=526,GateOpenHold=361,GateOpenClose=425,DumpEventLog=565,PlayroomOff=617 }, vd = { AlarmManagement=881,TVPresets=1545,SonosTTS=1452,LightPresets=1534,HouseModeExt=1538,SonosPresets=1536,RackTempMngt=1453,MediaSourcePresets=1567,JhomeTable=1566,GateControl=1537,GarageControl=1559 }, users = { admin=2,frank=1564,sylvia=1565 }, ios = { frankS6=993,sylviaS7=1526,frankipad=1532,sylviaipad=1533 }, IsOnline = { GlobalCache=1,SatBox=1,AppleTV=1,AndroidBox=1,TVPlayroom=1,TVKitchen=1,TVLiving=1,Projector=1,HC2=1,SynNAS=1,AlarmGateway=1,AlarmPanel=1,SonosAPI=1,DrivewayCam=1,GardenCam=1,FrontDoorCam=1,PizzaBBQCam=1,Internet=1,USG=1,HouseAP=1,GarageAP=1 }, }
  3. Guys, I have seen some very cheap Z-wave devices at eBay... Please see link below http://www.ebay.com/sch/aixi-smart-home-security/m.html?item=122479369236&rt=nc&_trksid=p2047675.l2562 Ia anyone has tried these no brand devices? It looks like "original" copy of some famous smart home manufacturers . Would like to hear your opinion on that..... thanks
  4. Hi everyone. I have few devices that don't react properly to simple "turnOn", "turnOff" actions. Might be Z-wave unresponsive at that time or RF interference or they're too far away from controller or they'e dead. Anyhow when executing fibaro:call(devID,"turnOn") the device doesn't always turning ON (same case for OFF). This phenomena very frustrating especially on predefined events that don't act as expected ( like turn on Fan in bathroom when humidity high, close garage if no presence detected at home, turn on/off water heater according to temperature and etc.) Attached scene code is verifying that the device is not dead, command transferred to device and device has changed the state. In case of problem email sent to notify about problem. In addition I have found that this scene is very efficient to identify unresponsive Z-wave situation and I'm using this scene to turn on/off some device every hour just to see if Z-wave is OK. Some basic instructions: 1. Create new LUA scene and copy attached code in it. 2. Scene call syntax: fibaro:startScene(sceneID, {devID, "turnOn"}) - same parameters as original fibaro:call() That's all for basic. In addition there are two options: 1. If you have device that you want to be notify by email at any time that the device state has been changed (in my case garage gate and water heater), please add third Boolean parameter: fibaro:startScene(sceneID, {devID, "turnOn", true}). You will receive an email one every state change of the device. Could be changed into push notification. 2. If you need to receive scene status of the action or debug information, please follow next instructions: Add "predefined global variable" by name jCall. In order to receive correct response you need to make sure that the scene is executed before that, so the suggested scene call is: fibaro:startScene(sceneID,{devID,"turnOff"}) x=os.time(); while (fibaro:countScenes(sceneID)>0 and os.time() - x < 10) do end jFc = json.decode(fibaro:getGlobalValue("jCall")) fibaro:debug(jFc.resp) -- print debug information if (jFc.status == 1) then -- success - write your code else -- action failed write your code end Note: In case the device already at the same state, email sent to notify that the device state is the same and no action performed. Scene Code below and attachment FibaroCall.rtf local jK,jC = {"device","act", "sEmail"} , {device = -1, act = "noAct", sEmail=false} for i, v in ipairs(fibaro:args(1)) do jC[jK[i]] = v end local actState = {"OFF", "ON", "turnOff" , "turnOn"} local sceneStart = os.time() local log, mLine = "", "————————————————————————————" local mStr = fibaro:getRoomNameByDeviceID(jC.device) ..":" .. fibaro:getName(jC.device) local iVal, iValTime = fibaro:getValue(jC.device, "value"), os.time() - fibaro:getModificationTime(jC.device,"value") local jF = {status=-1,resp="in scene"} if (actState[iVal+3] == jC.act ) then jF.status=1 jF.resp = "<font color=lightblue><sub>" .. fibaro:countScenes() .."</font></sub><font color=yellowgreen>" .. jC.device..":</font><font color=wheat>" .. mStr .. " <font color=lightgreen> [ Device state: " .. actState[iVal+1] .. " | Action: " .. jC.act .. " ] </font><font color=lightblue>-> No actions</font><span style=text-align:center>" if (jC.sEmail == true ) then fibaro:call(2, "sendEmail",fibaro:getName(jC.device) .. ":" .. jC.act , "{ " .. mStr .. " } device at same state as requested:\n" .. mLine .. "\n\t\tDevice state: " .. actState[iVal+1] .. "\n\t\tAction: " .. jC.act .. "\n" .. mLine .. "\n\n☛ Fail-safe Call (•‿•) " ) jF.resp = jF.resp .. " <small>(eMail sent)</small>" end fibaro:debug(jF.resp) if (fibaro:getGlobalValue("jCall")) then fibaro:setGlobal("jCall",json.encode(jF)) end fibaro:abort() end for i=1,3 do fibaro:call(jC.device, jC.act) x = os.time(); while (log == "" and (os.time() - x) < 10) do fibaro:sleep(150) -- time to update log (status) log = fibaro:getValue(jC.device, "log") end fibaro:sleep(350) if (log == "" ) then log="Transfer_was_Blank" end jF.resp = "<font color=lightblue><sub>" .. fibaro:countScenes() .. "</font></sub><font color=grey><sup>" .. i .. "</sup></font><font color=yellowgreen>" .. jC.device..":</font><font color=wheat>" .. mStr .. " <font color=lightgreen> [Action: " .. jC.act .. "] [State: " .. iVal .. ">" .. fibaro:getValue(jC.device, "value") .."]</font> [<small>" .. log .. "</small>]</font>" if (string.find(log,"Transfer_was_") == nil) then if (log == "SEND_COMMAND_TO_DEAD_DEVICE") then jF.resp = jF.resp .. "<br><font color=orangered>Trying " .. jC.act .. " on DEAD device [ " .. mStr .. " ]</font>" fibaro:call(1, 'wakeUpAllDevices',jC.device) end elseif (iVal == fibaro:getValue(jC.device, "value") ) then else jF.status = 1 break end fibaro:debug("<font color=yellowgreen>" .. jC.device.."</font> " .. jF.resp .. " <font color=orangered><small>FAILED</font>" .. "<small> Retry in " .. (.5*i) .. " Sec.</small>") fibaro:sleep(500*i) end -- for i=1,3 do if (jF.status == 0) then jF.resp = "<font color=orangered>Z-Error: </font>" .. jF.resp .. " <small>(eMail sent)</small>" fibaro:call(2, "sendEmail","Z-Error:" .. fibaro:getName(jC.device), "\n{ " .. mStr .. " } does not respond properly!\n" .. mLine .. "\n\t" .. jC.device .. ":" .. fibaro:getName(jC.device) .. " [ " .. actState[iVal+1] .. " > " .. actState[tonumber(fibaro:getValue(jC.device, "value"))+1] .. " ] [ " .. log .. " ]\n\t" .. actState[iVal+1] .. " state duration = " .. os.date("!%H:%M:%S",iValTime) .. " Sec.\n" .. mLine .. "\n\n☛ Fail-safe Call ( ◉︵◉ )") elseif (jC.sEmail == true ) then fibaro:call(2, "sendEmail",fibaro:getName(jC.device).. ":" .. jC.act , "\n{ " .. mStr .. " } device state has been successfully changed.\n" .. mLine .. "\n\t" .. jC.device .. ":" .. fibaro:getName(jC.device) .. " [ " .. actState[iVal+1] .. " > " .. actState[tonumber(fibaro:getValue(jC.device, "value"))+1] .. " : " .. log .. " ]\n\t" .. actState[iVal+1] .. " state duration = " .. os.date("!%H:%M:%S",iValTime) .. " Sec.\n" .. mLine .. "\n\n☛ Fail-safe Call (•‿•) ") jF.resp = jF.resp .. " <small>(eMail sent)</small>" end --if (status == 0) fibaro:debug(jF.resp .. "<small> in " .. os.time() - sceneStart .. " sec. </small><span style=text-align:center>") if (fibaro:getGlobalValue("jCall")) then fibaro:setGlobal("jCall",json.encode(jF)) end
  5. Hello everyone ! I'm looking for forum's help on below subject: Sometimes scenes, virtual devices unexpectedly stop running due to bugs or other problems, physical devices stuck (motion sensors, power readings and etc.) and there is no ability to identify it. The only way to realize that something went wrong is when you notify that the system behaves differently. In many cases it takes a while to understand what the problem is. I'm wondering if there is any builtin solution to monitor proper execution of scenes, virtual devices and to identify that physical devices aren't stuck. Something like "watchdog" for all parts and codes. I've wrote scene that uses refreshStates API, but it looks more like workaround. Although the scene works perfectly and sends emails (TTS as well) in case of problems in any part of the system , I prefer to use standard solution if exists. Thank you I believe, I'm not the only one that struggling with this problem. (If anyone is interested to have my solution, I could post it despite my opinion that it is "ugly workaround")
  6. Aeon KeyFob is missing double click activation (where most of other controllers do have that option), so I'm posting scene below as an example to have double click activation: In order to make this code works for you please follow per below: 1. Set Aeon KeyFob at Scene Mode (Parameter 250 set to 1) 2. Change device ID to your real ID 3. Define global variable "keyFob" --[[ %% properties 433 sceneActivation %% globals --]] local startSource = fibaro:getSourceTrigger() local ButtonPressed = fibaro:getValue(tonumber(startSource["deviceID"]), "sceneActivation") if (fibaro:countScenes() == 2) then fibaro:setGlobal("keyFob", "10") end if (fibaro:countScenes() == 1) then fibaro:sleep(3000) -- wait 3s if next click is coming ButtonPressed = ButtonPressed + tonumber(fibaro:getGlobalValue("keyFob")) if (tonumber(ButtonPressed) == 1) then --UPPER LEFT SHORT fibaro:debug("Key # " .. ButtonPressed) elseif (tonumber(ButtonPressed) == 2) then -- UPPER LEFT LONG fibaro:debug("Key # " .. ButtonPressed) elseif (tonumber(ButtonPressed) == 11) then -- UPPER LEFT SHORT DOUBLE NEW KEY fibaro:debug("Key # " .. ButtonPressed) elseif (tonumber(ButtonPressed) == 12) then -- UPPER LEFT LONG DOUBLE NEW KEY fibaro:debug("Key # " .. ButtonPressed) elseif (tonumber(ButtonPressed) == 3) then -- UPPER RIGHT SHORT fibaro:debug("Key # " .. ButtonPressed) elseif (tonumber(ButtonPressed) == 4) then -- UPPER RIGHT LONG fibaro:debug("Key # " .. ButtonPressed) elseif (tonumber(ButtonPressed) == 13) then -- UPPER RIGHT SHORT DOUBLE NEW KEY fibaro:debug("Key # " .. ButtonPressed) elseif (tonumber(ButtonPressed) == 14) then -- UPPER RIGHT LONG DOUBLE NEW KEY fibaro:debug("Key # " .. ButtonPressed) elseif (tonumber(ButtonPressed) == 5) then -- BOTTOM LEFT SHORT fibaro:debug("Key # " .. ButtonPressed) elseif (tonumber(ButtonPressed) == 6) then -- BOTTOM LEFT LONG fibaro:debug("Key # " .. ButtonPressed) elseif (tonumber(ButtonPressed) == 15) then -- BOTTOM LEFT SHORT DOUBLE NEW KEY fibaro:debug("Key # " .. ButtonPressed) elseif (tonumber(ButtonPressed) == 16) then -- BOTTOM LEFT LONG DOUBLE NEW KEY fibaro:debug("Key # " .. ButtonPressed) elseif (tonumber(ButtonPressed) == 7) then -- BOTTOM RIGHT SHORT fibaro:debug("Key # " .. ButtonPressed) elseif (tonumber(ButtonPressed) == 8) then -- BOTTOM RIGHT LONG fibaro:debug("Key # " .. ButtonPressed) elseif (tonumber(ButtonPressed) == 17) then -- BOTTOM RIGHT SHORT DOUBLE NEW KEY fibaro:debug("Key # " .. ButtonPressed) elseif (tonumber(ButtonPressed) == 18) then -- BOTTOM RIGHT LONG DOUBLE NEW KEY fibaro:debug("Key # " .. ButtonPressed) else fibaro:debug("Key # " .. ButtonPressed .. "not found") end fibaro:setGlobal("keyFob", "0") end Now we've doubled the number of keys from 8 to 16 ! at cost of 3 sec. delay. (The delay of 3 seconds works good for my configuration, but could be changed to fit your system) Of course by adding more delay and minor changes of the code, we can go to triple click and even more... By the way same idea could be implement for other controllers to expand the number of keys.
×
×
  • Create New...