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


Home Center 3 UI - Feature Request: Global Variables - Large Text Area For Editing


RedRocketFire

Recommended Posts

When I edit global variables in the website the text box is really small. The process is problematic because the data is larger than the visible text box. I often have to copy and past into a notepad or something every time. It seems like people are using this for all sorts of things like scripts, JSON, etc... A large multi line text area would be great especially since the entire page space is available and unused.

Edited by RedRocketFire
title clarity
Link to comment
Share on other sites

  • RedRocketFire changed the title to Home Center 3 UI - Feature Request: Global Variables - Large Text Area For Editing

The only question remains, why you have to enter global variable value manually?

Link to comment
Share on other sites

  • Topic Author
  • On 3/28/2023 at 7:17 PM, Sankotronic said:

    The only question remains, why you have to enter global variable value manually?

    For example I could create a Global Value "Nightlight Duration In Minutes" and set it to 15. In a LUA Scene I could consume that Global Variable value and leave lights on for 15 minutes when a specific event occurs. The benefit in this case is that I don't have to edit LUA code to change the how long the lights stay on for the specific event if my needs change in the future. Ideally changing the system parameters could be performed by an end user rather than a developer but if the system is in fact coded and maintained by the end user, it is still easier to change a variable through the UI.

     

    Also in perhaps a different scenario if this value changes automatically because of an event the value is visible and configurable in the UI as opposed to a hidden and inaccessible variable running in code.

    Other people are using them for additional purposes as well such as JSON code as Tomasz Spaleniak pointed out. I also store more detailed information structured as JSON as well. I store many device objects and properties that are not otherwise stored in the system. It is hard to edit a large JSON string in the small text box.

    Link to comment
    Share on other sites

    16 minutes ago, RedRocketFire said:

    In a LUA Scene I could consume that Global Variable value and leave lights on for 15 minutes when a specific event occurs. The benefit in this case is that I don't have to edit LUA code to change the how long the lights stay on for the specific event if my needs change in the future.

     

    You have to ask yourself; how many times are you going to change this time? You are building automation? Is it seasonal? Than program you automation to adapt to the seasons.

     

    Global Variables are designed to store a variable to use between multiple scenes. That HC3 programmers use this variable feature to store data does not mean that it's supposed for that. If there is a need to store big chunks of data at global level I would opt for a new Global Data type.

     

     

    • Like 2
    Link to comment
    Share on other sites

    Hi @RedRocketFire ,

     

    Sorry, I still fail to understand needing of manually editing global variables. Must be me and my way of thinking.

     

    First of all, all my global variables are automatically added by scenes or Virtual devices (HC2) or Quick Apps (HC3). Also their initial values are set by the same code. For json tables that are not frequently changed like e.g. HomeTable that contain all devices, scenes, rooms etc. ID numbers I edit scene code and then save scene and then it runs once with auto start to save json table to global variable. It is definitely easiest way to edit code in some LUA editor than use HC2 or HC3 interface pages.

     

    For global variables that I need to manually change in some occasions I use VD or QA and if I do not want other users to be able to use them then I restrict their access to this VDs or QAs. Besides VD and QA can show global variable value on their label so I do not even have to use PC and browser, but can do that using mobile app. So can do it at anytime and from anywhere :-)

     

    And at the end as @Joep  pointed out, we are building automation, which means that user involvement is reduced to minimum as much as possible.

    • Like 1
    Link to comment
    Share on other sites

  • Topic Author
  • 20 hours ago, Joep said:

     

    You have to ask yourself; how many times are you going to change this time? You are building automation? Is it seasonal? Than program you automation to adapt to the seasons.

     

    Global Variables are designed to store a variable to use between multiple scenes. That HC3 programmers use this variable feature to store data does not mean that it's supposed for that. If there is a need to store big chunks of data at global level I would opt for a new Global Data type.

     

     

    Your point is valid. I don't know what "Global Data" is though. Regardless I have scenarios where configurations may change and also configurations must be shared and persisted. They are not related to environmental conditions but instead are designed to fulfill the intent of "end user preference". I like your notion that I read as, "use the feature that is intended to fulfill the need". I think my personal use case falls outside of the HC3 feature set. I can't speak to others though.

    Link to comment
    Share on other sites

  • Topic Author
  • 19 hours ago, Sankotronic said:

    Hi @RedRocketFire ,


    Sorry, I still fail to understand

     I think we are after the same thing.

     

    I am using the Global Variables to avoid hard coded values in LUA because it easier to change a Global Variable in the UI. I think you are saying don't manually change them in the UI either, build a quick app or another LUA scene to hold and store the hard coded values. Fair enough. I think both ideas are valid and desirable. 

    But in the context that not everyone has the knowledge or desire to make a quick app with labels whenever they want some Global Parameters, it doesn't seem like a big ask to make a single line code change in the UI to make a larger input field. This is Fibaro's feature, I am just using what is there and wish it was a little bigger.

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