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

  • 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. Version 3.4

    3,767 downloads

    Netatmo Weather Station suite standalone v3.4 INTRODUCTION Netatmo Weather station suite 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 Sankotronic Lab. Emoji VD standalone (not required since v3.4) 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 and video from @MarcoTorino71: PACKAGE CONTENT Netatmo Main module VD 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 UPRADE PACKAGE CONTENT Netatmo Main module VD main loop and update button new code Netatmo Outdoor module VD main loop and update button new code Netatmo Additional indoor module VD main loop and update button new code Netatmo Wind sensor VD main loop and update button new code Netatmo Rain sensor VD main loop and update button new code Netatmo Weather station scene NOTE - User manual is now provided as separate download. 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.4 - Scene code changed to use new Netatmo API grant access by replacing username and password with tokens. All VD's since v3.4 do not need Emoji VD to be installed to work properly. 3.3.1 - Scene code changed to get rain amount for past 3 adn 6 hours to better support Irrigation Control VD. All VD's corrected some translations. Rain gauge VD changed labels content to display last 3 hours rain amount 3.3 - Check below version description or consult User manual for more details 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 suite! Sankotronic
  2. Hello, Is there someone who can help to make a VD in Fibaro HC2, that makes it possible to hear Spotify on SONOS. So that when I return home, automatically my favorite playlist in Spotify on my SONOS system can be heard? Who dares? Greetz John
  3. Hi all, I 've just bought my new HC3 but before I do the migration I have one issue: After the migration the z-wave devices will network anymore ->ok But I have some VDs only HC2 where I do not have an idea on how to migrate them to HC3, somy Idea was to keep those on HC2 and leave them running, if that is possible at all? e.G. I have one VD that is doing call handling (sending messages on Calls) with my router (fritzbox). This one is actually quite stand-alone, and does not need other devices. Would that work in general, or are all VDs not communicating anymore? cheers joystick
  4. This is a Quickapp script for HC3. I am trying to get this to work in a VD on HC2. Is it possible, or do I have to do it together with a scene to make it work? Can anyone help? function QuickApp:onInit() self:updateProperty("unit", "kr/kWh") self.refresh = 60 -- in seconds local function loop() self:webrequest(); setTimeout(loop,self.refresh * 1000) end if self.username ~= "changeme" then loop() end end function QuickApp:webrequest() local tid = os.date("%R") local minutt = os.date("%M") --OPPDATERER STRØMPRIS OG SNITT HVER TIME if (minutt == "00") then self:OppdaterPris(); self:OppdaterSnitt(); end end function QuickApp:OppdaterPris() --Opprette lokale variable local GammelStrompris = fibaro.get(126,"value") local NyStrompris --Definerer http local http = net.HTTPClient(); --Definerer strengen Payload til å være kommando til tibber local payload = '{"query": "{viewer {homes {currentSubscription{priceInfo{current{total}}}}}}", "variables": null, "operationName": null}'; --API.POST til Tibber-- http : request('https://api.tibber.com/v1-beta/gql', { options = { method = "POST", headers = { ['Authorization'] = '.........', --Min Tibber ID her. ['Content-Type'] = 'application/json' }, data = payload -- Query. }, success = function(response) --fibaro.debug (response.data) --Verifiser at en har fått response.data. Dette er data som en har fått fra Tibber local data = json.decode(response.data); --fjernet local under??? NyStrompris = json.encode(data.data.viewer.homes[1].currentSubscription.priceInfo.current.total); self:updateProperty("value", tonumber(NyStrompris)) --print("OK") end, error = function(err) fibaro.debug ("Error:" .. err) end }); end function QuickApp:OppdaterSnitt() --Definerer http local http = net.HTTPClient(); --Definerer strengen average til å være kommando til tibber local average = '{"query": "{viewer {homes {currentSubscription{priceRating{daily{entries{total}}}}}}}", "variables": null, "operationName": null}'; --API.POST Til Tibber http : request ('https://api.tibber.com/v1-beta/gql', { options = { method = "POST", headers = { ['Authorization'] = '...............', --Min Tibber ID her. ['Content-Type'] = 'application/json' }, data = average -- Query }, success = function(response) --fibaro.debug(response.data) --Verifiser at en har fått response.data. Dette er data som en har fått fra Tibber local data = json.decode(response.data); local Nypris = tostring(json.encode(data.data.viewer.homes[1].currentSubscription.priceRating.daily.entries[31].total)); self:updateProperty("log", tostring(Nypris)) end, } ) end
  5. Version 2.8.1

    2,389 downloads

    Weather State & Forecast suite standalone UPDATED USER MANUAL (09/10/2021) I have updated user manual and added chapter 6.4 Weather Forecast global variable and how to read it In this chapter users can find how to get forecast data and use this data in their code. Please click on this link to download user manual: SA WS VD and WF VD User manual v2.3EN.pdf UPGRADE PROBLEM? Please check upgrade instructions in User manual or below in version history. INTRODUCTION Weather state & forecast module enhance HC2 weather capabilities. Weather State & Forecast module in its latest version works with five most popular weather services: OpenWeatherMap Accu Weather NEW WeatherBit Weather HERE Weather API NEW Weather Underground NEW Weather Underground PWS bringing completely new level of weather experience to Fibaro Home Center 2 users. PREREQUISITES Fibaro Home Center 2 with firmware 4.160 or greater with installed Weather provider plugin set as main weather provider. Sankotronic Lab Emoji VD standalone User account for at least one of the available weather services FEATURES With Netatmo Weather station suite or Netatmo Public Weather station suite gives best support for Irrigation Control watering adjustment Works with 7 most popular weather services on the planet Regularly refreshes weather state and forecast User can setup when forecast push and popup notifications will be sent same as e-mail with complete forecast User can install more than one set of VD’s and follow weather for more than one place It is now separated from Netatmo weather station but can still display Netatmo measurements (will be available only with UHAS version) User can add additional sensor for lux and UV Automatically finds weather provider plugin if installed and can then update weather on the HC2 web GUI and mobile applications 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. VD will automatically translate current weather and forecast data to selected language Easy setup for VD icons. User can download HC2 Icon Preview VD to easily find icon ID numbers Global variables are automatically added, monitored, repaired and cleaned and does not require user intervention Supported are metric and imperial units for measured data. Wind speed can be set to show in meter per second (m/s) instead of km/h or mph INSTALLATION AND UPGRADE Please check provided User Manual PACKAGE CONTENT Weather State VD v2.8.1 Weather Forecast VD v2.8.1 Weather Module scene v2.8.1 (only one scene needed for multiple VD installed) Icon pack 1 - standard HC weather icons Icon pack 2 - flat weather icons provided by Wunderground User manual EN v2.2 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 2.8.1 - Weather Unlocked forecast extended for better support for Irrigation Control VD. Also corrected Weather API rain precipitation display 2.8 - Added new weather services and resolved some bugs, see bellow or User Manual for more details. 2.7.1 - Corrected bug that prevented using Wunderground, corrected day/night weather icons and other bugs. 2.7 - Added scene for safe communication with weather servers. Added e-mail notifications. Added 3 more weather services and updated WU service... For more detailed list check bellow 2.4 – VD completely redesigned and added openweathermap 5 day / 3 hour forecast. VD's update is synced to always have up to date weather info. Solved some more bugs 2.3.1 – Solved bug with Weather State VD update button 2.3 – First release on Fibaro marketplace
  6. Hi everyone, I'm having some issues with Lua code in a virtual device I am writing. I'm getting information on the status of my Bluespray irrigation controller. It has a basic API and reports if any of the zones are on watering. I want to just query the unit and then print out if any are detected as on. When I query bluespray controller and its not watering anything I get some JSON back which looks like this. { "result": { "sensors": { "door": 0, "rain": 1 }, "active_zones": [ ], "timestr": "Sat Mar 11 2017 10:09:38 PM", "time": 1489241378000, "door": 0 }, "id": 528452 } When its IS watering I get the following. { "result": { "sensors": { "door": 0, "rain": 1 }, "active_zones": [ { "on": 1489240754, "off": 1489241054, "run": 1489240754, "terminal": 3 } ], "timestr": "Sat Mar 11 2017 10:00:12 PM", "time": 1489240812000, "door": 0 }, "id": 218829 } To make it even more complex sometimes the system reports multiple zones operating. (This is normal and ok. I just need to pick up the first zone reported) { "result": { "sensors": { "door": 0, "rain": 1 }, "active_zones": [ { "on": 1489241854, "off": 1489241974, "run": 1489241854, "terminal": 4 }, { "on": 1489241854, "off": 1489241974, "run": 1489241854, "terminal": 8 } ], "timestr": "Sat Mar 11 2017 10:17:38 PM", "time": 1489241858000, "door": 0 }, "id": 998161 } My issue is detecting if I get none, one or multiple active zones. If I have a valid zone then I then want to put the first zone number into the zoneterminal variable. If I don't have a valid zone I just want to put 0 into the zoneterminal variable. The problem is when I try something like the code below I get [ERROR] 22:11:22: line 56: attempt to index field '?' (a nil value) I cant figure out how to deal with LUA arrays correctly. (specifically detecting valid entries) The json.null operator does not seem to work the same way on array values. -- This script polls data from a local Bluespray Irrigation controller every 60 seconds and displays the status of the active zones -- Its configured for a speicific system but could easily be adapted to any bluespray controller. -- This script is written for Fibaro HC2 -- Script written by Brom ([email protected]) -- version 0.1 (10/3/17) function round(x, n) n = math.pow(10, n or 0) x = x * n if x >= 0 then x = math.floor(x + 0.5) else x = math.ceil(x - 0.5) end return x / n end fdata = {} zonename_1 = "Front Lawn" zonename_2 = "Road Lawn" zonename_3 = "Front Garden" zonename_4 = "Back Lawn Left" zonename_7 = "Back Lawn Right" zonename_5 = "Back Garden Left" zonename_6 = "Back Garden Right" fdata.selfId = fibaro:getSelfId() fdata.selfIp = fibaro:get(fdata.selfId, "IPAddress"); -- Perform the grab from the irrigation controller. local irrigationcontroller= Net.FHttp(fdata.selfIp); response,status,errorCode = irrigationcontroller:GET("/api/status") -- Basic debugging fibaro:debug(response) -- Check the respose from the controller is valid and Pull out the details from the JSON response. if (tonumber(status)==200 and tonumber(errorCode)==0) then local irrigation = json.decode(response) -- If any of the responses are null then make them 0 if irrigation.result.time == json.null then polltime = 0 else polltime = irrigation.result.time end -- this bit does not work !!!! zoneterminal = irrigation.result.active_zones[1].terminal zoneon = irrigation.result.active_zones[1].on zoneoff = irrigation.result.active_zones[1].off zonerun = irrigation.result.active_zones[1].run -- Basic Debugging fibaro:debug("polltime: "..polltime) fibaro:debug("zoneterminal: "..zoneterminal) fibaro:debug("zoneon: "..zoneon) fibaro:debug("zoneoff: "..zoneoff) fibaro:debug("zonerun: "..zonerun) timeleft = (zoneoff - zonerun) / 2 / 60 fibaro:debug("timeleft: "..timeleft) -- Output to the device. if zoneterminal == 0 then fibaro:call(fdata.selfId, "setProperty", "ui.watering.value"," OFF ") end if zoneterminal == 1 then fibaro:call(fdata.selfId, "setProperty", "ui.watering.value"," ON "..zonename_1) fibaro:log("Time Left "..timeleft.." Min"); end if zoneterminal == 2 then fibaro:call(fdata.selfId, "setProperty", "ui.watering.value"," ON "..zonename_2) fibaro:log("Time Left "..timeleft.." Min"); end if zoneterminal == 3 then fibaro:call(fdata.selfId, "setProperty", "ui.watering.value"," ON "..zonename_3) fibaro:log("Time Left "..timeleft.." Min"); end if zoneterminal == 4 then fibaro:call(fdata.selfId, "setProperty", "ui.watering.value"," ON "..zonename_4) fibaro:log("Time Left "..timeleft.." Min"); end if zoneterminal == 5 then fibaro:call(fdata.selfId, "setProperty", "ui.watering.value"," ON "..zonename_5) fibaro:log("Time Left "..timeleft.." Min"); end if zoneterminal == 6 then fibaro:call(fdata.selfId, "setProperty", "ui.watering.value"," ON "..zonename_6) fibaro:log("Time Left "..timeleft.." Min"); end if zoneterminal == 7 then fibaro:call(fdata.selfId, "setProperty", "ui.watering.value"," ON "..zonename_7) fibaro:log("Time Left "..timeleft.." Min"); end if zoneterminal == 0 or zoneterminal == 1 or zoneterminal == 2 or zoneterminal == 3 or zoneterminal == 4 or zoneterminal == 5 or zoneterminal == 6 or zoneterminal == 7 then fibaro:debug("Valid Zone") else fibaro:call(fdata.selfId, "setProperty", "ui.watering.value","Error") end else fibaro:debug("error Irrigation Controller: "..errorCode) end -- sleep for 1 min fibaro:sleep(10000) -- fibaro:sleep(60000) Any help appreciated. ps Code for the output is really extra long. Looking to understand how I can manipulate the variable name / number I am outputting to reduce the number of if statements. Once I get this figured out I plan to also add in buttons to perform manual runs. Brom
  7. I purchased some downlights that work with Hue. I added them to hue and ensured they work. then I added them to fibaro using the plugin with no issues. I set the color to what I want in the app (in this case I want bright white). I run a scene to figure out the value, brightness and saturation. I then put it in a VD as a saved color. once I press the saved color in fibaro the light changes to an off blue color instead of bright white. I can get the light back to a bright white by going to the hue app and adjusting the color so I know its not the light itself. Does anyone know if Hue changed a setting that does not allow the light to change to the correct color? in the app they have 2 different selections for colors and White not sure if this makes a difference on fibaro now. HC2 latest OS @T.Konopka
  8. I am very conversant with the HC2 stuff. For the HC3, the last time I looked at this a year ago, the offerings were rather disappointing with a steep learning curve. Could some one recommend A decent example of a lua scene. I am fine with the language change - I have just grepped and done global modifications on my 30 odd lua scenes. I am looking for a better explanation of the new trigger mechanism. A decent example of the new VD and any gotchas. Before I could just save the lua as a text file on pc with versioning. How are people saving the new scenes, as they come in two parts ?
  9. Do you have any idea how to control Hisense Air Conditioner - Apple Pie by wifi module AEH-W4A1. I need to control it by commands throught wifi - Virtual Device
  10. Hello, I have created multiple virtual devices but never found out how to change the main icon. I have used: fibaro:call({id of VD}, "setProperty", "currentIcon", {id of icon}) but it doesn't work. I need a solution to setup an icon that stys unchanged, even if buttons are pressed. Thank you!
  11. Version 1.0.0

    68 downloads

    Smarter Coffee VD Hello friends of Fibaro and a good cup of coffee!!! When I became proud owner of Smarter coffee machine, I didn't know that Smarter is making smart appliances that are actually not connectible to home automation. I have ask them several times if they plan to publish coffee machine API or what ever is needed so that it can became connected part of our every day smarter home. What is the use of smart coffee machine if you have to grab mobile phone every morning in bed to tell it that you want coffee to be brewed!! The answer was always "maybe soon". So I get tired of waiting! I was intensively searching the wast land of internet and just few days ago finally stumble on at least some kind of solution provided by Simone Margaritelli the evilsocket and Aden Forshaw. Of course their solution is written in python but for me is unacceptable to have additional server even on small PI just to start coffee machine. So done little experimenting because this coffee machine has really simple commands in bytes where first byte is command and last byte is marking end of command. Here is what evilsocket and Aden found and I provide translation to our LUA language with this little knowledge I have just in case if you want to experiment further or do similar VD for iKittle 2: -- Smarter coffee commands: command - hexadecimal - decimal format used in LUA -------------------------------------------------------------------------------------- brew = "7" = "7" reset = "\x10" = "\16" get wifi aps = "\xD" = "\13" toggle grind = "\x3c\x7e" = "\60\126" set strength = "\x35%\x7e" = "\53\%\126" where % = 0-2 (weak, mid, strong) set cups = "\x36%\x7e" = "\54\%\126" where % = 1-12 cups set config = "\x38\%1\%2\%3\%4\x7e" = "\56\%1\%2\%3\%4\126" where %1 = strength %2 = cups %3 = mode (grind, filter) %4 = warm time warm % min = "\x3e%\x7e" = "\62\%\126" where % = 1-30 min warm stop = "\x4a\x7e" = "\74\126" -- Smarter coffee response response - hex - decimal counterpart ------------------------------------------------------- brewing or OK = "\x03\x00~" = "\3\0~" already brewing = "\x03\x01~" = "\3\1~" invalid argument = "\x03\x04~" = "\3\4~" no carafe = "\x03\x05~" = "\3\5~" no water = "\x03\x06~" = "\3\6~" low water = "\x03\x07~" = "\3\7~" reset ok = "\x03i~" = "\3i~" -- In LUA backslash \ is used to mark byte in the string so it cannot stand alone or be -- last character in string like this: "\" or this "\56\". ''So this is problem if you want -- to combine different values in string commands like for changing number of cups -- since it is impossible to join "\54\" ..cups.. "\126". 'Only possibility that -- came across my mind is to use table with predefined strings for coffee strenght, -- number of cups and Keep wamring time as listed bellow. local comm = "\56"; local cups = {"\1", "\2","\3", "\4","\5", "\6","\7", "\8","\9", "\10", "\11", "\12"}; local stre = {"\0", "\1","\2"}; local mode = {"\0", "\1"}; local time = {"\5", "\10", "\15", "\20", "\25", "\30", "\35", "\40"} local endb = "\126" -- example of building command for setting coffee machine default settings local command = comm..stre[2]..cups[2]..mode[1]..time[1]..endb I should actually put this part in developer section but here it is for those of you who like to play with it. So here it is SMARTER COFFEE VD V0.1 first release Smarter_coffee.vfib.json To be able to use this VD you will need following devices: 1) HC2 - VD will work only on HC2 due to LUA code (Will try to do HCL version but will not be with all possibilities as LUA version) 2) Smarter Coffee machine with latest firmware V 22.0 (will work with older version but you will not be able to stop Keep warming or set it to 40 min) 3) FGWP smart plug or any other similar. It is needed to monitor coffee machine consumption from which is determined if it is brewing, keep coffee warm or stopped Also after importing VD to your system you need to setup IP address and TCP port. Since it is not possible to get IP address of your precious coffee machine from original app you will need some other app to find it for you. I used Fing on my iPhone. TCP port is 2081. And it should be entered on advanced tab of the VD: Before you start using VD first you will need to define some global variables in global variable panel. I was planning to add code to do that part for you, but since Fibaro is constantly changing API on HC I decided to leave this part to you. Besides you can put values of global variables in your language but then you will also have to change few things in code of each button and main loop. Will explain later what to change. So this are global variables that are needed for Smarter coffee VD to work properly: First are variables (top part in panel): Name of variable - possible value that you must enter when adding (DO NOT leave 0 if is not possible value!!) ----------------------------------------------------------------------------------------------------------------------------- SmarterCups - possible values: between 1 and 12. Do not leave 0. Keeps number of cups of coffee. SmarterStrength - possible values: 0 - Weak, 1 - Medium or 2 - Strong. Keeps value of coffee strength SmarterWarm - possible values: 5, 10, 15, 20, 25, 30, 35 and 40. Keeps time for how long coffee will be kept warm Following are predefined global variables (bottom part in panel): Name of variable - possible values that you must enter in order I put them here bellow. ----------------------------------------------------------------------------------------------------------------------------- SmarterBrewed - possible values: No, Yes. Used to prevent starting brewing twice in a row. This is filter coffee and filter is better to cleaned after each use. SmarterDefaults - possible values: table that contains coffee machine default values for strength, number of cups, mode (Filter or Grind) and time to Keep warm. You need to define only one value with name Table and then save. Open again to edit and then delete Value2. VD will take care of the rest. SmarterMode - possible values: Filter, Grind. It is self explanatory SmarterPush - possible values: No, Yes. It is used to send push notification only ones from VD main loop when coffee is ready SmarterStatus - possible values: Ready, Not ready, Brewing, Keep warm, Faulty, No carafe, No water, Low water. Status of the machine. SmarterUseDef - possible values: No, Yes. If using default values then VD needs to restore to those values after brewing is finished. For global variables SmarterBrewed, SmarterMode and SmarterStatus you can use words in your language but if you do then you will have to change in code as follows: -- GLOBAL VARIABLES -- enter names and value mapping of your -- global variables or leave as it is and add to variables panel -- "SmarterStatus" is predefined global variable. Enter your -- name and mapping of values local smarterStatus = "SmarterStatus"; -- change value mapping to corresponds to your values in your global variable local smarterStatusMapping = {ready="Ready", notready="Not ready", brewing="Brewing", warming="Keep Warm", faulty="Faulty", nocarafe="No carafe", nowater="No water", lowater="Low water"}; -- "SmarterMode" is predefined global variable local smarterMode = "SmarterMode"; -- change value mapping to corresponds to your values in your global variable local smarterModeMapping = {filter="Filter", grind="Grind"}; -- "SmarterWarm" is global variable possible value 5 to 40 in -- step of 5 local smarterWarm = "SmarterWarm"; -- "SmarterBrewed" is predefined global variable used to change -- machine status local smarterBrewed = "SmarterBrewed"; -- change value mapping to corresponds to your values in your global variable local smarterBrewedMapping = {Yes="Yes", No="No"}; and this has to be done in all code for each button and main loop! Next step is to add icons and then do mapping of their IDs in the code. Here are the icons in order and with their names in code: Main icon that you will set as default on the VD and all buttons except on button Brew and Keep warm: In code is named iconBrewing so you will need ID and also set it up on Brew button: In code is named iconWarming so you will need ID and also set it up on Keep warm button: in code is named iconNoCarafe so you will need ID: in code is named iconLoWater and ID is needed: in code is named iconNoWater and ID is needed: in code is named iconFilter0 you need ID and it is showing setting for Weak strength and Filter mode: in code is named iconFilter1 you need ID and it is showing setting for Middle strength and Filter mode: in code is named iconFilter2 ID is needed and it is showing setting for Strong coffee and Filter mode: in code is named iconGrind0 ID is needed and it is showing setting for Weak coffee and Grind mode: in code is named iconGrind1 Id is needed and it is showing setting for Medium coffee and Grind mode: and the last one is named in code iconGrind2 Id needed and is showing setting for Strong coffee and Grind mode: How to get icon ID is explained many times here on forum so I will skip that. After you get ID of all icons then you need to replace them in main loop and for buttons Brew, Keep warm, Weak, Medium, Strong, Change mode, Reset machine and main loop. Code is well commented and looks like this: -- VD ICONS ---------------------------------------------------- -- enter ID numbers of corresponding icons on your system local iconBrewing = 1041; local iconWarming = 1042; local iconNoCarafe = 1044; local iconFilter0 = 1045; local iconFilter1 = 1046; local iconFilter2 = 1047; local iconGrind0 = 1048; local iconGrind1 = 1049; local iconGrind2 = 1050; local iconLoWater = 1051; local iconNoWater = 1052; And before you can start enjoying your coffee there is one more touch that needs to be done. You need to go to main loop code and first setup smart plug ID. Look for this code in main loop: -- SMART PLUG -------------------------------------------------- -- enter ID nuber of smart plug to which Smarter cofee is -- connected. Smart plug is the only way to check machine status -- at the present moment so it is needed for proper functioning -- of this VD local plugID = 135; Then if you want to be notified by VD when coffee is ready then find this code and enter ID of your mobile devices to which will be send. You can put as many as you like between brackets {} just separate them by comma eg. {2, 45, 121}: -- PUSH NOTIFICATIONS ------------------------------------------ -- define users that will receive push notifications when -- coffee is ready if leaved empty no notification will be send local userID = {} -- enter default flags: 1 - will send, 0 - will not send -- must be same number of flas as users local userFlag = {}; -- enter push message text that will be sent when coffee is -- ready local pushMessage = "Coffee is ready!" -- here you can put code that will change flags to whom push -- notification will be sent function setupUsers() -- here you can put code to dynamically change which users -- will get push notifications if you use flags end If you want to change who will receive push notifications you can use variable userFlag for that. For each userID you can enter 1 to send push notification or 0 not to send. Then you can add some code in function setupUsers() where you can change flags as you wish. For example I use that code to stop receiving push notifications when I'm away from home. If you don't need this feature then just leave brackets empty. And of course you can change message for pushMessage to your language. And if you want to completely translate VD to your language you just need to check all code for this part: -- MESSAGES ---------------------------------------------------- -- enter messages in your language -- response messages from coffee machine local _respBrewing = "Brewing"; local _respAlready = "Already brewing"; local _respInvalid = "Invalid argument"; local _respNocarafe = "No carafe" local _respNowater = "No water"; local _respLowater = "Low water"; local _respResetOK = "Reset OK"; local _respCheck = "Check machine"; local _respFailed = "Transfer failed"; -- command sent by this button local _command = "Brew"; -- coffee machine status messages local _statReady = "Ready"; local _statNotready = "Not ready - fill in coffee"; local _statBrewing = "Already brewing!"; local _statWarming = "Warming coffee!"; local _statFaulty = "Faulty - check machine"; local _statNocarafe = "No carafe - put it back"; local _statLowater = "Warning! - Low water"; local _statNowater = "No water - fill tank"; I try to make it easier for you as much as I could in this four days of development so all messages I collected on beginning of the code. Some buttons have more messages, some don't so you better check them all. At the end just short explanation how it works. Before first run, you will need to check if settings in VD corresponds to machine settings by checking display on the machine or original app. When this is synced you can start using it. Before first brewing status of VD must be Ready. If it is not you can press button Reset status to just reset VD or Reset machine to reset all to factory settings. Reseting machine will clear all default settings so you will need to send them again by pressing button Set above as default after you make your favorite choice of strength, cups and mode. This default settings will be always set back after brewing coffee no matter what settings was for the last brew. After brewing coffee status of the VD will be always set to Not ready except if there is No carafe in place, or No water or Low water. After rectifying cause: placing carafe in place, filling water and cleaning filter you will need to press button Reset status to put it back into Ready state. If this is too annoying you can always setup some short scene that you will trigger with some switch, button or swipe or whatever and reset VD to Ready status. If you want to keep coffee warm after brewing you can do that by setting time and then pressing button Set above as default so warming will start immediately after brewing, or you can setup time and then press button Keep warm. If during Keep warm you press button Keep warm again this will stop warming but only with new machine firmware. Keep warming time can be set up to 40 minutes. And that's it! Enjoy coding and coffee!!! EDIT Still working on 4.180
  12. Version 1.3.4

    2,781 downloads

    Main scene FTBE v1.3.4 UPDATE (30 December 2019) Changed only Main scene FTBE code. Changed function for time of day calculation and added use of SleepState global to set time of day to morning when Awake and current time is between midnight and sunrise time. KNOWN ISSUES v1.3.4 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 and check video from @MarcoTorino71: PACKAGE CONTENT Main scene FTBE v1.3.4 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.3 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.
  13. I got a VD that collects lux for me and put it as global variable, yesterday i received something wrong in the readout as you could see below. The VD collects data thru json , all code is in mainloop. When this unexpected answer from the device shows up, the VD stop working, the only way to get it up and running again is to reboot the HC:2, is there any other way to get the VD to start again? [DEBUG] 18:03:49: 0.83 [DEBUG] 18:04:49: 0.83 [DEBUG] 18:05:52: 0.83 [ERROR] 18:07:56: line 7: Expected value but found T_END at character 1 Code in mainloop selfId = fibaro:getSelfId() sleeptimer = 1 -- minutes between pollning local WEB = Net.FHttp("192.168.88.65",80) -- IP to your espeasy local response ,status, err = WEB:GET("/json?tasknr=1") -- task id on espeasy if (tonumber(status) == 200 and tonumber(err)==0) then local jsonTable = json.decode(response) name = jsonTable.TaskName value = jsonTable.Lux fibaro:debug(value) --fibaro:log(value) fibaro:call(selfId, "setProperty", "ui.Label1.value", value.." Lux") fibaro:setGlobal("Sun", value) end fibaro:sleep(sleeptimer*1000*57)
  14. Version 1.0.0

    74 downloads

    Poniżej pierwsza wersja kodu dla Fibaro VD odczytująca dane z falownika ZeverSolar -instalacji fotowoltaicznej dostępne po sieci lokalnej: adresIP/home.cgi. VD ZeverSolar wymaga tylko wpisania swojego adresu IP VD ZeverSolar umożliwia: 1. Prezentacje danych: czas odczytu, wartość chwilowa pacW, wielkość produkcji dziennej. 2. Przycisk wymuszający odczyt on demand "Update?". 3. Zapis zmiennych globalnych pacW, etodayKWh.
  15. Hi A small solution to making tunable white lighting in Fibaro. Might help someone who is new to Lua and Fibaro https://youtu.be/atihFhlgTAc The video description has the link to virtual device.
  16. Hello everyone! I'm working on solution that should bring easier sharing and installation of scenes and virtual devices for users. What I'm missing is a way how to change button and label 'Name' or 'caption' using LUA code and/or REST API. See picture bellow: @T.Konopka, Please if you know answer to this question can you share it, or of it is not possible with latest version 4.120 can this be added to the todo list for some future release? Really appreciate your help! Sincerely Sankotronic EDIT This is solution to the question provided by @A.Socha: --id of VD id = 105 --contecting to HC2 to get VD who you want modify local HC2 = Net.FHttp("127.0.0.1", 11111) payload = "/api/virtualDevices/" .. id response, status, errorCode = HC2:GET(payload) if tonumber(errorCode) == 0 and tonumber(status) == 200 and response ~= nil and response ~= "" then jsonTable = json.decode(response) --changening caption jsonTable.properties.rows[1].elements[1].caption="testazz" --sending it back local response, status, errorCode = HC2:PUT(payload, json.encode(jsonTable)) end After changing label, slider or button caption please refresh HC web GUI interface page and do Refresh Network data on mobile devices to make change visible!
  17. Hello! i Wonder how can i change width of virtual device to get perfect square? now it's very large and take much space for only energy consumption report
  18. Version 1.0.0

    115 downloads

    This is a simple VD+Scene to control ZXT-120 AC controllers. I use it because of 2 factors: 1) You can control everything on one screen instead of 3 devices in HC2 interface 2) it is visible in Home Center app (ZXT-120 is not visible natively yet) It supports heating and cooling modes and fan speed. You can see current status as well. Setup is very simple: VD - just put ID of the child device of ZXT-120 which controls temperature into the "Port" field of VD Scene - You have to put IDs of three child deviced of ZXT in the triggers field annd the same ID into "Options" part of the scene. Also put VD ID inn the "Options" part. Maybe it can be useful for some of you. ZXT-120.zip
  19. How to make a button in a VD what will restart your HC2 ? Thanks for your help -sbo
  20. As has been re-iterated many many times on this forum, there are two methods of updating a slider in a virtual device from a scene or another VD: Using fibaro:call(device, "setProperty", "ui.sliderX,value", value) causes the numerical value of the slider to be updated, but not the length of the slider bar. Neither does it execute the code behind the slider. Using fibaro:call(device, "setSlider", X, value) causes the numerical value and the length of the slider to be updated,, and executes the code behind the slider. In both cases, "device" is the ID number of the VD, "X" is the slider reverence number and "value" is the new slider value (0-100). Generall, option 2 is preferred because everything is updated. However, there seems to be an issue if the VD has more that nine sliders. Executing a few lines of test code for each of the methods illustrates this. First, method 1. Executing this code: local device = fibaro:getSelfId() local sliderString1 local sliderString2 local numSliders = 13 fibaro:debug('-----------------------------------------------------------') fibaro:debug('--Set Sliders----------------------------------------------') for i = 1, numSliders do sliderString1 = ('ui.Slider' .. tostring(i) .. '.value') fibaro:call(device, "setProperty", sliderString1, tostring(i)) fibaro:debug('Slider ' .. tostring(i) .. ' = ' .. tostring(i)) end fibaro:debug('--Read Sliders---------------------------------------------') for i = 1, numSliders do sliderString1 = ('ui.Slider' .. tostring(i) .. '.value') sliderString2 = fibaro:getValue(device, sliderString1) fibaro:debug(device .. ', ' .. sliderString1 .. ' = ' .. sliderString2) end Gives: [DEBUG] 16:21:04: --Set Sliders---------------------------------------------- [DEBUG] 16:21:04: Slider 1 = 1 [DEBUG] 16:21:05: Slider 2 = 2 [DEBUG] 16:21:05: Slider 3 = 3 [DEBUG] 16:21:05: Slider 4 = 4 [DEBUG] 16:21:05: Slider 5 = 5 [DEBUG] 16:21:05: Slider 6 = 6 [DEBUG] 16:21:05: Slider 7 = 7 [DEBUG] 16:21:05: Slider 8 = 8 [DEBUG] 16:21:05: Slider 9 = 9 [DEBUG] 16:21:05: Slider 10 = 10 [DEBUG] 16:21:05: Slider 11 = 11 [DEBUG] 16:21:05: Slider 12 = 12 [DEBUG] 16:21:05: Slider 13 = 13 [DEBUG] 16:21:05: --Read Sliders--------------------------------------------- [DEBUG] 16:21:05: 1044, ui.Slider1.value = 1 [DEBUG] 16:21:05: 1044, ui.Slider2.value = 2 [DEBUG] 16:21:05: 1044, ui.Slider3.value = 3 [DEBUG] 16:21:05: 1044, ui.Slider4.value = 4 [DEBUG] 16:21:05: 1044, ui.Slider5.value = 5 [DEBUG] 16:21:05: 1044, ui.Slider6.value = 6 [DEBUG] 16:21:05: 1044, ui.Slider7.value = 7 [DEBUG] 16:21:05: 1044, ui.Slider8.value = 8 [DEBUG] 16:21:05: 1044, ui.Slider9.value = 9 [DEBUG] 16:21:05: 1044, ui.Slider10.value = 10 [DEBUG] 16:21:05: 1044, ui.Slider11.value = 11 [DEBUG] 16:21:05: 1044, ui.Slider12.value = 12 [DEBUG] 16:21:05: 1044, ui.Slider13.value = 13 As would be expected. However executing a code snippet using method 2, like this: local device = fibaro:getSelfId() local sliderString1 local sliderString2 local numSliders = 13 fibaro:debug('-----------------------------------------------------------') fibaro:debug('--Set Sliders----------------------------------------------') for i = 1, numSliders do fibaro:call(device, "setSlider", tostring(i), tostring(i)) fibaro:debug('Slider ' .. tostring(i) .. ' = ' .. tostring(i)) end fibaro:debug('--Read Sliders---------------------------------------------') for i = 1, numSliders do sliderString1 = ('ui.Slider' .. tostring(i) .. '.value') sliderString2 = fibaro:getValue(device, sliderString1) fibaro:debug(device .. ', ' .. sliderString1 .. ' = ' .. sliderString2) end Give this: [DEBUG] 16:43:02: --Set Sliders---------------------------------------------- [DEBUG] 16:43:02: Slider 1 = 1 [DEBUG] 16:43:02: Slider 2 = 2 [DEBUG] 16:43:02: Slider 3 = 3 [DEBUG] 16:43:02: Slider 4 = 4 [DEBUG] 16:43:02: Slider 5 = 5 [DEBUG] 16:43:02: Slider 6 = 6 [DEBUG] 16:43:02: Slider 7 = 7 [DEBUG] 16:43:02: Slider 8 = 8 [DEBUG] 16:43:02: Slider 9 = 9 [DEBUG] 16:43:03: Slider 10 = 10 [DEBUG] 16:43:03: Slider 11 = 11 [DEBUG] 16:43:04: Slider 12 = 12 [DEBUG] 16:43:04: Slider 13 = 13 [DEBUG] 16:43:04: --Read Sliders--------------------------------------------- [DEBUG] 16:43:04: 1044, ui.Slider1.value = 10 [DEBUG] 16:43:04: 1044, ui.Slider2.value = 11 [DEBUG] 16:43:04: 1044, ui.Slider3.value = 12 [DEBUG] 16:43:04: 1044, ui.Slider4.value = 13 [DEBUG] 16:43:04: 1044, ui.Slider5.value = 5 [DEBUG] 16:43:04: 1044, ui.Slider6.value = 6 [DEBUG] 16:43:04: 1044, ui.Slider7.value = 7 [DEBUG] 16:43:04: 1044, ui.Slider8.value = 8 [DEBUG] 16:43:04: 1044, ui.Slider9.value = 9 [DEBUG] 16:43:04: 1044, ui.Slider10.value = 10 [DEBUG] 16:43:04: 1044, ui.Slider11.value = 11 [DEBUG] 16:43:04: 1044, ui.Slider12.value = 12 [DEBUG] 16:43:04: 1044, ui.Slider13.value = 13 Which is clearly wrong. Is this a bug, or have I done something really dumb (if so please enlighten me). If it is a bug, does a workaround exist? TIA.
  21. How to get the vlaue from a label in a VD ? I want to read the status from a label in a VD, how to do so? if fibaro:getValue(189, "ui.verandaspots.value") == 'ON' then fibaro:debug("TEST") end
  22. 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
  23. Buongiorno, c'è modo di far tracciare i cambiamenti dei VD come eventi e poterli consultare nel pannello eventi? Grazie. Lorenzo
  24. Hi Everyone. So, firstly a bit of background. I am playing with improving the current SONY TV control. Currently there is only one working control and that is the current VD, but there is a PLUGIN that doesn't work for the newer Android tv's So after a lot of head scratching and googling i have figured that the Sony TV has a REST API that can be connected to with a HTTP request. The Sony actually has three ways to control it IRCC (IR codes over IP), Serial and REST API. the current VD uses IRCC and cant go directly to say HDMI3 or an app you have installed. This is where the REST API is far better. I have figured out the syntax for the HTTP call to get it work with the help of a program called POSTMAN and i can do all sorts of control. End background..... But here is where i am falling short, the trick with the HTTP string is in the header (it must be in the header AFAIK) it needs to have, at least: Header KEY = x-auth-psk Value = 0000 KEY = host Value = 192.168.1.12 (IP of the originating unit) in the body you send (no quotes) "{"method":"setPowerStatus","version":"1.0","id":1,"params":[{"status":true}]}" That will turn the TV on. So playing with a few other Virtual Drivers for other integration I somewhat understand the GET command. (this is from the "control by web" web relay driver) GET /state.xml?relay1State=1&noReply=1 HTTP/1.1 0x0D0x0A0x0D0x0A So i understand the GET part of the statement, but then i run into the HTTP/1.1 part. I cant find anything that explains the HTTP/1.1 and what it needs what options it has and how I need to use it. For instance, why does it need a HEX string that says (no quotes) 'Carriage return 'newline' 'carriage return 'new line' So can anyone point me at the correct learning section or help me out with a command that can integrate x-auth-psk as the key and 000 as the value into the header of a HTTP request? That command will just turn the TV on, but you can string them together. Why? Imagine this: while sitting on you couch watching TV, your CCTV/IPC NVR closes one of its alarm contacts on say motion detection. I would like to know that there is motion on my security cameras while i am at home...... So a scene could be run in combination with the Virtual Driver to: Test if the TV power is on. Test if the PLEX or NETFLICK app is running Record current state Pause current state ( ie pause video or movie) Change the input to HDMI3 (to view the cameras directly from the NVR output.) wait till alarm is cleared (lets say motion) return to Plex or netflicks All of that would very VERY hard to do with IR codes. Fodder.
  25. Guys, i simple need to send this command using a VD: Button1: PUT http://admin:[email protected]/ISAPI/ContentMgmt/record/control/manual/start/tracks/101 Button2:PUT http://admin:[email protected]/ISAPI/ContentMgmt/record/control/manual/stop/tracks/101 How can i do? Do u have some example? There ia also a way to check the status of the command? Regards Gianluca
×
×
  • Create New...