OK to change auto-created group variable names?

Posted on
Sun Nov 05, 2017 2:28 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

OK to change auto-created group variable names?

Will the plugin freak if I change an automatically created variable (like "Unifi-Count-Group2-Home") to something else? Will the plugin still update that variable if I change its name?

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Mon Nov 06, 2017 5:48 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: OK to change auto-created group variable names?

it will re-create the old one and will update the old one.

If it should do what you want it would need to have a config section to set a name for each of the "types".

Posted on
Mon Nov 06, 2017 9:02 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: OK to change auto-created group variable names?

Thanks. When you say "update" do you mean it keeps good data in the variable whose name has been changed?

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Mon Nov 06, 2017 9:18 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: OK to change auto-created group variable names?

It will ignore anything that does not have the predefined names

So it will only update the variables it knows. The names are hardwired.

The plugin “recycles” (= deletes and recreates )some of the variables at midnight
This is done to make sqllogger delete the tables for these variables. The contents of these variables do not need to be time tracked. ( name of changed device etc). This helps the sql dB - at least for Postgres- to keep the sqldatabase smaller. If a table is deleted that space ( a file in the case of Postgres ) gets completely deleted.



Sent from my iPhone using Tapatalk

Posted on
Mon Nov 06, 2017 10:21 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: OK to change auto-created group variable names?

Thanks for the explanation.

Guess I'll have to rely on my brain to remember which group number is for which thing. Dangerous! :D

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Mon Nov 06, 2017 10:59 am
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: OK to change auto-created group variable names?

kw123 wrote:
it will re-create the old one and will update the old one.

If it should do what you want it would need to have a config section to set a name for each of the "types".


Or you could just maintain a variable ID map so that if the user changes the name it doesn't effect operation because you're using the ID.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Nov 06, 2017 11:42 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

OK to change auto-created group variable names?

Yes, I thought about that, but if the variable is deleted it will not work. In my environment some of these get updates veryyyyy frequently. Hence I like to recycle the variable
And indigo only offers to purge/prune all variables to the same date.

Sent from my iPhone using Tapatalk

Posted on
Mon Nov 06, 2017 8:07 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: OK to change auto-created group variable names?

kw123 wrote:
Yes, I thought about that, but if the variable is deleted it will not work.


Which is the case either way, so it's not really relevant to the discussion.

kw123 wrote:
In my environment some of these get updates veryyyyy frequently. Hence I like to recycle the variable
And indigo only offers to purge/prune all variables to the same date.


I don't understand...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Nov 06, 2017 9:39 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: OK to change auto-created group variable names?

here we go:

1. with 10 variables being updated 1/sec with ~ 20 bytes per update , 80k secs in day creates ~ 16Mbyte / day = 5+ GB in a year, just for these variables.

2. as indigo does not allow individual pruning of variables ( could be done outside indigo) it is either keep all variables or none beyond pruning date.

3. when deleting and recreating the variables the database - postgres- deletes all the old data files related to the variables - and sets up new ones so no increase in DB size (not true for SQLite)

4. names vs id: when a user is allowed to rename the variable and the variable gets deleted the link between id and name is gone. One could store the new name and recreate the new set of variables using the new name, but that makes the management somewhat complex (if e.g. user does not rename but copy or delete... )

So in order to keep things a little bit simpler, I decided to fix the names and delete and recreate them after midnight and the user can simply use the name for triggers etc.

Karl

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests