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

10 minutes ago, jgab said:

Yes, the issue was that my parser was too strict and considered a semicolon at the end of a || >> ...; 

to be an error. (It is unnecessary)

Yes, that was what I did. I took 49 and called it 51 so you could "upgrade" to a functioning version.

I found out. I was because the update rules where in the buttom of the rules

these

 

Please login or register to see this code.

and because of the other error you mentioned . it didnt update

Please login or register to see this attachment.

Link to comment
Share on other sites

  • Topic Author
  • 5 minutes ago, ChristianSogaard said:

    I found out. I was because the update rules where in the buttom of the rules

    these

     

    Please login or register to see this code.

    and because of the other error you mentioned . it didnt update

    Please login or register to see this attachment.

    Yes, my thinking is that I will download the beta versions of the QA files (if any) and store them in the same ER QA together with the "stable" files.

    Then a quickAppVariable that is set to either 'stable' or 'beta' will select what version of files are used when restarting the QA.

    Then when no one complains about the beta I will upgrade the stable to the beta.

    This way it is easy to try out the beta and revert if it fails,

    • Thanks 1
    Link to comment
    Share on other sites

    Yes, the issue was that my parser was too strict and considered a semicolon at the end of a || >> ...; 

    to be an error. (It is unnecessary)

    This was confusing me but I managed all QA's without error

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • Just now, Sjakie said:

    Yes, the issue was that my parser was too strict and considered a semicolon at the end of a || >> ...; 

    to be an error. (It is unnecessary)

    This was confusing me but I managed all QA's without error

    //Sjakie

    v51 will give you the MIDNIGHT event error again. Fix tomorrow in v52

    Link to comment
    Share on other sites

    I will stay on the old 50 no problem all is working.

    //Sjakie

    Link to comment
    Share on other sites

    Jan, how to start a rule with,

    Please login or register to see this code.

    Thanks,

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 32 minutes ago, Sjakie said:

    Jan, how to start a rule with,

    Please login or register to see this code.

    Thanks,

    //Sjakie

    You can't.

    The @rule is only 24hours.

    You test every day at 12:18 if it's the right date.

    Rule.eval("@12:18 & day('5') & month('10') => ....

    Link to comment
    Share on other sites

    On 1/8/2021 at 12:18 PM, jgab said:

    Ok, I think this will work...

    Here is a shortcut that I have done on my iPhone.

    Please login or register to see this link.

     

    If you in settings->shortcuts has checked allow untrusted shortcuts it should be possible to click on the link from your iPhone and import the shortcut.

     

    When the shortcut is imported open it and edit it.

    First the URL, It should be:

    http://<Your HC3IP>/api/devices/<ER4 QA ID>/action/RECIEVE_EVENT

    Then open "Show more" and change the Authorization header to your own credentials. (base64 encoded)

     

    Then go down to Request body and open the 'args' items

    Open the next level, and then the next again (the 'ev' key)

    The last level says

    'type'     'test'

     

    When I click on the shortcut it sends an event to my ER4 QA that I can pick up easily

     

    rule("#test => lights:off")

     

    It only works when my iPhone is on the local network, but its is convenient way to talk to ER4 without needing to go through other services or QAs...

     

     

     

    Hi Jan.

     

    Is is possible to do the same not using IOS? - have a button on a website that can trigger a switch? or should that be done through the FIBARO Assistant Integrations?

    Link to comment
    Share on other sites

  • Topic Author
  • 11 hours ago, ChristianSogaard said:

    Hi Jan.

     

    Is is possible to do the same not using IOS? - have a button on a website that can trigger a switch? or should that be done through the FIBARO Assistant Integrations?

    You can always call the HC3 REST API and send an "event" to a ERR4 QA. The trick is how you can access the HC3 if it doesn't sit on the same network.

    The iOS shortcut only work if the iPhone/Mac sits on the same network as the HC3. It doesn't work if your iPhone is outside the home. It relies on the fact that it can call an URL that points to the HC3.

     

    To send an event {type="test", val=42} to ER4 with deviceID 53

    Please login or register to see this code.

    and it can be triggered with the rule

    Please login or register to see this code.

    Note that the event needs to be stuffed inside an event (x), it's kind of a bug that I will fix in the future.

     

    Link to comment
    Share on other sites

    14 minutes ago, jgab said:

    You can always call the HC3 REST API and send an "event" to a ERR4 QA. The trick is how you can access the HC3 if it doesn't sit on the same network.

    The iOS shortcut only work if the iPhone/Mac sits on the same network as the HC3. It doesn't work if your iPhone is outside the home. It relies on the fact that it can call an URL that points to the HC3.

     

    To send an event {type="test", val=42} to ER4 with deviceID 53

    Please login or register to see this code.

    and it can be triggered with the rule

    Please login or register to see this code.

    Note that the event needs to be stuffed inside an event (x), it's kind of a bug that I will fix in the future.

     

    Thanz Jan :-) was more into from a webpage on the Internet. 

    Link to comment
    Share on other sites

    Jan,

    Question about devices.

    Fa my curtain has two positions open or close. I dont use any position in between.

    At the moment I will close the curtain it immediatley show position as closed, practically its still closing. In my opinion it should report close as it is closed!

    Is this also for all devices?

    Thanks in advance,

    //Sjakie

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • 52 minutes ago, Sjakie said:

    Jan,

    Question about devices.

    Fa my curtain has two positions open or close. I dont use any position in between.

    At the moment I will close the curtain it immediatley show position as closed, practically its still closing. In my opinion it should report close as it is closed!

    Is this also for all devices?

    Thanks in advance,

    //Sjakie

    I don't have any device of that kind so I'm a bit unsure how it reacts.

    What value does it report when closed? and when fully opened? (device:value)

    device:isOpen is true for every value > 0.

    device:isClosed is true for value == 0

    It may work to test against 99 (if it's 99 when fully opened)

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    2 hours ago, jgab said:

    You can always call the HC3 REST API and send an "event" to a ERR4 QA. The trick is how you can access the HC3 if it doesn't sit on the same network.

    The iOS shortcut only work if the iPhone/Mac sits on the same network as the HC3. It doesn't work if your iPhone is outside the home. It relies on the fact that it can call an URL that points to the HC3.

     

    To send an event {type="test", val=42} to ER4 with deviceID 53

    Please login or register to see this code.

    and it can be triggered with the rule

    Please login or register to see this code.

    Note that the event needs to be stuffed inside an event (x), it's kind of a bug that I will fix in the future.

     

    i mean - from a website at the INternet. Outside your home. Can you integrate something at an internet website, using the same integration as google Home, Alexa?

    Link to comment
    Share on other sites

    Jan, yes I use value but it still stay the same.

    If value becomes smaller than 99 it will change state instead of waiting till 0 is the new value.

    ok for my log I use 99 and 0 but that is not as I thought it supposed to be.

    But I guess it will be Fibaro setting.

    //Sjakie

     

    Link to comment
    Share on other sites

    Jan, Question about HC2

    My daughter wants some home protection there for she takes my HC2.

    I am "in charge" of setting it up for her.

    I have from you the empty mail box rule.

    Can I extend it with automatic restart HC2?

    Thnaks in advance,

    //Sjakie

    Link to comment
    Share on other sites

    Jan,

    I have  a problem again.

    Curtains operating for months without any problem today curtain (gorijnOpRit) did not close.

    Please login or register to see this code.

    According debug the command was given. The curtain was just a tad not complete open I dont know if HC3 started to close for  a part of a second???

    The Rule is:

    Please login or register to see this code.

    I added to prevent again malfunction      wait(00:00:05); woonKamer.gordijnOpRit:close;

    Any idea what I can improve or is this Fibaro? This happends also a few days ago with a HUE light

    Thanks,

    //Sjakie

    Link to comment
    Share on other sites

    Jan, problem HC2 Aeotex doorbell. This work, debug show deurbel - belt

    Please login or register to see this code.

    This does not work

    Please login or register to see this code.

    hal.deurBell is in properties as 1311 value

    Any hint?

    //Sjakie

    Link to comment
    Share on other sites

    I'm new to ER4 and I'm sure to be asking stupid questions. I have a few time rules

    that work.

    What is the difference between rule() and Rule.eval()?

    And why does this rule not work: Rule.eval([[RainSensor:value == true & Markise < 99 => fibaro.call(Markise,'setValue',99)]])

    Thanks for hints.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 8 hours ago, jwi said:

    I'm new to ER4 and I'm sure to be asking stupid questions. I have a few time rules

    that work.

    What is the difference between rule() and Rule.eval()?

     

    They are the same function. In the old ER for HC2 it was Rule.eval() and sometimes redefined as just rule()

    In ER4 I have defined Rule.eval to be backward compatible, but I would recommend to just use rule (shorter to write).

    You can see that in the beginning of ER4's main() that it is defined as

    local rule = function(...) return self:evalScript(...) end

     

    8 hours ago, jwi said:

    And why does this rule not work: Rule.eval([[RainSensor:value == true & Markise < 99 => fibaro.call(Markise,'setValue',99)]])

    Thanks for hints.

     

    When you test Markise value, you need to get it's value property.

    Please login or register to see this code.

    To set the value of Markise you can do 

    Please login or register to see this code.

    I'm happy to answer basic/easy questions - they are the best - so keep them coming :-)

    10 hours ago, Sjakie said:

    Jan, problem HC2 Aeotex doorbell. This work, debug show deurbel - belt

    Please login or register to see this code.

    This does not work

    Please login or register to see this code.

    hal.deurBell is in properties as 1311 value

    Any hint?

    //Sjakie

    Because you are missing a '=>' ?

    Please login or register to see this code.

     

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