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

QuickApp - HomeTable


petrkl12

Question

QA for creating HomeTable in global variables in HC3.

 

Why using hometable? 

 

 

Instalation:

1. upload this QA

Please login or register to see this attachment.

 

2. In QA variables you can change name for hometable, name for scenes and time for regular update of hometable

Please login or register to see this image.

/monthly_2021_02/QAHomeTableVariables.png.709f05f8df61f550dfe36b18716dd329.png" />

 

3. In QA -> source files -> ManualData you can add your own data (it will be also saved in final hometable in global variables)

QAHomeTableSourceManualData.png.67f2a66478ea8e1eb0c6ddbcdc1290e6.png

 

How to read data from hometable:

Please login or register to see this code.

 

Names for rooms, devices and scenes are corrected by following replaces:

{["%."]="",["-"]="",["%("]="",["%)"]="",["&"]="",[":"]="",["%["]="",["%]"]="",["%+"]="",["%%"]="",["%/"]="",["%$"]=""}

{["Á"]="A",["Ä"]="A",["Ą"]="A",["À"]="A",["Â"]="A",["Č"]="C",["Ć"]="C",["Ç"]="C",["Ď"]="D",["É"]="E",["Ě"]="E",["Ë"]="E",["Ę"]="E",["È"]="E",["Ê"]="E",["Í"]="I",["Ï"]="I",["Î"]="I",["Ĺ"]="L",["Ľ"]="L",["Ł"]="L",["Ň"]="N",["Ń"]="N",["Ó"]="O",["Ô"]="O",["Ö"]="O",["Ő"]="O",["Œ"]="O",["Ŕ"]="R",["Ř"]="R",
["Š"]="S",["Ś"]="S",["Ť"]="T",["Ú"]="U",["Ů"]="U",["Ü"]="U",["Ű"]="U",["Ù"]="U",["Û"]="U",["Ý"]="Y",["Ÿ"]="Y",["Ž"]="Z",["Ż"]="Z",["Ź"]="Z",["á"]="a",["ä"]="a",["ą"]="a",["à"]="a",["â"]="a",["č"]="c",["ć"]="c",["ç"]="c",["ď"]="d",["é"]="e",["ě"]="e",["ë"]="e",["ę"]="e",["è"]="e",["ê"]="e",["í"]="i",["ï"]="i",["î"]="i",["ĺ"]="l",["ľ"]="l",["ł"]="l",["ň"]="n",["ń"]="n",["ó"]="o",["ö"]="o",["ô"]="o",["ő"]="o",["œ"]="o",["ř"]="r",["ŕ"]="r",["š"]="s",["ś"]="s",["ť"]="t",["ú"]="u",["ů"]="u",["ü"]="u",["ű"]="u",["ù"]="u",["û"]="u",["ý"]="y",["ÿ"]="y",["ž"]="z",["ż"]="z",["ź"]="z"}
 

Hometable in global variables will be overwrite only if newly generated hometable will be different.

 

Version of QA HomeTable: 0.12 - 21.1.2021

Please login or register to see this attachment.

 

Edited by petrkl12
  • Like 3
  • Thanks 3
Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

hello

what a great idea... i'm using one my self, mostly manually created and the advantage having it automatically done and updated is just great !

however it doesn't work and can't start the QA

only proposing me to refresh the page ;)

take care

 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Are there any errors?

    Have you change something after upload?
    I need more info from you ...

    Link to comment
    Share on other sites

    • 0

    with pleasure @petrkl12, always following with interest your post :)

    no error message, but the brower message proposing to refresh the page, restart the service or the box

    but no applicative message.

     

    Situation following upload of the QA :)

    hope it helps

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Have you try it again after restart of HC3?

    Same result?

    What version is in HC3?

     

    Edited by petrkl12
    Link to comment
    Share on other sites

    • 0

    i restarted and it works :)

    i'm currently using the 5.061 ... not a success...

     

    will try and test it now that installed :)

    thanks !)

    Link to comment
    Share on other sites

    • 0

    @petrkl12

    Thanks for your QA! 

    I'm new to LUA and by investigating QA's I get more and more understanding of the language.

     

    I added ["'"]="" to the "aH" variable because I had a single quote in a room name.

     

    I also removed the "aq.visible" check because i needed access to my hidden devices. Maybe you can make this optional by using a "showHidden" variable?

     

    Link to comment
    Share on other sites

    • 0

    I am a little confused.  I was expecting to make an array myself.

     

    1. Is this automatically getting all the device names etc by itself ?
    2. If so, how does it work when my devices don't have unique names?  For example, doors are called "Front Door", "Laundry Door".  But in the json data I just want Hallways.Door and  Laundry.Door.  (I have a room called Hallways which contains the front door and stairs)
    Link to comment
    Share on other sites

    • 0

    Yes it will gather all devices in your devices list.

    This HT combines room.device

    So in one room you van have multiple doors with different door names

    My hall is having 8 doors so the

    kitchen.door

    laundry.door

    bedroom.door

    gestroomd.door

    etc

    If you have duplicates it will show you

     

    Please login or register to see this attachment.

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

    ×
    ×
    • Create New...