-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
More options for scheduling/fetch interval #326
Comments
Two instances accessing the same serialport? This will pot overlap here and there and you miss a value for one ... This is general is no good idea. I could imagine an "update "state that triggers to query "now" (if not currently already a data query is in progress") ... |
Okay. Fair enough. But how do I achive my goal in that case? How do I store the current power consumption every 25 Secs and the total power consumption only once a day when using only one instance? |
this would be a duplicate of #308.
Fetching data every 25 seconds will end up in the same time on the next day. So you will need to get the value at the desired time out of the variable when the value was fetched. Example: Adapter gets data at |
@Loenne83
So I like to store two different values in two different intervals - since I don't want to store the total (kWh) every 25 secs. which is pretty useless. Any way to achive this is fine for me. |
@Grizzelbee In my opinion, there is no way to let the adapter only update the value for current consumption (W). |
As discussed with @Loenne83 bilateral via chat:
|
@Grizzelbee What does your post mean? I do not get it? There is not way to just get some values and others not |
@Apollon77 The Idea was to have a table in admin with the ability to add as much entries as needed by the user. Having this every user will be able to schedule whatever he likes. This will be the most flexible solution. Hope I made myself clear now. |
@Grizzelbee Yes I now understand it but I really have to decline this. I will not add such "veeery special and custom complex stuff" to the adapter which is interesting for a clear minority of users. I'm a fan of keeping data provider adapters as simple as possible (the whole protocol stuff is complex enough) and I like to use the power of ioBroker ecosystem for such custom requirements. I would maybe think about enhancing the idea from above and not only offer an "update now" state to trigger an update, but also offer an "updateNow" message that returns the just queried values additionally as json in the answer. With this you can write own scripts to do whatever you like with the data and get "the data" back from "that update cycle" without the need to add "once subscriptions" (btw is another option to achieve your goal with just the update state). |
@Apollon77 The need to write, schedule and maintain scripts that read a value once a day (or whatever scheduling) only to get it written to the DB in the needed interval does much more harm to the entire system than an adapter that has a flexible scheduling config. Btw: What is that mentioned "once subscriptions"? Never came across with that. Btw-2: Your solution with that triggers and messages sounds much more complex to me than the scheduling stuff. 😉 |
I like to do two different things with this adapter:
Monitoring the current power consumption works currently perfect so this is no issue.
Currently I have two instances for that:
Using two instances is fine for me, but I like to have the opportunity to define a fixed time for the data pull, like:
to summorize: simple cron scheduling.
The text was updated successfully, but these errors were encountered: