noi-techpark / bdp-commons

GNU Affero General Public License v3.0
2 stars 12 forks source link

emobility-echarging: sometimes all Alperia stations "number-available" is set to 0 for all stations, but should not be 0 #543

Open dulvui opened 2 years ago

dulvui commented 2 years ago

When looking at analytics sometimes all stations show number-available 0 for 5-10 minutes and that is exactly when an error occurs during the fetching of the data from the data collector. The value should remain the same, if an error occurs, instead of jumping to 0.

dulvui commented 1 year ago

The problem happens only with Alperia stations and it is not correlated with error events of the data-collector, because it happens now with no errors. Still investigating...

dulvui commented 1 year ago

Here a screenshot of the problem image

dulvui commented 1 year ago

By logging the Alperia API repsonses I found out that the API sets all stations states to "TEMPORARYUNAVAILABLE", when this the values are 0 on the analytics charts. So this is a problem of the API and not of the data collector.

I saw that also the plugs have no state, so a workaround could be to skip the data syncing if this happens, so the value would stay the same and not drop to 0. @rcavaliere should I implement this workaround or leave it like it is?

rcavaliere commented 1 year ago

@dulvui let's understand better this problem with Alperia (Neogy), than decide what to do. I will contact them and keep you updated