DrozmotiX / ioBroker.coronavirus-statistics

Adapter to show Global Corona Virus information and current reports
MIT License
18 stars 19 forks source link

Datapoint gets re-created during update #315

Closed ninja-warrior closed 3 years ago

ninja-warrior commented 3 years ago

Hey guys,

I'm currently using Corona-Virus Statistic Adapter Version 0.8.2 and Linked Devices Adapter Version 1.4.3. For some reasons I decided to access the values from corona-virus statistic adapter through virtual datapoints from linked devices adapter. This worked well in the past for old versions of corona virus statistic adapter.

Since the update to the latest version of corona virus statistic adapter I noticed that the link between my corona virus statistic data points and the virtual linked devices data points get lost when receiving new values.

In log file of iobroker I found the following log entry:

(309448) parentObject 'coronavirus-statistics.0.Germany.Stadt.Darmstadt.cases7_per_100k' deleted, linkedObject 'linkeddevices.0.LinkedServices.CoronaStatistik.Darmstadt.cases7_per_100k' status 'isLin

It seems like the corona virus statistic adapter is recreating the data points when receiving new values. So for that reason the link gets lost. For what ever reason this only happens for my datapoints below "Kreis" and "Stadt", but not for datapoints below "Bundesland".

Could you please check the implementation?

Thanks a lot and best regards, David

DutchmanNL commented 3 years ago

what happens if you deactivate " Delete unused States" in advanced settings ?

DutchmanNL commented 3 years ago

ok just able to reproduce will investigate

ninja-warrior commented 3 years ago

Disabling the option "Delete unused states" seems like to be a work-around.

DutchmanNL commented 3 years ago

Disabling the option "Delete unused states" seems like to be a work-around.

thanks, that at least ensure the logic is working and issues are related to a ode fragment. As a WA keep it disabled for now, I am already looking into the code why this happens.

Can you confirm it only happens for German city, bunddeslaender and countries looks all well right ?

DutchmanNL commented 3 years ago

Please test 0.8.3-0, can be installed by git or NPM (expert mode in admin, install from npm) https://github.com/DrozmotiX/ioBroker.coronavirus-statistics/commit/db2d541d92fe809449b0df5b0c70d6aba88a77f0

DutchmanNL commented 3 years ago

Solved 0.8.3