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

  • 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. This QuickApp monitors your SolarEdge managed Solar Panels. The QuickApp has (child) devices for current Power, solar Power, lastday, lastmonth, lastyear and lifetime energy. The peak power and currency setting are retrieved from the inverter. The readings for lastmonth, lastyear and lifetime energy are automatically set to the right Wh unit (Wh, kWh, MWh or GWh). The energy production is added to the (new) HC3 energy panel. Changes version 1.2 (26th August 2021) Added values update main device to power interface to show usage in Power consumption chart Solved a bug in the lifeTimeData.revenue existence check Changes version 1.1 (21th August 2021) Changed back currentPower measurement to Watt and lastDayData, lastMonthData to kWh (not to mess up statistics in Energy panel or InfluxDB/Grafana installations) Changed Child device currentPower to Main device with type com.fibaro.powerSensor (Watt). So the Main device will show the current power production, no Child device necessary. Changed Child device lastDayData to type com.fibaro.energyMeter (kWh). These values will be shown in the new energy panel. Added automaticaly change rateType interface of Child device lastDayData to "production" Added extra check on apiKey and siteID, if not OK then change to simulation mode SolarEdge Monitor settings currency and PeakPower also available in simulation mode Changed the lastUpdateTime to format dd-mm-yyyy hh:mm Changes version 1.0 (30th July 2021) Total m² solar panels added to log text and label text Check for API existance of lifeTimeData_revenue (not available in older firmware) Automatic conversion added for lastmonthData, lastYearData and lifetimeData production to Wh, kWh, MWh or GWh Automatic conversion added for currentPower to Watt, Kilowatt, Megawatt or Gigawatt (yes, Megawatt and Gigawatt is optimistic) Get the Peakpower and Currency settings from Inverter Peakpower added to label text and child device log text Changes version 0.3 (12th April 2021) Added last update date / time Cleaned up the code Changes version 0.2 (12th April 2021) Disabled revenue value (not for lifeTimeData) Changes version 0.1 (11th April 2021) First (test) version QuickApp variables (mandatory, they will be automatically added with the default values): siteID = Site ID of your SolarEdge installation (see your Inverter Site Details) apiKey = API key of your SolarEdge Inverter (contact your installer if you don't have one) solarM2 = The amount of m2 Solar Panels (use . for decimals) for calculating Solar Power m2 (default = 0) interval = The daily API limitiation is 300 requests. The default request interval is 360 seconds (6 minutes). debugLevel = Number (1=some, 2=few, 3=all, 4=simulation mode) (default = 1) icon = User defined icon number (add the icon via an other device and lookup the number) (default = 0) Tested with: SolarEdge firmware version 4.12.35 and 4.13.40 Download the QuickApp here (download the file and un-zip): https://github.com/GitHub4Eddy/solaredge_monitor/archive/refs/tags/solaredge_monitor-12.zip or on the Fibaro Marketplace: https://marketplace.fibaro.com/items/solaredge-monitor How to install: Open the Configuration Interface Go to Settings > Devices Click + Choose Other Device Choose Upload File Choose file from your computer with .fqa
  2. TQAE.lua v0.35 -- Main emulator, loads other modules TQAEmodules/sync.lua -- timers with fake asynchronous IO TQAEmodules/async.lua -- timers with asynchronous IO based on cops TQAEmodules/copas.lua -- copas.* functions TQAEmodules/net.lua -- net.* functions TQAEmodules/api.lua -- api.* and web api TQAEmodules/json.lua -- json library TQAEmodules/fibaro.lua -- fibaro.* functions TQAEmodules/class.lua -- class function TQAEmodules/files.lua -- support for loading files, *.lua and *.fqa files TQAEmodules/QuickApp.lua -- QuickApp classes TQAEmodules/devices.json -- device templates TQAEmodules/webserver.lua -- web server for remote calls (ex. from proxy) TQAEmodules/proxy.lua -- creates QA proxy on the HC3 for funnelling back onAction and UIevents TQAEmodules/ui.lua -- Local Web UI for QA TQAEmodules/time.lua -- Time manipulation - changing start time... TQAEmodules/refreshStates.lua -- /refreshStates support TQAEmodules/Scene.lua -- Initial support TQAEmodules/offline.lua -- Support for local shadowing resources. Currently /globalVariables TQAEmodules/stdQA.lua -- Standard (simulated) devices TQAEmodules/web/main.html -- Web - Main emulator page TQAEmodules/web/qa.html -- Web - QuickApp info TQAEmodules/web/ui.html -- Web - QuickApp UI TQAEmodules/web/timers.html -- Web - list of active timers TQAEmodules/web/settings.html -- Web - editor for configuration file TQAEexamples/MyQuickApp.lua -- Example, Simple QuickApp TQAEexamples/Hue.lua -- Example, Hue QuickApp with QuickAppChildren TQAEexamples/Scheduler.lua -- Example, Simple minute based scheduler TQAEexamples/Ping.lua -- Example, Ping QuickApp that loads Pong QuickApp and exchanges fibaro.calls... TQAEexamples/Pong.lua TQAEexamples/TestScene.lua -- Test scene TQAEexamples/TestSceneCron.lua -- Test scene with Date condition TQAEexamples/Backup.lua -- Non-QA code that backs up QuickApps from the HC3 to the local filesystem as *.fqa files TQAEexamples/SamsunWebSocket.lua -- WebSocket example controlling my Samsung TV TQAEexamples/TestTCPSocket.lua -- TCPSocket example with emulated responses TQAE.tar.gz -- Every file in one archive Installation The source for the emulator is available at the Fibaro forum link or directly from my GitHub <link> (It's a bit messy...) First time download the archive, TQAE.tar.gz and unpack it in a suitable directory on your PC/Mac/Linux. On Linux: >tar xvf TQAE.tar.gz On PC/Mac use suitable archive program to unpack the archive. ../TQAE.lua ../TQAE_QA.lua ../TQAEmodules/* ../TQAEexamples/* Download ZeroBrane studio <link> Open ZBS and open the TQAE_QA.lua file Set project directory in ZBS to the current file, TQAE_QA.lua (Project->Project Directory->Set From Current File) Also set Lua interpreter to Lua 5.3 (Project->Lua Interpreter->Lua 5.3) Now, run TQAE_QA.lua (F5 in ZBS). The output will look something like: ---------------- Tiny QuickAppEmulator (TQAE) v0.30 ------------- [11.10.2021] [08:33:23] | SYS|: No connection to HC3 [11.10.2021] [08:33:23] | SYS|: Created WebAPI at 192.168.1.18:8976 [11.10.2021] [08:33:23] | SYS|: sunrise 07:43, sunset 19:50 Note first that there is no connection to the HC3 - we are missing user, password, and IP for the HC3. Secondly, note the WebAPI address. 192.168.1.18 is my machine, your IP address may be different. The port is 8976. While TQAE_QA.lua is running open http://192.168.1.18:8976/web/main in your browser. (the Web UI only works while the emulator is running) Goto [Settings] in the web page menu (upper right). Fill in User ID, Password, and IP address for the HC3. Click "Save" Hopefully there is now a TQAEconfigs.lua file with the HC3 credentials that the emulator can use. Go back to ZBS and stop the program (Shift-F5) and run it again: ---------------- Tiny QuickAppEmulator (TQAE) v0.30 ------------- [11.10.2021] [09:13:43] | SYS|: Using config file TQAEconfigs.lua [11.10.2021] [09:13:43] | SYS|: Created WebAPI at 192.168.1.18:8976 [11.10.2021] [09:13:43] | SYS|: sunrise 07:14, sunset 17:52 It loads the config file and doesn't complain that there is no connection to the HC3 anymore. Great we are up and running! Supported functions (v0.33) fibaro.debug(type,str) fibaro.warning(type,str) fibaro.trace(type,str) fibaro.error(type,str) fibaro.call(deviceID, actionName, ...) fibaro.getType(deviceID) fibaro.getValue(deviceID, propertyName) fibaro.getName(deviceID) fibaro.get(deviceID,propertyName) fibaro.getGlobalVariable(varName) fibaro.setGlobalVariable(varName ,value) fibaro.getRoomName(roomID) fibaro.getRoomID(deviceID) fibaro.getRoomNameByDeviceID(deviceID) fibaro.getSectionID(deviceID) fibaro.getIds(devices) fibaro.getAllDeviceIds() fibaro.getDevicesID(filter) fibaro.scene(action, sceneIDs) fibaro.profile(profile_id, action) fibaro.callGroupAction(action,args) fibaro.alert(alert_type, user_ids, notification_content) fibaro.alarm(partition_id, action) fibaro.setTimeout(ms, func) fibaro.clearTimeout(ref) fibaro.setInterval(ms, func) fibaro.clearInterval(ref) fibaro.emitCustomEvent(name) fibaro.wakeUpDeadDevice(deviceID) fibaro.sleep(ms) net.HTTPClient() net.TCPSocket() net.UDPSocket() net.WebSocketClient() net.WebSocketClientTLS() mqtt.Client.connect(uri, options) <mqttclient>:addEventListener(message,handler) <mqttclient>:subscribe(topic, options) <mqttclient>:unsubscribe(topics, options) <mqttclient>:publish(topic, payload, options) <mqttclient>::disconnect(options) api.get(call) api.put(call <, data>) api.post(call <, data>) api.delete(call <, data>) setTimeout(func, ms) clearTimeout(ref) setInterval(func, ms) clearInterval(ref) json.encode(expr) json.decode(string) plugin.mainDeviceId plugin.deleteDevice(deviceId) plugin.restart(deviceId) plugin.getProperty(id,prop) plugin.getChildDevices(id) plugin.createChildDevice(prop) class QuickAppBase class QuickApp class QuickAppChild QuickApp:onInit() -- called at startup if defined QuickApp - self:setVariable(name,value) QuickApp - self:getVariable(name) QuickApp - self:debug(...) QuickApp - self:trace(...) QuickApp - self:warning(...) QuickApp - self:error(...) QuickApp - self:updateView(elm,type,value) QuickApp - self:updateProperty(name,value) QuickApp - self:createChildDevice(props,device) QuickApp - self:initChildDevices(table) The idea and reason that I implement an offline emulator for the HC3 is that it is generally speaking a pain to debug a moderately complex QuickApp on the HC3. You are left to using debug statements and it slow you down as you can not set breakpoint and step through the code to understand what logic it is following. With an offline emulator running on a PC/Mac you can use a modern IDE like ZeroBrane or VisualStudio to develop your QA. You can quickly put together 99.9% of your QA and the speed/productivity tripples. When it works in the emulator you can move the code to the HC3 and it will work. No need to develop on the HC3 and accidentally crash the whole box and make your family upset. Here is a video showing a typical workflow. (Note that the Web UI now has a button "Upload" that uploads the QuickApp when it's ready to the HC3) Writing HC3 (HC2) emulators seems to be a hobby for me - but what better thing to do on a vacation? So far I have HC2 Scene emulator - quite ok and feature complete, not actively developed anymore but still works well (not much has happened to the HC2 scene framework lately) HC3 emulator (fibaroapiHC3.lua) - gazillion of features, 9.5k lines - haven't come across any QA it can't run. Also some basic Scene support HC3 micro emulator - ~70 lines of Lua that can run QAs in parallel but have a very limited function support. Developed to prove that we could enhance the call model of QAs without much work Well, the micro emulator got my interest and I have evolved it to a more full featured emulator - Tiny QuickApp Emulator (TQAE). Runs multiple QAs in parallel - can test fibaro.calls between them Supports net.HTTPClient, setTimeout, clearTimeout, setInterval, clearInterval, json.*, class, property Supports QuickApp methods - self:setVariable, self.getVariable, self:updateProperty, self:updateView Supports fibaro.* functions Supports QuickAppChild devices Supports simple web UI to test QuickApp buttons/sliders Supports proxy QA on the HC3 to make to emulated QA interact with QAs running on the HC3 - Real HC3 QAs can call the QA you are running in the emulator. (and you get a real UI too) The main idea is that the emulator could be used as a light weight playground for testing out QAs The main logic is still under 1000 lines with current modules but stuff like json support and the whole fibaro.* sdk requires quite some code so it tends to swell - in any case it's modular. Dependencies on luasocket. (I recommend the free ZeroBrane Studio as it comes with the necessary libraries and is a specialised development environment for Lua) local http = require("socket.http") local socket = require("socket") local ltn12 = require("ltn12") It has an easy structure (I think). There are very few differences between TQAE and fibaroapiHC3.lua so I mainly work with TQAE these days. Advantages compared to fibaroapiHC3.lua. Easier to debug as code is not as asynchronous as it is in the fibaroapiHC3 scheduler (possibility to use a sync scheduler). Uses a vanilla fibaro.* implementation only leveraging api.* and __fibaro_* calls, so it should be easy to upgrade if we get new fibaro.* calls. Module structure makes it easy to add new libraries etc. It's modular. Include it in your QA code _=loadfile and loadfile("TQAE.lua"){ user="admin", pwd="admin", host="192.168.1.57" } --%%name='Test' --%%id=99 --%%quickVars={x=88,y=99} function QuickApp:onInit() self:debug(self.name,self.id) self:debug("y=",self:getVariable("y")) local n = 5 setInterval(function() n=n-1 if n <= 0 then os.exit() end self:debug("PING") end,1000) end The loadfile at the top loads in the emulator and run your QA. The { ... } table after loadfile("TQAE.lua") is a table with configuration options to the emulator. The emulator needs ip, user and password to access the HC3. If you don't want to type that you can store a config file for TQAE with you standard settings. The default name for the file is "TQAEconfigs.lua" and it can look like return { user="admin", pwd="admin", host="192.168.1.57", verbose=false, modPath = "TQAEmodules/", temp = "temp/" --localModules = {"myModule.lua"} --globalModules = {"UDP.lua"} } However, you still need to call loadfile("TQAE.lua"){} with and empty table. If you would like to have another name of the file you can specify that loadfile("TQAE.lua"){ config = "myTQAEconfigfile.lua" } The config is parameters for the emulator. Then you can also set "parameters" for the individual QAs that you run using --%% directives The --%% directives in your QA code are collected into a Lua table. In the case above { name='Test', id=99, quickVars = { x=88, y=99 } } and if present will be used to add fields to the QA. This is the way to tell what name, id and type you want your QA to have. A special field is quickVars that will be inserted as quickAppVariables of the QA at startup. Note that each field can only be one line. It's easy to startup another QA from within your code _=loadfile and loadfile("TQAE.lua"){ user="admin", pwd="admin", host="192.168.1.57" } --%%name='Test' --%%id=99 hc3_emulator.installQA{id=444,file='MyOtherQA.lua'} -- Load in another QA and set id to 444 function QuickApp:onInit() self:debug(self.name,self.id) fibaro.call(444,"test",5,6) -- call other QA end If the other file is open in the IDE you can set breakpoints in it and jump between the QAs. In fact, hc3_emulator.installQA{id=444,file='MyThirdQA.fqa'} will load in a .fqa file directly. In that case temporary files are stored for each of the files in the .fqa. This means we can do trick like this, downloading a QA from the HC3 and run it in the emulator with one line of code _=loadfile and loadfile("TQAE.lua"){ user="admin", pwd="admin", host="192.168.1.57" } hc3_emulator.installQA{id=700,code=api.get("/quickApp/export/700")} -- Load in QA 700 from HC3 and run it function QuickApp:onInit() self:debug(self.name,self.id) fibaro.call(700,"test",5,6) -- call QA 700 end Another useful directive is --FILE:<filename>,<name>; that allow us to include extra files in our QA. A QA can consist of several files but it must have a 'main' file. The QA code you run in the emulator will always be the main, and then you can include extra files that will be added to the QA as "files". Ex. _=loadfile and loadfile("TQAE.lua"){ user="admin", pwd="admin", host="192.168.1.57" } --FILE:myUtilities.lua,utilities; function QuickApp:onInit() self:debug(self.name,self.id) LOG("This is a test") -- Using global LOG function defined in myUtilities.lua end Running and logs When running there will be output of two types. Standard logging that the QA does with fibaro.debug, self:debug etc,. System debugs, that are the emulators way to inform on what is ongoing. How much the system logs depends on the configuration parameter .logLevel. ---------------- Tiny QuickAppEmulator (TQAE) v0.5 ------------- [29.07.2021] [11:17:34] |SYS |: Loading QA:TestQA1 - ID:1001 Start [29.07.2021] [11:17:34] |SYS |: Starting QA:TestQA1 - ID:1001 [29.07.2021] [11:17:34] [DEBUG] [QUICKAPP1001]: TestQA1 - 1001 Here we se the system log (|SYS |) that the QA is loading and then the log that it's running. The first is when the QA code is loaded and all functions are defined. Also if you do something on top-level, outside functions it will run here. In the example the QA does a print("Start") on top-level of the QA so that is executed when loading. Then, if the QA is successfully loaded, it will be "started, meaning that the function QuickApp:onInit() will be called if it's defined. That's the second SYS log. It's good to pay notice to this. If you get an error before Loading it typically means that you have a syntactic error in the QA code - non-valid Lua code. If you get an error after Loading but before Starting it's something on top-level that is run, outside of function QuickApp:onInit() If you get an error after Starting, well, then it's just something wrong with your code when it runs. A run-time error will look like: [29.07.2021] [12:27:47] [ERROR] [QUICKAPP1002]: [string "temp/main_16546.lua"]:5: attempt to call a nil value (global 'foo') This tells us that the error was in the QA with id 1002 (unless you have changed __TAG) The QA file is 'main'. A QA can consist of many files and this gives us the clue in what file the error was. If you only have one file, its name is 'main'. Then it tells us that is was line 5 where the error occurred ([string "temp/main_16546.lua"]:5:) and then that we tried to call a global variable 'foo' that didn't have a value (a function) So, in the main file look for a foo() call on line 5 - that's the error... Turning up logLevel will also log modules loaded etc. It also sets a Lua global in the QA, LOGLEVEL to the level, so that variable can be used by you to also allow your code to log more or less. Other features A QA can also be saved in a .fqa format that can be uploaded to the HC3 The directive --%%save="myQAs/QA42.fqa" will package and save the QA to myQAs/QA42.fqa when finished. It you have included multiple files with the --FILE: directive they will also be included. A simple way to code and create multi-file QAs. The directive 'interfaces' Ex. --%%interfaces={"power"} will add the interfaces as the initialInterfaces property of the .fqa. An easy way to include and extra interface in the ready .fqa. Emulator options: (set in the header _=loadfile and loadfile("TQAE.lua"){...} ) user=<user> Account used to interact with the HC3 via REST api pwd=<Password> Password for account used to interact with the HC3 via REST api host=<IP address> IP address of HC3 configFile = <filename> File used to load in emulator options instead of specifying them in the QA file. Great place to keep credentials instead of listing them in the QA code, and forget to remove them when uploading codeto forums... Default "TQAEconfigs.lua" debug={ traceFibaro=<boolean> -- default false QA=<boolean>, --default true module=<boolean>, --defaul false module2=<boolean>, --defaul false lock=<boolean>, --default false child=<boolean>, --default true device=<boolean>, --default true refreshStates=<boolean> -- default false } modPath = <path>, Path to TQAE modules. Default "TQAEmodules/" temp = <path> Path to temp directory. Default "temp/" startTime=<time string> Start date for the emulator. Ex. "12/24/2024-07:00" to start emulator at X-mas morning 07:00 2024. Default, current local time. htmlDebug=<boolean>. If false will strip html formatting from the log output. Default true colorDebug=<boolean>. If true will log in ZBS console with color. Default true copas=<boolean> If true will use the copas scheduler. Default true. noweb=<boolean> If true will not start up local web interface. Default false lateTimers=<seconds> If set to a value will be used to notify if timers are late to execute. Default false timerVerbose=<boolean> If true prints timer reference with extended information (expiration time etc) QuickApp options: (set with --%% directive n file) --%%name=<name> --%%id=<number> --%%type=<com.fibaro.XYZ> --%%properties={<table of initial properties>} --%%interfaces={<array of interfaces>} --%%quickVars={<table of initial quickAppVariables>} --%%proxy=<boolean> --%%save=<boolean> Documentation Emulator parameters and QA parameters Web UI - and QA UI Some implementation notes Notes and ToDos Mostly developed as a playground for my own coding and it fits my workflow. I may add features/fix bugs if others are using it - but no more than 500 lines of code
  3. This Quickapp retrieves energy consumption, energy production, gas and water usage from the (P1 Monitor) energy, gas and water meter. Child Devices for Consumption (Watt), Production (Watt), Todays Consumption (kWh), Todays Production (kWh), Gross Consumption (Watt), Device Consumption (Watt), Waterflow (Liter), Consumption High (kWh), Consumption Low (kWh), Production High (kWh), Production Low (kWh), Consumption L1 L2 L3 (Watt), Production L1 L2 and L3 (Watt), Ampere L1 L2 L3 (Amp), Voltage L1 L2 L3 (Volt), Total Gas (m³) and Total Waterflow (m³). Energy consumption and energy production is added to the (new) HC3 energy panel. All power consumption of all HomeCenter devices is summarized. The difference between the total power consumption and the power consumption of the HomeCenter devices is put in a unused device (unless the powerID = 0 or empty). The Child device Todays Consumption can be selected in the Generals Settings as "Main energy meter". Doing so, the summary consumption will be from this device. If not, the consumption will come from the Child device Consumption High, the Child device Consumption Low and all your energy registering Z-wave devices and there values will be counted twice unless you change the Energy panel setting of each energy registering Z-wave device. Interval: It is now possible to process messages from the smart meter every second. Of course, this is only possible if the smart meter actually sends a message every second. This can be turned on via the ztatz software P1 port configuration page via the "maximum processing speed" option. Note that this gives a high(er) load on the Rpi. It has been tested on the Rpi3/Rpi4 and works well on it. Older or other RPIs have not been tested. BTW The P1 Monitor QuickApp uses 2 API calls each cycle, and if you also use Waterflow, 3 API calls each cycle. With an interval setting of 10 seconds there is an API call every 5 seconds (and with Waterflow enabled, every 3.33 seconds). So the fastest interval setting will probably be 3 seconds with Waterflow and 2 seconds without Waterflow. ToDo as soon as the Yubii Mobile App supports all device types: water -> com.fibaro.waterMeter ampere/voltage -> com.fibaro.electricMeter gas -> com.fibaro.gasMeter devices with power values (Watt) --> com.fibaro.powerMeter Version 1.5 (4th September 2021) Support of new Energy Panel: Changed Child device Net Consumption to Main device with type com.fibaro.powerSensor (value can be positive or negative) Added Child device Todays Consumption to show the daily energy consumption in kWh Added Child device Todays Production to show the daily energy production in kWh Changed Child device Consumption High and Low to com.fibaro.energyMeter (kWh in property "value"; "rateType" = consumption). These values will be shown in the new energy panel. Changed Child device Production High and Low to com.fibaro.energyMeter (kWh in property "value"; "rateType" = production). These values will be shown in the new energy panel. Added automaticaly change rateType interface of Child device Consumption High and Low to "consumption" and Production High and Low to "production Changed Child device Consumption and Production to type com.fibaro.powerSensor (Watt) to show power graphs Changed Child device Consumption L1, L2 and L3 and Production L1, L2 and L3 to type com.fibaro.powerSensor (Watt) to show power graphs Additional changes: Added todays Maximum consumption and todays Maximum production and timestamp to the label text and Child device log text Added todays Maximum consumption and todays Maximum production automatic format measurement to W, Kw, MW or GW Added todays Consumption low and high (kWh) and todays Production low and high (kWh) to the label text and Child devices log text Added todays Consumption of gas in the label text and Child device log text Added Timestamp in format dd-mm-yyyy hh:mm:ss to log of Main device and labels Placed production below consumption in the labels Solved bug when Production is higher than Consumption with calculation of Gross Consumption (Gross Consumption = Net Consumption minus or plus Device Consumption) Version 1.4 (11th April 2021) Added Child Devices Waterflow and Total Waterflow Version 1.3 (13th February 2021) Added Child Devices for Voltage L1 L2 L3 Version 1.2 (6th February 2021) Added a lot of Child Device Version 1.1 (18th January 2021) Solved a bug when powerID = 0 Version 1.0 (15th Januari 2021) Changed routine te get Energy Device ID's fast (no more maxNodeID needed) Added "Update Devicelist" button to update the Energy devicelist Added Tarifcode High and Low (and empty for flat fee) Rounded Consumption and Production to zero digits Watt Added Quickapp variable for debug level (1=some, 2=few, 3=all). Recommended default value is 1. Re-aranged the labels Cleaned up some code Version 0.3 (16th August 2020) Added Quickapp variables for easy configuration Added Power Production Changed method of adding QuickApp variables, so they can be edited Tested on P1 Monitor version: 20211002 V1.4.1 (see: https://www.ztatz.nl) Raspberry Pi model: Raspberry Pi 4 Model B Rev 1.1 Linux-5.10.63-v7l+-armv7l-with-debian-10.10 Python versie: 3.7.3 I use a Smart Meter Cable Starter Kit - Raspberry Pi 4 Model B Rev 1.1 2GB - 8GB Micro SDHC - Original Raspberry Pi 4B Enclosure - Original Raspberry Pi USB-C 3A power supply - Smart Meter cable - P1 Monitor software from: https://www.ztatz.nl - Water Flow Sensor (M18 8mm sensing DC 5V NPN NO LJ18A3-8-Z/BX-5V cylinder inductive proximity sensor switch work voltage 5VDC special for MCU) QuickApp variables (mandatory, they will be automatically added with the default values): IPaddress = IP address of your P1 monitor Interval = Number in seconds, the P1 Monitor normally is updated every 10 seconds powerID = ID of the device where you want to capture the 'delta' power, use 0 if you don't want to store the energy consumption debugLevel = Number (1=some, 2=few, 3=all) (default = 1) waterMeter = Existance of watermeter true or false (default = false) Download the QuickApp here (download the file and un-zip): https://github.com/GitHub4Eddy/p1_monitor/archive/refs/tags/p1_monitor_15.zip or Fibaro Marketplace: https://marketplace.fibaro.com/items/p1-monitor How to install: Open the Configuration Interface Go to Settings > Devices Click + Choose Other Device Choose Upload File Choose file from your computer with .fqa
  4. fibaroapiHC3.lua (Note: The new version of the emulator has gone through extensive rewrite and is stabilising (0.300). The old version of the emulator is here fibaroapiHC3_classic.lua.) I'm currently working on a new emulator, TQAE, that I recommend you to check out... It's a rewrite with the learnings I have made coding fibaroapiHC3.lua... This is a thread for the fibaroapiHC3.lua sdk that is under development (keeping it separate from the HC3 QuickApps coding - tips and tricks thread) I've started to run and test HC3 QuickApps offline and have made a fibaroapi.lua file that can be included to emulate the fibaro calls and call out to the HC3. This means that a whole QA can be developed offline, debugged and verified before deploying to the HC3. Something that significantly reduces the development process. It's an emulation so it's not 100% but it will cater for 99.99% of the needs to catch bugs, get decent error messages when things doesn't work (like timers). Be able to set breakpoints and inspect states etc. It's complete enough to run the most demanding QuickApps that I have found on the forum so far... If it runs in the emulator and it doesn't run on the HC3 or vice versa I will prioritise to fix it. Latest version here fibaroapiHC3.lua (v0.311) The code is updated weekly so please make sure you have the latest... It was inspired by the old fibaroapi for the HC2 in a thread started by @riemers but has evolved with more extensive support to create a better debugging and "offline experience"... in fact, it's really an HC3 emulator now. The video is an earlier version of the emulator but the principles are more or less the same. Note the nice tooltip and autocompletion of fibaro commands we get with the fibaroapiHC3plugin for ZBS. Enable English subtitles to see instructions... Some benefits: Use a modern development environment such as ZeroBrane Studio (free for Mac/PC/Linux, HC3 plugin here) on your laptop/PC to develop and debug QuickApps and Scenes. Here is a good introduction to Lua (using ZeroBrane) Step through code, inspect Lua variables, set break-points etc - all that is possible in a good IDE. Faster to pin-point errors as the error messages are better than on the HC3 - stack-traces etc. Advanced timer info (setTimeout) warning of late timers and from where the offending function was called if a timer function crashes. Info from where an eronous json.encode was called from in your code so you can easily find the error (instead of seeing a line from deep inside the json encoder) Use the whole Fibaro API fibaro.call etc and net.HTTPClient(), setTimeout(), json.ecode/decode, QuickApp self:functions like self:getVariable, self:updateView Support for MQTT client and QuickApp child devices Both QuickApps and Scenes are supported. Scenes support most conditions and are triggered by real triggers from the HC3 or simulated triggers. Speed up clock to run faster than real time, to watch a Scene or QuickApp over days/weeks/months in seconds. Start at any given time and date - test if your scene behaves on week-ends ? Automatically create a proxy QuickApp on the HC3 that sends UI clicks back to the code your are running and displays self:updateView updates. This way you can test the QuickApp UI (buttons etc) and still debug the main code on your PC. Develop and run multi-file QuickApps, allowing you to build up a library of common code to share between your QAs. Run completely disconnected from the HC3 simulating devices and other resources (now you can take your coding with you on your vacation ) There is a possibility to download resource definitions from the HC3 and use them (devices, globals etc) while running disconnected. Load multiple QAs/Scenes into the emulator at the same time to debug interaction patterns between QAs (or just run all your QAs offline and use the HC3 as a wave GW ) Telnet into the running emulator to capture logs or issue Lua commands like turning on/off devices at runtime to test you QA/Scene. Move the code as-is over to the HC3 when it runs in the emulator - and it will most likely run on the HC3. Scenes needs to be moved to conditions/actions part on the HC3 - may automat that in the future. Oh, and an emulated Web GUI for the quickApp so you can try out button/slider clicks without connecting to the HC3. And lastly, it makes it fun to develop code for the HC3 To get going download the fibaroapiHC3.lua and put in in the working directory where you code your QA(s) If you run ZerobraneStudio (recommended) paste this and run if dofile and not hc3_emulator then dofile("fibaroapiHC3.lua") end--hc3 hc3_emulator.downloadPlugin() hc3_emulator.downloadAssets() Please note the 'end--hc3' that ends the 'if dofile and not hc3_emulator then' statement. It requires the '--end' comment so I can recognise it. Also, you need to set the Lua interpreter to version 5.3 (In ZBS, Menu ; Project -> Lua Interpreter -> Lua 5.3) It will install the. ZBS plugin in ~/.zbstudio/packages and some code templates in ~/.zbstudio/hc3emu/ (Restart ZBS for the plugin to. be installed) Create a Lua file and create a header + QA/scene code. An example of a minimal QA can look like if dofile and not hc3_emulator then hc3_emulator = { name = "My QA", poll=1000, -- Poll for triggers from the HC3 every 1s credentials = {ip="192.168.1.X", user="<user>", pwd="<password>"} } dofile("fibaroapiHC3.lua") end--hc3 function QuickApp:onInit() fibaro.call(88,"turnOn") -- turns on device 88 on your HC3 end We wrap the emulator specific stuff inside "if dofile and not hc3_emulator then .... end" as the symbol 'dofile' is not defined on the HC3 and will thus be false and not include the code - This means that we can take the code as-is and paste it into the HC3 and it works. Note the credentials that contains the IP, username and password so that the emulator can access the HC3 box. If you use ZBS and the plugin there is an Edit-HC3 SDK templates-> menu that will insert a standard QA and Scene header + code in the current buffer. Most of the functions are there and will be improved over time. There are support for net.HTTPClient() and setTimeout/clearTimeout and api.* There are support for getting triggers and events from the HC3 Support for auto-creating a QuickApp proxy with UI elements that sends events back to the code being debugged. There are support for both QuickApps and Scenes (with conditions) Currently supported (v 0.300) fibaro.debug(type,str) fibaro.warning(type,str) fibaro.trace(type,str) fibaro.error(type,str) fibaro.call(deviceID, actionName, ...) fibaro.getType(deviceID) fibaro.getValue(deviceID, propertyName) fibaro.getName(deviceID) fibaro.get(deviceID,propertyName) fibaro.getGlobalVariable(varName) fibaro.setGlobalVariable(varName ,value) fibaro.getRoomName(roomID) fibaro.getRoomID(deviceID) fibaro.getRoomNameByDeviceID(deviceID) fibaro.getSectionID(deviceID) fibaro.getIds(devices) fibaro.getAllDeviceIds() fibaro.getDevicesID(filter) fibaro.scene(action, sceneIDs) fibaro.profile(profile_id, action) fibaro.callGroupAction(action,args) fibaro.alert(alert_type, user_ids, notification_content) fibaro.alarm(partition_id, action) fibaro.setTimeout(ms, func) fibaro.clearTimeout(ref) fibaro.setInterval(ms, func) fibaro.clearInterval(ref) fibaro.emitCustomEvent(name) fibaro.wakeUpDeadDevice(deviceID) fibaro.sleep(ms) net.HTTPClient() net.TCPSocket() net.UDPSocket() net.WebSocketClient() -- needs extra download net.WebSocketClientTLS() -- needs extra download api.get(call) api.put(call <, data>) api.post(call <, data>) api.delete(call <, data>) setTimeout(func, ms) clearTimeout(ref) setInterval(func, ms) clearInterval(ref) mqtt.Client.connect(uri, options) -- needs extra download <mqttclient>:addEventListener(message,handler) <mqttclient>:subscribe(topic, options) <mqttclient>:unsubscribe(topics, options) <mqttclient>:publish(topic, payload, options) <mqttclient>::disconnect(options) plugin.mainDeviceId plugin.deleteDevice(deviceId) plugin.restart(deviceId) plugin.getProperty(id,prop) plugin.getChildDevices(id) plugin.createChildDevice(prop) class QuickAppBase class QuickApp class QuickAppChild json.encode(expr) json.decode(string) QuickApp:onInit() -- called at startup if defined QuickApp - self:setVariable(name,value) QuickApp - self:getVariable(name) QuickApp - self:debug(...) QuickApp - self:updateView(elm,type,value) QuickApp - self:updateProperty() QuickApp - self:createChildDevice(props,device) QuickApp - self:initChildDevices(table) sourceTrigger - scene trigger Supported scene events: {type='alarm', id=<id>, property='armed', value=<value>} {type='alarm', id=<id>, property='breached', value=<value>} {type='alarm', property='homeArmed', value=<value>} {type='alarm', property='homeBreached', value=<value>} {type='weather', property=<prop>, value=<value>, old=<value>} {type='global-variable', property=<name>, value=<value>, old=<value>} {type='device', id=<id>, property=<property>, value=<value>, old=<value>} {type='device', id=<id>, property='centralSceneEvent', value={keyId=<value>, keyAttribute=<value>}} {type='device', id=<id>, property='accessControlEvent', value=<value>} {type='device', id=<id>, property='sceneActivationEvent', value=<value>} {type='profile', property='activeProfile', value=<value>, old=<value>} {type='location', id=<uid>,property=<locationId>, value=<geofenceAction>, timestamp=<timestamp>} {type='custom-event', name=<name>} {type='UpdateReadyEvent', value=_} {type='onlineEvent', value=<bool>} Some of the parameters that affect the behaviour of the emulator and can be set in the header are: hc3_emulator.name=<string> -- Name of QuickApp, default "QuickApp" hc3_emulator.id=<QuickApp ID> -- ID of QuickApp. Normally let emulator asign ID. (usually 999 for non-proxy QA) hc3_emulator.poll=<poll interval> -- Time in ms to poll the HC3 for triggers. default false hc3_emulator.type=<type> -- default "com.fibaro.binarySwitch" hc3_emulator.speed=<speedtime> -- If not false, time in hours the emulator should speed. default false hc3_emulator.proxy=<boolean> -- If true create HC3 procy. default false hc3_emulator.UI=<UI table> -- Table defining buttons/sliders/labels. default {} hc3_emulator.quickVars=<table> -- Table with values to assign quickAppVariables. default {}, hc3_emulator.offline=<boolean> -- If true run offline with simulated devices. default false hc3_emulator.autocreate=<boolean> -- Autocreate local resources hc3_emulator.apiHTTPS=<boolean> -- If true use https to call HC3 REST apis. default false hc3_emulator.deploy=<boolean>, -- If true deploy code to HC3 instead of running it. default false hc3_emulator.assetDirectory=<string> -- Directory where assets shoud be downloaded (ZBS). Default ~/.zbstudio/hc3emu hc3_emulator.resourceFile=<string> -- When doing a resource download, use this file as default. hc3_emulator.db=<boolean/string>, -- If true load a "resource download" from hc3_emulator.resourceFile or string hc3_emulator.htmlDebug=<boolean> -- Try to convert html tags to ZBS console cmds (i.e. colors) hc3_emulator.terminalPort=<boolean> -- Port used for socket/telnet interface hc3_emulator.webPort=<number> -- Port used for web UI and events from HC3 hc3_emulator.HC3_logmessages=<boolean> -- Defult false. If true will push log messages to the HC3 also. hc3_emulator.supressTrigger -- Make the emulator ignore certain events from the HC3, like = PluginChangedViewEvent hc3_emulator.negativeTimeout=<boolean> -- Allow specification of negative timeout for setTimeout (will fire immediatly) hc3_emulator.strictClass=<boolean> -- Strict class semantics, requiring initializers hc3_emulator.consoleColors=<table> -- Maps fibaro.debug/self:debug etc to color (debug.color enables color debugging) hc3_emulator.sysConsoleColors=<table> -- Maps colors used for system logs hc3_emulator.userdataType=<boolean> -- If true intercepts type(...) to return 'userdata' for our Lua classes. Some apps checks this... Some useful emulator functions: hc3_emulator.setOffline(<boolean>,<boolean>) -- hc3_emulator.getIPaddress() -- Return HC3 IP address hc3_emulator.prettyJsonFormat(<table>) -- Return json formatted string of Lua table hc3_emulator.postTrigger(<event>,[<time ms>]) -- Posts a trigger to the emulator... hc3_emulator.loadScene(...) -- Load scene from file or HC3... hc3_emulator.loadQA(...) -- Load QA from file or HC3... hc3_emulator.downloadPlugin() -- (ZBS). Default ~/.zbstudio/packages hc3_emulator.downloadAssets() -- (ZBS). Default ~/.zbstudio/hc3emu hc3_emulator.downloadResources([<filename>]) -- Downloads a "backup" of HC3 resources hc3_emulator.loadResources([<filename>]) -- ...that can be loaded as "local" resources for the emulator. Some debug flags that can be set with hc3_emulator.debug.<flag>=<value> fibaro=false, -- Logs calls to fibaro api trigger=true, -- Logs incoming triggers from HC3 or internal emulator timers=nil, -- Logs low level info on timers being called, very noisy. refreshloop=false, -- Logs evertime refreshloop receives events mqtt=true, -- Logs mqtt message and callbacks http=false, -- Logs all net.HTTPClient():request. ALso includes the time the request took api=false, -- Logs all api request to the HC3 onAction=true, -- Logs call to onAction (incoming fibaro.calls etc UIEvent=true, -- Logs incoming UIEvents, from GUI elements zbsplug=true, -- Logs call from ZBS plugin calls webServer=false, -- Logs requests to /web/ including headers webServerReq=false, -- Logs requests to /web/ excluding headers files=false, -- Logs files loaded and run color=true, -- Logs in console using ANSI colors (see hc3_emulator.consoleColors for mapping) locl=true, -- Log creation of local devices breakOnInit=<boolean> -- Tries to set breakpoint on QuickApp:onInit (mobdebug) breakOnLoad=<boolean> -- Tries to set breakpoint on first line in loaded file (mobdebug) breakOnError=<boolean> -- Tries to break after error (makes it easier to look at call stack etc) ctx=false, -- Logs Lua context switches timersSched=false, -- Logs when timers are scheduled timersWarn=0.500, -- Logs when timers are called late or setTimeout with time < 0 timersExtra=true, -- Adds extra info to timers, like from where it's called and definition of function (small time penalty) In the example in the beginning, the HC3 credentials are listed in the header. If you don't want that (it's easy to forget it and share the code with your passwords in plain sights<9 you can create a credentials.lua file with your secret stuff and it will be automatically included by the SDK. The format should be return { ip="2912.168.77", user="admin", pwd="admin", mySecret="hgskjfhgjhgkdfh" } It returns a Lua table with the relevant keys. ip, user,and pwd is used to log into the HC3. We have added another key here to 'mySecret'. Assume that you want you QA to have a defined quickAppVariable with the value of mySecret. It could be the password to log into an external services. Then you can do like this if dofile and not hc3_emulator then hc3_emulator = { name="My QA", quickVars = {["password"]="$CREDS.mySecret"}, This define a quickAppVariable with the name 'password' and it fetches the key 'mySecret' from the credentials table and uses that as the value. When you QA starts up you can do self:getVarible('password') and it will return the credential. This is useful as not to litter your code with visible credentials. NOTE. Be aware that if you deploy the real QA with hc3_emulator.deploy=true or using the menu commands with the plugin, the deployed QA will have the quickAppVariable defined and if you upload that for sharing people will see your credential. If someone wants to try this in another IDE than Zerobrane that I use (like Visual Studio) the only thing that could be an issue is to have access to the Lua libraries require("socket") -- LuaSocket require("socket.url") -- LuaSocket require("socket.headers") -- LuaSocket require("ltn12") -- LuaSocket require("mime") -- LuaSocket require("lfs") -- LuaFileSystem They are pretty standard lua libraries - based on LuaSocket. @10der has managed to run it under Visual Studio on Windows. Here is an updated library/project map to work with the latest version of the emulator vscode_fibaro_bin.zip. Note that you should update the fibaroapiHC3.lua file provided i the archive when new are released as I will not update this archive for every new release. @petergebruers also have some tips. Any improvements are happily received (in code) and credits will be due granted. Links to notable post Here is a description of the various way to use the emulator when developing code (high-level) Some in-depth posts Running "Offline" (TBD) Running in "Mix mode". Mixing real devices and locally emulated devices (TBD) Running with a "Proxy QA" (TBD) Using real QA as "Proxy" (TBD) Downloading HC3 resources to file and emulate them locally (TBD) Running standard Lua with access to HC3 functions (developing management scripts etc) (TBD) Loading multiple QAs/Scenes and run them in parallel in the emulator (also getting QAs/Scenes from the HC3 and install them in emulator on the fly...) (TBD) Running faster than real-time and manipulating start dates (TBD) A ZeroBrane plugin to make life easier while debugging A post introducing the SDK with QuickApps. A post introducing the SDK with Scenes. Scene support is not complete. Creating and debugging multi-file QuickApps The debug flags that can be set are described The new dynamic load functions to run multiple QAs/Scenes in the emulator are described Telneting into the emulator to capture logs and issuing Lua calls <here> (nice way to test your code) Using the Web GUI Debugging setTimeout code and tracking timers. MQTT support. Another post with running a scene completly without being connected to the HC3. Some notes on the implementation of the SDK - if you would like to hack on it A collection of QA's I developed with the SDK - which means that they can be run offline ChildrenOfHue. A QA that creates QA children devices for your Hue devices (It's the Hue QA I use myself these day) iOSLocator. An iOS geopresence QA. iCal (iOS,Google) QA Telegram QA. Event watcher QA. Helper QA to get/subscribe on event triggers Vonage/Nexmo SMS service. Send SMS. Changelog: v 0.67 - numerous bug fixes caused by the restructuring. hc3_emulator.start{startTime="07:00 4/5/2000"} - will start the simulation at the given time. v 0.68 - fibaro.debug behaves more like original. v 0.70 - better offline support and speeding. v 0.72 - More offline and support for downloading HC3 resources to be used while running disconnected from the HC3 v 0.73 - Various speed-time related bugs v 0.75 - Better http sync behaviour. Set hc3_emulator.asyncHTTP=true to get some pseudo asynchronous behaviour v 0.77 - Support for 5.030.45. Initial support for childDevices and fixes for the changed handling of UI events v 0.78 - UI fix. Name of callbacks defaults to button.."Clicked", unless you have a onReleased=name or onChanged=name in the UI table struct. v 0.80 - Fixed bug in self:getVariable and self:setVariable v 0.81 - Better quickVariables handling for proxies, and self.childDevices list updated when children are deleted. v 0.83 - self:getVariable returns the empty string "" if the variable does not exists according to the latest behaviour on the HC3... 'class' is not redefined if available from Luabind... However, I've not had a chance to test if it's 100% compatible yet... v 0.84 - Initial support for mqtt. You need to have installed https://github.com/xHasKx/luamqtt so that require("mqtt") works from fibaroapiHC3.lua. I have tried to mimic the HC3 mqtt api but I have not really used mqtt that much so if someone uses it with fibaroapiHC3.lua and discovers if stuff is not compatible with the HC3 implementation please let me know and we fix it. v 0.85 - Compatibility fix for function 'class' to adhere more closely to the HC3/luabind version v 0.90 - Cleanup of code, Better handling of children and QuickApps, ZBS color output with ansi escapes; hc3_emulator.colorDebug=true v 0.93 - New model for QuickApp proxies. Better child device compatibility. v 0.95 - Various bug fixes - log prints more in line with HC3 log console. fibaro.emitCustomEvent bug fix. v 0.98 - First support for backup/download/upload with the ZeroBrane plugin (another post here) v 0.99 - Better trigger handling and new way to include SDK in your QA/scene code. No hc3_emulator.start at the end. v 0.100 - Web GUI emulator for QuickApps. New format for using credentials.lua. Bug fixes... v 0.102 - Better handling of children and their quickAppVariables v 0.104 - Rewrite of offline mode. Better web UI support. v 0.105 - Support for new QA file format (proxies work again) v 0.106 - Added support for net.UDPSocket() v 0.109 - UDPSocket bug fix. ( @10der), property() support for class() - much harder than it looks... v 0.110 - Oops, serious bug in 'class' affecting ...everything. Hopefully fixed. v 0.111 - Removed unnecessary os.exit(). urlencode api calls ( @10der) v 0.112 - UDP fixes. ( @10der) v 0.114 - Bug fix (global 'self' escaped) v 0.115 - Bug in url encode for api calls. UDPSocket :bind(ip,port) function added. v 0.116 - :bind(ip,port) really fixed.... v 0.117 - startup fix v 0.119 - "Softer os.exit()" - better compatibility with Visual Studio (thanks @10der) v 0.120 - Debugger friendly QuickApp class (no __index). First version of file/backup v 0.121 - api.get bug fix. Faster proxy/deploy. v 0.123 - QuickApp:setVariable bug (thanks @10der) v 0.124 - fibaro.clearTimeout added, MQTT fixes. v 0.125 - fibaro.alarm() was buggy - fixed. Set self.USERPIN to pincode to allow fibaro.alarm("disarm") to be allowed from emulator. v 0.126 - fix __fibaro_get_device() ( @10der) v 0.128 - fix sort order of triggers. Default room in offline mode ( @10der) v 0.130 - fix UI handling ( @rangee. More UI options. v 0.131 - fix uiCallbacks not always updating when updating proxy v 0.135 - fixes... v 0.137 - TCPSocket fixes v 0.138 - setTimeout for negative times are inserted in the queue.... i.e. will execute as soon as possible. v 0.140 - fixed bug with setInterval (clearInterval within a setInterval function didn't work...) v 0.141 - fix bug in net.TCPClient() v 0.145 - bug in printout of sockets... stricter class constructor requirements v 0.148 - MQTT event format bug ( @jayrock) v 0.150 - Initial websocket support. Need to download wsLua_ER.lua from my github and put in project directory. v 0.152 - support fibaroapiHC3plug.lua v0.4 v 0.155 - bugfixes. v 0.156 - html color bugfix v 0.198 - New version of emulator with better support for everything. Thanks to @petrkl12 that has been a guinea pig and helped in debugging the code. v 0.200 - Fixed bug in speedTime. plugin.restart() now restarts the QA in a correct way. v 0.299 - Major rewrite of the HC3 API - cleaner architecture and prepared for being split into sub-files (I'm approaching 10k lines now). Note 'end--hc3' required to end header. v 0.300 - Bugfixes from v0.299 v 0.301 - Better/simpler class definition - easier to debug/step into classes (avoiding __index unless class uses property() )
  5. The QuickApp Air Quality OpenWeatherMap provides the current measurement for your location on Air Quality. Besides basic Air Quality Index the QuickApp provides also data about polluting gases such as Carbon monoxide (CO), Nitrogen monoxide (NO), Nitrogen dioxide (NO2), Ozone (O3), Sulphur dioxide (SO2), Ammonia (NH3), and particulates (PM2.5 and PM10). This QuickApp has Child Devices for Carbon monoxide (CO), Nitrogen monoxide (NO), Nitrogen dioxide (NO2), Ozone (O3), Sulphur dioxide (SO2), Ammonia (NH3), PM2.5 and PM10. Common Air Quality Index (CAQI) The Common Air Quality Index (CAQI) is an air quality index used in Europe since 2006. In November 2017, the European Environment Agency announced the European Air Quality Index (EAQI) and started encouraging its use on websites and for other ways of informing the public about air quality. As of 2012, the EU-supported project CiteairII argued that the CAQI had been evaluated on a "large set" of data, and described the CAQI's motivation and definition. CiteairII stated that having an air quality index that would be easy to present to the general public was a major motivation, leaving aside the more complex question of a health-based index, which would require, for example, effects of combined levels of different pollutants. The main aim of the CAQI was to have an index that would encourage wide comparison across the EU, without replacing local indices. CiteairII stated that the "main goal of the CAQI is not to warn people for possible adverse health effects of poor air quality but to attract their attention to urban air pollution and its main source (traffic) and help them decrease their exposure." The CAQI is a number on a scale from 1 to 100, where a low value means good air quality and a high value means bad air quality. The index is defined in both hourly and daily versions, and separately near roads (a "roadside" or "traffic" index) or away from roads (a "background" index). As of 2012, the CAQI had two mandatory components for the roadside index, NO2 and PM10, and three mandatory components for the background index, NO2, PM10 and O3. It also included optional pollutants PM2.5, CO and SO2. A "sub-index" is calculated for each of the mandatory (and optional if available) components. The CAQI is defined as the sub-index that represents the worst quality among those components. Here is a description of Air Quality index levels Pollutant concentration in μg/m3: Index NO2 PM10 O3 PM25 (optional) Good 1 0-50 0-25 0-60 0-15 Fair 2 50-100 25-50 60-120 15-30 Moderate 3 100-200 50-90 120-180 30-55 Poor 4 200-400 90-180 180-240 55-110 Very Poor 5 >400 >180 >240 >110 See more on CAQI: https://en.wikipedia.org/wiki/Air_quality_index IMPORTANT You need an API key and Polygon ID from https://home.openweathermap.org/users/sign_up The API is free up to 60 calls per minute Version 0.1 (9th October 2021) Initial version Variables (mandatory): apiKey = Get your free API key from https://agromonitoring.com latitude = latitude of your location (Default is the latitude of your HC3) longitude = longitude of your location (Default is the longitude of your HC3) interval = [number] in seconds time to get the data from the API timeout = [number] in seconds for http timeout debugLevel = Number (1=some, 2=few, 3=all, 4=simulation mode) (default = 1) Download the QuickApp here (download the file and un-zip): https://github.com/GitHub4Eddy/air_quality_openweathermap/archive/refs/tags/air_quality_owm-01.zip or Fibaro Marketplace: https://marketplace.fibaro.com/items/air-quality-openweathermap How to install: Open the Configuration Interface Go to Settings > Devices Click + Choose Other Device Choose Upload File Choose file from your computer with .fqa
  6. This Quickapp retrieves energy consumption, energy production and gas usage from the Toon Energy meter. This QuickApp has Child Devices for Consumption (Watt), Production (Watt), Consumption High (kWh), Consumption Low (kWh), Production High (kWh), Production Low (kWh), Gas Usage (l/h) and Total Gas (m³). The Energy Usage from the Child devices Consumption High, Consumption Low, Production High and Production Low can be used for the HC3 Energy Panel Your Toon Energy Meter needs to be rooted, see: https://github.com/JackV2020/Root-A-Toon-USB-Stick. This is the recommended all in one solution with a one time boot from USB stick, 10 minutes of work and done. After rooting you don't need a subscription anymore and you have access to a ToonStore with a growing number of apps. For more technical people there is a possibility to ssh into the Toon if they want with username root and password toon. Rooting is at your own risk, look here for further support and info: See also: https://github.com/ToonSoftwareCollective/Root-A-Toon (if you already have a running Linux environment) See also: https://toonforum.nl/ See also: https://www.domoticaforum.eu/ Version 1.0 (3th October 2021) Ready for download Version 0.2 (30th September 2021) Gas from m³/h to l/h Splashed a bug Version 0.1 (29th September 2021) Initial version Variables (mandatory): IPaddress = IP address of your Toon Meter Interval = Number in seconds debugLevel = Number (1=some, 2=few, 3=all, 4=simulation mode) (default = 1) Download the QuickApp here (download the file and un-zip): https://github.com/GitHub4Eddy/toon_energy/archive/refs/tags/toon_energy-1.zip of Fibaro Marketplace: https://marketplace.fibaro.com/items/toon-energy How to install: Open the Configuration Interface Go to Settings > Devices Click + Choose Other Device Choose Upload File Choose file from your computer with .fqa
  7. This QuickApp can be used as your weather provider. The Buienradar Weather QuickApp contains the current Dutch weather measurements, the weather forecast and the 5-day forecast. The current observations are measured by KNMI weather stations spread across The Netherlands and are updated every 10 minutes. The weather report is updated several times a day by the Buienradar meteorologists. This QuickApp is plug-and-play. The only thing you can do, is change the Station ID to a weather-station nearby from the list or add some nice icons to the devices. Wind Chill (based on the JAG/TI-method) and is only valid for temperatures between -46 C and +10 C and is only valid for wind speed between 1.3 m/s and 49 m/s Windspeed is shown in m/s (km/3.6) Absolute humidity is the measure of water vapor (moisture) in the air, regardless of temperature. It is expressed as grams of moisture per cubic meter of air (g/m3) conditionCodes = {unavailable = 3200, clear = 32, rain = 40, snow = 43, storm = 38, cloudy = 30, fog = 20,} The time shown in the QuickApp, is the last time of the measurement from Buienradar (not the system time) Version 2.1 (15th January 2021) Added weatherdescription: "Mix van opklaringen en hoge bewolking" to conditioncode "cloudy" "Half bewolkt" to conditioncode "cloudy" "Opklaring en lokaal nevel of mist" to conditioncode "fog" "Zwaar bewolkt met lichte sneeuwval" to conditionCode "snow" "Zwaar bewolkt met regen en winterse neerslag" to conditioncode "snow" "Afwisselend bewolkt met lichte sneeuwval" to conditioncode "snow" "Zware sneeuwval" to conditioncode "snow" "Opklaringen en kans op enkele pittige (onweers)buien" to conditioncode "rain" "Bewolkt en kans op enkele pittige (onweers)buien" to conditioncode "rain" Added Airpressure Text in log of Airpressure Child Device Version 2.0 (3rd January 2021) Added Child Devices for: Temperature °C (including feeltemperature and groundtemperature) Humidity % Absolute humidity g/m³ Airpressure hPa Windspeed m/s (including windspeedBft and Windgust km/h) Winddirectiondegrees ° (including winddirection and arrow) Rain mm/h (including rainFallLast24Hour mm) Sunpower watt/m² Visibility km Sunset (time) Sunrise (time) Re-arranged the labels Added backup station functionality for weather stations that don't have all the data, the data from 6260 Meetstation De Bilt is used. Improved check for missing data Added Quickapp variable for debug level (1=some, 2=few, 3=all). Recommended default value is 1. Version 1.0 (25th October 2020) Added weatherdescription "Zwaar bewolkt met wat lichte regen" to conditionCode "rain" Version 0.6 (9th September 2020) Changed conditionCodes storm = 38 snow = 43 and unknown = unavailable Added weatherdescription "Afwisselend bewolkt met (mogelijk) wat lichte regen" to conditionCode "rain" and and "Afwisselend bewolkt met lokaal mist(banken)" to conditionCode "fog" Version 0.5 (4th September 2020) Added wind direction, air pressure and feel temperature to QuickApp labels Changed stationname to regio in labels and log Changed the names of the Global Variables to meet the Fibaro standards and shortened them (please manually delete your old ones and change the names in your scenes) Added an extra check for response of Buienradar (jsonTable) Version 0.4 (22nd August 2020) Completely renewed code Several Global Variables are available for personal use Added QuickApp variable SetGlobalVar true or false, whether you want to use the Global Variables Added QuickApp variable Timeout for finetuning waiting for response Version 0.3 (11th August 2020) error message instead of debug message in case of an error Changed method of adding QuickApp variables, so they can be edited Weather conditions: The Buienradar weather description is converted to the right Fibaro condition codes, with the icons: Fibaro Dashboard: The Fibaro properties Temperature, Humidity and Wind values are updated to show in your dashboard: Mobile App: For the Mobile app the basic values are available: For the most accurate measurements you can select a Station in your neighborhood: 6391 Meetstation Arcen / 6275 Meetstation Arnhem / 6249 Meetstation Berkhout / 6308 Meetstation Cadzand / 6260 Meetstation De Bilt / 6235 Meetstation Den Helder / 6370 Meetstation Eindhoven / 6377 Meetstation Ell / 6321 Meetstation Euro platform / 6350 Meetstation Gilze Rijen / 6323 Meetstation Goes / 6283 Meetstation Groenlo-Hupsel / 6280 Meetstation Groningen / 6315 Meetstation Hansweert / 6278 Meetstation Heino / 6356 Meetstation Herwijnen / 6330 Meetstation Hoek van Holland / 6279 Meetstation Hoogeveen / 6251 Meetstation Hoorn Terschelling / 6258 Meetstation Houtribdijk / 6285 Meetstation Huibertgat / 6209 Meetstation IJmond / 6225 Meetstation IJmuiden / 6277 Meetstation Lauwersoog / 6320 Meetstation LE Goeree / 6270 Meetstation Leeuwarden / 6269 Meetstation Lelystad / 6348 Meetstation Lopik-Cabauw / 6380 Meetstation Maastricht / 6273 Meetstation Marknesse / 6286 Meetstation Nieuw Beerta / 6312 Meetstation Oosterschelde / 6344 Meetstation Rotterdam / 6343 Meetstation Rotterdam Geulhaven / 6316 Meetstation Schaar / 6240 Meetstation Schiphol / 6324 Meetstation Stavenisse / 6267 Meetstation Stavoren / 6229 Meetstation Texelhors / 6331 Meetstation Tholen / 6290 Meetstation Twente / 6313 Meetstation Vlakte aan de Raan / 6242 Meetstation Vlieland / 6310 Meetstation Vlissingen / 6375 Meetstation Volkel / 6215 Meetstation Voorschoten / 6319 Meetstation Westdorpe / 6248 Meetstation Wijdenes / 6257 Meetstation Wijk aan Zee / 6340 Meetstation Woensdrecht / 6239 Meetstation Zeeplatform F-3 / 6252 Meetstation Zeeplatform K13 QuickApp variables (mandatory, they will be automatically added with the default values): interval = Number in seconds to update the data (defaul = 601) timeout = Number in seconds to wait for a response (default = 5) stationID = Number of the station you want to use for weather measurements (default = 6260 Meetstation De Bilt) backupstationID = Number of the backup station for missing weather data from stations that don't have all the data (default = 6260 Meetstation De Bilt). Don't change this ID unless you know what you are doing. setGlobalVar = true or false, whether you want tu use the Global Variables (default = false) debuglevel = Number (1=some, 2=few, 3=all) (default = 1) Download the QuickApp here (download the file and un-zip): https://github.com/GitHub4Eddy/buienradar_weather/archive/buienradar_weather_21.zip or Fibaro Marketplace: https://marketplace.fibaro.com/items/buienradar-weather How to install: Open the Configuration Interface Go to Settings > Devices Click + Choose Other Device Choose Upload File Choose file from your computer with .fqa JSON data copyright: (C)opyright Buienradar / RTL. All rights reserved JSON data terms: This feed may be used freely under condition of source reference buienradar.nl including a hyperlink to https://www.buienradar.nl. The feed cannot be derived from users or other persons.
  8. A thread to share some coding techniques for QuickApps? Because QAs are "long running scenes" (they don't have to be loaded and restarted for every event) - it is actually worthwhile to build up a library of "nice to have" code and include them in QAs. Here is Fibaro's manual for QuickApps. Here is Fibaro's manual for creating QuickAppChild devices Here is Fibaro's manual for using MQTT client Here is Fibaro's manual for WebSocket client List of posts: Introduction to the QuickApp anatomy - tutorial Part 1. Lua functions and object-oriented programming. (QuickApp is a OO class, so we need that base) Part 2. The basic QuickApp functions and what they do... and how. Part 3. More on QuickApp event handling - interaction with the UI and fibaro.call(<quickApp>,"name",...) Part 4. QuickAppChildren and how to raise them... what makes them tick? Also a tutorial on using classes in QuickApps here... All functions and variables available in the QuickApp Lua environment Logging functions (replacement for color/html tags + tostring for customised data structure) Shared functions calls between QuickApps (Here is an improved version) Off-line HC3api to use fibaro.* calls on PCs/Linux/Mac (fibaroapiHC3.lua) Polling for triggers in a QuickApps (like fibaro.getSourceTrigger()) Here is another method using a helper QA Patching 'setTimeout' so you get an error message if the function crashes A generic template for a QuickApp A simple code-lock QuickApp (demonstrating the UI with buttons) A QuickApp for scheduling user profiles (demonstrates UI buttons that change labels/text to present options) It doesn't' actually schedules the profile yet. (here is a working version) Structuring a QuickApp using event handlers to cope with asynchronous calls - like when using net.HTTPClient() instead of FHTTP(). looping with setInterval (without drifting) A QD reporting if other QDs are crashing (leveraging the "polling for triggers" code) Coding and debugging HC3 QuickApps offline using PC/Mac/Linux and a Lua IDE (and auto-creating a proxy on the HC3) An example of a QuickApp that download and installs scenes and QuickApps from a repository (files in a flat format) Coding and debugging of HC3 scenes using fibaroapiHC3.lua (not strictly about QuickApps but related) - can speed-up time A more complex QD that reads Google calendars or iPhone calendars and schedule custom events (uses the QuickApp structure for asynchronous calls in a previous tip) A substitute for Lua's loadstring() Here is another method of loading code dynamically into a QA Creating proxy devices on the HC3 to share devices between HC2 and HC3 A "webhook" QD - pushing events to external apps Adding interfaces to QA's - ex. power and battery and updating the properties (updates the little battery and power icon UI) @tinman Using '/plugin/publishEvent' to emit 'centralSceneEvent' (and a few other) .... Ex. keyfob QA by @tinman QA Toolbox. A modular toolbox of add-on functions to QAs that makes it easier to develop QAs 'basic' - Generic QA functions for loggin, loading modules, and management - used by all other modules. (some documentation) 'childs' - QA functions to easily manage quickAppChild devices. Loading, saving state, getting UI events etc. 'events' - QA functions for defining event handlers and structuring your code accordingly. Makes it easy to setup timers in various ways... 'triggers' QA functions for recieving triggers like Scenes do. The events module will receive triggers if loaded, but own handler can be defined. 'rpc' - QA functions for declaring (synchronous) remote functions from other QAs files - QA functionality for copying files between QAs pubsub - QA functions for event publish/subscribe... ui - QA functions for manipulation the UI elements of a QA lua parser/compiler - QA function for emulating loadstring and evaluating Lua expression from strings profiler - Functions for timing code used in QA Reading label/button/slider values. Sha2.lib crypto libs for HC3 (MD5, HMAC, SHA-1, SHA-224, SHA-256, SHA-512/224, SHA-512/256, SHA-384, SHA-512, SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128, SHAKE256) @tinman aes crypto lib @tinman List of HC3 device types and interfaces @tinman Readers note. I started to call QuickApp devices for QDs (as in QuickApp Device, thought QAs sounded like Question and Answers). So, I use the word QD here and there but I'm not religious about it...
  9. This Quickapp retrieves power consumption, solar production, gas usage and water flow from the Iungo Monitor, Solarpanel and Watermeter (Child) Devices for Consumption, Production, Solar Power, Water Flow, Consumption High, Consumption Low, Production High, Production Low, Total Gas and Total Water FLow Version 1.1 (11th September 2021) Changed the Child Devices Consumption High, Consumption Low, Production High and Production Low to device type energyMeter to facilitate the new Energy Panel Added automaticaly change rateType interface of Child device Consumption High and Low to "consumption" and Production High and Low to "production" Changed the Main Device to device type powerSensor to show the power graphs Added Net Consumption to the value of the Main Device Changed the Child Devices Consumption, Production and Solar Power to device type powerSensor to show the power graphs Changed the Water Flow unit text from m³ to Litre Added the amount of m2 Solar Panels to the log text ot the Child Device Solar Power and to the labels Changed meterreading to automatically kWh, MWh of GWh Moved tarif informatie to main device log text Added Meter measurement for Consumption High, Consumption Low, Production High, Production Low, Gas and Water to reset the measurements Added Meter measurement Date for Consumption High, Consumption Low, Production High, Production Low, Gas and Water Removed Refresh button Added some extra debug information when debug level = 3 Version 1.0 (6th February 2021) Now also supports Iungo Solarpanel and Iungo Watermeter Added a lot of Child devices Added QuickApp Variable for user defined icon Mother Device Added QuickApp Variable for Solar Power m2 Removed calculation and storage of energy consumption of Fibaro devices Version 0.6 (22nd January 2021) Now also supports Iungo basic version Version 0.5 (21 January 2021) Initial version QuickApp variables (mandatory, they will be automatically added with the default values): IPaddress = IP address of your Iungo Monitor solarPanel = true or false for use of the SolarPanel module (default is false) waterMeter = true or false for use of the Watermeter module (default is false) interval = Number in seconds, the Lungo Monitor normally is updated every 10 seconds solarM2 = The amount of m2 Solar Panels (use . for decimals) for calculating Solar Power m2 debugLevel = Number (1=some, 2=few, 3=all, 4=simulation mode) (default = 1) meterConsHigh = Last meter measurement Consumption High meterConsLow = Last meter measurement Consumption Low meterProdHigh = Last meter measurement Production High meterProdLow = Last meter measurement Production Low meterGas = Last meter measurement Gas meterWater = Last meter measurement Water meterConsHighD = Date last meter measurement Consumption High meterConsLowD = Date last meter measurement Consumption Low meterProdHighD = Date last meter measurement Production High meterProdLowD = Date last meter measurement Production Low meterGasD = Date last meter measurement Gas meterWaterD = Date last meter measurement Water Tested with: Iungo lite version Firmware Rev 3683 (07-01-2021) Download the QuickApp here (download the file and un-zip): https://github.com/GitHub4Eddy/iungo_monitor/archive/refs/tags/iungo_monitor-11.zip or Fibaro Marketplace: https://marketplace.fibaro.com/items/iungo-monitor How to install: Open the Configuration Interface Go to Settings > Devices Click + Choose Other Device Choose Upload File Choose file from your computer with .fqa
  10. Ambee changed their API policy to only paid and a (too) short trial time. This QuickApp gives access to real-time water vapor level of any location in Asia, Europe, North America, Australia and New Zealand by latitude and longitude. Water vapor resolution varies from 1 hour to 2 days, based on the availability of data and the change of data with respect to a particular location. IMPORTANT You need an API key form https://www.getambee.com UPDATE 6th of August 2021: The API is free up to 100 API calls/day for 15 days, with zero limitations on country, access to air quality, pollen, weather and fire data and dedicated support. After 15 days you have to migratie to a paid plan. Variables (mandatory): apiKey = Get your free API key from https://www.getambee.com interval = [number] in seconds time to get the data from the API timeout = [number] in seconds for http timeout debugLevel = Number (1=some, 2=few, 3=all, 4=simulation mode) (default = 1) icon = [numbber] User defined icon number (add the icon via an other device and lookup the number)
  11. Ambee changed their API policy to only paid and a (too) short trial time. This QuickApp gives access to real-time soil moisture (Volumetric Soil Moisture (VSM) level in percentage (%)) and soil temperature (temperature of the soil in celsius (℃)) levels of any location in Asia, Europe, North America, Australia and New Zealand by latitude and longitude. Soil data resolution is set at 7 days (with Ambee). Soil moisture is the amount of water content present in soil. Soil moisture depends on precipitation, temperature, soil characteristics, ground water content and more. Soil temperature affects the soil moisture content. Optimal soil temperature and moisture content is needed for crop yield. IMPORTANT You need an API key form https://www.getambee.com UPDATE 6th of August 2021: The API is free up to 100 API calls/day for 15 days, with zero limitations on country, access to air quality, pollen, weather and fire data and dedicated support. After 15 days you have to migratie to a paid plan. Variables (mandatory): apiKey = Get your free API key from https://www.getambee.com interval = [number] in seconds time to get the data from the API timeout = [number] in seconds for http timeout debugLevel = Number (1=some, 2=few, 3=all, 4=simulation mode) (default = 1) icon = [numbber] User defined icon number (add the icon via an other device and lookup the number)
  12. Ambee changed their API policy to only paid and a (too) short trial time. This QuickApp gives access to real-time pollen count - tree, grass and weed, of any location in Asia, Europe, North America, Australia and New Zealand by latitude and longitude. Pollen is a fine powder produced by trees and plants. Pollen can severely affect people, especially those with different ailments such as asthma and respiratory issues. It can aggravate these existing conditions or cause these issues in high risk groups. Grass Pollen: Pollen grains from grasses. Measuring unit is pollen particles/m³ Tree Pollen: Pollen from trees such as Birch and Oak. Measuring unit is pollen particles/m³ The QuickApp provides a risk evaluation with levels Low - Mild risk to those with severe respiratory issues. No risk for the general public Moderate - Risky for those with severe respiratory problems. Mild risk for the general public High - Risky for all groups of people Very High - Highly risky for all groups of people IMPORTANT You need an API key from https://www.getambee.com UPDATE 6th of August 2021: The API is free up to 100 API calls/day for 15 days, with zero limitations on country, access to air quality, pollen, weather and fire data and dedicated support. After 15 days you have to migratie to a paid plan. Variables (mandatory): apiKey = Get your free API key from https://www.getambee.com interval = [number] in seconds time to get the data from the API timeout = [number] in seconds for http timeout debugLevel = Number (1=some, 2=few, 3=all, 4=simulation mode) (default = 1) icon = [numbber] User defined icon number (add the icon via an other device and lookup the number)
  13. This QuickApp predicts the rain in The Netherlands (and Belgium, a part of Germany and a small part of France and England) with data from the Buienradar, two hours in advance. The value of this QuickApp represents the minutes until rain. If there is no rain expected, the value is set to 0. If it rains, the value is set to 999 and the amount of rain (mm/h) is shown. Buienradar updates every 5 minutes with intervals of 5 minutes until 2 hours in advance. If rain is expected within the first predicted 5 minutes or less, the QuickApp assumes it is raining. If rain is expected or it rains, the interval for checking the Buienradar data (default without rain 300 seconds, equal to the Buienradar updates) is speed up (default 60 seconds) so the QuickApp value is updated more often. Version 1.1 (19th March 2021) Added Child Device for rainfall mm/h Added Quickapp variable for debug level (1=some, 2=few, 3=all). Recommended default value is 1. debuglevel 4 = Rain expected simalation. debugLevel = 5 Raining simulation Freed up some space (3 positions) in the presentation of the amount of rain Increased the default value of the maximum lines (maxLines) from 23 to 26 Changed the unit in case of rain to empty Version 1.0 (25th October 2020) Added the possibility to change the icon according to rain, rain expected or dry. Three not mandatory quickapp variables are added to fill in with the icon number for rain, rain expected and dry. Version 0.3 (26th September 2020) Build an extra check for an incomplete Buienradar response (sometimes less than two hours) Added global variable maxLines to arrange the maximum amount of lines to indicate the amount of rain (one line for every 0.10mm rain) to fit the screen of your mobile device Decreased the default lines from 25 to 23 to show it right on an iPhone Version 0.2 (4th September 2020) Ready for the new Mobile App 1.9: Added visual level of rain (forecast) with thanks to @tinman from forum.fibaro.com Added warning for latitude and logitude settings where Buienradar Rain has (no) coverage Version 0.1 (15th August 2020) Initial version The value of this QuickApp is the same as the value of any other device like a temperature, humidity, CO2 sensor. With the value updated in this QuickApp, you are able to build and use your own scenes to notify, to close or open sunscreens, to close or open windows, etcetera Or a Block Scene: Where the value: 0 = no rain expected 999 = it is raining any other number = the minutes until rain expected In this example rain is expected at 20:55, within 93 minutes. local value = fibaro.getValue(321,"value") Where 321 should be your Buienradar Rain device ID In this example it is raining. In the log you can see how much it is raining: local log = fibaro.getValue(321,"log") Where 321 should be your Buienradar Rain device ID JSON data copyright: (C)opyright Buienradar / RTL. All rights reserved. JSON data terms: Deze feed mag vrij worden gebruikt onder voorwaarde van bronvermelding buienradar.nl inclusief een hyperlink naar https://www.buienradar.nl. Aan de feed kunnen door gebruikers of andere personen geen rechten worden ontleend. QuickApp variables (mandatory, they will be automatically added with the default values): intervalR = Number in seconds to update the data when rain expected or raining (default is 60 seconds, must be different to IntervalD) intervalD = Number in seconds to update the data when no rain expected. Buienradar is updated every 300 seconds (default is 300 seconds). latitude = of your location (default is the latitude of your HC3) longitude = of your location (default is the longitude of your HC3) maxLines = maximum number of | to indicate the amount of rain (one line for every 0.10mm rain) iconR = icon number for rain iconE = icon for rain expected iconD = icon number for dry Coverage: Latitude (50-54) / longitude (1-10) NO or YES coverage Download the QuickApp here (download the file and un-zip): https://github.com/GitHub4Eddy/buienradar_rain/archive/buienradar_rain_11.zip or Fibaro Marketplace: https://marketplace.fibaro.com/items/buienradar-rain How to install: Open the Configuration Interface Go to Settings > Devices Click + Choose Other Device Choose Upload File Choose file from your computer with .fqa Check the latitude and longitude settings in the QuickApp Variables and change them to your settings (or delete them and push the “save” button to force the right default settings)
  14. This QuickApp gives access to real-time and 5-day forecast pollen count and risk category for grass pollen, mold spores, ragweed pollen and tree pollen of any location from AccuWeather.com Pollen is a fine powder produced by trees and plants Pollen can severely affect people, especially those with different ailments such as asthma and respiratory issues. It can aggravate these existing conditions or cause these issues in high risk groups Grass Pollen: Pollen grains from grasses Mold Spores: The fungus produces spores that can become airborne Radweed Pollen: Ragweeds are annual and perennial herbs and shrubs. A single plant may produce about a billion grains of pollen per season. Tree Pollen: Pollen from trees such as Birch and Oak The QuickApp provides a risk evaluation with levels in particles/m³ Grass Pollen Risk Begin Range End Range Low 0 4.99 Moderate 5 19.99 High 20 199.99 Very High 200 299.99 Extreme 300 1000000 Mold Spores Risk Begin Range End Range Low 0 6499.99 Moderate 6500 12999.99 High 13000 49999.99 Very High 50000 64999.99 Extreme 65000 1000000 Ragweed Pollen Risk Begin Range End Range Low 0 9.99 Moderate 10 49.99 High 50 499.99 Very High 500 649.99 Extreme 650 1000000 Tree Pollen Risk Begin Range End Range Low 0 14.99 Moderate 15 89.99 High 90 1499.99 Very High 1500 2999.99 Extreme 3000 1000000 IMPORTANT You need an API key from https://developer.accuweather.com The API is free up to 50 API calls/day, one key Variables (mandatory): apiKey = Get your free API key from AccuWeather locationKey = AccuWeather number from your HC3 Lon/Lat interval = [number] in seconds time to get the data from the API timeout = [number] in seconds for http timeout debugLevel = Number (1=some, 2=few, 3=all, 4=simulation mode) (default = 1) icon = [numbber] User defined icon number (add the icon via an other device and lookup the number) ownload the QuickApp here (download the file and un-zip): https://github.com/GitHub4Eddy/accuweather_pollen/archive/refs/tags/accuweather_pollen-01.zip How to install: Open the Configuration Interface Go to Settings > Devices Click + Choose Other Device Choose Upload File Choose file from your computer with .fqa
  15. QA for Philips Hue devices (for HC3 5.040 GA or above): - support of philips hue lights, switches and sensors (motion, temperature, light) and some ikea lights connected to hue bridge - unlimited number of hue bridges - all logic and setup are centralized in QA HueMain - creating of hue devices via click on buttons in HueMain - a lot of parameters for advanced users - automatic update of all devices in case of new versions - centralized setting of favorite buttons,colors and icons (also possibility to override settings via local variables in every QAs) - power consumption calculation for lights - supported languages: en,cz,de,se,nl,sk,fr,ru,it,pl Installation: 1. Download HueMain.fqa 2. Install HueMain.fqa to HC3 3. In Variables in HueMain you have to setup: - HueBridgeName1 - you can choose any name of your bridge - it can be whatever – allowed characters: a-z, A-Z, 0-9, _ - for example MyBridge1 - HueBridgeIP1 - IP address of your bridge for example 192.168.1.200 - Save variables - HueMain should start if everything is OK 4. And than you have 2 options: a) you know your user in bridge - you can add it to Variables - item HueUser1 ie.vPCj123VmJ18uWSHqpXfidxq5sjsP1q4Wi6DiCm b) you can create user in HueMain - last part - button Create user (you will need physical access to your Hue bridge and press button there) + save/restart 5. HueMain should run (if everything is OK) and show your hue devices in menu 6. You can create QAs for group of lights, lights and sensors in menu in HueMain Files: 1. QA - HueMain HueMain20210307_300.fqa 2. Icons: Icons20200928.zip HOW TO CALL from other QAs or Scenes: -- for calling from other QAs: fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='setscene', deviceID=QAID_HueLight, value='TVmugOA8rAACGGj',transitiontime=0}) -- for calling from scenes (you have to add json.encode): fibaro.call(249, "HueCommands", json.encode{type='Hue', action='setscene', deviceID=500, value="Sb3tQguuEpnV0gO", transitiontime=0}) --[[ -- QAID_HueMain and QAID_HueLight have to be numbers -- light on fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='on', deviceID=QAID_HueLight}) -- light on with transition time fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='on', deviceID=QAID_HueLight, transitiontime=0}) -- light off fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='off', deviceID=QAID_HueLight}) -- light on with transition time fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='off', deviceID=QAID_HueLight, transitiontime=0}) -- light on with setting of brightness (in value), if value<2 then value=100, value=<0,100> fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='on_bri', deviceID=QAID_HueLight, value=50}) -- setup of brightness (in value) and also if value is 0 then Light off - in other cases Light on, value=<0,100> fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='brightness', deviceID=QAID_HueLight, value=50}) fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='brightness', deviceID=QAID_HueLight, value=50, transitiontime=0}) -- light toggle based on last refreshed data from hue bridge (fast method, in some cases can be inaccurate) fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='toggle', deviceID=QAID_HueLight}) -- light toggle based on new request from hue bridge (slower method but accurate) fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='toggle2', deviceID=QAID_HueLight}) -- light toggle based on last refreshed data from hue bridge (fast method, in some cases can be inaccurate), brightness is in value <0,100> fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='toggle_bri', deviceID=QAID_HueLight, value=50}) -- light toggle based on new request from hue bridge (slower method but accurate), brightness is in value <0,100> fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='toggle_bri2', deviceID=QAID_HueLight, value=50}) -- setup of color (in value), value=<0,100> fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='color', deviceID=QAID_HueLight, value=50}) fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='color', deviceID=QAID_HueLight, value=50, transitiontime=0}) -- setup of saturation (in value), value=<0,100> fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='saturation', deviceID=QAID_HueLight, value=50}) fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='saturation', deviceID=QAID_HueLight, value=50, transitiontime=0}) -- setup of color temperature (in value), value=<0,100> fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='colortemp', deviceID=QAID_HueLight, value=50}) fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='colortemp', deviceID=QAID_HueLight, value=50, transitiontime=0}) -- setup of color via RGB (in colorR, colorB, colorB <0,254>), brightness is in value=<2,100> fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='colorRGB', deviceID=QAID_HueLight, colorR=10, colorG=200, colorB=100, value=100}) fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='colorRGB', deviceID=QAID_HueLight, colorR=10, colorG=200, colorB=100, value=50, transitiontime=0}) -- setup of hue light based on global setting in Hue Main for button Color 1 to button Color 5 fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='setcolor', deviceID=QAID_HueLight, typebutton='color1'}) -- setup of hue light based on global setting in Hue Main for favourite button 1 to button 5 fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='setbutton', deviceID=QAID_HueLight, typebutton='button5'}) -- setup of hue light based on standard Philips Hue commands and values fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='set', deviceID=QAID_HueLight, ParamHue={"on":true,"hue":0,"sat":254,"bri":254}}) fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='set', deviceID=QAID_HueLight, ParamHue={"on":true,"bri":254,"xy":[0.3651,0.3719]}}) -- setup scenes - sceneID is in value fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='setscene', deviceID=QAID_HueLight, value='TVmugOA8rVWCGGj'}) -- setup color loop efect - start fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='colorloopstart', deviceID=QAID_HueLight}) -- setup color loop efect - stop fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='colorloopstop', deviceID=QAID_HueLight}) -- set hue scene for lights fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='setscene', deviceID=QAID_HueLight, value=hueSceneID, transitiontime=0}) fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='setscene', deviceID=QAID_HueLight, value='TVmugOA8rAACGGj', transitiontime=0}) -- enabling of motion sensor fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='configon', deviceID=QAID_HueMotionSensor}) -- disabling of motion sensor fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='configoff', deviceID=QAID_HueMotionSensor}) -- alerts fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='alerttoggle', deviceID=QAID_HueLight}) fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='alertstart', deviceID=QAID_HueLight}) fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='alertstop', deviceID=QAID_HueLight}) fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='alertstart2colors', deviceID=QAID_HueLight, color='"sat":254, "bri":254, "hue":65535', color2='"sat":254, "bri":254, "hue":46530'}) fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='alertstart', deviceID=QAID_HueLight, color='"sat":254, "bri":254, "hue":0'}) fibaro.call(QAID_HueMain, "HueCommands", {type='Hue', action='alertstart', deviceID=QAID_HueLight, color='"sat":254, "bri":254, "hue":46530'}) --]] How to add icons where is not direct QA support for icon selection - for example for QA Hue Switches: There is not possible to change icon for switch via user interface but you can do it via my QA: 1. you have to upload icons for hue switch: In HueMain - tab General - add Icon Select your user icons and save it. You don't need to change icon for your HueMain 2. You need to get icon number - user icon has number with 4 digits (I hope that you don't have more 9999 icons currently ) right click on icon in your browser and select save picture - there will be - ie. User1007.png - your icon number is 1007 (in some of icons ie. for lights you can see longer number ie. User1018100.png, always use only first 4 digits - 1018 3. In HueMain - tab Variables - add your icons number to IconSwZLLxxx (default icon is 0) or IconSwZGPxxx based on your hue switch type - btw. you can set also default icons for all your hue devices 4. Save your variables and HueMain will be restarted and your HueQAs will have new nice icons
  16. This QuickApp gives access to real-time pollen count and risk category for grass pollen, weed pollen and tree pollen of any location from Tomorrow.io Pollen is a fine powder produced by trees and plants Pollen can severely affect people, especially those with different ailments such as asthma and respiratory issues. Version 0.1 (15th August 2021) Initial working version Pollen: Grass Pollen: Pollen grains from grasses Weed Pollen: Weeds are annual and perennial herbs and shrubs. A single plant may produce about a billion grains of pollen per season. Tree Pollen: Pollen from trees such as Birch and Oak Risk: 0: None 1: Very low 2: Low 3: Medium 4: High 5: Very High IMPORTANT You need an API key from https://app.tomorrow.io The API is free up to 500 calls / per day, 25 calls / per hour, 3 calls / per second (Pollen is 5% of rate limit) You need to create your location in https://app.tomorrow.io/locations to get a location ID and copy it to the QuickApp variable Variables (mandatory): Variables (mandatory): apiKey = Get your free API key from Tomorrow.io location = Tomorrow.io location ID (created in https://app.tomorrow.io/locations) interval = [number] in seconds time to get the data from the API timeout = [number] in seconds for http timeout debugLevel = Number (1=some, 2=few, 3=all, 4=simulation mode) (default = 1) icon = [numbber] User defined icon number (add the icon via an other device and lookup the number) Download the QuickApp here (download the file and un-zip): https://github.com/GitHub4Eddy/Tomorrow.io_Pollen/archive/refs/tags/tomorrow_io_pollen-01.zip How to install: Open the Configuration Interface Go to Settings > Devices Click + Choose Other Device Choose Upload File Choose file from your computer with .fqa
  17. I am looking for ways to change the fontsize and/or color of a QA panel. Seems to me that it should be done trough updateView, but I can only find the "text" and "value" properties documented (or rather, mentioned in this forum) Is there a way to change the appearance of a QA?
  18. Hello everyone,.. I am pleased to announce that the first version of QA for controlling the iEAST streamer has already been published. It's the Lite version. You can download it here on the Marketplace: https://marketplace.fibaro.com/items/ieast-hc3-lite-player Current version: Lite 1.0.0 Date of publication: 7/08/2020 Last update: 17/08/2020 FUNCTIONS The functions of this Quick App are: Allowing to control iEAST Player from Home Center 3. You can control one device. It does support basic and advanced functions: Basic Control Chose the device preset (radio station/stream) – if your device supported this Initiate playback Button for Playback, Stop, Prvevious and Next track Toggle button, Pause/Playback Button for MUTE (unMUTEd will be when set some volume) Basic Rendering Control Get player volume and mute state Set player volume to a specific level and unmute the player if muted Increase or decrease player volume Get or Set or Toggle player mute state (Mute or unmute the player) Get or Set or Toggle player loudness state Basic Rendering States Get URL stream from device Get Title and Artist from device Get Play status – play/stop/pause/mute Get Volume level Show the QA status QA Properties Enable QA Debug Mode RELEASE NOTES - changelog Version 1.0.0 For HC3 v5.031 Support standard capabilities (PlayerControl, PlayerStatus) Displaying information on the currently playing (with some exceptions) Fully controllable from the LUA scenarios (see available command list) Directly controll the one of three devices For the future Support for select LineIN play mode Support fot Equaliser Toggle for STOP/PLAY MASTER / slave multiroom control support (in the Enhanced version) For more information, visit the Marketplace page: https://marketplace.fibaro.com/items/ieast-hc3-lite-player The description is part of the package. In case of questions, please write eM. EDIT 20200918: For debug some communication problem, pleas visit this post:
  19. Version 1.0.2

    32 downloads

    About This File Onkyo QuickApp INTRODUCTION Onkyo has a range of network connected Audio/Video receivers that can be controlled via a network UTP connection. This QuickApp provides basic control of the A/V receiver. Tested on an Onkyo TX-NR616. QuickApp should be easy to adapt to other models if required. This is my first QuickApp, any suggestion to make it better highly appreciated. PREREQUISITES Tested on Fibaro Home Center HC3L and Yubii Home with firmware 5.071.52 An Onkyo AV Receiver FEATURES Basic On/Off Volume Control Mute On/Off toggle switch 8 Input selectors, label can be customised using variables 4 Listening Modes On/off line status indicator INSTALLATION Please check provided User Manual. Upload file in the device section. AVAILABLE DOWNLOAD Onkyo 2021-06-23.fqa Icons - found on the forum and slightly adapted 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. VERSION HISTORY 1.0.2 - First public release
  20. Hi, I already found lots of LUA scripts and other "inserts" for Bose Soundtouch but I can't find anything that works on HC3. Is someone already working on a QuickApp or some kind of VD for the Bose Soundtouch ? I don't have the proper skills to make something myself and I would love to integrate my Bose …. Thank you
  21. Hello, Can someone tell me whether there is a possibility to integrate sensors from Aqara at Fibaro and then use them for scenes? Regards
  22. This QuickApp contains devices of soil moisture, soil temperature and surface temperature, from accumulated temperature and precipitation data from OpenWeather via Agro Monitoring. Soil temperature and moisture are essential indices that allow your customer to adjust irrigation work and prevent crop roots damage. Accumulated temperature and precipitation is essential to make a right decision depends on a threshold setting. Temperature quantity index calculated as the sum of daily temperatures. Humidity quantity index expressed as the sum of daily precipitation. Current soil data is updated 2 times a day. The soil temperature is provided in Kelvins and in this quickapp converted to Celsius (C = K - 273.15) IMPORTANT You need an API key and Polygon ID from https://agromonitoring.com You need to create your Api key and Polygon ID at https://agromonitoring.com/dashboard/dashboard-start After your registration click the "New" button in the top of the "Create polygon" screen. Click on the polygon icon or square icon on the map. Draw your polygon. If you choose a polygon shape icon do not forget to merge the first and last points to finish your polygon. Fill in the "Name" field and click the "Create" button to save your polygon. The API is free up to 60 calls per minute and a total area of polygons of 1000ha See: https://agromonitoring.com/dashboard/dashboard-start See: https://openweathermap.medium.com/dashboard-update-current-and-historical-soil-data-24422fc75c5b What is soil moisture? The science behind the measurement: https://www.metergroup.com/environment/articles/what-is-soil-moisture-science-behind-the-measurement/ Version 0.2 (24th May 2021)) Changed Soil Moisture (child) device from multilevelSensor to humiditySensor with percentage presentation Version 0.1 (22 May 2021) Initial version Variables (mandatory): apiKey = Get your free API key from https://agromonitoring.com polygon = Create your Polygon ID at https://agromonitoring.com/dashboard/dashboard-start interval = [number] in seconds time to get the data from the API timeout = [number] in seconds for http timeout debugLevel = Number (1=some, 2=few, 3=all, 4=simulation mode) (default = 1) icon = [numbber] User defined icon number (add the icon via an other device and lookup the number) Download the QuickApp here (download the file and un-zip): https://github.com/GitHub4Eddy/agro_monitor/archive/refs/tags/agro_monitor-02.zip How to install: Open the Configuration Interface Go to Settings > Devices Click + Choose Other Device Choose Upload File Choose file from your computer with .fqa
  23. Hi, need to controll Epson projector (send PWR On, PWR Off, PWR?) messages For controllinhg Epson, need to send a command for establishing connection (0x450x530x430x2F0x560x0500x2E0x6E0x650x740x100x030x000x000x000x00) and after that send the command for interogating power status (0x500x570x520x3f0x0d) Testing this from Hercules utility, works great When coding in LUA, after sending first command, when trying to send second command I get Connection reset by peer error If sending just first command, I get a proper response, so, no error in connection or command string Here is my code: function QuickApp:onInit() self:debug("onInit") self.ip = self:getVariable("ip") self.port = tonumber(self:getVariable("port")) self.sock = net.TCPSocket() end function QuickApp:parseData(str) while true do if string.find(str, '0x') then i,j = string.find(str, '0x') str = string.sub(str, 1, i - 1) .. self:fromhex(string.sub(str, i + 2, j +2)) .. string.sub(str, j + 3) else return str end end end function QuickApp:fromhex(str) return (str:gsub('..', function(cc) return string.char(tonumber(cc, 16)) end)) end function QuickApp:connect(successCallback) print("connecting:", self.ip, self.port) self.sock:connect(self.ip, self.port, { success = function() self:debug("connected") successCallback() end, error = function(err) self.sock:close() self:debug("connection error connect", err) end, }) end function QuickApp:init(event) --self:connect() self:send("0x450x530x430x2F0x560x0500x2E0x6E0x650x740x100x030x000x000x000x00", true, "0x500x570x520x3f0x0d") end function QuickApp:send(dataToSend, waitForResponse, pwr) self:connect(function() local dataConverted = self:parseData(dataToSend) local pwrConverted = self:parseData(pwr) self.sock:write(dataConverted) fibaro.setTimeout(1000, function() self.sock:write(pwrConverted) end) self.sock:read({ success = function(data) self:debug("response data:", data) --self.sock:close() end, error = function(err) self:debug("response error wait ", err) --self.sock:close() end }) fibaro.setTimeout(1000, function() self.sock:write(pwrConverted) end) self.sock:read({ success = function(data) self:debug("response data:", data) --self.sock:close() end, error = function(err) self:debug("response error wait ", err) --self.sock:close() end }) end) end Looks like the connection is closed after frist call, but do not know how to keep alive, tried everything Can anybody help me? Regards
  24. If I restore a dead device connected to the HC3 through the mobile app. Then the device recovers immediately after the push of the button. But if I do the restore by code (in a HC3 QuickApp) then the device does not restore. I use (wakeUpDeadDevice(deviceID)) for this. local parentID = 201 fibaro.wakeUpDeadDevice(parentID) fibaro.sleep(1000) fibaro.call(parentID,'turnOn') Is there any other code similar to the code the mobile app uses?
  25. This QuickApp gets the actual water level or flow from rivers in France. The latest water level or flow of your selected hydro station is updated in the value of this QuickApp. You can choose between Water Level or Water Flow. If you want to measure both, simply install the QuickApp twice. See for more information: https://www.vigicrues.gouv.fr Service d'information sur le risque de crues des principaux cours d'eau en France Version 1.0 (25th April 2021) - Added Water Flow next to Water Level, mode = level or flow (Choose for waterlevel or waterflow, default = level) - Added debugLevel (Number (1=some, 2=few, 3=almost all, 4=all) (default = 1)) - Re-structured the code Version 0.5 (16th August 2020) - Error message instead of debug message in case of error - Adjusted the date/time in the label and debug message. If the json file was in a different order, a wrong date/time could show. - Changed method of adding QuickApp variables, so they can be edited Version 0.4 (7th August 2020) - Changed debug message actual level with location - Added QuickApp variables Version 0.3 (3rd August 2020) - Put the latest WaterLevel value in QuickApp value - Put the latest DateTime value in the QuickApp log - Added labels with the json data - Added debug notification Version 0.2 (3nd August 2020) - Date time value converted to readable time - Added the latest date, time and waterlevel values QuickApp variables (mandatory, they will be automatically added with the default values): - stationHydro = Status from where you want your data from - mode = level or flow (Choose for waterlevel or waterflow, default = level) - interval = Number in seconds to request the data - debugLevel = Number (1=some, 2=few, 3=all) (default = 1) Download the QuickApp here (download the file and un-zip): https://github.com/GitHub4Eddy/water_flow_level/archive/refs/tags/water_flow_level_10.zip or Fibaro Marketplace: https://marketplace.fibaro.com/items/water-flow-level How to install: Open the Configuration Interface Go to Settings > Devices Click + Choose Other Device Choose Upload File Choose file from your computer with .fqa
×
×
  • Create New...