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


Question

Posted (edited)

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 4

17 answers to this question

Recommended Posts

  • 0
Posted

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

 

  • 0
  • Inquirer
  • Posted

    Are there any errors?

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

    • 0
    Posted

    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

     

    • 0
  • Inquirer
  • Posted (edited)

    Have you try it again after restart of HC3?

    Same result?

    What version is in HC3?

     

    Edited by petrkl12
    • 0
    Posted

    i restarted and it works :)

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

     

    will try and test it now that installed :)

    thanks !)

    • 0
  • Inquirer
  • Posted

    OK. Perfect

    • 0
    Posted

    @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?

     

    • Like 1
    • 0
    Posted

    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)
    • 0
    Posted

    jT.Hallways.FrontDoor

    • 0
    Posted (edited)

    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
    • 0
    Posted
    On 5/4/2022 at 12:45 PM, _Wilco_ said:

    @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?

     

    I was looking for the same - A showHidden variable

    • 0
    Posted

    Hello Peter,

     

    I'm using your QA Hometable. This is very useful.

     

    However, lately there are a number of QAs that also have emojis in their names. This causes me to receive error messages when requesting and controlling scenes. Of course I can change the Name without emoji, but that makes it a lot more beautiful and fun. Is there a solution for this?

     

    Greetz John

    • 0
    Posted

    Hello everyone, I have started the migration process - after many years (8) of using HC2 - to HC3. Unfortunately, I am not a programmer and that is why I am asking for help regarding QA HomeTable... After uploading the file, the table updates and everything is OK only after updating the ManualData tab and adding a new fragment of QA data and saving in the debugger it informs about correctness, but in reality the Update button disappears and the HomeTable variable does not update.
    What am I doing wrong??? Maybe some tips from forum users or the author of the script - I would be grateful. I am attaching a fragment of the code I am adding to ManualData:

      myAlarm={
        Dom=5,
        Wiatrolap=6,
        Garaz=7,
        Fibaro=8,
        Drzwi_satel=2271,
        PIR_satel=2272,
        Ppoz_dom=2273,
        PIRGabinet=2274,
        PIROliwcia=2275,
        PIRSypialnia=2276,
        PIRSalon=2277

    }

     

    Best regards

    • 0
    Posted (edited)

    Sorry did't read all.

    I never added some data! 

     

     

    Edited by Sjakie
    • 0
    Posted

    Hello again - can someone help me? At least a hint...
    Best regards

    • 0
    Posted

    Hi dareszek @,
    I don't know if this will help, but I have it like this and it works fine.

     

    jsonHomeAdds = {

    myOknaHT = {

            Kuchyn_okno_JIH=194,

            Zadveri_okno=1197,

            Hala_okno=1219,

            Obyvak_vent_leva=1234,

            Sklep_kuch_P_okno=135,

            Sklep_kuch_L_okno=944,

            Sklep_okno_JIH=998,

            Sklep_okno_skl_tech=125,

            Sklep_okno_schody=1035,

            Host_okno=1885,

            Pracovna_ZM_okno=1046,

            Byt_okno_LE=247,

            Byt_okno_ST=237,

            Byt_okno_PR=243,

            Byt_koupelna=1650,

            Satna_okno_SV=717,

            Satna_okno_VY=251,

            Chodba_vent_SEV_1p=1483

            },

    }

    • 0
    Posted

    Unfortunately after updating user_data QA becomes dead and there is no way back, you have to re-upload QA...

    Best regards

    Please login or register to see this attachment.

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