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

  • 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. 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 !
  2. 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
  3. 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.
  4. 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?
  5. 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.
  6. 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,
  7. 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.
  8. 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()
  9. 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!
  10. 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 })
  11. Version 1.0

    723 downloads

    This is second package of the icons for scenes if you like this type of design.
  12. 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
  13. 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?
  14. Version 1.0.0

    1,128 downloads

    This is first package of the icons for scenes if you like this type of design.
  15. 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
  16. 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
  17. 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!
  18. I am new to LUA and have been automating my heating. I wanted to be able to create a scene that triggered the manual mode for some of the heating panels. I wanted to share the code with this forum - I am aware there is a similar thread but I found copying the code (and modifying) did not work. The LUA code below works for three rooms (just copy the section to a new section for another room), sets the Temperature to 21 for 3 hours from the current time --[[ %% properties %% events %% globals --]] local ManualTemp = 20 local ManualTime = (os.time()+3*60*60) -- 3 hours -- Repeat for each room that you want to set a manual temperature in. -- Office local IdPanel = 21 local panel = api.get("/panels/heating/" .. IdPanel) panel.properties.handTemperature = (ManualTemp) panel.properties.handTimestamp = (ManualTime) api.put("/panels/heating/" ..IdPanel, panel) -- Kitchen ID 18 local IdPanel = 18 local panel = api.get("/panels/heating/" .. IdPanel) panel.properties.handTemperature = (ManualTemp) panel.properties.handTimestamp = (ManualTime) api.put("/panels/heating/" ..IdPanel, panel)
  19. Can I get some help on this one please. I don't understand why my conditions are not working. The setup that I want is. If the light is under 10 lux and either the motion sensor detects or the Garage door opens. then the lights turn on. But what is happening at the moment is, the sensor is behaving as expected. i.e if the light is above 10 lux the sensor won't trigger but if it is bellow it will. But if the garage door opens it triggers no mater what the lux. Any help would be greatly appreciated. Scene attached. Thanks
  20. Hi! I have been using HC2 for 2 years now. I have 3 scenes, in which i use when i leave the house or come home. 1. Nobody home - Turns off all lights, and turns the heating down on multiple devices. WORKS 2. Gone Away - The same as nr 1 but more extensive heat management. WORKS 3. Came Home - This has the problem. I use this to turn on the heat again, and to turn off some general lighting. The heating works like it should, no problem, everything get the SetTemperature that it should. The problem is the lighting. You can see them turn on in the Interface for a second, then they all fall to off again. If i run the scene multiple times, it may eventually turn them on. I have tried the following: - Changed the triggers to and from a device's state, to a variable. No change, and why should it? The scene never fails to trigger, just to work properly. - Changed the scene from using my premade "general lights" scene and instead, configuring all the lights by themselves. Even if i Trigger my general lights scene with the come home scene, or have them all configured in the come home scene individually, i get the same result. I can see them turn on in interface, the falls off again. I have built the scene with blocks, but changed it to lua for easy reading. Scene 104 at the end is just my General lighting scene, which works just fine outside this scene. --[[ %% properties 84 value %% weather %% events %% globals --]] local startSource = fibaro:getSourceTrigger(); if ( ( tonumber(fibaro:getValue(84, "value")) > 0 or tonumber(fibaro:getValue(84, "value")) == 0 ) or startSource["type"] == "other" ) then fibaro:call(339, "setThermostatSetpoint", "1", "23"); fibaro:call(348, "setThermostatSetpoint", "1", "25"); fibaro:call(324, "setThermostatSetpoint", "1", "20"); fibaro:call(71, "setThermostatSetpoint", "1", "20"); fibaro:call(79, "setThermostatSetpoint", "1", "24"); fibaro:setGlobal("HjemmeBorte", "Hjemme"); fibaro:startScene(104); end Anybody seen this? Best regards
  21. when creating a scene I get the message 403 ACCESS FORBIDDEN. None of mye scenes are working anymore, and I cannot create new ones. I have deleted the old scenes and restarted the Home center lite but does not help. Any solutions anyone??
  22. Hello community! I have a task: Every evening user want to set time for the curtains to open in the morning with the alarm clock. Ideal - the user simply sets the alarm in the phone and the home center gives the command to open the curtains when triggered. But I did not find such option in IFTTT. Another one - set time to open the curtains in mobile app (iOS and Android), without having to enter the web configuration. Does anyone have a solution to this problem? Or maybe any suggestions what I need to use? Thank you!
  23. 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
  24. HI tio all, I would like to run a scene from a widget in my iOS device (iPhone 7 plus), but don't work if I protect the scene wit a PIN... Can someone help me? thanks in advances, Paolino
  25. I sometimes recognize that some scenes are not called as soon as they should be. A couple of my scenes are triggered by a motion sensor to switch on the light for example. Sometimes the light get on as soon as I enter the area of the motion sensor (or by triggering a door sensor). But sometimes it takes about 5 seconds until the lights are getting switched on. There are hardly any other scenes running (about four), there do exist only one VD (sonos), the amount of free RAM is at 73% and the CPU usage is between 3 and 12%. So why is it taking longer some times? Thinking about one second might be fine but more than 3 seconds? Is there any possibility to check out why this is happening? One thing is I will try to compare the event log entry with the time stamp of a debug line in one of my scenes. Would it be a good idea to having one huge scene to cover most other scenes (so this scene stays cached)?
×
×
  • Create New...