Xenon-s / ioBroker.device-reminder

Notifications at device start or end by telegram, Alexa, Whatsapp, sayit, pushover, email
MIT License
28 stars 8 forks source link

Callibrateable polling time for the adapter instead of always 10 s #386

Open bolantando opened 10 months ago

bolantando commented 10 months ago

Hi and thanks a lot for your great work so far! I would like to use the adapter in context of upgrading old machines without communication interfaces (e.g. dish washer, washing machine) to smart machines which can be integrated into a home energy management system with solar panels. Therefore I would like to be able to interrupt the program of a just started machine (with a shelly plus plug s) earlier than after 10 s, because e.g. the washing machine already starts filling water inside in less than 10 s. Later - when I have more power from solar panels - I would like to resume the program.

Thus I kindly request the option to set the polling time to less than 10 s (e.g. 1 s).

Please ask if anything still is unclear.

bolantando

Xenon-s commented 10 months ago

The adapter continuously calculates the moving average. What you are trying to do is not possible. If the washing machine draws no power for a short time, it is switched off immediately.

bolantando commented 10 months ago

Thanks for your quick reply. Yes, the washing machine of course is switched off immidiately if it has no power. That's no problem. That's what I want it to do. But the machine has - like probably most machines - the feature that when the shelly repowers the machine it resumes the program which was aborted last time because of the blackout. I want to turn on it later automatically by the shelly (switched by ioBroker) when I have more power from the solar panels. For doing all this I need a very fast detection of the begin of action of the machine - faster than 10 s.

I hope this helps to explain my problem.

Xenon-s commented 10 months ago

I don't think you understand the problem. Your washing machine will switch off again for every short period without power consumption. If your machine draws no power for, say, 1 minute 5 times in one cycle, it will switch off 5 times. The adapter cannot implement what you have in mind.

If I change the polling from 10 seconds to 1 second, all the values set for your thresholds and start/end values will no longer fit. This will lead to numerous users experiencing problems and the adapter will no longer be adjustable.

The adapter does not retrieve the consumption every 10 seconds, but calculates the new average every 10 seconds using the latest value

bolantando commented 10 months ago

I try to describe it in another way:

My idea is the following:

  1. Using your adapter for fast detection of a just started washing machine program.
  2. Switching of the Shelly for power connection of the washing machine if (a new) system variable has the value false.
  3. Waiting for solar panels to produce more power (detection by reading the inverter versus modbus adapter)
  4. Setting the the above mentioned system variable to true (as release for resuming the whole program now).
  5. Switching on the shelly again for repowering the washing machine. This time the program won't be interrupted because of the system variable has another value than first time (true instead of false).
Xenon-s commented 9 months ago

Oh, I thought you wanted to switch off the machine via the adapter.

And you are of the opinion that it makes a difference whether it recognizes the whole thing after 1 second or only after 10 seconds?

If you set your threshold values for start to 5W, for example, and the number of values to 1, you will get the new status after 10 seconds. Or is this already causing problems?

I am currently working on a completely new version and you could of course incorporate something like this, even if very few users need it. And that's the problem, at some point you have too many setting options and the user is overwhelmed

bolantando commented 9 months ago

That's pretty close to what I did meanwhile and it seems to be sufficient for my usecase.

Nevertheless thanks a lot for your new reply! :)