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

On 10/14/2023 at 11:00 AM, jgab said:

Sorry, need more info. Both 'now' and 'sunrise' haven't changed for years...

Jan, Thanks.

Indeed problem was a faulthy GV.

Link to comment
Share on other sites

@jgabHello Jan, we have two questions:

 

1. Does ER4 offer any possible way to update a Quickapp Switch device property upon another device state change? But only the state..this is the main problem. From inside a quickappp itself i can call self:updateProperty('value', true). This usually happens hand in hand with self:turnOn function. But we don't want to change the QA's state, when it gets turned on. We want to change its state, only when some other devices change their state. A simple example is a group of lights, that are controlled by this QA switch. When user turns on the QA switch, all the lights defined in a group will get turned on by a rule rule("QAswitch:isOn => lightsGroup:on "), but we need to control the QASwitch state upon the lightsgroup lights state, and not automatically set its state inside it's self:turnOn function. So if any light state in the lightGroup changes to true, then the QASwitch state should change to true. Is there any workaround? Or we need to define event listeners right insied the QASwitch quickapp, and listen to lightGroup devices state change, and right there set the QASwitch state with self:updateProperty function. I know, this is working this way, but i am wondering, if there is no other, more felxible way from ER4 somehow?

 

2. What us the pattern of interactivePush messages in ER4?

 

thanks ahead

Link to comment
Share on other sites

  • Topic Author
  • Please login or register to see this code.

     

    :state returns a list of the true and false states of the group and we loop over the list to see if there are any true values...

     

    (something like listAnd will be in ER5 as it will support property list filters... )

    • Like 1
    Link to comment
    Share on other sites

  • Topic Author
  • 27 minutes ago, Neo Andersson said:

    @jgab

    2. What us the pattern of interactivePush messages in ER4?

     

    thanks ahead

     

     

    Oh, interactivePush - no, nothing special in ER4 - haven't had interactivePush working for me for a long time.

    There is support in fibaroExtra that is included in ER4.

    Link to comment
    Share on other sites

    @jgab
    manual      
    Is there a better way to express this, such as isOn isOff

    Please login or register to see this code.


     

    Link to comment
    Share on other sites

  • Topic Author
  • I'm not sure what you want to accomplish?

    Would you like to do

    Please login or register to see this code.

    to see if any of the devices was manual???

    No, you can't. But can do

    Please login or register to see this code.

    which will return >= 0 if any device was manual...

    • Like 1
    Link to comment
    Share on other sites

    Jan is there a way to accomplish?

    Humidity bathroom if value goes up > 2 it starts _Stand_2

    If value higher than 5 it start _Stand_3

    I want if the value was above 5 and comes down to stop the fan because it will take too long time to come back to start value.

    fyi average humidity apartment 8 degrees lower than bathroom

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 4 hours ago, Sjakie said:

    Jan is there a way to accomplish?

    Humidity bathroom if value goes up > 2 it starts _Stand_2

    If value higher than 5 it start _Stand_3

    I want if the value was above 5 and comes down to stop the fan because it will take too long time to come back to start value.

    fyi average humidity apartment 8 degrees lower than bathroom

    Please login or register to see this code.

     

    You can keep track of the previous Afz_Badkamer_Delta, and then see if its going down or up

    Like 

    Please login or register to see this code.

     

    Edited by jgab
    Link to comment
    Share on other sites

    Jan getting error

     

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 2 hours ago, Sjakie said:

    Jan getting error

     

    Please login or register to see this code.

     

    Sorry, first rule should be an '&' instead of 'or'. I have changed in the post.

    Link to comment
    Share on other sites

    @jgab thank you ,i will try :
     

    7 hours ago, jgab said:

    I'm not sure what you want to accomplish?

    Would you like to do

    Please login or register to see this code.

    to see if any of the devices was manual???

    No, you can't. But can do

    Please login or register to see this code.

    which will return >= 0 if any device was manual...

     

    Link to comment
    Share on other sites

    Hello. I haven't followed the forums in a while and maybe something has changed that I don't know...I'm running a new HC3 at my friend's and installed ER4 0.961 from scratch via QA Updater, v:0.67 and started porting some rules from my ER4 which is still dragging from version 0.5 and also updated to the latest... everything is fine with me, but with the new ER4 there is some problem... the elementary rule does not work! Maybe there are some changes or something is not installed correctly?

     

    I already did it even for the test... the point is that the message should come to me every day at 4:00 p.m., but if I even restart ER4 at, say, 5:00 p.m., the message should catch up with the time and go away... but it DOESN'T COME!
     telegram works 100%, because all other messages from ER4 arrive correctly... until I noticed a problem with CATCH

     

    rule(" @{16:00,catch} => fibaro.call(teleg_sasa, 'sendMessage', fmt('test'), -4000753263)")
     

    Please login or register to see this image.

    /monthly_2023_10/image.png.3c70aa8cdc7dce8cd58dc2da37022d90.png" />
     
    in the logs it says that this rule does not have a trigger! Although I do not understand how this can be, if we clearly have a POST or CATCH! especially since there are a LOT of such rules in other dozens of HC3+ER4!
    Edited by fastvd
    Link to comment
    Share on other sites

  • Topic Author
  • 15 hours ago, fastvd said:

    Hello. I haven't followed the forums in a while and maybe something has changed that I don't know...I'm running a new HC3 at my friend's and installed ER4 0.961 from scratch via QA Updater, v:0.67 and started porting some rules from my ER4 which is still dragging from version 0.5 and also updated to the latest... everything is fine with me, but with the new ER4 there is some problem... the elementary rule does not work! Maybe there are some changes or something is not installed correctly?

     

    I already did it even for the test... the point is that the message should come to me every day at 4:00 p.m., but if I even restart ER4 at, say, 5:00 p.m., the message should catch up with the time and go away... but it DOESN'T COME!
     telegram works 100%, because all other messages from ER4 arrive correctly... until I noticed a problem with CATCH

     

    rule(" @{16:00,catch} => fibaro.call(teleg_sasa, 'sendMessage', fmt('test'), -4000753263)")
     

    Please login or register to see this link.

     
    in the logs it says that this rule does not have a trigger! Although I do not understand how this can be, if we clearly have a POST! especially since there are a LOT of such rules in other dozens of HC3+ER4!

    Hi, yes there was a bug in the latest version of ER for catch that was introduced in the last fix - I have updated it now in v0.998 of ER4

    ER4 is version 0.998 now (0.961 is the log message for the fibaroExtra library used)

    The [not triggered] log message says that the rule has not yet been triggered - which was of course true when the catch was broken and didn't run the rule.

    • Like 1
    Link to comment
    Share on other sites

    On 10/18/2023 at 2:28 PM, jgab said:

    Please login or register to see this code.

     

    :state returns a list of the true and false states of the group and we loop over the list to see if there are any true values...

     

    (something like listAnd will be in ER5 as it will support property list filters... )

    @jgab

     

     

    Hello Jan.

    I think we can't achieve the proper functionality in ER4 for our case, or if you can find any solution, that would be nice. A simple scenario, that is commonly used in many many cases in my installations. So far we had to create separate quickapps for every such device.

    We have a realRelay (that opens the gate), a realSensor (that checks the gate state) and a quickappGate switch that wraps these together, and customer sees only the quickappGate.

     

    Our quickapps work like this at this point

    1. When user presses quickappGate, it turnsOn the realRelay , but without affecting the quickappGate status (the self:updateProperty is not called in the quickappGate turnOn function)

    2. When gate opens, the realSensor got breached, so we listen to that event in quickappGate and only now we change its status to true. So user sees if the gate is opened in real.

    The same goes for closing.

     

    So i wanted to achieve the same in ER, but i think it is impossible.

    Even with help of ER4, we need to create the quickapGate anyhow thats celar, (with removed "updateProperty" code line inside turnOn, turnOff functions), because that is the interface for user, but the advantage would be that we wouldn't need to code the functionality inside the quickapp but rather in ER.

     

    when i wanted to call 

    rule(quickapGate:isOn=>realRelay:on ) --this doesn't work. I think this is because in quickapGate we removed the updateProperty from the turnOn function, so ER does not now, that the turnOn function is called as it monitors the value property of the quickapGate, and that did not change. (it should only change when the realSensor changes)

     

    In one workd, just confirm me please (just no not crack my head anymore) that this is achievable only like we do it now. In separate quickapps.

     

    Thanks

     

    Link to comment
    Share on other sites

  • Topic Author
  • 10 minutes ago, Neo Andersson said:

    @jgab

     

     

    Hello Jan.

    I think we can't achieve the proper functionality in ER4 for our case, or if you can find any solution, that would be nice. A simple scenario, that is commonly used in many many cases in my installations. So far we had to create separate quickapps for every such device.

    We have a realRelay (that opens the gate), a realSensor (that checks the gate state) and a quickappGate switch that wraps these together, and customer sees only the quickappGate.

     

    Our quickapps work like this at this point

    1. When user presses quickappGate, it turnsOn the realRelay , but without affecting the quickappGate status (the self:updateProperty is not called in the quickappGate turnOn function)

    2. When gate opens, the realSensor got breached, so we listen to that event in quickappGate and only now we change its status to true. So user sees if the gate is opened in real.

    The same goes for closing.

     

    So i wanted to achieve the same in ER, but i think it is impossible.

    Even with help of ER4, we need to create the quickapGate anyhow thats celar, (with removed "updateProperty" code line inside turnOn, turnOff functions), because that is the interface for user, but the advantage would be that we wouldn't need to code the functionality inside the quickapp but rather in ER.

     

    when i wanted to call 

    rule(quickapGate:isOn=>realRelay:on ) --this doesn't work. I think this is because in quickapGate we removed the updateProperty from the turnOn function, so ER does not now, that the turnOn function is called as it monitors the value property of the quickapGate, and that did not change. (it should only change when the realSensor changes)

     

    In one workd, just confirm me please (just no not crack my head anymore) that this is achievable only like we do it now. In separate quickapps.

     

    Thanks

     

    Hey, everything is doable in ER :-) 

     

    If your QuickApp is a binarySwitch it has 2 properties - a value property that is true/false used by the :isOn and :on and it also decides the icon in the UI (on-green or off-red)

    It also has a 'state' property that is also true/false - This property can be used to achieve what you want.

     

    You QuickApp must have the turn on and turn off methods, but it only updates the state property

    Please login or register to see this code.

     
    In ER you have rules

    Please login or register to see this code.

    So, the QAs ON button only sets the state and waits for the sensor to set the QAs value

    Now the QA goes to "off" when the sensor is off - your use case may require different

    • Like 1
    Link to comment
    Share on other sites

    4 minutes ago, jgab said:

    Hey, everything is doable in ER :-) 

     

    If your QuickApp is a binarySwitch it has 2 properties - a value property that is true/false used by the :isOn and :on and it also decides the icon in the UI (on-green or off-red)

    It also has a 'state' property that is also true/false - This property can be used to achieve what you want.

     

    You QuickApp must have the turn on and turn off methods, but it only updates the state property

    Please login or register to see this code.

     
    In ER you have rules

    Please login or register to see this code.

    So, the QAs ON button only sets the state and waits for the sensor to set the QAs value

    Now the QA goes to "off" when the sensor is off - your use case may require different

    You are a god..

    Link to comment
    Share on other sites

    42 minutes ago, jgab said:

    Hey, everything is doable in ER :-) 

     

    If your QuickApp is a binarySwitch it has 2 properties - a value property that is true/false used by the :isOn and :on and it also decides the icon in the UI (on-green or off-red)

    It also has a 'state' property that is also true/false - This property can be used to achieve what you want.

     

    You QuickApp must have the turn on and turn off methods, but it only updates the state property

    Please login or register to see this code.

     
    In ER you have rules

    Please login or register to see this code.

    So, the QAs ON button only sets the state and waits for the sensor to set the QAs value

    Now the QA goes to "off" when the sensor is off - your use case may require different

    @jgab Jan this doesn't work, The line 

    Please login or register to see this code.

    the rule triggers, but the right side does nothing. In quickappGate i have this

     

    Please login or register to see this code.

    Link to comment
    Share on other sites

    43 minutes ago, Neo Andersson said:

    @jgab Jan this doesn't work, The line 

    Please login or register to see this code.

    the rule triggers, but the right side does nothing. In quickappGate i have this

     

    Please login or register to see this code.

    Jan i have created 3 test devices, to test what is happening

    Just for testing, so i dont need to open/close my gate all the day. the same logic that you recommended is used here .

     

    Please login or register to see this code.

     

    However, when I change the testGateSensor state (created buttons to run updateProperty for the sensor, so i can test when state changes)

    So something really strange happens

    The testGateRelay also chnages to ON. For some reason

     

    This is from debug window.

     

    [true]>>'Rule:2[testGateSensor:breached=>testGate:value=true]'[21.10.2023] [12:54:23] [DEBUG] [QUICKAPP2311]:

    [false]>>'Rule:3[testGateSensor:safe=>testGate:value=false;testGate:state=false]'[21.10.2023] [12:54:24] [DEBUG] [QUICKAPP2311]:

    [true]>>'Rule:1[testGate:state==true=>testGateOriginal:on]'

     

    Link to comment
    Share on other sites

  • Topic Author
  • Ok, it turned out that it was an interesting issue...

    id:value=true does not translate to a property update for a binary switch, but to a :turnOn 

    which calls your QAs QuickApp:turnOn function that only sets the state...

     

    To get around that, we need to set the properties directly, do

    Please login or register to see this code.

     

    Edited by jgab
    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...