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


HC3 QuickApps coding - tips and tricks


jgab

Recommended Posts

11 minutes ago, jgab said:

f you paste the url into the browser does it download the calendar?

YES

Link to comment
Share on other sites

Hi!

If i create an apple calendar event at 18:00 to 18:10 the log in the QA says: 

 

[21.10.2020] [17:39:34] [DEBUG] [QUICKAPP506]: #New events:1

[21.10.2020] [17:39:34] [DEBUG] [QUICKAPP506]: Event:Fibaroevent Wed Oct 21 19:00:00 2020

 

there ist one hour difference.

 

Greetings!

Link to comment
Share on other sites

  • Topic Author
  • 1 hour ago, kallecux said:

    Hi!

    If i create an apple calendar event at 18:00 to 18:10 the log in the QA says: 

    [21.10.2020] [17:39:34] [DEBUG] [QUICKAPP506]: #New events:1

    [21.10.2020] [17:39:34] [DEBUG] [QUICKAPP506]: Event:Fibaroevent Wed Oct 21 19:00:00 2020

    there ist one hour difference.

    Greetings!

     

    Hmmm, I thought that I had figured out the timezone stuff... There are a couple of ways to report timezone i iCal format - a bit of a mess... will have a check what iCloud reports...

    Link to comment
    Share on other sites

    @jgab

    I haven't really played with the QA yet but I'm hoping you can tell me if it fits my usecase.

    I have 'Working from home' calendar entries automatically imported into my Google calendar and the entry will be for the entire WFH period e.g. 12/10/20 00:00 – 23/10/20 23:59.

    What I was hoping to do was have something run each day and check if there is a work from home entry for that day and then set a WorkingFromHome variable to true to be used in other scenes.

    Is this possible with this QA?

    Thanks

    Link to comment
    Share on other sites

  • Topic Author
  • 13 hours ago, bgoldie said:

    @jgab

    I haven't really played with the QA yet but I'm hoping you can tell me if it fits my usecase.

    I have 'Working from home' calendar entries automatically imported into my Google calendar and the entry will be for the entire WFH period e.g. 12/10/20 00:00 – 23/10/20 23:59.

    What I was hoping to do was have something run each day and check if there is a work from home entry for that day and then set a WorkingFromHome variable to true to be used in other scenes.

    Is this possible with this QA?

    Thanks

    Ok, I have updated the iCal QA 

    The timezone is not sorted yet but there is a slider in the UI to adjust a time offset... I'm continuing to look into how to figure it out automatically.

     

    There is now a way to query the iCal QA for the current "active" events - the events that have a start date before now and an end date after now. It can return more than one event. Ex. You have a multi-day event and a single event that overlap.

    Please login or register to see this code.

    This rules ask for the current events 1min after midnight every day. 

    The first rule get the events and check if the name/title of the. event contains "WFH" and sets a fibaro global to the value.

    One could also check against the description field of the event. Ex. string.match(ev.descr,'WFH')

     

     
    Edited by jgab
    • Like 1
    • Thanks 1
    Link to comment
    Share on other sites

    On 10/21/2020 at 5:23 PM, jgab said:

    Ah there is a bug in the code.

    @jgab Jan downloaded version 0.8 and sofar it seems to work properly now. Thank you

    Link to comment
    Share on other sites

    Hello @jgab

    I was using / playing with ChildrenOfHue v. 0.7 successfully

    Then I migrated my HC2 to HC3 and reinstalled ChildrenOfHue.

    Upgraded firmware to newest - 5.050.13

    Installing sensors are working fine 

    Installing lights are now failing - only install one light - i have 50 ish.

     

    Is there a newer version og ChildrenOfHue?

     

    pressing the list seems to be working :-)

    Any clue ?

     

    [24.10.2020] [14:04:08] [TRACE] [QUICKAPP440]: UIEvent: {"elementName":"list","eventType":"onReleased","values":[],"deviceId":440}
    [24.10.2020] [14:04:08] [DEBUG] [QUICKAPP440]: Light id:40, name:Star, type:Dimmable light
    [24.10.2020] [14:04:08] [DEBUG] [QUICKAPP440]: Light id:30, name:Marius Seng, type:Color temperature light
    [24.10.2020] [14:04:08] [DEBUG] [QUICKAPP440]: Light id:20, name:Bryggers 1, type:Color temperature light
    [24.10.2020] [14:04:08] [DEBUG] [QUICKAPP440]: Light id:10, name:Skrivebord, type:Dimmable light
    [24.10.2020] [14:04:08] [DEBUG] [QUICKAPP440]: Light id:9, name:Loft, type:Dimmable light
    [24.10.2020] [14:04:08] [DEBUG] [QUICKAPP440]: Light id:34, name:Toilet 3, type:Color temperature light
    [24.10.2020] [14:04:08] [DEBUG] [QUICKAPP440]: Light id:36, name:Garage 2, type:Extended color light

     

    Pressing Install lights

    [24.10.2020] [13:57:00] [DEBUG] [QUICKAPP440]: QA ChildrenOfHue - version:0.7 (QA toolbox 0.15)
    [24.10.2020] [13:57:00] [DEBUG] [QUICKAPP440]: DeviceId..:440
    [24.10.2020] [13:57:00] [DEBUG] [QUICKAPP440]: Type......:com.fibaro.deviceController
    [24.10.2020] [13:57:00] [DEBUG] [QUICKAPP440]: Interfaces:["quickApp"]
    [24.10.2020] [13:57:00] [DEBUG] [QUICKAPP440]: Room......:219
    [24.10.2020] [13:57:00] [DEBUG] [QUICKAPP440]: Visible...:true
    [24.10.2020] [13:57:00] [DEBUG] [QUICKAPP440]: Created...:Sat Oct 24 13:45:55 2020
    [24.10.2020] [13:57:00] [DEBUG] [QUICKAPP440]: Modified..:Sat Oct 24 13:45:55 2020
    [24.10.2020] [13:57:00] [DEBUG] [QUICKAPP440]: Setup: Child manager (0.3)
    [24.10.2020] [13:57:00] [DEBUG] [QUICKAPP440]: No children
    [24.10.2020] [13:57:01] [TRACE] [QUICKAPP440]: Hue connected to 192.168.201.3
    [24.10.2020] [13:57:17] [TRACE] [QUICKAPP440]: UIEvent: {"elementName":"installLights","eventType":"onReleased","values":[],"deviceId":440}
    [24.10.2020] [13:57:17] [TRACE] [QUICKAPP440]: Color_light inited, hueId:19, deviceId:441
    [24.10.2020] [13:57:17] [DEBUG] [QUICKAPP440]: Installed lights:19-Bryggers 2
    [24.10.2020] [13:57:17] [ERROR] [QUICKAPP440]: Error in setTimeout:./include/main.lua:155: attempt to perform arithmetic on a nil value (local 'hue')
    [24.10.2020] [13:58:03] [TRACE] [QUICKAPP440]: UIEvent: {"elementName":"installLights","eventType":"onReleased","values":[],"deviceId":440}
    [24.10.2020] [13:58:03] [DEBUG] [QUICKAPP440]: lights:19-Bryggers 2 already installed

     

     

    Edited by ChristianSogaard
    Link to comment
    Share on other sites

  • Topic Author
  • 9 minutes ago, ChristianSogaard said:

    Hello @jgab

    I was using / playing with ChildrenOfHue v. 0.7 successfully

    Then I migrated my HC2 to HC3 and reinstalled ChildrenOfHue.

    Upgraded firmware to newest - 5.050.13

    Installing sensors are working fine 

    Installing lights are now failing - only install one light - i have 50 ish.

     

    Is there a newer version og ChildrenOfHue?

     

    It seems like you got one of my debug versions that only install one light (I don't want to reinstall all lights everytime  I test a new version :-) - somehow that version ended up in the forum... )

    Try this. v0.8.

    Please login or register to see this attachment.

    I'm about to upgrade the QA a bit and add new features, soon......

    • Like 2
    Link to comment
    Share on other sites

    4 minutes ago, jgab said:

     

    It seems like you got one of my debug versions that only install one light (I don't want to reinstall all lights everytime  I test a new version :-) - somehow that version ended up in the forum... )

    Try this. v0.8.

    Please login or register to see this attachment.

    I'm about to upgrade the QA a bit and add new features, soon......

    Amazing so fast you replied - and version 8 is working for me

    Link to comment
    Share on other sites

  • Topic Author
  • A new version of. ChildrenOfHue. v1.14.

     

    Please login or register to see this attachment.

    It's a "simple" QA that relies on the QuickAppChildren to realise the Hue devices.

    This means that the user interfaces are limited to what are supported by the child app classes.

    Supported Hue device classes:

     

    ZLLSwitch.

    Hue switch with 4 buttons. Creates centralSceneEvents similar to a Fibaro keyFob (com.fibaro.remoteController)

    The interpretation is

         keyId = hueKeyValue // 1000

         keyAttribute = ({"Pressed","HeldDown","Released","Released"})[hueKeyValue % 1000 +1]

    It also supports setValue('value',value) to simulate a key press.

     

    ZLLTemperature.

    Hue temperature sensor. Behaves like a standard fibaro.com.temperatureSensor.

     

    ZLLLightLevel.

    Hue light sensor. Behaves like a standard fibaro.com.lightSensor.

    The device quickAppVariables  'daylight' and 'dark' is updated with resp. Hue attribute.

     

    ZLLPresence

    Hue presence sensor. Behaves like a standard fibaro.com.motionSensor.

     

    Extended color light

    Hue RGB light. Behaves like a fibaro.com.philipsHueLight.

    supports:

    fibaro.call(<id>,"turnOn")

    fibaro.call(<id>,"turnOff")

    fibaro.call(<id>,"toggle")

    fibaro.call(<id>,"setValue",value)                   -- dim value 0..100

       If the value is a table the value is sent directly to the Hue light as a Hue property table. 

      Ex. fibaro.call(<id>,"setValue",{effect='colorloop',bri=50})

            fibaro.call(<id>,"setValue",{startup={customsettings={xy={0.73500005089041,0.26499994910959}}}})

    fibaro.call(<id>,"setColor",red, green,blue).  -- color 0..255

    fibaro.call(<id>,"changeBrightness")             -- brightness 0..255

    fibaro.call(<id>,"changeHue")                        -- 0..65535

    fibaro.call(<id>,"changeSaturation")              -- 0..255

    fibaro.call(<id>,"startLevelIncrease")

    fibaro.call(<id>,"startLevelDecrease")

    fibaro.call(<id>,"stopLevelChange")

    fibaro.call(<id>,"toggleDim",<boolean>) -- Toggle dim direction. true with 'stop'

    The device quickAppVariable  'state' is updated with the Hue state

     

    Dimmable light

    Hue dimmable white light. Behaves like a fibaro.com.multilevelSwitch.

    supports:

    fibaro.call(<id>,"turnOn")

    fibaro.call(<id>,"turnOff")

    fibaro.call(<id>,"toggle")

    fibaro.call(<id>,"setValue",value)                   --- dim value 0..100

       If the value is a table the value is sent directly to the Hue light as a Hue property table. 

    fibaro.call(<id>,"changeBrightness")             -- brightness 0..255

    fibaro.call(<id>,"startLevelIncrease")

    fibaro.call(<id>,"startLevelDecrease")

    fibaro.call(<id>,"stopLevelChange")

    fibaro.call(<id>,"toggleDim",<boolean>) -- Toggle dim direction. true with 'stop'

    The device quickAppVariable  'state' is updated with the Hue state

     

    Color temperature light

    Mapped as a Dimmable light

     

    Color light

    Hue color light. Behaves like a fibaro.com.colorController.

    supports:

    fibaro.call(<id>,"turnOn")

    fibaro.call(<id>,"turnOff")

    fibaro.call(<id>,"toggle")

    fibaro.call(<id>,"setValue",value)                   --- dim value 0..100

       If the value is a table the value is sent directly to the Hue light as a Hue property table. 

    fibaro.call(<id>,"setColor",red, green,blue).  -- color 0..255

    fibaro.call(<id>,"changeBrightness")             -- brightness 0..255

    fibaro.call(<id>,"startLevelIncrease")

    fibaro.call(<id>,"startLevelDecrease")

    fibaro.call(<id>,"stopLevelChange")

    The device quickAppVariable  'state' is updated with the Hue state

    fibaro.call(<id>,"toggleDim",<boolean>) -- Toggle dim direction. true with 'stop'

     

    Room

    Hue light group. 

    Behaves like a fibaro.com.multilevelSwitch.

    fibaro.call(<id>,"turnOn")

    fibaro.call(<id>,"turnOff")

    fibaro.call(<id>,"toggle")

    fibaro.call(<id>,"setValue",value)                   --- dim value 0..100

       If the value is a table the value is sent directly to the Hue group as a Hue property table. 

    fibaro.call(<id>,"changeBrightness")             -- brightness 0..255

    fibaro.call(<id>,"startLevelIncrease")

    fibaro.call(<id>,"startLevelDecrease")

    fibaro.call(<id>,"stopLevelChange")

    fibaro.call(<id>,"setScene",<Hue scene ID or scene name>)

    fibaro.call(<id>,"toggleDim",<boolean>) -- Toggle dim direction. true with 'stop'

     

    Hue CLIPS devices

    CLIPPresence          => com.fibaro.motionSensor          class='ZLLPresence'
    CLIPTemperature.   => com.fibaro.temperatureSensor class='ZLLTemperature'
    CLIPPressure           => com.fibaro.binarySwitch           class='BinarySwitch'
    CLIPHumidity           => com.fibaro.humiditySensor.      class='Humidity'
    CLIPOpenClose.      => com.fibaro.binarySensor.          class='BinarySensor'

     

     

    The startLevelIncrease, startLevelDecrease, and stopLevelChange makes it possible to bind a remote controller that support centralSceneEvent to dim when a button is held down and stop dimming when the button is released.

     

    The lights store their Hue values in a quickAppVariable 'state'.

    This can be retrieved like below and ex. used to set default startup values for Hue lights...

    Please login or register to see this code.

     

    v 1.1 - Fixed bug with ZLLSwitch

    v 1.4 - better startLevelIncrease & friends

    v 1.5 - fix for color light

    v 1.7 - New dim approach

    v 1.9 - Support Zones (same as Groups)

    v 1.10 - start dim up with brightness=1

    v 1.11 - setValue > 0 turns on light

    v 1.12 - startDimLevel

    v 1.14 - startDimLevel -> toggleDim

    Edited by jgab
    • Like 3
    • Thanks 1
    Link to comment
    Share on other sites

    Hello Jan,

    I didt expected an updated version from you after the last problems I had.

    So now I am on Petr his QA.

    Your version is simple and easy (I hope it will work on my HC3)

    If HC3 is doing wierd or will do an automatic repair I will try your updated version again.

    Thanks for your excellent service!!

    Have a nice weekend

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 5 minutes ago, Sjakie said:

    Hello Jan,

    I didt expected an updated version from you after the last problems I had.

    So now I am on Petr his QA.

    Your version is simple and easy (I hope it will work on my HC3)

    If HC3 is doing wierd or will do an automatic repair I will try your updated version again.

    Thanks for your excellent service!!

    Have a nice weekend

    //Sjakie

    @petrkl12 provides a much more extensive user interface for the devices. This is more focused on providing devices that can be used from code/scenes.

    Edited by jgab
    Link to comment
    Share on other sites

    just in case someone need to play with, here just posted Home Connect QA (device flow type)

     

     

    more or less simple thing, leaved my sha lib inside in case someone wish to change to someting different.

    Edited by tinman
    • Like 2
    Link to comment
    Share on other sites

  • Topic Author
  • Bew version of ChildrenOfHue (v1.0)

     

    Bug fix that made lightGroups/rooms dysfunctional.

    lightGroups/rooms supports fibaro.call(<id>,"setScene",<Hue scene ID or scene name>)

    UI slider to set polling interval of the Hue bridge.

    There is also an option to poll lights slower with a factor. Ex. If poll every 1s, we can poll lights every 2s. Sensors will still be polled every 1s. Polling only sensors has a lower. load on the Hue bridge than polling all info.

    Link to comment
    Share on other sites

  • Topic Author
  • On 10/27/2020 at 11:01 AM, jgab said:

    New version of ChildrenOfHue (v1.0)

     

    Bug fix that made lightGroups/rooms dysfunctional.

    lightGroups/rooms supports fibaro.call(<id>,"setScene",<Hue scene ID or scene name>)

    UI slider to set polling interval of the Hue bridge.

    There is also an option to poll lights slower with a factor. Ex. If poll every 1s, we can poll lights every 2s. Sensors will still be polled every 1s. Polling only sensors has a lower load on the Hue bridge than polling all info.

     

    Edited by jgab
    Link to comment
    Share on other sites

  • Topic Author
  • This is some more documentation QA Toolbox

     

    The QA Toolbox is a Lua module that can  be added to any QA project and that will add enhancements.
    It will both add additional funtions to handle common tasks as well as enhancements to existing functions.

    Please login or register to see this attachment.

    Toolbox is the QA Toolbox file. 'main' is the regular QA file.

     

    If we create a simple QA like this

    Please login or register to see this code.

    We will get this output when we start the QA:

    Please login or register to see this code.

    It will list the name of the QA, the device ID and other info when starting up. The last line is the debug statement in our ownInit() function.

     

    There is a flag we can set to affect how the toolbox logs at startup.

    Please login or register to see this code.

    and we only get the output 

    Please login or register to see this code.


    Log functionality

     

    The log functions are a bit enhanced 

    Please login or register to see this code.

    There are some other flags that affect how the log functions behave

     

    Please login or register to see this code.

    will make self:debug(...) convert arguments that are tables into json strings, i.e don't need to call json.encode.

    Please login or register to see this code.

     

    Please login or register to see this code.

    will format space/newlines with html codes for log print outs -  normally they are  "stripped" in the log console

    Please login or register to see this code.

     

    Please login or register to see this code.

    will inhibit all self:debug(...) messages. Can be useful to turn off all debug messages

     

    Please login or register to see this code.

    will inhibit all self:trace(...) messages. Can be useful to turn off all trace messages

     

    Please login or register to see this code.

    will create NotificationCenter messages for self:error(...) and self:warning(...). THis can be useful to create attention to errors and warnings in the QA.

     

    Please login or register to see this code.

    will reuse notifications with same title and priority. If you have a QA that logs a  warning when it can't make a HTTP requests it can be annoying to have >1000  notifications in the Notification center after a while. This flag  will replace notifications with the same title and priority with the last notification.

     

    All log functions have formatting versions

    Please login or register to see this code.

    Ex.

    Please login or register to see this code.

     

    Please login or register to see this code.

    This functions make it easy to add a notification to the Notification Center.
    'priority' is either 'warning', 'info', 'error'
    'title' is an arbitrary string and so is 'text'
    If you have set QuickApp._NOTIFYREUSE it will replace the last notification of same priority/title

     

    Please login or register to see this code.

    This will create an interactive push message.
    The callback is a function that will be called if the user press the 'Yes' button.
    'timeout' is the time in seconds after which the response/callback will be ignored.

    Please login or register to see this code.

     

    Please login or register to see this code.

    This will set the text under the icon of the QA. Optional timout in seconds after which the message is removed

    Please login or register to see this image.

    /monthly_2020_10/icontext.png.a08f51e572141dfed4393cc79fa202e9.png" />
    Here the. blue text under the icon "My text..."


    An example of a scrolling message under the icon could look like this

    Please login or register to see this code.

    This will scroll a longer text message so the only 15 characters are visible at any time.

     

    Please login or register to see this code.

    is similar to self:updateView(elm,prop,value) but with formating option

     

    Please login or register to see this code.

    will return the value of the view property of elm

     

    Please login or register to see this code.

    will create formated (indented) json string of the table given

    Please login or register to see this code.

     

    Please login or register to see this code.

    will return the version of the HC3 firmware. Ex. "5.050.31"
    Optionally a version can be given and it will check if the HC3 version is later or equal

    Please login or register to see this code.

     

    Please login or register to see this code.

    will return the IP address of the HC3 - starting with wlan0 and return the first enabled interface.

     

    In addition to logging functions, extra logging is added to setTimout, setInterval, json.encode, json.decode to print out error message if they fail. Something that is not always guaranteed if it happens in another "thread".

    setTimeout is also patched to cope with longer time intervalls <

    Please login or register to see this link.

    >

     

    QA property manipulation

     

    Please login or register to see this code.

    will set the name of the QA

     

    Please login or register to see this code.

    will enable/disable the QA.
    If the QA is disabled (also using the UI) the :onInit()  method will not be called. Instead  a  message  that the QA is disabled will be logged.

     

    Please login or register to see this code.

    This will add the interfaces to the QA definition. Only valid interfaces will be added. A check is done if the QA already has the interface and will in that case not try to add it, because adding an interface will always restart the QA.

     

    Please login or register to see this code.

    is defined here. In QAs, only urldecode(<string>) is normally defined.

     

    Please login or register to see this code.

    will create a base64c encoding of the string

     

    Please login or register to see this code.

    will create a basic authorization data for http requests

    Please login or register to see this code.

     

    Besides this it will also load all quickAppVariables in a key-value table named self.config.

    Please login or register to see this code.


    The QA Toolbox adds the above functionality. In addition, this module is the base for dynamically loading other modules like childDevice management, trigger and events.

    Please login or register to see this attachment.

     

    • '

      Please login or register to see this link.

      ' - extra functions for managing child devices
    • '

      Please login or register to see this link.

      ' - extra function for setting up event handlers and structure your code accordingly.
    • '

      Please login or register to see this link.

      ' - extra functionality for receiving triggers (like scenes) - per default sends triggers to 'events' module if available 
    • '

      Please login or register to see this link.

      ' - functions to copy QA files
    • '

      Please login or register to see this link.

      ' - module for remote (synchronous) functions provided from another  "library" QA.
    • '

      Please login or register to see this link.

      ' - module for publish/subscribe functions for exchanging events between QAs
    • '

      Please login or register to see this link.

      ' - a module to manipulate UI elements. Ex adding/removing labels
    • Please login or register to see this link.

       - makes it possible to do "loadstring" or evaluate Lua expression from strings
    • Please login or register to see this link.

      - Functions for timing code used in QA

     

    How to load them and use them will be discussed in another post..

    Edited by jgab
    • Like 3
    • Thanks 3
    Link to comment
    Share on other sites

    • 2 weeks later...
  • Topic Author
  • A simple profiler for QAs (v2)

    Please login or register to see this attachment.

    Add it as a separate file in the QA. It defines a global function Profiler() that returns a report function

    Please login or register to see this code.

    In this example we bind the report function to an UI button so we can get a profile report printed out to the console like below.

    Functions that are declared local are not trapped.

    Please login or register to see this code.

    pro.addFun adds a function to be profiled given name. Because we create a new function we need to reassign the new function to our local foo variable. For global values and QuickApp this is done automatically.

    When function Profiler() is initially called it will trapp all functions. It's possible to add a list of function that should not be trapped.

    Please login or register to see this code.

    Here we don't want to profile the pcall and tostring function

    It normally start to profile functions as soon as profiler() is called. It is possible to start the profiler in an disabled state.

    Please login or register to see this code.

    The it needs to be started with prof.start()

    There is also a prof.stop()

    It can be used to only profile certain sections of the code as time and statistics are more counted when profiler is stopped.

     

    It's still a simple profiler so any enhancement are welcome. I will add a manual way to add local functions and exclude functions of no interest.

     

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: Function                      Time       Count  %time  %time(A)

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: ---------------------------------------------------------------

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: pcall                         0.012205s  00021  15.2   05.0

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: tostring                      0.011134s  00603  13.9   04.5

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: api.post                      0.008198s  00004  10.2   03.3

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: __fibaro_add_debug_message    0.006399s  00003  08.0   02.6

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: type                          0.006118s  01488  07.6   02.5

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: json.encode                   0.005357s  00006  06.7   02.2

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: json.decode                   0.005098s  00010  06.4   02.1

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: fibaro.debug                  0.004079s  00002  05.1   01.7

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: QuickApp:debugf               0.003167s  00001  04.0   01.3

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: QuickApp:trace                0.003042s  00001  03.8   01.2

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: fibaro.trace                  0.002738s  00001  03.4   01.1

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: Util.printBanner              0.002134s  00001  02.7   00.9

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: QuickApp:debug                0.002072s  00001  02.6   00.8

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: QuickApp:setView              0.001944s  00001  02.4   00.8

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: QuickApp:updateView           0.001870s  00001  02.3   00.8

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: string.gsub                   0.001230s  00040  01.5   00.5

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: Util._reverseMap              0.000608s  00005  00.8   00.2

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: setTimeout                    0.000504s  00006  00.6   00.2

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: Util.reverseMapDef            0.000395s  00001  00.5   00.2

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: oldSetTimout                  0.000375s  00006  00.5   00.2

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: pairs                         0.000367s  00068  00.5   00.1

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: QuickApp:post                 0.000188s  00001  00.2   00.1

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: QuickApp:enableTriggerType    0.000172s  00006  00.2   00.1

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: table.concat                  0.000131s  00006  00.2   00.1

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: assert                        0.000126s  00022  00.2   00.1

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: ipairs                        0.000085s  00013  00.1   00.0

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: __assert_type                 0.000059s  00003  00.1   00.0

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: Util.defvars                  0.000054s  00001  00.1   00.0

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: table.remove                  0.000048s  00004  00.1   00.0

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: Util.makeBanner               0.000046s  00001  00.1   00.0

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: table.insert                  0.000043s  00004  00.1   00.0

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: string.rep                    0.000029s  00002  00.0   00.0

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: table.unpack                  0.000027s  00002  00.0   00.0

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: Util.defvar                   0.000023s  00004  00.0   00.0

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: os.time                       0.000023s  00002  00.0   00.0

    [08.11.2020] [09:28:58] [TRACE] [QUICKAPP1519]: httpRequests: 0

    Edited by jgab
    • Thanks 2
    Link to comment
    Share on other sites

    Thank you for developing Children of HUE @jgab - I just love it.

    I saw you implemented Hue ZLLSwitch support :-)

    I was wondering if there is an easy way to tweak the code so I can use my logic group zdb5100 switches also?

    Its the same press available in the zdb5100 as the ZLLSwitch

    "Pressed","Released","HeldDown","Pressed2","Pressed3"

     

    Just a big whish for next update of Children of HUE ;-)

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, ChristianSogaard said:

    Thank you for developing Children of HUE @jgab - I just love it.

    I saw you implemented Hue ZLLSwitch support :-)

    I was wondering if there is an easy way to tweak the code so I can use my logic group zdb5100 switches also?

    Its the same press available in the zdb5100 as the ZLLSwitch

    "Pressed","Released","HeldDown","Pressed2","Pressed3"

     

    Just a big whish for next update of Children of HUE ;-)

    If you press the "List" button it will dump all the devices in the Hub.

    Look for your switch and see what type it reports?

    Should look something like

    [09.11.2020] [10:35:10] [DEBUG] [QUICKAPP1348]: Sensor id:2, name:Dimmer switch, type:ZLLSwitch

    If it has another type but behaves like a ZLLSwitch you could add a line to the HUE_TYPE_MAP in the beginning of the QA code

      [<zdb5100 switche type>]               = {ftype='com.fibaro.remoteController', class='ZLLSwitch'},

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...