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



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

  1. 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?
  2. Version 3.2

    1,140 downloads

    Netatmo Weather Station VD-scene standalone INTRODUCTION Netatmo Weather station VD-scene brings complete integration of Netatmo weather station to HC2 users including rain and wind gauges and support for more than one station. PREREQUISITES Fibaro Home Center 2 with firmware 4.160 or greater Netatmo Weather station FEATURES Complete integration of Netatmo weather station with HC2 including rain gauge and anemometer Support for multiple Netatmo weather stations Support for maximum 3 additional indoor modules Smart update system that follows Netatmo weather station cloud updates Completely independent installation does not require any more Weather State VD or Main scene FTBE Netatmo weather station measurements can be shown on Weather State VD and HC2 web GUI and mobile applications by means of Weather State VD and Weather provider plugin VD has built in multi-language support with 27 languages included (see APPENDIX 1 for the list). VD can use HC selected language or user can select any other available language. Easy setup for VD icons (on UHASTM compatible version is this even easier) Global variables are automatically added, monitored and repaired and does not require user intervention INSTALLATION Please check provided User Manual PACKAGE CONTENT Netatmo Indoor Base module VD (main) Netatmo Outdoor module VD Netatmo Additional indoor module VD Netatmo Wind sensor VD Netatmo Rain sensor VD Netatmo Weather station scene Set of icons for all VD's and scene User manual EN 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 ABC VD. Please contact the author Sankotronic, on the Fibaro Forum, for any questions or support required. VERSION HISTORY 3.2 - Corrected rain sensor code and cleaned some bugs in scene. Indoor modules corrected handling of CO2 measurement, improved updating code. 3.0 – This new version is completely redesigned and made independent. Does not require Main scene FTBE and Weather State VD anymore. Updating is now synced with Netatmo cloud so readings are always up to date. 2.0.2 – Code optimized and resolved some bugs Here is look of the Netatmo Weather set: Enjoy coding and your new Netatmo weather station VD-scene! Sankotronic
  3. Hello, i am controlling my garden lights with 2 scenes, one for sunset and one for sunrise. And it’s working perfectly I usually have lights dimmed at 30%. I would like to know if it’s possible to add a scene where, if there is a motion it will increase the lights by 30% or to put it to max level for 3 minutes and then back to the previous condition. Another scene could also work, if there is a motion lights up to 100%, and when if there is no motion for 3 minutes lights to 30%. in both cases I would like this scene to work only between 22:00 and 07:00. is it possible to make such a scene ? Thanks in advance !
  4. Universal alarm v1.0 Hello everyone! Here is one simple scene that can be used for FIRE, FLOOD or OTHER ALARM purpose. When triggered by sensor it will send you popup, push and e-mail notification. It can also activate additional alarm sounders. You can also add additional actions to turn On lights, lower blinds or whatever action you like to happen when alarm is breached and also when sensor get back to safe state. There is no global variables needed! If you use HomeTable then you can just uncomment line where this table is read to the scene. SCENE SETUP First you need to decide for what you will use this scene. You can use it for FIRE ALARM or for FLOOD ALARM or for any other purpose that you can think off. Just for setup example I will show here how to set it up for FIRE alarm. Same setup can be done for FLOOD alarm. First you need to add all your smoke detectors to scene header so that it is triggered when any of this sensors detects fire and get breached: --[[ %% properties 96 value 128 value 605 value %% globals --]] Then you can setup devices to which you want this scene to send push notifications. As already mentioned in my other threads, to find ID of your mobile devices you can enter this link in your browser: http://<YOUR_HC_IP>/docs/#!/iosDevices/getIosDevices and then press on button TRY IT! You will get ID numbers of all mobile devices that you can enter here: -- PUSH MESSAGES AND MOBILE DEVICE SETUP --------------------------------- -- define mobile devices to send push messages. Enter devices inside -- braces separated by comma local iosDeviceID = {206, 321}; Then you can setup messages text, translate it to your language: -- PUSH MESSAGES SETUP ------------------------------------------------------ -- enter push message text for breached alarm notification local pushMessage = "WARNING! FIRE/FLOOD/OTHER ALARM BREACHED!"; -- POPUP MESSAGES SETUP ----------------------------------------------------- -- enter popup message text and button caption for breached alarm local popupMainTitle = "FIRE/FLOOD/OTHER ALARM"; local popupTimeFormat = "%H:%M:%S | %d.%m.%Y."; local popupContentTitle = "ALARM breached!"; local popupImgUrl = ""; local popupButtonCaption = "OK"; Here you can setup users that will receive e-mail message. Same as for mobile devices, you can find users ID by entering following link in your browser: http://<YOUR_PC_IP/docs/#!/users/getUserss and then press button TRY IT!. You will get ID numbers of all users that you can enter here: -- E-MAIL MESSAGE SETUP ----------------------------------------------------- -- define users for which you want to receive e-mail warning. Enter users -- inside braces separated by comma local userID = {}; -- Translate this e-mail message text that will be sent to you. On this -- part scene will add which sensor was breached. local emailMessage = "Breached FIRE/FLLOD/OTHER sensor:" In above settings you can also setup first part of the e-mail message. Scene will on that part add room and name of the sensor that is breached! If you want to activate additional sounders because fire and flood sensor sounder is not enough then you can setup here additional sounders to be activated when alarm is activated: -- EXTRA SOUNDER SETUP ------------------------------------------------------ -- define alarm sounder ID inside braces. You can define more than one just -- separate them with comma. local sounderID = {128, 210}; And for the end, if this is not enough for you and you want more action to be executed when alarm is breached, like close water valves, close blinds or turn on some lighting then you can add that code yourself. There are three functions where you can add code: -- EXTRA FUNCTIONS WHERE YOU CAN ADD YOUR CODE ---------------------------- -- use this function to add code that will be executed before all other -- code when sensor is breached function extraUserCodeBreachFirst() -- your code goes here end -- use this function to add code that will be executed after all other -- code when sensor is breached function extraUserCodeBreachLast() -- your code goes here end -- use this function to add code that will be executed when sensor is -- back to safe state function extraUserCodeSafe() -- your code goes here end If you want some action before notifications are send and sounders activated then you add code to function extraUserCodeBreachFirst(). If you want some action to be executed after notifications are sent and sounders activated then you add code to function extraUserCodeBreachLast(). When sensor goes back to safe state scene is activated again. It will not send any messages but will stop sounders and if you want some more action then you can add code to function extraUserCodeSafe(). So, one copy of this scene you can setup for FIRE ALARM. Another copy you can setup for FLOOD ALARM, and if you have something else then you can setup third copy for that OTHER ALARM. NOTE! This scene is tested on my HC2 with software 4.110 by breaching FIRE & FLOOD sensors and found to work flawlessly. If you encounter any problems then please first check your settings and look for typos. If you are still unable to make it work then please send me copy of complete scene code and screenshot of debugging window to my private message and I will help you to make it work! Please, I will appreciate very much any feedback and requests for additional features!! Example of debug window when scene is activated: ICONS DOWNLOAD Icons for this scene you can find here: SCENE DOWNLOAD FILE Please click bellow to download: [SCENE] Universal alarm scene {v1.0} as TXT file --------------------> Universal Alarm scene v1.0.txt [SCENE] Universal alarm scene {v1.0} as LUA file --------------------> Universal Alarm scene v1.0.lua NOTE LUA version of scene code is saved by ZeroBrane Studio v1.50. You can download it at this link: https://studio.zerobrane.com
  5. Today i updated to v. 4.02 for my Fibaro HC2. The update log recommended a reinstallation of the Logitech Harmony Plugin. When i installed the Plugin again via the very smart code-authentication it says on the plugin info: As I understand from the text above it should be possible to make a Scene in HC2 and include a Logitech Harmony Activity? As an example, I have a scene in HC2 called "Leaving Home", and when I press it the lights shuts down and in that scene I also want to shut down my Tv using the Harmony Acitivity. But when i trying to add a scene i can't choose the Activity from my Logitech even tough the activity (Acitivity Digital-Tv in the image attached) is visible in the HC2 panel in the web interface. Does anybody know how to add an Logitech Harmony Acitivity in a HC2 Scene? Thanks in advance! C.
  6. Version 1.3.3

    1,295 downloads

    Main scene FTBE v1.3.3 UPDATE (11 July 2019) Changed only Main scene FTBE code. Improved stability of the scene by adding more checks to time calculating functions and added more debugging info to easier trace source of problem. Corrected timeOfDay and Darkness functions to correctly calculate time of day and darkness if sunset time is after midnight and that sunset time is before sunrise time. Removed time synchronization that was executed every day at 2 o'clock in the morning. Upgrade is recommended for all users that have problems with scene instability and wrong calculation of time of day and darkness based on sunrise and sunset. KNOWN ISSUES v1.3.3 Sunrise and Sunset VD will not show correctly default sunrise and sunset time set by user in Main scene in case that that times are used due to problem with HC settings. If sunset time is before sunrise time then user must check that night time is not set to start after sunrise. Sunrise & Sunset VD does not check this time automatically. INTRODUCTION Main scene FTBE is the beating heart of the HA system. It is the only scene necessary to loop endlessly because it is the source of most important events generated on our gateways and that are time based events! It is looping once every minute making sure that our gateways are aware of the current time, part of the day, week, month and season of the year. Many actions done by our gateways are depending on current time like raising or lowering blinds, lighting control, waking up of our home and us, brewing coffee at proper time (this is extremely nice!), reminding us of important events and many other things. This scene will take care of that by changing various global variables at appropriate time thus activating other scenes triggered by them and the user can even configure it to start other scenes or press buttons on VD's at predefined intervals or at scheduled times. PREREQUISITES Fibaro Home Center 2 with firmware 4.110 or greater FEATURES Consists of scene and three VD's. Main scene FTBE loops and takes care of all timers like darkness, time of day, week days, month and season. Can also be setup to run other scenes, activate buttons on VD's or change global variables value at predefined times. VD's are used to set values of timers and show them on HC2 interface Can be setup to send push messages for scheduled execution of scenes and VD's Can track users location and calculate distance from home Darkness can be changed either by user set sunrise and sunset times or by light level measured by devices Part of the used global variables are automatically added to the system by Sunrise & Sunset VD and are automatically repaired INSTALLATION & UPGRADE Please check provided User Manual where all steps are explained in detail PACKAGE CONTENT Main scene FTBE v1.3.3 Sunrise & Sunset VD v1.4.0 Home Status VD v1.0 Home Timers VD v1.0.1 Icons for scene and VD's User Manual EN v1.2 CREDITS Many thanks to many Fibaro forum users for help with testing and suggestions for improvements. 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 Main scene FTBE. Please contact the author Sankotronic, on the Fibaro Forum, for any questions or support required.
  7. How to create a BUTTON ON/OFF in HLC to start a scene (turn on/off all lamps, turn on/off alarm) from vidget? Is there some example?
  8. Hello friends, I would like to control my sonos devices via scenes. It seems not possible to do that with common ways. So maybe someone in this forum already did that via http methods, rest apis etc. Would be great help if someone has any idea about that. Thanks in advance.
  9. I created several scenes where the timer functions to start the scene is being used. But none of them works. Any idea where should be the problem? See the pictures attached. Thanx for any adwise. HC2, FW 4.056,
  10. Hi I recently figured out that my scenes with sending picture to e-mail from a ip camera not working anymore. It stops working around November 2017, I think after update to 4.150 or 4.140. Now running 4.170 on HC2 and command "sendPhotoToUser" not working. Button with camera logo on the device which used to send a snapshot to mail, also doesn't work. Has anyone else same issue? Code which should send a picture looks like this: Exactly the same code coming from block scene, when I making new scene now and converting to lua. --[[ %% properties 874 value %% weather %% events %% globals --]] local startSource = fibaro:getSourceTrigger(); if ( ( tonumber(fibaro:getValue(874, "value")) > 0 ) -- id 874 is triggering device or startSource["type"] == "other" ) then fibaro:call(648, "sendPhotoToUser", "2"); -- 648 is a camera id, 2 is a user id end Camera's settings and plugins/for cameras wasn't changed since this worked.
  11. I use my HC2 as an alarm system, with 12 door sensors, 5 motion sensors, 2 smoke sensors and 2 flood sensors. Although using Sankotronix scene for detecting empty batteries, I was faced twice in the last month with “dead nodes”, due to empty battery. I would like to run a script (either daily or when I switch on the alarm), that notifies me on any dead nodes. Is there a Fibaro function that I can use for this? The information should be in the system, as the web interface does give the dead node information.
  12. Main scene FTBE v 1.3.0 Hello everyone! NEW version is OUT! More about scene and download you can find here: WHAT'S NEW: Main scene FTBE 1.3.0 - cleaned some bugs, added some more checks to prevent scene from stop running due to errors. Optimized and compacted code, removed unnecessary comments. DemoMode only stops changing timers while user code and scheduled events will continue to execute. Darkness can now be changed by measured lux level or global variable that is set to lux value measured by light measuring devices placed outside. Scene is now running on setTimeout function instead on sleep for better timing and also aligns to 0 seconds or exact minute. Sunrise & Sunset VD v1.4.0 - Modified main loop code to better handle global variables. Variables are now automatically repaired and are not reset to default settings after HC2 reboot. Added variable SunriseIcon to store VD icon ID and now when main icon for VD is set also all button icons are set automatically. Home Status VD v1.1 - Added variable HomeStatIcon to store VD icon ID and now when main icon for VD is set also all button icons are set automatically. Added label that shows most important values on VD when closed. Home Timers VD v1.1 - Added variable HomeTimersIcon to store VD icon ID and now when main icon for VD is set also all button icons are set automatically. Added label that shows most important values on VD when closed. NOTE - This version is compatible with previous versions so need to do any changes in your current code of other scenes and VD's. REQUEST - If you like my work and found it useful please give me support by rating and writing short review. Thank you! PS Dear friends from Slovakia you can find this scene and VD translated to your language here: HomeSystem.sk
  13. Hi, I have an ACTRONAIR at Home with Wireless Controller. I have done extensive research to understand how the AC is controlled. It turns out that the AC wireless controller get it's instruction from a Web Service in the cloud. I have intercepted the Web Service Call and this is what get passed on to the cloud: PUT https://actron.ninja.is/rest/v0/device/ACONNECTXXXXXXXXXXXX_0_2_5?user_access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1 Accept: application/json Content-Type: application/json Referer: https://actronair.com.au/aconnect/ Accept-Language: en-AU,en;q=0.8,ar-LB;q=0.5,ar;q=0.3 Origin: https://actronair.com.au Accept-Encoding: gzip, deflate User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393 Host: actron.ninja.is Content-Length: 24 Connection: Keep-Alive {"DA":[0,1,1,0,0,0,0,0]} I need help with creating a Scene that sends instructions to the same cloud service. So far I tried the following without any sucess. Appreciate any guidance please! --[[ %% properties %% events %% globals --]] -- Callback at success local function successCallback(resp) fibaro:debug('connection success, status: ' .. resp.status) end -- Callback at error local function errorCallback(resp) fibaro:debug('connection no success, error: ' .. resp) end -- http-request Scene : senden über AutoRemote Tasker WiFi Service enabled in Tasker Action local function getDirect() local http = net.HTTPClient() payload = '"DA":[1,1,1,1,1,0,0,0]' fibaro:debug('this is the payload: ' .. payload .. '.') http:request('https://actron.ninja.is/rest/v0/device/ACONNECTXXXXXXXXXXX_0_2_4?user_access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', { options = payload, success = successCallback, error = errorCallback } ) end -- Do the request getDirect()
  14. Hi all, in the Panels menu, Fibaro alarm, advanced tab, pre-defined actions: the first pre-defined action "PANIC" dissapeared. I added and deleted some of my own scenes into other actions, and once the PANIC action is no longer there... Does anyone has any idea how to get it back? Thanks, Cheers!
  15. I have a smoke alarm (FireAngel ST-630 with Sprue Z-wave-module) which I would like to trigger switching off a relay when an alarm is given. Basically, there are two ways to make one device trigger another, associations or scenes. Using association has the advantage of being independent of the HC2 gateway, so that is what I was looking for at first. The supplier of the alarm tells me, however, that association will not work in this case, since the appropriate association group uses a "sensor notification reports and not a set command". I am a little out of my depth here, and would appreciate any comments. The complete documentation for the device is enclosed. There is no Fibaro template for this device, but I do not expect that to make a difference. Do you agree with the supplier that association to a switch or relay is not possible in this case? What is a good and simple way to set up a scene for this function: 'If smoke alarm on device xxx then set switch yyy to "off"?' Sprue-Z-Wave-Module-Developer-Pack-2017.pdf
  16. Check status of doors and windows v1.0 This simple scene will send push message every time when door or window is opened if global Variable DoorWinCheck is set to "Yes". Usage, we are sitting in garden on the opposite side of our house main entrance door. Turning this scene on and we will be informed every time when somebody opens main door If scene is started manually with RUN button or by other scene or VD then it will check all doors and windows (or just those we put in the list) and will send popup message with the list of opened doors and windows. The rest is up to you. Here is scene code: --[[ %% properties 125 value 159 value %% globals --]] --[[ --------------------------------------------- -- CHECK DOOR/WINDOWS FOR OPEN/CLOSE STATE -- --------------------------------------------- Copyright © 2016 by Zoran Sankovic - Sankotronic Version 1.0 This scene will be triggered when any door or window is opened or closed if its ID is added above in scene header %% properties section and will send you push notification which one. If it is run manually or started with RUN button or called by VD or other scene then it will check all doors and windows that are added in winDoorID table variable and send you a popup message with the list of all doors and windows openned. This scene requires following global variables: DoorWinCheck - values: "Yes", "No" - set by VD You can enter name of your variable for that purpouse and even map your values to work properly. --]] -- PART OF CODE FOR USERS TO EDIT AND SETUP --------------------------------- -- GLOBAL VARIABLES -- enter names and value mapping of your global variables -- or leave as it is and add to variables panel -- enter name of your global variable and map values local doorWinCheck = "DoorWinCheck"; local doorWinMapping = {Yes="Yes", No="No"}; -- SENSORS, USERS, NOTIFICATIONS setup -------------------------------------- -- enter in this table IDs of all window and door sensors separated by comma -- that you want to be checked when scene is started manually or by another -- scene or VD local winDoorID = {125, 159}; -- define users to send push messages, replace with your user ID local userID = {10, 204, 210}; -- flag for each user; if 1 then send notifications else if 0 do not send notifications local userFlag = {1, 1, 1}; -- setup local variables for notifications -- popup notification title local popupTitle = "Door/Window status"; -- opoup notification subtitle usually contain time when is sent local popupSubtitle = "%H:%M:%S | %d.%m.%Y."; -- message if found any door or window opened local foundOpenedMessage = "Following doors/windows are open:"; -- message if found all doors/windows closed local foundAllClosedMessage = "All doors/windows are closed!"; -- text for button to close popup notification local buttonCaption = "OK"; -- url path to icon to show on popup message local imgUrl = "" -- DEBUGGING VARIABLES --------------------------------------------------- -- setup debugging, true is turned on, false turned off. local deBug = true; -- DEFINE FLAGS - in this section add code to change users flags ----------------- -- END OF CODE PART FOR USERS TO EDIT AND SETUP -------------------------- -- BELLOW CODE NO NEED TO MODIFY BY USER --------------------------------- local OpenWinDoor = ""; local opened = false; local sourceTrigger = fibaro:getSourceTrigger(); local doorWin = fibaro:getGlobalValue(doorWinCheck); -- send push notifications! function sendPush(message) if #userID > 0 then for i = 1, #userID do if userFlag[i] == 1 then fibaro:call(userID[i], "sendPush", message); -- Send message to flagged users end end end end function sendPopup(open, Info) if open then typeInfo = "Warning"; titleInfo = foundOpenedMessage; else typeInfo = "Success"; titleInfo = foundAllClosedMessage; end ------------------------------------- POPUP MESSAGE HomeCenter.PopupService.publish({ -- title (required) title = popupTitle, -- subtitle(optional), e.g. time and date of the pop-up call subtitle = os.date(popupSubtitle), -- content header (optional) contentTitle = titleInfo, -- content (required) contentBody = Info, -- notification image (assigned from the variable) img = "", -- type of the pop-up type = typeInfo, -- buttons definition buttons = { { caption = buttonCaption, sceneId = 0 } } }) end if (sourceTrigger["type"] == "property") then if (doorWin == doorWinMapping.Yes) then local WinDoorID = tonumber(sourceTrigger['deviceID']) local status = tonumber(fibaro:getValue(WinDoorID, "value")) if (status == 1) then local room = fibaro:getRoomNameByDeviceID(WinDoorID); local deviceName = fibaro:getName(WinDoorID); if deBug then fibaro:debug(room..' ' .. deviceName .. ' is opened.') end local pushMessage = room..' ' .. deviceName .. ' is opened.' sendPush(pushMessage); else local deviceName = fibaro:getName(WinDoorID); local room = fibaro:getRoomNameByDeviceID(WinDoorID); if deBug then fibaro:debug(room..' ' .. deviceName .. ' is closed.') end end end elseif (sourceTrigger["type"] == "other") then for i = 1, #winDoorID do if tonumber(fibaro:getValue(winDoorID[i], "value")) == 1 then opened = true; OpenWinDoor = OpenWinDoor .. fibaro:getRoomNameByDeviceID(winDoorID[i]) .." ".. fibaro:getName(winDoorID[i]) .. "\n"; if deBug then fibaro:debug("It is open: "..fibaro:getRoomNameByDeviceID(winDoorID[i]) .." ".. fibaro:getName(winDoorID[i])) end end end if not opened then OpenWinDoor = "All Closed!" end; sendPopup(opened, OpenWinDoor); end fibaro:abort(); global variable DoorWinCheck can be changed by virtual device which have one label and one button. Here is code that goes to button: local selfId = fibaro:getSelfId() -- enter name of your global variable and map values local doorWinCheck = "DoorWinCheck"; local doorWinMapping = {Yes="Yes", No="No"}; if fibaro:getGlobalValue(doorWinCheck) == doorWinMapping.Yes then fibaro:setGlobal(doorWinCheck, doorWinMapping.No) fibaro:call(selfId, "setProperty", "ui.lblDoorWinCheck.value", "No") fibaro:call(selfId, "setProperty", "currentIcon", 402); -- import icon to HC and check ID else fibaro:setGlobal(doorWinCheck, doorWinMapping.Yes) fibaro:call(selfId, "setProperty", "ui.lblDoorWinCheck.value", "Yes") fibaro:call(selfId, "setProperty", "currentIcon", 401); -- import icon to HC and check ID end And if you want you can add this code to Main loop: local selfId = fibaro:getSelfId() -- enter name of your global variable and map values local doorWinCheck = "DoorWinCheck"; local doorWinMapping = {Yes="Yes", No="No"}; if fibaro:getGlobalValue(doorWinCheck) == doorWinMapping.Yes then fibaro:call(selfId, "setProperty", "ui.lblDoorWinCheck.value", "Yes") fibaro:call(selfId, "setProperty", "currentIcon", 401); else fibaro:call(selfId, "setProperty", "ui.lblDoorWinCheck.value", "No") fibaro:call(selfId, "setProperty", "currentIcon", 402); end fibaro:sleep(3000); Don't forget to change name for label from label1 to lblDoorWinCheck or vice-versa. Here is also picture of DV and icons to use for scene and VD: EDIT : New version 1.0 with some changes for users to easier setup. Now you can use existing variable and values you just need to enter name of your variable and map your values to Yes and No for checking and sending push notification when door or window is opened. Also changed push notifications so that users are defined in table variable userID. userFlag defines if user will get notification set by 1, or not set with 0. You can add your part of code to change flags, see example: -- DEFINE FLAGS - in this section add code to change users flags ----------------- local momAway = "MomAway"; local momAwayMapping = {Yes="Yes", No="No"}; if momAway ~= "" then if fibaro:getGlobalValue(momAway) == momAwayMapping.Yes then userFlag[3] = 0; userFlag[4] = 0; end end -- END OF CODE PART FOR USERS TO EDIT AND SETUP -------------------------- Enjoy coding!
  17. Hello guys, before the 4.520 update I used to have a scene which used to restart the HC2 but with the new update it doesn't work anymore and I cant figure this out. I could use some help from you guys. Thank you! Below is the code of the script. --[[ %% properties %% events %% globals --]] -- specify user and passwort in clear text local user = '' local password = '' function encbase64(data) local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; return ((data:gsub('.', function(x) local r,b='',x:byte() for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end return r; end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x) if (#x < 6) then return '' end local c=0 for i=1,6 do c=c+(x:sub(i,i)=='1' and 2^(6-i) or 0) end return b:sub(c+1,c+1) end)..({ '', '==', '=' })[#data%3+1]) end local http = net.HTTPClient(); http:request('http://127.0.0.1/services/system/reboot.php',{ options = { method = 'GET', headers = { ["Authorization"] = 'Basic '.. encbase64(user .. ':' .. password) } }, success = function(response) end, error = function(err) fibaro:debug("Error: " .. err) end })
  18. Version 1.0

    253 downloads

    This is second package of the icons for scenes if you like this type of design.
  19. Hi all, I have an issue trying to make and HTTPS POST request from my LUA scnene in Fibaro HC. I am getting "short read" error with the URL "https://api2.magicair.tion.ru/idsrv/oauth2/token" This is my scene: ============================================= --[[ %% properties %% events %% globals --]] local authData = "username=XXX&password=YYY" function doTest() print('Test!') local requestUrl = "https://api2.magicair.tion.ru/idsrv/oauth2/token" local httpClient = net.HTTPClient() httpClient:request(requestUrl, { options = { method = "POST", headers = { ["Content-Type"] = "application/x-www-form-urlencoded", ["Content-Length"] = tostring(authData:len()) }, data = authData, timeout = 5000 }, success = function (response) fibaro:debug (response.data) end, error = function (err) fibaro:debug ("Error: " .. err) end }) setTimeout(doTest, 5*1000) end print('Script start...') doTest() ============================================= I am getting the following in my log: [DEBUG] 15:16:52: Script start... [DEBUG] 15:16:52: Test! [DEBUG] 15:16:52: Error: short read I have been trying to play with headers, data format, timeouts and all parameters I could find, however I always get the same error with the provided URL. Other HTTPS URLS I tried with GET method works just fine. Also I have been trying to do the same with cURL and it works fine with the exact same set of headers and payload (with full credentials string, of course). So the issue is somehow connected with this specific URL: "https://api2.magicair.tion.ru/idsrv/oauth2/token" The Internet is saying that short read problem in HTTPClient request might be related to ciphering protocols mismatch between the client and server. So there could be some parameter regulating this? 2 main versions, which I see: 1. Some tricky param is required to form the correct HTTPS request. 2. Some bug / missing feature in HTTPClient implementation in HC2. Anyway I am stuck and need the help from the community and HC developers. Has anyone seen something similar? Any clues? Please help! Many thanks in advance. PS Using the latest FW 4.51 of Fibaro Come Center 2
  20. Hi there! After latest update (or may be one before) my scene not triggered on motion state. I have Fibaro motion sensor and Fibaro wall plug. Only magic scene works. My own - no. Yes, it has Automatic flag and work when I press Run. I try to create new scene but the same. All the scenes and devices assigned to same room. What the problem?
  21. Version 1.0.0

    1,633 downloads

    Some of the icons I use for different scenes (e.g., TimeBasedEvent by Sankotronic or a scene for the sun protection in summer time) - - - - - 21.08.2018 - adding some new icons for a "battery check" and a "ambient light" scene - - - - - - - - - - 29.08.2018 - adding some new icons for a "check door/window" scene - - - - - - - - - - 14.09.2018 - adding one new icon for the roller shutter control and some different colored icon to create a variable - - - - - RollerShutter Control SunProtection HeatingPlan, TimeBasedEvents, CalcBankHoliday and other DimLight, NightLight, ColorLight AllOff, BabyMood, BatterieCheck, WindowCheck, InventoryCheck Create Variable (in different colors)
  22. Version 1.0.0

    605 downloads

    This is first package of the icons for scenes if you like this type of design.
  23. HI, SORRY FOR MY POOR ENGLISH IN ADVANCE I HAVE A HCL LITE UPDATED TO LAST VERSION AND TWO ANDROID PHONE WITH FIBARO APP UPDATED TO LAST VERSION, GPS ACTIVATED ON SMARTPHONES AND SCENE SET ON PRIVILEGE ON BOTH USERS GPS LOCATION ON FIBARO IS OK AND I SEE TRACKING OF FIBARO FAMILY AS YOU CAN SEE IN THE NEXT IMAGE. I TRIED TO MODIFY PRECISION ON FIBARO APPS AND TIME TO TRACK GPS IN FIBARO USERS, NOTHING CHANGE IT DOESN'T WORK look 7st image I CAN'T USE THE GPS FUNCTIONS, I TRY TO ARM MY SENSORS WHEN ALL OF THE SMARTPHONE ARE AWAY HOME, I TRIED WITH TWO WAYS THE FIRST: FIRST WAY (CAN'T WORK) -DECLARE A VARIABLE CASA=1 (image 1) -CREATE A SCENE (image 2) -CREATE A SECOND SCENE (image 3) SECOND WAY (CAN'T WORK) -DECLARE TWO VARIABLE (TERESA AND RICCARDO) (image 1) -CREATE THREE SCENES (image 4-5-6) CAN YOU HELP ME UNDERSTAND WHAT IS WRONG, I READ OF A LOT OF PEOPLE HAVE PROBLEMS WITH GEOFENCING THANK YOU IN ADVANCE AND SORRY FOR MY POOR ENGLISH
  24. Hi, I am using and maintaining some 50s scene on my HC2. I am developing mostly in ZeroBrane. Well so far so good. But the most anoying thing is that there is no way to "upload" scene to the HC2. Ideally this could be done from the development environment. So my question is: Is anybody using such a feature? And if yes, how? If not, I am currently looking into integrating such a feature in a GIT workflow, as git hook. So if there is any interst I would look further into it. While I have already a plan (REST/put with a decent JSON content, retrieving information from the lua script) I have still some questions, or could need some help. Even if it is just "testing". So if you there are any comments on this, just contact me. Best regards, Theo
  25. I have an issue trying to make and HTTPS POST request. I am getting "short read" error with the URL "https://api2.magicair.tion.ru/idsrv/oauth2/token" This is my scene: ============================================= --[[ %% properties %% events %% globals --]] local authData = "username=XXX&password=YYY" function doTest() print('Test!') local requestUrl = "https://api2.magicair.tion.ru/idsrv/oauth2/token" local httpClient = net.HTTPClient() httpClient:request(requestUrl, { options = { method = "POST", headers = { ["Content-Type"] = "application/x-www-form-urlencoded", ["Content-Length"] = tostring(authData:len()) }, data = authData, timeout = 5000 }, success = function (response) fibaro:debug (response.data) end, error = function (err) fibaro:debug ("Error: " .. err) end }) setTimeout(doTest, 5*1000) end print('Script start...') doTest() ============================================= I am getting the following in my log: [DEBUG] 15:16:52: Script start... [DEBUG] 15:16:52: Test! [DEBUG] 15:16:52: Error: short read I have been trying to play with headers, data format, timeouts and all parameters I could find, however I always get the same error with the provided URL. Other HTTPS URLS I tried with GET method works just fine. Also I have been trying to do the same with cURL and it works fine with the exact same set of headers and payload (with full credentials string, of course). So the issue is somehow connected with this specific URL: "https://api2.magicair.tion.ru/idsrv/oauth2/token" The Internet is saying that short read problem in HTTPClient request might be related to ciphering protocols mismatch between the client and server. So there could be some parameter regulating this? 2 main versions, which I see: 1. Some tricky param is required to form the correct HTTPS request. 2. Some bug / missing feature in HTTPClient implementation in HC2. Anyway I am stuck and need the help from the community and HC developers. Help!
×
×
  • Create New...