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

  • Topic Author
  • 3 hours ago, edwink023 said:

    glad its that simple, i changed it and will see if the error stays away.

    thans you for the quick responds.

    I'm rewriting the rule engine for ER and hopefully the error messages will be better - both when they are defined as well as when they are running.

    It's always been a weakness - the difficulty to understand what is wrong with a rule that throws an error.

    Link to comment
    Share on other sites

    On 11/9/2021 at 11:30 AM, jgab said:

    Please login or register to see this code.

     

    hello Jan. I have been using the ER4 + climate panel for several months now, everything is fine. Thank you again.
    But now there is a new problem and it is called "MINIMUM OPERATING TEMPERATURE":
    1) when using classic types of heating (underfloor heating or radiators), all thermostats just do on / off and we have enough to do in the same climate panels with ER4 to do virtually any manipulation.
    2) But when using air conditioning heating, it's not!
    2.1) What I mean: if, for example, you want our office temperature to be 20 degrees in the morning, then say 18 degrees in the afternoon, then everything is OK - the climate panel changes the temperature and the air conditioner also changes it.

    2.2) The nuance is that for example my AC GREE can PHYSICALLY MINIMUM OPERATING TEMPERATURE of 16 degrees, and we say we need 14 degrees at night in the office, but the climate panel can not send OFF and AC will just keep 16 degrees

    3) So there was a simple idea: in ER4 read the temperature of the climate panel, and if we say it is less than 16 degrees (the minimum temperature supported by my AC GREE), then set the AC mode OFF
    4) And otherwise - if the set temperature in the climate panel is higher than the MINIMUM OPERATING TEMPERATURE - to return the AC operation on the climate panel.
    I hope the idea is clear)

    How to read the set temperature from the climate panel?

    Edited by fastvd
    Link to comment
    Share on other sites

  • Topic Author
  • I'm not using the climate panel so I'm not an expert on this.

    api.get("/panels/climate/1").properties.currentTemperatureHeating

    and

    api.get("/panels/climate/1").properties.currentTemperatureCooling

    is the temperatures  it will start to heat and cool at.

    I guess it's cooling you want to trigger on?

     

    Maybe something like below, checking every 5min?

     

    rule("@@00:05 => api.get("/panels/climate/1").properties.currentTemperatureCooling  < 16 & ac:off  | ac:on")

     

    Assuming that ac:on when the AC is on doesn't have any harmful affect.

    Edited by jgab
    Link to comment
    Share on other sites

    2 hours ago, jgab said:

    I'm not using the climate panel so I'm not an expert on this.

    api.get("/panels/climate/1").currentTemperatureHeating

    and

    api.get("/panels/climate/1").currentTemperatureCooling

    is the temperatures  it will start to heat and cool at.

    I guess it's cooling you want to trigger on?

     

    Maybe something like below, checking every 5min?

     

    rule("@@00:05 => api.get("/panels/climate/1").currentTemperatureCooling  < 16 & ac:off  | ac:on")

     

    Assuming that ac:on when the AC is on doesn't have any harmful affect.

    1) yes, the temperature should be a trigger.
    2) did not fully understand how this rule works

    rule("@@00:05 => api.get("/panels/climate/1").currentTemperatureCooling  < 16 & ac:off  | ac:on") ????

    3) how can I physically see this temperature so that I can work with it later?

    Edited by fastvd
    Link to comment
    Share on other sites

  • Topic Author
  • 24 minutes ago, fastvd said:

    1) yes, the temperature should be a trigger.
    2) did not fully understand how this rule works

    rule("@@00:05 => api.get("/panels/climate/1").currentTemperatureCooling  < 16 & ac:off  | ac:on") ????

    3) how can I physically see this temperature so that I can work with it later?

    So there are 2 temperature - when to cool and when to heat.

    api.get("/panels/climate/1").properties.currentTemperatureCooling

    api.get("/panels/climate/1").properties.currentTemperatureHeating

     

    You can add this rule to get the (cool) temp when it changes 

     

    Util.defTriggerVar("zone1temp",0)

    rule("zone1temp => log('New cooling temp:%s',zone1temp)")

    rule("@@-00:01 => zone1temp = api.get('/panels/climate/1').properties.currentTemperatureCooling").start()

     

    And then

    rule("zone1temp < 16 => ac:off")

    rule("zone1temp > 16 => ac:on")

    Link to comment
    Share on other sites

    YES, it works !! BRAVO!
    Thank you again!

    PS: I was close, just did not know that given the word properties in the rule)

    Link to comment
    Share on other sites

  • Topic Author
  • 1 minute ago, fastvd said:

    YES, it works !! BRAVO!
    Thank you again!

    PS: I was close, just did not know that given the word properties in the rule)

    Yes, I made that mistake too.

    Link to comment
    Share on other sites

    Guest kallecux

    Hello @jgab, i love your ER4 its realy great!! Thanks for your good work!

     

    I used until today the version V5.0 and every things is correct, but after update  to V0.75 this is not working.

     

    I send an event from homeassistant to react in ER4, but now (V0.75) there is no event coming.

     

    This is HomeAssistant:

     

      geolocation_kh:
        url: "http://192.168.3.116/api/devices/791/action/RECIEVE_EVENT"
        method: post
        content_type: "application/json"
        username: "HomeAssistant"
        password: "XXXXXXXXXXX"
        payload: '{"args":[{"type":"x","ev":{"type":"geolocation", "person":"Karl Heinz", "location":"{{ states.device_tracker.iphone_karl_heinz.state }}"}}]}'
     

    and this is ER4:

     

    rule("#geolocation{person='Karl Heinz',location='home'} => $location_khh='Zuhause'; log('HA: Karl Heinz Zuhause')")

     

    Do you have a hint - thanks and greetings!

    Karl Heinz 

    Link to comment
    Share on other sites

  • Topic Author
  • This works for me

     

    Do you add the X-Fibaro-Version header?

    Is "location":"{{ states.device_tracker.iphone_karl_heinz.state }}"

    creating "location":"home"

    ? (some string interpolation?)

     

    You would see a "onAction: {"deviceId":791,"actionName":"RECIEVE_EVENT",... }

    log in the console if the event arrives on the HC3 (before ER4 gets it)

     

    Link to comment
    Share on other sites

    Guest kallecux

    I have to checkout how to implement the X-Fibaro header, (it worked without this)

    yes the string ist "home"

    i don't know how to use "onAction: {"deviceId":791,"actionName":"RECIEVE_EVENT",... }" :-)

     

    I will try.....thanks...i made a rollback to  Current version is 0.5 - fix80 - but i does not work again.

     

    Greetings Karl Heinz 

    Link to comment
    Share on other sites

    Guest kallecux

    Hi @jgab thanks for your help - i did it.

     

    I have an extra User only with access to ER4 - but the ID of the QA has changed, so there was no access - sorry - for the hassle.

    Nice weekend!

    Link to comment
    Share on other sites

    Hello @jgab, begin to use your ER4 on HC3. A lot of rules are clear. After successing setting variable TimeOfDay i would variable Season set on trigger of timespace of month. I tried for example 

    rule("@{catch, month('nov-feb')} => $Season = 'winter'") or rule("@{catch, month('11-02')} => $Season = 'winter'") without succes. I thing there is just a bug in my notation. Didn't found a example in your rules-posts. Please can you give me an example?

    Thanks in advance.
    Link to comment
    Share on other sites

  • Topic Author
  • 2 hours ago, Speedo67 said:

    Hello @jgab, begin to use your ER4 on HC3. A lot of rules are clear. After successing setting variable TimeOfDay i would variable Season set on trigger of timespace of month. I tried for example 

    rule("@{catch, month('nov-feb')} => $Season = 'winter'") or rule("@{catch, month('11-02')} => $Season = 'winter'") without succes. I thing there is just a bug in my notation. Didn't found a example in your rules-posts. Please can you give me an example?

    Thanks in advance.

    Please login or register to see this code.

    You can only do triggers daily ,  so run daily and then check if it's the season and if so  set the variable.

    It's the simplest way to do it.

    Also add .start() so the rule runs when ER starts uo so that it will set the variable if not.

    As long as $Season is set to the same value it will not trigger other rules or scenes.

    Link to comment
    Share on other sites

    Guest kallecux

    Good morning @jgab,

     

    i have a QA (BinarySensor) and i change the displayed label with self:updateProperty("log", "TEXT"). Is there a way to react in ER4 of the change of the label "TEXT". 

    Thanks!

    Karl Heinz 

    Link to comment
    Share on other sites

  • Topic Author
  • rule("#device{id=88,property='log',value='$logText'} => log('Device 88 has new log text:%s',logText)")

     

    Link to comment
    Share on other sites

    Guest kallecux

    Sorry,

    it does not work. 

     

    I have an QA with ID 810.

    Inside the QA i have a loop, were every 5 seconds the log-Text is modified.

    Please login or register to see this image.

    /monthly_2022_02/image.png.4bef525173d1f5a3440cdcf332c95f32.png" />

    In ER4 i have this rule:

     

    rule("#device{id=810, property='log'} => log('Device-Log wurde geändert')")

     

    and

     

    rule("#device{id=810,property='log',value='$logText'} => log('Device 88 has new log text:%s',logText)")

     

    But there is no Log and no Error-log in ER4 - what is going wrong....Thanks!

     

    Karl Heinz 

     

    Link to comment
    Share on other sites

    Quick question, is there a way to set hue colours with event runner 4 on the HC3?

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, kallecux said:

    Sorry,

    it does not work. 

     

    I have an QA with ID 810.

    Inside the QA i have a loop, were every 5 seconds the log-Text is modified.

    Please login or register to see this link.

    In ER4 i have this rule:

     

    rule("#device{id=810, property='log'} => log('Device-Log wurde geändert')")

     

    and

     

    rule("#device{id=810,property='log',value='$logText'} => log('Device 88 has new log text:%s',logText)")

     

    But there is no Log and no Error-log in ER4 - what is going wrong....Thanks!

     

    Karl Heinz 

     

    Strange, it works for me...

    If you add 

    Please login or register to see this code.

    in the  beginning of ER4 (where the other debugFlags are set) and see if you get a console message in ER

    Please login or register to see this code.

    when you set the log property in your QA?

    If  so, it's a sign that ER gets the trigger...

    38 minutes ago, Joel said:

    Quick question, is there a way to set hue colours with event runner 4 on the HC3?

    Yes, you can call existing Hue QAs to set colors or you can provide your own http call to set the colors.

    Link to comment
    Share on other sites

    3 minutes ago, jgab said:

     

    Yes, you can call existing Hue QAs to set colors or you can provide your own http call to set the colors.

     

    I have the standard fibaro QA for Hue, obviously with hue there is on, off, colour setting and brightness levels, is there a way to see which values are what inside the QA?

     

    I am guessing I can do hue:<parameter> => value, if I can find out what the parameter names are?

     

     

     

     

    Link to comment
    Share on other sites

    Guest kallecux

    Sorry, but i will not work:

     

    This is the QA:

     

    Please login or register to see this attachment.

     

    and this is the rule log:

     

    Please login or register to see this attachment.

     

    and yes, there are many logs after your debug-hint, but no one from device 810.

     

    Greetings.

    Karl Heinz 

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