Gladys Assistant: Let's write more content together!

I made a commit on the page (typo) and you forgot to add the Gladys support extension to the Amazon links, as well as to add the preamble to

1 Like

I don’t see a PR?

The Amazon links are indeed affiliate links!

oops I thought just committing would be enough I just created the PR

no, there’s only this, for example for the Beelink Mini S12 Pro
Amazon

that’s indeed an affiliate link! Click on it, you’ll see :slight_smile:

Thanks for the typos, I’ll merge that!

indeed « gladproj-21 », and at €149 on sale right now that’s not insignificant! :heart_eyes:

1 Like

I like it, it’s very clear about the possibilities and the costs.
Personally, I started « because it’s cool », then I figured out my needs later :rofl:

I’ll write, I haven’t forgotten. But I haven’t been able to start yet; I’ve had too many unexpected things at work that have literally sucked up my time :sweat_smile:

Now I’m wondering, what’s the best approach in your opinion to cut power to an outlet that is no longer consuming electricity?

I see several possibilities:

  1. Every 10 minutes, check if the outlet is consuming below a threshold (10W for example). If so, wait another 10 min, check, repeat once more, then cut the outlet if it’s still below 10W after 30 minutes (cumulative).
  2. For each value sent by the outlet, check the consumption. If it’s below 10W, wait 2×10 minutes while checking consumption again, then cut. But this operation seems heavy to me, since smart plugs can send a consumption value every second.
  3. More « dumb and simple »: Every 10 min, fetch the consumption, wait 20 minutes and if it’s still below 10W, cut the outlet. It’s very simple to implement but you won’t be able to detect a temporary use of the outlet during the 20-minute window.
  4. Take an average of the outlet’s consumption by retrieving the values every 10 minutes for half an hour. If we’re below 10W (example threshold), cut the outlet.

Which solution do you prefer? Or do you have any comments?

For me there is no right answer since it depends on your end goal / what is connected to the outlet.

So I would gladly tell you to take a concrete example: imagine a power strip with a TV / amp / console.
There the scenario of checking every 5 or 10 minutes is perfectly valid. If two 10-minute checks are below a certain threshold, then you cut the power.

It’s rare to use the TV or the console for less than 5 or 10 minutes, so it makes sense.

@lmilcent

I think there are 2 categories of appliances to manage

  • those with cycles (washing machine (MAL), dishwasher, dryer, oven, etc.)

    • turn off if consumption is <= appliance end-of-cycle consumption
      or
    • turn off after the longest possible cycle duration (with detection of the start time by the increase in consumption above the minimum cycle consumption)
  • those without cycles (TV, lamp, etc.)

    • minimum consumption: TV on without signal (player off) and determine this threshold as the minimum consumption triggering shutdown
      or
    • maximum shutdown time: 6 a.m. — that’s good if you’re an insomniac :rofl:

My connected washing machine, when in standby or scheduled, consumes 16.8 W — which is what I observed. Since I don’t run a load during the day (off-peak rate: evenings and weekends), for now I’ve cut power to the outlet from 8:30 to 20:30 because around 21:00 I schedule my machine but not every night.

Afterwards I can arrange to keep my machine switched off permanently and press the button on the outlet to power it, but if I create a scene to cut the outlet when it’s in standby because I’ve scheduled it (consumption 16.8 W), it shouldn’t cut it and cancel my scheduling!

That’s why I chose a trigger at a fixed time; I haven’t tried the other options.

I’ve noticed that my TV in standby consumes nothing or almost nothing, unlike my washing machine, because the outlet doesn’t report a value.

Thank you for your answers; I will include your examples as practical cases.

In my case, I have a wireless button to turn on or force the shutdown of an outlet. Especially if the outlet is not accessible, it’s more convenient when I turn it off automatically with Gladys.

1 Like

@pierre-gilles

This may seem unnecessary, but since I have my two NAS under OpenMediaVault, while looking up which Debian version was being used I checked on… Wikipedia and out of curiosity I typed Gladys-Assistant and nothing!
Maybe consider looking into the idea of creating a page for that, no? Do you think it would improve SEO?

2 Likes

[quote=« cce66, post:32, topic:8492 »]
Wikipedia — out of curiosity I searched for Gladys-Assistant and found nothing!

@cce66 Thanks for your PRs on the site :slight_smile: 25 PRs — it took me a little while to merge them bit by bit ^^

I’ve merged 20 PRs; there are 5 PRs where I received feedback, you can check them here:

https://github.com/GladysAssistant/v4-website/pulls

Let me know when you’ve addressed the feedback :slight_smile:

1 Like

Ok I’ll look at that as soon as I’ve finished the article on Wikipedia :slight_smile:

2 Likes

Hi!
Let me share my practical example.
The dryer’s outlet, located in the bathroom, activates when the light has been on for five minutes (via a scene, of course). This helps reduce unwanted automatic turn-ons.
It does not turn off when the measured power is below the waiting threshold (because the delayed start’s power is too close to standby power).
When the dryer has finished its cycle (measured power drops below X Watts, lower than during the drying cycle), I receive two messages.

  1. The drying cycle has finished.
  2. Should I turn off the dryer’s outlet?
    An hour later, I check if the outlet is off and if another drying cycle is not in progress (power greater than X Watts). If not, I send the following message:
    ‹ The anti-crease period is over, you wouldn’t have forgotten to empty the dryer, would you? ›
    Followed by ‹ Should I turn off the dryer’s outlet? ›
    Thanks to the integration of :cat_face::dashing_away: (yes yes, ChatGPT according to the kids)!
2 Likes

:joy: I didn’t see that coming!
Thanks for your comment.

Hahah excellent :rofl:

PR on the site’s docs:

1 Like

So cool :slight_smile:

Are the changes you made to the Node.js installation in particular due to your personal observations during your recent Gladys installation?

I just want to make sure these are commands you tested personally!

Yes, during the initial installation it was written in large red letters that this script was deprecated and that the method needed to be changed (indicated on the repo).

So I tried the new way before integrating it into the documentation.

Tested on Debian 12 and Windows 11

1 Like