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



jgab

Recommended Posts

  • Topic Author
  • 4 minutes ago, fastvd said:

    ?

    Yes, you gave me a very special case that’s not applicable to most peoples setup. I can’t add code for very special cases.  I’m asking for an example of  how the command could look like to cover the general case without being overly complex to use. I have no idea….

    Link to comment
    Share on other sites

    Hi Guys , been a while , have a little problem with this, can you help?

     

    for i=1,3 do
      label(1311,Label[i]) = log('ghgghgh');
    end

     

    no error , no label update , what i did wrong here ?

     

    Link to comment
    Share on other sites

    On 04.11.2021 at 20:29, jgab said:

    Да, вы дали мне особый случай, который не подходит для большинства людей. Я не могу добавлять код для особых случаев. Я прошу привести пример того, как могла бы выглядеть команда, чтобы охватить общий случай без чрезмерной сложности в использовании. Я понятия не имею….

    OK. I understand you. Let's start with a simple one then:
    1) there is a room with ID = 11
    2) this room has a thermostat ID = 22
    3) This thermostat is connected to the climate panel ID = 33
    4) in this room there is a window opening sensor ID = 44

    exercise:
    if the sensor for the opening of the window in the room is triggered, then through the API tell our climate panel to switch the heating to mode Off (in web on HC3 in climat panel= Choose operating mode for schedule: Off)

    and when the window is closed, turn to Heating mode

    Link to comment
    Share on other sites

  • Topic Author
  • This function will return the mode (if 'mode' parameter is nil) or set mode if 'mode' is provided.

    Please login or register to see this code.

     
    So, this can work

    Please login or register to see this code.

     

    If this works, I can add it to ER4 as a built in function.

    Edited by jgab
    Link to comment
    Share on other sites

    well, logically, about what you need ...
    As far as I understand in programming (and I am almost complete zero), then if I copy ALREADY this code, then it will not work on the current version of ER4?

    Link to comment
    Share on other sites

  • Topic Author
  • 26 minutes ago, fastvd said:

    well, logically, about what you need ...
    As far as I understand in programming (and I am almost complete zero), then if I copy ALREADY this code, then it will not work on the current version of ER4?

    It works on current version.

    Just declare the Lua function

    Please login or register to see this code.

    just above your rules inside the main() function

     

    Link to comment
    Share on other sites

    so far I do not have a window sensor, but there is a garge gate opening sensor ... I use it for a test ...
    1) when the window is opened, the heating went to OFF mode (this can be seen on the screenshot that the garage is in the OPEN status plus at the same time in history we also see the work with the thermostat: Action: Set heating thermostat setpoint)

    Please login or register to see this attachment.

     

    Please login or register to see this attachment.

     

     

     

    2)but when I closed the window, the panel did not return to Heating mode (the status of the garage door we see CLOSE, the rule worked, but the panel remained in OFF mode)

    Please login or register to see this attachment.

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    22 minutes ago, jgab said:

    It works on current version.

    Just declare the Lua function

    Please login or register to see this code.

    just above your rules inside the main() function

     

     

    right?

     

     

     

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Edited by fastvd
    Link to comment
    Share on other sites

  • Topic Author
  • Sorry, the values for heating and cooling should be 'Heat' and 'Cool'.

    Changed in original post.

    • Like 1
    Link to comment
    Share on other sites

    yes it worked. super.
    move on. we have the same initial data, but now we have more
    1) outdoor temperature sensor id=55
    task:
    if the outside temperature is more than -10, then switch the thermostat to manual mode for 12 hours and increase the temperature by 2 degrees than specified in the climate panel for this room
    2) if during these 12 hours the temperature drops below -10, then the climate panel will return to automatic mode.

    this is already more interesting and allows you to very dynamically control the climate.

    Link to comment
    Share on other sites

    3 hours ago, jgab said:

    Sorry, the values for heating and cooling should be 'Heat' and 'Cool'.

    Changed in original post.

    the task I have set is almost elementarily realized by 2 block scenes (almost, since there is no way to compare what the set temperature in the climate panel is and to make it 2 degrees more).
    1) if the temperature is less than -10, then we transfer the bedroom to manual mode for 12 hours
    2) if the bedroom is in manual mode and the temperature is more than -10, then we return the climate to the automatic

    but we are interested in all this in ER4 + to draw out the set temperature from the climate panel and make it 2 degrees more by 12 hours.

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

  • Topic Author
  • Ok,  I don't use climate panel myself so I didn't really have an understanding for it...

    There are functions in Scenes to set how the climate panel is working that seems to be missing in QAs.

    Here is versions of them that can be included in QAs

    Please login or register to see this code.

     

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

  • Topic Author
  • 14 hours ago, fastvd said:

    the task I have set is almost elementarily realized by 2 block scenes (almost, since there is no way to compare what the set temperature in the climate panel is and to make it 2 degrees more).
    1) if the temperature is less than -10, then we transfer the bedroom to manual mode for 12 hours
    2) if the bedroom is in manual mode and the temperature is more than -10, then we return the climate to the automatic

    Please login or register to see this code.

     

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

    Goodmorning Jan,

    For my upcomming move to another house I need to "save" my GV's.

    Is it enough that I add for each GV in QA

    Please login or register to see this code.

    Will setting QA comes if rule create setting?

    Or do I need to do something more to redo all my GV's in a blanc HC3?

    Please advice,

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • You can always create new globals with a rule like you propose.

    It can be a good practice to do that as a rule every time ER starts. If the global already exist nothings happens.

     

    Do you also want to save the actual value of the global too? and transfer it to a new HC3?

    What you could try to do is to read the GV value and save them as quickAppVariables in the QA. Then if you save the QA to a PC/Mac the quickAppVariables are included in the saved .fqa file. When you upload it to the new HC3 you get the quickAppVariables back and can save them as GVs again...

    Link to comment
    Share on other sites

    Jan, Thanks!

    I did the creation part.

    Please login or register to see this code.

    Please login or register to see this code.

    Is this sufficient>
    I am aware it will only fill the GV after a complete cyclus.Please advice,
    //Sjakie

     

    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.

     

    this is super, it greatly expanded the capabilities of ER4 ... I'm going to test it with impatience !!! thanks again

    Link to comment
    Share on other sites

    On 09.11.2021 at 11:00, jgab said:

    Хорошо, я сам не пользуюсь климатической панелью, поэтому у меня действительно не было понимания ...

    В сценах есть функции для настройки работы климатической панели, которые, по-видимому, отсутствуют в QA.

    Вот их версии, которые можно включить в QA.

    Please login or register to see this code.

     

    If I understand correctly, then the old function from the previous message should be replaced with all these new functions that fully disclose the control of the climate panel via the API? Or leave the old function as well?

    Link to comment
    Share on other sites

  • Topic Author
  • Ok, I have created a new way how I install and update my QAs. 

    Please login or register to see this attachment.

    Please login or register to see this image.

    /monthly_2021_11/UpdaterQA.png.be161dc4a22e70bf426b9ab70ec9901b.png" />It can be used to update

    • The QA reads a "manifest" from my GitHub with the latest versions. The date of the latest version is displayed at the first line (here 11/15/21 10:21:22)
    • <<Updates Updates>> switch between the QAs updates available in the manifest
    • Refresh, re-reads the manifest from GitHIb (it does a refresh when restarting the QA too)
    • <<Version Version>> flips between the version of the update. This allows to update to new version or downgrade to older version.
    • Install, install a new copy of the QA and version.
    • <<QA QA>> flips between the installed QAs that can be upgraded with this version.
    • Upgrade/Reinstall/Downgrade will change text label depending on what operations will be done.

     

    It supports EventRunner4 and some other QAs I work on. (QAUpdater can also update itself)

     

    The advantage is that we should be able to upgrade and revert to an older version if the new version crashes. I have made some tests myself and so far it seems to work - but I would be happy with some guinea pigs :-)

    The QAUpdater fetches code from my GitHub at specific points in time and can thus revert to old version easier.

     

    The ER4 (0.66) does not have a lot of new stuff besides that it is based on fibaroExtra instead of the module system as in the past. (it also contains the fibaro.climate functions posted recently)

     

    Because it's based on fibaroExtra it may miss some old functions or just introduced bugs - but if you test it should be revertible to the old version. The update doesn't touch the 'main' file of ER4 so your rules should be intact.

     

    The autoupdate doesn't work yet - all the mechanisms are there I just need to provide some new rules - so for now you update manually using the UpdaterQA.

     

    Edited by jgab
    Link to comment
    Share on other sites

    Wowwww Jan now it will become more easy  for us, thanksssss!

    COH1.18 no action thats a pitty because I use this version, some quick fix?

    COH1.19 it shows in QAUpdater and if I click update it uodates the older version

    ER I dont see anymore???

     

    //Sjakie

    ER still 05 fix 79

     

    Please login or register to see this image.

    /monthly_2021_11/image.png.20c8a6a3df16da4bdb6fab9b3d43da74.png" />

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