Jump to content

Search the Community

Showing results for tags 'hue'.



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

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 45 results

  1. Here is an example of how to code in a "single instance / event" style. A style I'm using today for all of my scenes. The idea is that instead of having to deal with a new instance being spawned with every scene trigger, all triggers are dealt with from within a single scene instance that is continuously running. It becomes something close to a traditional event loop model found in most modern GUI frameworks. The advantages with coding scenes in this style are: Scene can keep state in local lua variables between scene invocations/triggers Easy to keep different rules/logic in the same scene without causing conflicts, e.g. combining continuous running loops/schedules with immediate reaction on incoming triggers Easy to distribute different rules/logic between different scenes and allow them to communicate Easy to schedule actions to do in the future - that can be easily cancelled if new information is gained. Because the scene is continuously running it doesn't matter if there is a heavy initialisation when the scene starts up (parsing HomeTables etc.) as it is only done once... The framework has extensive support to run and debug the scene offline on a PC/Mac to get things right before deploying the scene on the HC2. Offline it is easy to simulate trigger/events to understand if the logic is correct, something that is not always easy to detect in a asynchronous environment. It has publish/subscribe mechanism allowing scenes to exchange events without having to know each other's names or IDs or rely on global variables. It has proven to be easy to integrate with external event/msg based systems like Node-red, where scenes can both send and receive events to node-red and thus extend functionality with Alexa, Google home, Hue etc etc. The framework is available in two version, a 'light' version and a full blow version with a lot of bells and whistles. The latter also supports writing rules in EventScript, a "simple", but very flexible and efficient approach to writing rules that need to trigger things at various times of the day, or trigger on sensors or switches changing states. The implementation of EventScript is built on-top of the single instance framework and the event model and would have been impossible to do in a traditional scene model. Ex of EventScript rules. --[[ %% properties 54 value 55 value 56 value 57 value 66 value 77 value 78 sceneActivation 88 ui.Slider1.value 88 ui.Label1.value %% events 100 CentralSceneEvent 120 AccessControlEvent %% globals Home %% autostart --]] myLightSensor1 = 54 -- do not declare local, script will not find them(!) myLightSensor2 = 55 myMotionSensor1 = 56 myMotionSensor2 = 57 myLight1 = 66 myLight2 = 67 myDoorSensor = 77 mySwitch = 78 myVD=88 myKeyFob = 100 myLock = 120 function main() -- Trigger rules Rule.eval("myLightSensor1:lux > 200 => myLight1:on") -- Turn on light1 if lux value goes above 200 Rule.eval("myLight1:isOn => myLight2:on") -- Turn on light2 if light1 is turned on Rule.eval("myDoorSensor:breached => myLight1:on") -- Turn on light1 if door sensor is breached Rule.eval("mySwitch:scene == S2.click => myLight1:on") -- Turn on light1 if S2 is clicked once Rule.eval("slider(myVD,'Slider1') == 50 => myLight1:on") -- Turn on light1 if slider is set to 50 Rule.eval("label(myVD,'Label1') == 'ON' => myLight1:on") -- Turn on light1 if label is set to 'ON' Rule.eval("myKeyFob:central.keyId==4 => myLight1:on") -- Turn on light1 if key 4 is pressed on keyFob Rule.eval("myLock:access.status=='Unlock' => log('Door unlocked by %s',myLock:access.name)") -- Door unlocked Rule.eval("$Home == 'AWAY' => myLight1:on") -- Turn on light1 if fibaro global variable 'Home' is set to 'AWAY' Rule.eval("#AccessControlEvent{data={name='$name',slotId='$slot',status='Unlock',id=myLock}} => log('Door unlocked by %s',name)") -- more rules -- Turn on lamp at 15min before sunset Rule.eval("@sunset-00:15 => myLight1:on") -- Turn off 2 lamps 15min past sunrise on weekdays Rule.eval("@sunrise+00:15 & wday('mon-fri') => {myLight1,myLight2}:on") -- Turn on lamp if sensor breached Rule.eval("myMotionSensor1:breached => myLight1:on") -- Turn off lamp if sensor safe for 5min Rule.eval("for(00:05,myMotionSensor1:safe) => myLight1:off") -- Turn on lamp if doubleclick on switch S2 Rule.eval("mySwitch:scene==S2.double => myLight1:on") -- Toggle lamp if key '1' pressed on keyfob Rule.eval("myKeyfob:central.keyId=='1' => myLight1:toggle") -- Turn on lamp if average lux is less than 200 Rule.eval("sum({myLightSensor1,myLightSensor2}:lux)/2<200 => myLight1:on") -- Turn on lamp if any of motion sensor myMotionSensor1,myMotionSensor2 are breached Rule.eval("{myMotionSensor1,myMotionSensor2}:breached => lamp:on") -- ..and turn off lamp all motion sensors are safe for 10min Rule.eval("for(00:10,{myMotionSensor1,myMotionSensor2}:safe) => lamp:off") -- Turn on lamp if any of motion sensor myMotionSensor1,myMotionSensor2 is breached -- but not if it's daytime, and only at dimmed level during night Rule.eval([[{myMotionSensor1,myMotionSensor2}:breached => || 24:00..sunrise >> myLight1:value=30 || sunset-00:30..24:00 >> myLight1:on ]]) end More on EventScript and the full blown version is available in the posts listed below: Here is a post on setting up the framework (works for EventRunnerLite too) Here is a post on the EventRunnerLite version - a bare bone version of the framework Here is a post on writing schedulers using EventScript. Here is a post on writing trigger rules using EventScript. Here is a post on EventScript syntax and rules Here is a post on writing Lua event handlers Here is a post on debugging the framework Here is a post on the publish/subscribe mechanism Here is a post on enabling Hue support - mapping of Hue devices to standards z-wave/fibaro:* calls Here is a post on integrating the event model with Node-red - sending/receiving events from node-red, with extendable, example flow. Gives support for Sonos TTS and Alexa input... Here is a post on running and debugging standard HC2 scenes - using the EventRunner framework (SceneRunner) There will also be some services based on the EventFramework posted iOSLocator - a service that checks with iClod for people at places and sends events to other EventFramework services Logger service - TBD Alarm service - TBD CronRunner - a UNIX like crontab service other scenes can register call-backs with Supervisor - A scene that pings EventRunner scenes and makes sure they stay alive. Best practices rules - TBD Implementation notes Notes on the basic EventRunner framework Notes on the EventScript implementation - TBD ChangeLog for the EventRunner framework. The lastest version of the code is kept in my GitHub. The background of this framework and a thread discussing it can be found here, however the code has evolved a bit from when originally posted there.
  2. Sankotronic

    Philips HUE AIO VD standalone

    Version 3.1

    693 downloads

    Philips HUE AIO VD v3.1 (standalone version) With Philips HUE preview VD v1.1 - brings easier setup and support for multiple Philips HUE bridges INTRODUCTION Philips HUE lighting brings colorful way of lighting experience. More about this lights you can find here https://www2.meethue.com/en-us Philips HUE AIO VD is All In One solution for HC2 owners to control Philips HUE lighting with support for all types of HUE lamps made by Philips and some other manufacturers. PREREQUISITES Fibaro Home Center 2 with firmware 4.120 or greater (tested up to 4.540) Philips HUE bridge V1 (round) with firmware up to 01041302 (released 05 February 2018) or Philips HUE bridge V2 (square) with firmware up to 1901181309 (released 07 February 2019) FEATURES Consists of two VD's: Philips HUE Preview VD which connects to Philips HUE bridge and downloads information of all lights and groups of lights and greatly simplifies installation of Philips HUE AIO VD that controls individual HUE bulbs or group of bulbs. Also added unreachable icon for Philips HUE bridge v1. Philips HUE Preview VD has button for generating authorization username and for easy connection to Philips HUE bridge Support for multiple HUE bridges and most of the Philips HUE bulbs including bulbs from other manufacturers that can be connected to HUE bridge. HUE AIO VD recognizes different types of bulbs like multicolor, white ambience and dimmable and enables proper controls Can control brightness, hue, saturation, color temperature and transition speed that can be set from instant to 10 seconds duration Buttons to activate colorloop efect and Alerts Multilanguage support with 27 languages included. VD's can use HC2 selected language or user can select any other available language. VD will be automatically translated to the selected language (visible after refreshing page on browser or refreshing network data on Fibaro mobile application) Easy setup for VD icons that will also setup icons for all buttons and sliders of the VD. (on UHASTM compatible version is even more easier to setup VD icons with Icon Preview VD) On HUE AIO VD user can setup separated on and off button or have on/off toggle button Self adding of global variables needed and global variable data integrity checking Automatic repair of global variables without user intervention New approach to programming other code to control this VD enables future upgrades without needing to change that code. (See more about that in User Manual provided) INSTALLATION Please check provided User Manual where all steps are explained in detail PACKAGE CONTENT Philips HUE Preview VD v1.1 standalone Philips HUE AIO VD v3.1 standalone Icon pack Philips HUE E27 bulb indoor Icon pack Philips HUE E27 bulb outdoor Icon pack Philips HUE GU10 bulb indoor Icon pack Philips HUE GU10 bulb outdoor Icon pack Philips HUE LED strip indoor User Manual v1.1 EN CREDITS Many thanks to BodyArt, gucio1234 and many other Fibaro forum users for help with testing, translations and user manual. TERMS AND CONDITIONS Permission to use, copy, modify and distribute this software and its documentation for educational, research, personal use and non-profit purposes, without fee and without a signed licensing agreement is hereby granted, provided that the copyright notice, with "Terms and conditions" and "Disclaimer" appear in all copies, modifications and distributions. It is strictly forbidden to sell, rent, lease and/or lend this software for profit without prior consent from the Author. DISCLAIMER This software is provided by copyright owner "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the author and distributor be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. Fibar Group S.A. and their employees are not responsible for support of the Philips HUE AIO VD. Please contact the author Sankotronic, on the Fibaro Forum, for any questions or support required. LEGAL NOTICE HUE is registered trademark of Philips Lighting Holding B.V. registered internationally. LATEST NEWS 1 April 2019 Philips HUE bridge firmware new version 1901181309 is out. If you upgrade to this latest firmware Philips HUE AIO VD will continue function properly. VERSION HISTORY 3.1 - Corrected bug that was causing HUE AIO VD main loop to stop with error if user set light or group ID that does not exists on HUE bridge. Also corrected bug that was not updating list correctly after first scan if user removed or added light or group on HUE bridge. 3.0 - All In One solution, one VD for all types of bulbs and for control of individual light or group of lights with supporting Philips HUE Preview VD. 2.1 - added Philips HUE White dimmable VD of same version as color version. 2.1 - Corrected error handling when HUE bridge is not reachable. 2.0 - Added On/Off button; two version available: 2.0m with Main loop refresh or 2.0b with button refresh for systems with more than 15 HUE lamps to improve response and reduce network traffic; changing brightness, color or Saturation sliders now immediately refreshes VD status; code improved so users can easier setup necessary data 1.5 - Added sliders for color (hue) and Saturation, VD is now getting ID & TCP port setting from VD general tab 1.0 - Changing icons based on the brightness level, Changing icons based on HUE lights state (unreachable/error); Error handling for HUE response data, status information in the bottom bar of the VD; detailed comments in LUA code, main loop refresh code added Here is a new look of Philips HUE AIO VD and companion Philips HUE Preview VD: Enjoy coding and your new Philips HUE virtual device! Sankotronic PS This solution is only for HC2. If you have HCL then please check @AkilliYuva.com solution here:
  3. Hi I am playing around with HUE together with my Fibaro system and so far it works fairly well. I am able to get my wall switch (with a dimmer 1 behind it) "control" the HUE indirectly via scenes. So I am able to switch the HUE on or off just by pressing S1 on the dimmer. However, if I use the HUE remote the dimmer won't know about it and comes out of sync. Working example: - press S1 on dimmer kicks of a LUA script that sends a "on" signal to the HUE light. - press S1 on dimme again sends an "off" signal to the HUE Not working example: - Hue started via the LUA script as mentioned above. If I then kill the light via the HUE remote the dimmer of course won't get a notification of that and still thinks it is "on". To "resync" the two devices I have to press S1 two times again. This of course works but, I would like to get another LUA script to pick up the status of the HUE and set the fibaro dimmer accordingly. I can see that the HUE light status (on/off) is picked up by my controller if I press the remote so my idea was to use the following code to pick it up and set the dimmer in the same state. --[[ %% properties 145 HUE light 164 Fibaro dimmer %% globals --]] local startSource = fibaro:getSourceTrigger(); if (fibaro:getValue(145, "ui.onOff.value") == '1') then fibaro:call(164, 'turnOn') else fibaro:call(164, 'turnOff') end But problem is that the script never executes. it is set to automatically start and I can execute it manually to verify it works but I still cannot get it to execute automatically (possible that it does not recognize the on/off trigger on the HUE). Any suggestion of how this could be done? And just to clarify, I am not using the dimmer to control the HUE lights directly. I am only using it to trigger the HUE via scripts. //Peter
  4. Henn Sarv

    VD for controlling HUE lamps

    Hi possible interested users, I just inserted HUE bridge onto my system and becouse plugins are not suitable for automation, I looking for VD I find one - not VD but instruction to create VD: http://www.siio.com/lightshadow/philips-hue-virtual-module-in-fibaro-hc2-4742/ Actually this instruction need to some correction so I create VD and modified this a bit and saved as vfib some important modifications: * I created global variable to hold user key: Hue_User * I create global variable to hold starting number for icon set: Hue_IconStart * I changed port number to hardcoded: 80 * I changed VD port field to be used as light-id (lamp number) * Additionally I added label field on top of VD UI to get lamp name from bridge Result - You can add same VD several time - one for each lamp You need to control (I've started with 5 lamps in different rooms) For each lamp add one VD, configure IP address and lamp id (into port number) One more decision point: initially I had plan to put bridge IP into global variable. I had to change this idea and leave IP as config parameter for VD. The reason is that on my second house I probably need several bridges with different IP Unfortunateli responding to siio.com page fails (they have some error on page preventing responses) NB! attached file is not mine origin - this is created using instructions (ideas) from SIIO and only corrected. required icon set You find from referenced siio.com page HUE-Bulb-HS.vfib
  5. This is my first topic in a series of post I'm going to write about the advanced LUA scenes I wrote for my home automation project. My goal is not flipping a light scene with a phone but for 90% autonome home automation. Besides posting LUA code I give you more insight why I came to this routine. It may help you with designing your own automation routines. Disclaimer: I am not a professional programmer and I post the scenes as is. I have no time to make the LUA scenes generic like other great members do on this forum. I just post my LUA code to share knowlegde and inspire you to create awesome things! Advanced home wake-up routine with Philips Hue and HC2 Applies to: Fibaro Home Center 2 and Philips HUE bridge. GOALS Use my Philips Hue led strips as a wake-up light. Use 1 app to schedule the whole home wake-up routine. Start the morning routine when walking downstairs (check motion). Turn on the lights only when it’s dark (read lux). In our bedroom we integrated a Philips Hue lightstrip in the ceiling and use this with the Philips Hue app as a wake-up light. It beautifully fakes a sunrise in our whole room. As we use the Hue app to set our wake-up alarm I use this app to trigger the Home Center to run a wake-up routine for the rest of the house. TL;DR Set recurring wake-up schedule in the Philips Hue app. Home Center LUA scene 1 reads schedules at 04:00 with the keyword Wake in it. If schedule is set for today and motion is detected at the hallway after the scheduled time (scene 2), run wake-up routine. HOW I IMPLEMENTED IT IN WORDS Reading Hue schedules from the bridge cannot be done with the Fibaro Hue plug-in. Therefore I wrote a LUA scene to read the Hue schedules from the Hue bridge and run the wake-up routine at the schedules wake-up time. I achieved this with 2 LUA scenes: Scene 1 runs every minute and polls the Hue bridge schedules at 04:00. If a wake-up is scheduled for today write the wake-up times to a global variable. Every minute it checks if there is a wake-up planned by reading the same global variable and if so it sets the WakeUpReady global variable to 1. Scene 2 runs when motion detected by a Fibaro Motion Sensor. If it detects motion it checks if the global variable WakeUpReady is set to 1 and runs the wake-up routine. SCENE 1 EXPLAINED You can download the full LUA scenes at the bottom of this post. I only describe snippets of my code to make you understand what it does and show the challenges I ran into. TAG YOUR HUE SCHEDULE WITH A WAKE-UP STRING IN IT! To know which schedules are used for wake-up I set all those schedules with the Wake keyword in it. Like Wake-up weekday’s and Wake-up weekends. In the LUA scene I find these schedules with the code: if name:find('Wake') and status == 'enabled' then ... end RECURRING DAY’S ARE SAVED AS A BITMASK IN THE HUE BRIDGE The Hue API states: The Hue bridge saves the recurring day’s as a bitmask. You have to convert this bitmask to weekday’s. So you can check if the alarm is set for today. The first step is to convert decimal to a binary. I did this with the folowing LUA function: function bin(dec) local result = "" repeat local divres = dec / 2 local int, frac = math.modf(divres) dec = int result = math.ceil(frac) .. result until dec == 0 local StrNumber StrNumber = string.format(result, "s") local nbZero nbZero = 8 - string.len(StrNumber) local Sresult Sresult = string.rep("0", nbZero)..StrNumber return Sresult end Then I have a binary representation of the scheduled weekday’s. For example: mo tu we th fr sa su 1 1 1 1 0 1 0 You see the alarm is set for monday, tuesday, wednesday, thursday and saturday. With this I can determine if the alarm is set for today: if name:find('Wake') and status == 'enabled' then local huedays, huetime = string.match(timepattern, 'W(.*)/T(.*)') -- Hue starts at monday, LUA starts at sunday, so I have to fix this. local dayofweek = os.date("*t").wday-1 if dayofweek == 0 then dayofweek = 7 end local scheduleddays = bin(huedays) -- dayofweek+1 because a week is 7 days and binary is 8 digits, so -- a have a pre 0 local waketoday = string.sub(scheduleddays, dayofweek+1, dayofweek+1) if waketoday == '1' then wakeUpAlarms = wakeUpAlarms .. huetime:sub(1, -4) .. '|' end ... end WRITE WAKE-UP TIME TO GLOBAL VARIABLE If there is an alarm schedule for today write it to a global variable for later use: if wakeUpAlarms ~= '' then fibaro:setGlobal("WakeUpTime", wakeUpAlarms:sub(1, -2)) -- remove last | else -- If no schedules are set, write disabled to the global variable. fibaro:setGlobal("WakeUpTime", "disabled") end SET WAKEUPREADY GLOBAL VARIABLE FOR MOTION SENSOR LUA SCENE The LUA scene runs every minute using the code: setTimeout(tempFunc, 60*1000) At 04:00 it checks the schedules in the Hue bridge, but every minute it checks the WakeUpTime global variable to set the wakeupReady global variable to 1. This variable triggers the second LUA scene used by the motion sensor. local wakeupTime = fibaro:getGlobal("WakeUpTime") if wakeupTime ~= "disabled" then local waketimes = {} for match in (wakeupTime..'|'):gmatch("(.-)"..'|') do table.insert(waketimes, match); end for k, v in pairs(waketimes) do if os.date("%H:%M") == v then fibaro:setGlobal("WakeUpReady", 1) fibaro:debug("It's wake-up time! Set motion detector ready!") end end end SCENE 2 EXPLAINED (MOTION SENSOR PART) With scene 1 I created a global variable setting to determine if the wake-up routine must run. Now I create a second scene to act if there is motion in our hallway. CHECK FOR MOTION AND IF ALARM IS NOT ARMED First I want to check if there is motion and if the alarm is not armed with the line: if tonumber(fibaro:getValue(158, "value")) > 0 and tonumber(fibaro:getValue(158, "armed")) == 0 then ... RUN WAKE-UP ROUTINE ONLY IF IT’S DARK OUTSIDE The Philips Hue wake-up schedule runs always because our bedroom had curtains and the room is always dark. Downstairs I only want to run the wake-up routine when it’s dark outside. The wakeupReady global variable check’s if the routine needs to run when there is motion (set with scene 1). The line below gets the current lux reading from the Fibaro motion sensor: fibaro:getValue(160, "value") If the illuminance is below 20 I want to turn on my lights. if wakeupReady == "1" then fibaro:setGlobal("WakeUpReady", 0) -- Disable trigger for current wake-up time. -- check lux local currentLux = tonumber(fibaro:getValue(160, "value")) -- id 160 is sensors light device. -- If it's dark then start wake-up routine if currentLux < 20 then fibaro:debug("Illuminance measuring " .. currentLux .. " lx, starting wake-up routine.") fibaro:call(44, "setValue", "8") -- Spots keuken (8%) fibaro:call(29, "setValue", "5") -- Tafel eethoek (5%) fibaro:call(106 , "turnOn") -- Bolles (aan) fibaro:call(118 , "turnOn") -- Spot voordeur (aan) fibaro:call(156, "sendPush", "Started wake-up routine. Debug: " .. currentLux .. " lx") else fibaro:debug("Illuminance measuring " .. currentLux .. " lx, do nothing.") end ... DOWNLOAD MY SCENES COMPLETE LUA CODE You can download the full LUA scene code from GitHub: Scene 1: Wakeup.lua Scene 2: MotionRoutine1.lua You have to change the device id’s from my motion sensors in this scene to your own id’s! And don't forget to set the scenes to run automatic in the Fibaro Home Center 2
  6. Hello! I am trying to make a scene in LUA where I can dim my Hue bulbs. I have a Sunricher 4ch switch, which I have created scenes for turnOn and turnOff Hue bulbs, and it works nicely, as in the picture below: I want to make a new scene, where the button´s HELD DOWN function should utilize dimming of the Hue bulb. I have tested some commands from the Hue Developer API, and found out that if I "PUT" the below command to the Hue-bulb, it increases the saturation with 1 for each time I press "PUT". Is it possible to make a repeat loop / while loop or similar that sends this command? I know this is not the LUA API, it is in the REST API. I can not quite see how to send similar commands in LUA, unless there is a way to make a repeat loop that takes the saturation value and adds "1" e.g. each 10 millisecond while the switch is in HELD DOWN state?
  7. Witam, Męczę się z wirtualnym urządzeniem pod HCL. Tworzę wirtualne urządzenie które ma sterować żarówką HUE wg opisu z forum, niestety urządzenie nie działa. Moje pytanie dotyczy kwestii debbugowania. Czy istnieje możliwość sprawdzenia co robi utworzony przycisk w wirtualnym urządzeniu, jaki PUT wysyła do mostka HUE. Dodam że jak steruję z samego mostka IP/debug/clip.html to wszystko działa prawidłowo, żaróka zapala się i gaśnie. Przykład jednego z przycsków, który chciałbym zdebbugować : PUT /api/mój_klucz_użytkownika_API_HUE/lights/1/state HTTP/1.10x0D0x0AHost:192.168.1.2190x0D0x0AContent-Length: 450x0D0x0A0x0D0x0A{"on":true, "sat":255, "bri":255,"hue":12000}0x0D0x0A Pozdrawiam Raf Centralka - niestety HC LITE wersja firmware : 4.521 BETA
  8. For the Philips Hue lovers there is cheap Osram Lightify Smart Plug, which can be easily added to Philips Hue bridge in order to make non Hue lamps controlled by Hue bridge. I made a simple small VD based on @Sankotronic's Hue devices. ----------------------------------------------------------------------------- -- Osram Smart Plug On/Off ----------------------------------------------------------------------------- --[[ ----------------------------------------------------------------------------- Version 1.0 Original VD written by CHRISSXCROSS © 2015 VD modified and upgraded by Sankotronic © 2016 ----------------------------------------------------------------------------- --]] local _f = fibaro local hueID = 40; -- get name of the user from global value local hueUser = _f:getGlobal('HueUser'); local iconOff = 1226; local iconOn = 1227; local iconUnreachable = 1012; local iconError = 1013; -- END OF CODE PART FOR USERS TO EDIT AND SETUP -------------------------- Id = _f:getSelfId() Ip = _f:get(Id, "IPAddress") Port = _f:get(Id, "TCPPort") -- connect to the Hue bridge Hue = Net.FHttp(Ip, Port) -- Now do light, get previous settings and send new -- HTTP GET to get all the info from the light(s) resp ,stat , err = Hue:GET('/api/'..hueUser..'/lights/'..hueID); -- continue if HTTP status code is 200 if (tonumber(stat) == 200) then jT = json.decode(resp) -- get the on state hueOn = jT.state.on _f:debug("hueOn = " .. tostring(hueOn)); hueReachable = jT.state.reachable _f:debug("hueReachable = " .. tostring(hueReachable)); -- if light is reachable then check if it is ON or OFF to toggle it if (hueReachable == true) then if (hueOn == false) then hueOn = true; ic = iconOn; else hueOn = false; ic = iconOff; end -- HTTP PUT to set the new values resp, stat, err = Hue:PUT('/api/'..hueUser..'/lights/'..hueID..'/state', '{"on":'..tostring(hueOn)..'}'); _f:call(Id, "setProperty", "currentIcon", ic); else _f:log("Hue: Unit not reachable"); -- change the icon to unreachable _f:call(Id, "setProperty", "currentIcon", iconUnreachable); end else _f:log("Hue: Bridge not reachable"); _f:call(Id, "setProperty", "currentIcon", iconError); end I hope someone will have use for it
  9. Sankotronic

    Garden globe for HUE lights

    Version 1.0.0

    59 downloads

    Garden globe with installed Philips HUE bulbs icons. This is how it looks in my garden:
  10. Sankotronic

    Philips HUE strip

    Version 1.0.0

    126 downloads

    Icons for Philips HUE strip lights.
  11. Sankotronic

    Philips HUE GU10 outdoor

    Version 1.0.0

    35 downloads

    Outdoor version of Philips HUE GU10 bulbs.
  12. Sankotronic

    Philips HUE GU10 indoor

    Version 1.0.0

    52 downloads

    Philips HUE GU10 indoor bulbs icons with new icon for unreachable bulb.
  13. Sankotronic

    Philips HUE E27 outdoor

    Version 1.0.0

    33 downloads

    Philips HUE virtual device is revamped to version 2.0 check here: Here are icons for Philips HUE E27 outdoor bulbs to use with Philips HUE VD
  14. Sankotronic

    Philips HUE E27 indoor

    Version 1.0.1

    372 downloads

    Philips HUE virtual device is revamped to version 2.0 check here: Here are icons for Philips HUE E27 indoor bulbs to use with Philips HUE VD
  15. vanni177

    Hue API in Scenes

    Hi I tried to use a Hue API command in my scene, but it's not working. I copied the LUA code from a working Hue VD and modify a bit, as the original is to switch off a Hue. I'd like to switch "group/0" in Hue-bridge to turn off all hue lights at once. here is how it looks like and is not working. I guess the problem is : Hue = Net.FHttp(hueIP,huePort) response ,status, errorCode = Hue:PUT('/api/'..hueuser..'/groups/0/action', '{"on":'..on..'}') Any help on that is welcome
  16. I am not the Author, but this is such a great guide that I think it should be here. https://snillevilla.se/styr-philips-hue-lampor-med-fibaro-home-center-2/ You also need to check Developers.meethue.com and follow the tutorial there to get a user made for API https://developers.meethue.com/documentation/getting-started Files for icons and VD files here: https://github.com/snillevilla/Philips-Hue-VD-for-Fibaro-HC2
  17. Kenmar

    Controlling Philips Hue with the Swipe

    Hi, Is it possible to control Philips Hue with the Swipe? If so how can I fix this? Marlon
  18. I am currently renovating my house and looking for a system that can integrate with 3rd party products. I need one interface and be able to have the 3rd party devices respond/act based on an action. For example I would like to have a smart-lock at the front door that when it is unlocked when it is dark, the light goes on etc. I intend to heave the following devices: Lights: Philips Hue Smart lock: Danalock (as i believe it is Z wave) Roller blinds: fibaro Can this work together? Is there a tutorial or documentation that supports this? One more question is: If I use the Fibaro Roller Shuuter system, will my existing normal wall mounted roller shutter switch work? TIA aussie
  19. Sankotronic

    Philips HUE LED Strip

    Version 1.0.0

    52 downloads

    Here is my version of Philips HUE strip icons: turned off: turned on: I hope is ok. Cheers!
  20. Hi all, is there a way to receive the power status of the hue bulb? E.g. If I turn my lights off via a fibaro relay, I would like to see if the hue light is actually supplied with power or not... cheers
  21. Season holiday iscoming so I am happy to share the scene to control the VDs for PHILIPS HUE. That can be used not only for the color lights during holidays, but also for decorative light arrangement in the garden or wherever. The scene is controlling the VDs published by @Sankotronic here : The user settings is very simple. There are three parameters to be entered. 1. timeBRI is the value for the cycle of the brightness change 2. timeHUE is the value for the cycle of the hue cycle 3. lights ={} contain the IDs of the HUE lights to be controlled. I reccomend to experiment with different values and see the result of the "DYNAMIC RAINBOW" with your lights. -- BEGIN OF USER SETTINGS -- time for BRIGHTNESS cycle [ time units depend on number of lights ] local timeBRI = 100 -- time for HUE cycle [ time units depend on number of lights ] local timeHUE = 20 -- IDs of HUE lights VDs to be controlled local lights = {1240,1247,1249,1250,1251,1252,1253}; -- END OF USER SETTINGS The scene is running in the endless loop, so if you want to stop it, you have to press button on the scene icon GUI. DYNAMIC RAIBOW 1.01.txt UPDATE: There are quite interesting result if you run two instances of this scene at the same time :
  22. I understand that the plugin in HC2 is only to enable manual control of lights from the HC2 and from the Fibaro App. Are there any other ways I could include one or more hue lights into scenes? Any coding? Anything else before I have to throw a large investment I made in hue lights or instead the Fibaro one? Many thanks for your support.
  23. Hi everyone, It appears my hue lights are not responding to any scenes after the HC2 and hue hub had a power outage. is there an easy way to reset this? I dont want to create new bulbs with new device ID's because then i will ave to change all my scenes Thanks in advance!
  24. Dear people, I have a little puzzle... We have Sonos, Hue and fibaro devices and a very irregular live. Our routine for waking up is setting seperate timers for Sonos (actual wake up time), Hue (starts 10 minutes before actual waking time) and our thermostate (danfoss via Fibaro, starts 45 minutes before actual waking time) via the native apps. We have multiple routines / scenes (per device) which we can activate to do so. For Fibaro I have multiple scenes to set a global variabele for the thermostate time and multiple scenes to actually set the temperature (depending global variabele and time). Any suggestions how I should combine everything so I only have to acitivate1 routine? General direction would be great! I presume fibaro should be in the lead... Thans for you help! Kind regards, Roland
  25. Dear forum, I googled a lot but cannot seem to find a solution. I bought a Philips Hue motion sensor and want to use it in my scenes. I wrote my own VD (loosely based on @Sankotronic's Hue VD) in order to use the motion sensor in my scenes. However, the response time is very slow. I read somewhere about a 3 second delay, not sure exactly what it is and if you can influence that. It correlates however with my observations that the VD seems to trigger itself every 3 seconds. For a motion sensor, you want instant response without delay. Anybody any suggestion how to speed up the VD response or how to read the data from the Hue motion sensor faster? I pasted my VD source below. ----------------------------------------------------------------------------- -- Philips HUE Motion Sensor Virtual Device ----------------------------------------------------------------------------- local hueTemperatureDeviceID = 2 local hueMotionDeviceID = 3 local hueLightlevelDeviceID = 4 -- enter name of the user that you added to the HUE bridge local hueUser = "your-user-here" -- enter icon ID's for corresponding status of the virtual device local iconOk = 1048 local iconUnreachable = 1033 local iconError = 1034 local debug = false -- get this virtual device ID vDeviceID = fibaro:getSelfId() -- get IP address and TCP port for PhilipsHUE bridge hueIP = fibaro:get(vDeviceID, "IPAddress") huePort = fibaro:get(vDeviceID, "TCPPort") -- connect to the Hue bridge Hue = Net.FHttp(hueIP,huePort) -- TEMPERATURE response, status, errorCode = Hue:GET('/api/'..hueUser..'/sensors/'..hueTemperatureDeviceID); -- continue if HTTP status code is 200 if (tonumber(status) == 200) then jsonTable = json.decode(response) -- get the temperature data hueTemperature = jsonTable.state.temperature if debug then fibaro:debug("hueTemperature = " .. tostring(hueTemperature)) end fibaro:call(vDeviceID, "setProperty", "ui.temperature.value", tostring(hueTemperature/100)) fibaro:call(vDeviceID, "setProperty", "currentIcon", iconOk) else fibaro:log("Hue: Bridge not reachable") fibaro:call(vDeviceID, "setProperty", "currentIcon", iconError) end -- MOTION response, status, errorCode = Hue:GET('/api/'..hueUser..'/sensors/'..hueMotionDeviceID) -- continue if HTTP status code is 200 if (tonumber(status) == 200) then jsonTable = json.decode(response) -- get the motion data hueMotionDetected = jsonTable.state.presence if debug then fibaro:debug("hueMotionDetected = " .. tostring(hueMotionDetected)) end fibaro:call(vDeviceID, "setProperty", "ui.motionDetected.value", tostring(hueMotionDetected)) if hueMotionDetected then huelastBreached = os.time() else if huelastBreached == nil then huelastBreached = 0 end end if debug then fibaro:debug("huelastBreached = " .. tostring(huelastBreached)) end fibaro:call(vDeviceID, "setProperty", "ui.lastBreached.value", tostring(huelastBreached)) fibaro:call(vDeviceID, "setProperty", "currentIcon", iconOk) else fibaro:log("Hue: Bridge not reachable") fibaro:call(vDeviceID, "setProperty", "currentIcon", iconError) end -- LIGHTLEVEL response ,status , errorCode = Hue:GET('/api/'..hueUser..'/sensors/'..hueLightlevelDeviceID) -- continue if HTTP status code is 200 if (tonumber(status) == 200) then jsonTable = json.decode(response) -- get the lightlevel data hueLightlevel = jsonTable.state.lightlevel if debug then fibaro:debug("hueLightlevel = " .. tostring(hueLightlevel)) end fibaro:call(vDeviceID, "setProperty", "ui.lightLevel.value", tostring(10^((hueLightlevel-1)/10000))) hueDark = jsonTable.state.dark if debug then fibaro:debug("hueDark = " .. tostring(hueDark)) end fibaro:call(vDeviceID, "setProperty", "ui.dark.value", tostring(hueDark)) hueDaylight = jsonTable.state.daylight if debug then fibaro:debug("hueDaylight = " .. tostring(hueDaylight)) end fibaro:call(vDeviceID, "setProperty", "ui.daylight.value", tostring(hueDaylight)) fibaro:call(vDeviceID, "setProperty", "currentIcon", iconOk) else fibaro:log("Hue: Bridge not reachable") fibaro:call(vDeviceID, "setProperty", "currentIcon", iconError) end
×