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


  • 0

HC3 Quick App for controlling AC units


laurgh
 Share

Question

Hello,

 

I am trying to create in HC3 a quick app which is controlling my DAIKIN air condition units. The interface and possibilities offered by quick app are very limited, especially from controls point of view where I have access to buttons, labels and sliders. I'm struggling actually to write code in order to avoid different operator actions(I mean, I would like to make this interface usable by anybody not only by myself): for example it would be nice to have the possibility to disable one button if the action performed by that button is already performed (if the AC unit is in AUTO mode I would like to disable the AUTO button) or it would be nice to have the possibility to change the colour of some controls (for example if for some reason I am losing the connection with the AC unit I would like to show a message to the operator but in red colour).

 

Anyway, at the end I am sure that I will be able to control the AC units by using this quick app but still there is a lot of place to improve in order to make it more user friendly.  Can you imagine that I have to set the temperature by moving a slider. More than that, because I have no possibility to change the limits of the slider, I have to write a lot of code which is actually ignoring or issuing some error messages when wrong values are selected. Is not a big deal of writing code but there is a huge difference between DAIKIN app interface and the interface which I can design in Quick App. See below some screenshots.

 

Is there any possibility to call some external apps from HC3, for example the apps designed by DAIKIN for managing the AC units. Or, do I have the possibility to call some routines which are programmed in some other programming languages which are a bit more flexible?


Thanks in advance, 

Laurentiu

 

Daikin APP:

Please login or register to see this image.

/monthly_2020_05/image.png.b72afceb284b4e6b5938f8c471fdacb2.png" />

 

My App:

 

image.png.0286bb89952e2cf805272483560f0387.png

Link to comment
Share on other sites

Recommended Posts

  • 0

Sorry I don't.. I just managed my Daikin with a dummy ON/OFF switch.. Your QA is already much better from what I managed to have.. But that's enough to me. I just need to be able to automate start/stop and cooling/heating in a scene. 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Thanks a lot for your answer.

     

    Hope that FIBARO will start to improve soon the possibilities to develop quick apps in their HC3. This would leave an open field for integrating products which are now not supported or they don't have an interface.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Hello BerndKlewes,

     

    I have somehow used the HC2 code as an example but then I found on Internet different descriptions of the parameters. For example here: 

    Please login or register to see this link.

     

    I am sending you attached my quickapp but it is still under construction. 

    Please login or register to see this attachment.

    • Thanks 1
    Link to comment
    Share on other sites

    • 0

    Hey

     

    thank you 

    On 5/10/2020 at 2:26 PM, laurgh said:

    Hello,

     

    I am trying to create in HC3 a quick app which is controlling my DAIKIN air condition units. The interface and possibilities offered by quick app are very limited, especially from controls point of view where I have access to buttons, labels and sliders. I'm struggling actually to write code in order to avoid different operator actions(I mean, I would like to make this interface usable by anybody not only by myself): for example it would be nice to have the possibility to disable one button if the action performed by that button is already performed (if the AC unit is in AUTO mode I would like to disable the AUTO button) or it would be nice to have the possibility to change the colour of some controls (for example if for some reason I am losing the connection with the AC unit I would like to show a message to the operator but in red colour).

     

    Anyway, at the end I am sure that I will be able to control the AC units by using this quick app but still there is a lot of place to improve in order to make it more user friendly.  Can you imagine that I have to set the temperature by moving a slider. More than that, because I have no possibility to change the limits of the slider, I have to write a lot of code which is actually ignoring or issuing some error messages when wrong values are selected. Is not a big deal of writing code but there is a huge difference between DAIKIN app interface and the interface which I can design in Quick App. See below some screenshots.

     

    Is there any possibility to call some external apps from HC3, for example the apps designed by DAIKIN for managing the AC units. Or, do I have the possibility to call some routines which are programmed in some other programming languages which are a bit more flexible?


    Thanks in advance, 

    Laurentiu

     

    Daikin APP:

    Please login or register to see this link.

     

    My App:

     

    Please login or register to see this link.

     

    6 hours ago, laurgh said:

    Hello BerndKlewes,

     

    I have somehow used the HC2 code as an example but then I found on Internet different descriptions of the parameters. For example here: 

    Please login or register to see this link.

     

    I am sending you attached my quickapp but it is still under construction. 

    Please login or register to see this attachment.

     

    Hey

     

    Thank you very much 

    will test directly 

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • You have to define a variable ip_aircon where you define your IP. I tought that the export will give you all, not only the code.

     

    Anyway, the app is under construction. There are still things to be done. I did not yet built the full command to be sent to the AC. If you can help developing it OK, if not, I hope I will have time to finish it in weekend.

    Link to comment
    Share on other sites

    • 0

    It transferred all your information but the problem is that I can’t define a variable getting direct error 

     

    also I tested to create complete new variables same problem 

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • For some reason, I don't know why, it appears a variable with the name str_cmd which is not having any value. If you delete that variable, or you give some value to that variable it will let you save. 

     

    What is strange is that I cannot find where that variable comes from. I had in mind to define it at some point but I never did it. It is nowhere defined in the code or at least I cannot find it. More strange is that if you delete it, it appears again after some time. Maybe you can find what happens...

     

    This HC3 "programming" is really getting me crazy...  I don't even know with what I can compare it but what I know for sure is that HC3 is full of bugs... is just an expensive device which will probably become fully functional (as per their specification) in few years...

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Ok. After restarting HC3 the variable did not appeared anymore. Seems that a restart is solving the problems. I have now managed to code the rest of the QuickApp in order to send an ON/OFF command to the AC unit and to change the modes. I still did not finished the part with setting the temperature. Why? Because I wanted to try the quick app from Home Center app from my phone. Surprise, surprise! It does not appear at all in Home Center. In the old app, Fibaro, the quick app appears but I am getting an error when I am trying to open it. 

     

    Starting to lose my confidence... 

     

    So, the most important things to be solved:

    1. DAIKIN_AC device is not appearing in Home Center app.

    2. Setting the needed temperature by moving the slider. Not a big deal but because the slider limits cannot be changed we have to ignore some values (for example we cannot set 99 degrees).

    3. I did not made a continuous loop for reading the values of the AC unit as I don't know how is this affecting the resources of HC3. If somebody has any recommendation I would appreciate. Without looping the update of AC unit information, if the AC unit is changing its status from a remote control or something else, this status will not be seen in the QuickApp.

    4. Adding the fan speed setting.

    5. Adding the wing direction setting. 

    6. Adding the reading of internal and external temperatures.

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0

    Hi everyone. Following up with my previous message, I’ve added a simple loop in the your QA to query the AC unit (every 5 min in my case) to make sure it wasn’t modified from the remote or anything else.

     

    I noticed it was possible to get the device’s daily/weekly/yearly consumption, ex : 

    http://<UNIT_IP>/aircon/get_year_power_ex?

     

    It gives you that kind of result (in my case, I’m interested with the yearly consumption) : 

    Please login or register to see this code.

    I think it would be interesting to query and store these data (let’s say, for example, in a json-encoded global variable ?) so it could be used in scenes or displayed in a Grafana dashboard ? 

     

    I don’t have enough experience in development (or I’m not clever enough ?) to built this part of code. So if someone here can be interested with getting these data and is more clever than I am (easy one !), I would be happy to read your code ?

    Link to comment
    Share on other sites

    • 0

    @jguellec

     

    I copied some code from a Buienradar VD (@Lambik and @boerremk) to get you started. Just as an idea. 

     

    This LUA scene splits the input to, in this case only curr_year_cool and makes (with "function split" from a Buienradar VD) an array from the values. 

     

    Please login or register to see this code.

     

    This is the output

     

    Please login or register to see this code.

     

     

    Edited by SmartHomeEddy
    Link to comment
    Share on other sites

    • 0

    Ok, I have a new question ?

     

    I managed to write this function that gets me the correct value for your previous variable « input »

    Please login or register to see this code.

    As you can see,  I managed to store this data into a global variable (Daikin_test), but it would be nicer to store this value in a scene variable, so I can directly call the split(s, pattern, maxsplit) function. 

     

    Of course, I have tried to add : 

    Please login or register to see this code.

     

    But it’s ONLY working inside the function. If I try to call the daikin_response variable later in my scene, it gives me « nil » ?

     

    (I’m not sure I’m clear in my explanations... ?)

     

     
    Link to comment
    Share on other sites

    • 0

    In my QuickApps I use:

     

    Please login or register to see this code.


    And then

     

    Please login or register to see this code.


    And then I can use the different elements, for example:

     

    Please login or register to see this code.


    (Maybe loose the local)

     

     

     

    Edited by SmartHomeEddy
    Link to comment
    Share on other sites

    • 0

    Hello,

     

    Thanks a lot for your work.

    Before in my HC2 i love this app (in attachment on the market place for HC2)

     

    I would like (so i try) to recreate this under my HC3 ;)

    If you are motivated for this, i think i'm not alone to very appreciate this ^^

     

    BR

    Please login or register to see this attachment.

    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
    Answer this question...

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

     Share

    ×
    ×
    • Create New...