Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration Values….mayday #17

Open
atchoo78 opened this issue Jun 30, 2023 · 1 comment
Open

Configuration Values….mayday #17

atchoo78 opened this issue Jun 30, 2023 · 1 comment

Comments

@atchoo78
Copy link

atchoo78 commented Jun 30, 2023

Hi again,

I don’t know where else to address this issue…feel free to remove it. But the thing is:
All plugins containing configuration values (i.e. every plugin I made) are in fact useless at the moment, and they have been for a relatively long time. Why? Because the "minimumLength" and "maximumlength" field values (subclasses configuration.ConfigurationString and configuration.ConfigurationNumber) are in fact creating a catch 22 of its own:

If there is a blank config field, the user isn’t allowed to write anything if the minimum length isn’t defined specifically. If defined, it must be set to -1 or 0, or it catapults the local webserver containing the plugin configuration into a bug/nag-fest galore where your only option is to force quit the browser.

If your character count goes above the maximum value….same result if you backspace beyond the minimum char value.
But for the most part, the most annoying about all of this, is that you’re not allowed to write anything into the configuration.
The Pushover plugin has a 30 character (!) minimum value and 30 characters (!) maximum…i.e. it can’t be used.


Even my dead simple blink(1) plugin that only has a maximum length for one of the fields set, breaks beyond repair if you happen to erase the example IP address. You can remove it from the Tellstick, but the Telllstick will remember and keep the empty default value to infinity and beyond in Telldus.conf, which means the plugin is a waste of virtual memory space if you don’t happen to have SSH access to the Tellstick.

The good news is that this is very easy to fix:

  1. Hardcode the minimum value to -1 chars
  2. Set the default maximum character length to 99 characters (at least a ridicuosly high number) - if no value is specified by the plugin configuration (important)
  3. Do not allow a minimum char length greater than 0 IF the HTML page checks the value continously.
    If set to greater than 2, the character count will have to be executed when you press the Save/OK button, or not at all.
    For simplicity's sake, just set it 0. It won't break anything, and problem solved 🌈🦄🐛

That way you never release that specific deathmonkey, and the plugins can be put to good use again.
I don’t know if there is anyone working at #telldus here anymore (@mickeprag?), but they need to know this, because it’s downright annoying as f**k when you painted yourself into a corner. Fix please.

Sincerely,

Grouchy old man plugin and web developer

@atchoo78
Copy link
Author

atchoo78 commented Jul 2, 2023

As you can see here: #12 , this issue has been a problem at least since 2020. Can you please fix it?
That said, I can’t seem to get any plugins to load anymore (apart from the ones already on the distribution set), and the icon for the configuration doesn’t show up at all, no matter what I do.

Edit:
Most of the plugin issues mentioned were resolved a couple of days after I wrote this. I don’t know why, who and how, but thanks anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant