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


Recommended Posts

Jan,

HC2 and HC3 where running.

HC2 runs complex automation including HUE I dont have problems here.

I have deleted the part toilet and bathroom from HC2

HC3 is running toilet and bathroom including HUE

So both are independant?

All HUE lights are on HC2 and HC3 in my opinion sleeping in HC3 only toilet and bathroom

HUE operate with Fibaro plugin

While testing HC3 there was no switching HUE on/off by HC2

HC3>> I can switch on/off nummerous times HUE in devices as well by clicking on the icon in front or at the button on/off if you open devices but NOT in

HC3    QA ER 4

This sound logical:

If you run Hue scenes/devices on both the HC2 and the HC3 they will compete calling/polling the Hue hub and the Hue Hub may start to refuse to carry out commands.

I am just back with adding the devices again in HC2.

I will try to make some tests with a door sensor and than I will shut down HC2 to see if this can be the problem bt I think its not the problem

because

what will be the differnce? In device no problem but in QA only few times and after restart it will do it again a few times.

Jan is there a difference also between QA or scene?

A waiting your comment,

//Sjakie

 

Link to comment
Share on other sites

  • Topic Author
  • 30 minutes ago, Sjakie said:

    Jan,

    HC2 and HC3 where running.

    HC2 runs complex automation including HUE I dont have problems here.

    I have deleted the part toilet and bathroom from HC2

    HC3 is running toilet and bathroom including HUE

    So both are independant?

    All HUE lights are on HC2 and HC3 in my opinion sleeping in HC3 only toilet and bathroom

    HUE operate with Fibaro plugin

    While testing HC3 there was no switching HUE on/off by HC2

    HC3>> I can switch on/off nummerous times HUE in devices as well by clicking on the icon in front or at the button on/off if you open devices but NOT in

    HC3    QA ER 4

    This sound logical:

    If you run Hue scenes/devices on both the HC2 and the HC3 they will compete calling/polling the Hue hub and the Hue Hub may start to refuse to carry out commands.

    I am just back with adding the devices again in HC2.

    I will try to make some tests with a door sensor and than I will shut down HC2 to see if this can be the problem bt I think its not the problem

    because

    what will be the differnce? In device no problem but in QA only few times and after restart it will do it again a few times.

    Jan is there a difference also between QA or scene?

    A waiting your comment,

    //Sjakie

     

     

    Well, ER4 doesn't know that it controls a Hue device, it just sends sends commands type fibaro.call(<hueDevice>,"turnOn") etc.like it does to any device.

    You can however send commands quicker to a device with Lua (ER4) than when you click on the UI. It could be that the Hue plugin can't handle to quick invocation of commands or sends them too quick to the Hue Hub...

    If you use the ER3 on the HC2 to control the Hue Hub it makes sure to pace the requests to the Hue Hub so it's not too fast...

     

    Your HC2 and HC3 is independent but they talk to the same Hue bridge that can't cope with too many parallell requests.

    Link to comment
    Share on other sites

    Jan,

    Sorry wrong track.

    You made me think!

    In HC3 I created a rule to switch on/ off 8 pieces of HUE lights after each other not wait in between them.

    Remark HC2 is on!

    I can switch on off with door sensor after each other.

    So conclusion HUE is not the cause of my failing toilet light?

    Because in the toilet I only switch one HUE.

    What to do? Start all over again from scratch is the best way with only HUE and toilet and ER to see what is happening.

    I had hope that after the update my problems where passed but still fighting to get it working.

    //Sjakie

     

     

    Link to comment
    Share on other sites

    Hello,

     

    Is it possible to do smth like this with double switch?

     

    single short push > toggle power on first relay

    double short push > toggle power on both relays

     

    greets

    Link to comment
    Share on other sites

  • Topic Author
  • 14 hours ago, michal85pl said:

    Hello,

     

    Is it possible to do smth like this with double switch?

     

    single short push > toggle power on first relay

    double short push > toggle power on both relays

     

    greets

     

    Something like this?

    Please login or register to see this code.

    :manual returns the time in seconds since the switch was manually flipped. It return -1 if the script flipped the switch.

    Now if you flip switch1 back and forth within 2s it will turn on both switch1 and switch2, independent what state switch1 was in.

    If you want the same behaviour on switch2 I would recommend a second rule instead of trying to combine them into one rule.

    You could experiment with the time and set it to <2...

    Edited by jgab
    Link to comment
    Share on other sites

    4 godziny temu, jgab napisał:

     

    Something like this?

    Please login or register to see this code.

    :manual returns the time in seconds since the switch was manually flipped. It return -1 if the script flipped the switch.

    Now if you flip switch1 back and forth within 2s it will turn on both switch1 and switch2, independent what state switch1 was in.

    If you want the same behaviour on switch2 I would recommend a second rule instead of trying to combine them into one rule.

    You could experiment with the time and set it to <2...

    hmm...it always returns false...

     

    Maybe I will say what I would like to achieve:
    I want to replace double bistable switches with single momentaries but keep double modules. And cause a single click to toggle the state of the first circuit and double click of both circuits.

    As You know i'm  using shelly modules, which has the following options for the buttons.

    I think the best option would be "detached", but probably it will need some modifications in the shelly QA?

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

  • Topic Author
  • 14 hours ago, michal85pl said:

    hmm...it always returns false...

    Maybe I will say what I would like to achieve:
    I want to replace double bistable switches with single momentaries but keep double modules. And cause a single click to toggle the state of the first circuit and double click of both circuits.

    As You know i'm  using shelly modules, which has the following options for the buttons.

    I think the best option would be "detached", but probably it will need some modifications in the shelly QA?

    Ok, a shelly switch changes the equation...

    The problem is that you have to poll the switch every 1s to have a chance to detect double presses within 2s (that's why you always got false with the example rule)

    It would have been nice if the switch supported double presses but now you need to detect it on the HC3 side.

    You would need a low poll rate (1s) and there would be a chance if people press quickly that only one of the presses would be detected...

    Is there a 'last changed' value that could be read from the switch?

     

    Link to comment
    Share on other sites

    Godzinę temu, jgab napisał:

    It would have been nice if the switch supported double presses but now you need to detect it on the HC3 side.

    Unfortunately, shelly doesn't support this feature at the moment

     

    Godzinę temu, jgab napisał:

    Is there a 'last changed' value that could be read from the switch?

    Unfortunately, there is no such thing at the moment

     

     

    Is it possible to do on FIBARO FGS-221 modules?

    Link to comment
    Share on other sites

  • Topic Author
  • 6 minutes ago, michal85pl said:

    Unfortunately, shelly doesn't support this feature at the moment

     

    Unfortunately, there is no such thing at the moment

     

     

    Is it possible to do on FIBARO FGS-221 modules?

    Yes, the rule I provided could work with the 221, but because the switch and the relay is not "detached", you would get "blinks" as you double press I guess.

    Link to comment
    Share on other sites

    24 minuty temu, jgab napisał:

    Yes, the rule I provided could work with the 221, but because the switch and the relay is not "detached", you would get "blinks" as you double press I guess.

    Is it possible on some other fibaro modules?

     

    Shelly supports "detached" switch, in web interface i can see when switch is powerd on/off and relay is on/off.Is there a chance it can be done? Even changing the pool for these few modules for 0.5s

     

     

    Link to comment
    Share on other sites

    Jan,

    I am still trying to get it work.

    The rules are not (always) in debug as true or false??

    Remark toilet.pir:breached is added to have light.

    What can be done?

     

    Util.defTriggerVar("openVanBuitenDeurToilet",false)
     
    rule([[toilet.deur:breached =>
        || toilet.pir:safe >> openVanBuitenDeurToilet=true
        || toilet.pir:breached >> openVanBuitenDeurToilet=false
                ]])
     
    rule("openVanBuitenDeurToilet==true => toilet.Spottoilet:on; toilet.wcLamp:on; post(#toiletBezet);  $Toilet='Bezet'; log('#toiletBezet1 - post');log('deftrigger openVanBuitenDeurToilet true')")
     
    rule("openVanBuitenDeurToilet==false => toilet.Spottoilet:off; toilet.wcLamp:off; post(#toiletVrij); $Toilet='Vrij'; log('#toiletVrij2 - post'); log('deftrigger openVanBuitenDeurToilet false')")
     
    Rule.eval([[toilet.pir:breached =>
        toilet.Spottoilet:on; toilet.wcLamp:on; log('pirrrrrrrrrrrrrr licht aan')]])

     

    [19.10.2020] [16:40:25] [DEBUG] [QUICKAPP171]: wait(5); publish(#foo) = {"type":"foo"}
    [19.10.2020] [16:40:47] [DEBUG] [QUICKAPP171]: Incoming trigger:{"type":"device","id":225,"property":"lastBreached","old":1603118256,"value":1603118447}
    [19.10.2020] [16:40:48] [DEBUG] [QUICKAPP171]: Incoming trigger:{"type":"device","id":225,"property":"value","old":false,"value":true}
    [19.10.2020] [16:40:48] [DEBUG] [QUICKAPP171]: [true]>>'Rule:4[toilet.deur:breached =>...]'
    [19.10.2020] [16:40:48] [DEBUG] [QUICKAPP171]: Incoming trigger:{"type":"device","id":227,"property":"lastBreached","old":1603118244,"value":1603118447}
    [19.10.2020] [16:40:48] [DEBUG] [QUICKAPP171]: Incoming trigger:{"type":"device","id":227,"property":"value","old":false,"value":true}
    [19.10.2020] [16:40:48] [DEBUG] [QUICKAPP171]: [true]>>'Rule:9[toilet.pir:breached =>...]'
    [19.10.2020] [16:40:50] [DEBUG] [QUICKAPP171]: fibaro.call(39,"turnOn") => nil
    [19.10.2020] [16:40:50] [DEBUG] [QUICKAPP171]: fibaro.call(219,"turnOn") => nil
    [19.10.2020] [16:40:50] [TRACE] [QUICKAPP171]: pirrrrrrrrrrrrrr licht aan

     

    //Sjakie

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • The iCal example from the QA tips&tricks.

    There is a new version of ER4 that allows for string matching in events.

    Normally we can do

    Please login or register to see this code.

    This will bind the ER local variable 'val' to the matched key value of 'bar' in the #foo event.

    We can add constraints to the matching.

    Please login or register to see this code.

    This will only match #foo event with a bar key value > 6, and bind the local val to the value.

    Now we can also use string matching. The operator is '<>'

    Please login or register to see this code.

    and it will match a name key that has a string containing the 'Jan' substring. All of Lua patterns are available.

     

    This we can use to make the iCal example a bit more elegant

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 2 hours ago, Earybeongbeong7 said:

    Is there a way to utilize GPS through HC3 application in ER4?

    Like this?

     

    Link to comment
    Share on other sites

    Jan,

    If arming for example partition and some devices are not safe>>>>>

    "partition has breached devices cancel arming"

    - How to get wich devices are causing this

    - How to  continue the arming

    Sometimes we are short away and a window or door ist close so we want arm.

    Please advice,

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • On 10/24/2020 at 4:42 PM, Sjakie said:

    Jan,

    If arming for example partition and some devices are not safe>>>>>

    "partition has breached devices cancel arming"

    - How to get wich devices are causing this

    - How to  continue the arming

    Sometimes we are short away and a window or door ist close so we want arm.

    Please advice,

    //Sjakie

     

    I guess you could pick up the names of the breached devices and add them to the message

    Please login or register to see this code.

     

    Edited by jgab
    Link to comment
    Share on other sites

  • Topic Author
  • So there is a new version of my Hue QA

    The nice thing is that lights supports startLevelIncrease & friends - like other dimmable devices.

    fibaro.call(id,"startLevelIncrease") starts a loop that increases the light of a devices. It turns on the device if it is off.

    fibaro.call(id,"startLevelDecrease") starts a loop that decreases the light of a devices.

    fibaro.call(id,"stopLevelChange") stops the loop.

     

    centralSceneDevices like the keyfob do emit 'HeldDown' and 'Released' events when a button is held down for a while and subsequently released.

     

    To assign dim up and dim down on button 1 and 2 of the keyfob the rules look like

    Please login or register to see this code.

    We start the dimming loop when we hold the buttons down and we stop the loop when we release the buttons

    Support for :leveIncrease & friends is available in ER4 v0.5fix32.

     

    The childrenOfHue QA also supports scenes and storing default startup values for lights (like,  start with a red light when lamp is turned on). There is no direct ER support for that yet but can be used with fibaro.call(....

     

     

     

     

     

     

     

    Link to comment
    Share on other sites

    On 10/21/2020 at 4:19 PM, jgab said:

    The iCal example from the QA tips&tricks.

    There is a new version of ER4 that allows for string matching in events.

     

     

    Hi!

     

    Could you please update the .fqa and post in here or on Github under Releases? The one released in your footer links is "V0.5 fix.22".

     

    Thank's!

    Link to comment
    Share on other sites

  • Topic Author
  • 12 minutes ago, robw said:

     

    Hi!

     

    Could you please update the .fqa and post in here or on Github under Releases? The one released in your footer links is "V0.5 fix.22".

     

    Thank's!

    Done.

    (fix22 should autoupdate to fix32 if you enable it.)

     

    I don't upload the fqa to my Github - only the source.

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

    Just now, jgab said:

    Done.

    (fix22 should autoupdate to fix32 if you enable it.)

     

    Thank you for the quick update! :)

     

    Have a nice day!

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