Apollon77 / ioBroker.smartmeter

ioBroker-Adapter to read out Smart-Meter using protocols like SML, D0 and such
MIT License
36 stars 17 forks source link

Sync data fetch timestamp with other instance of this adapter #307

Closed Loenne83 closed 2 years ago

Loenne83 commented 2 years ago

Problem: When using two instances of this adapter, they might be not simultaneously fetch data, even if this would be interesting, because they both get power data. When calculating differences of these values, the time difference leads to inaccurate data.

Possible solution: Get an option in the instance setting, where the instance to be synced to can be named (i.e. "smartmeter.1"). Alternatively, defining a cron timeplan for each instance would do the job either, I suppose.

Apollon77 commented 2 years ago

Syncing between instances will not be that easiely possible, honestly ... then I more like the idea in #308 because with a "refresh" state that you can trigger you can achieve exactly this behaviour here by just setting both states (one per instance) at the same time Thats why I close this one

Loenne83 commented 2 years ago

since I'm not deep into the adapter structure it was just an idea. I agree with your opinion, but what about the cron option? On the other hand, this would indirectly also be possible with the solution in #308, correct?

Apollon77 commented 2 years ago

yes, also possible - controlled by a script of you