DavidFW1960 / Aussie-Broadband-Usage-Meter

Usage Meter for Aussie Broadband
5 stars 4 forks source link

Repeat of issue error "RegExp matching error (-1)" & "Calc: Division by 0" #32

Closed subi75 closed 1 month ago

subi75 commented 1 month ago

It appears that an issue I raised 2 years ago has now returned again where ABBUsage is not reporting usage data, which started occurring a few weeks ago. Last time this occurred, there was a confirmed issue on ABB's end that was an ongoing issue at the time because it also affected reporting via their mobile and web usage reporting, but this time I only see the issue with ABBUsage (phone app and ABB's site are correctly reporting).

I had also logged a ticket with them yesterday regarding it, to confirm if they were aware of an outstanding issue, and the following was their response: about 3 weeks ago we had some issues with the data usage display (same as in 2022) which lasted about a week. Its possible that the fix has caused compatibility issues with the ABBusage application you are using and it may need to be updated, if an update is available.

For reference attached is the debug logs from both RainMeter (latest Windows x64 version) and also the latest ABBUsage skin that you fixed up for me about 2 months ago. I had run the ABB-Clean script prior to generating the debug logs, plus unloaded all other skins at the time so the log data is only capturing ABBUsage related log data. Note - I have intentionally removed my ServiceID from the skin debug log, and have also replaced my user profile path with "%USERPROFILE%" inboth logs, with no other changes were made to either log file. ABB-DebugLog-ABBUsage-ABB-2024-07-21.txt Rainmeter.log

DavidFW1960 commented 1 month ago

Thanks. We will take a look at this.

protogen commented 1 month ago

I have noticed the same thing occurring. I have a relative who is an ABB customer. It started for them a few weeks ago too. They are not using Rainmeter or ABBUsage, but they do have some automation (which I built) that checks their usage data using the same source as ABBUsage. Their automation has intermittently been reporting errors with their usage data.

In a couple of cases, their usage data was empty (zeros and nulls) which is what causes the "RegExp matching" and "Division by 0" errors. In most cases though, their usage data appeared accurate (i.e. it matched the web portal) but the "lastUpdated" field was strange. It contained a very old timestamp.

I've just tested that automation now. The data is inaccurate and the "lastUpdated" field is "2024-07-08 23:59:59". That's 2 weeks ago. Normally that field is, at most, 1 hour ago. My automation is set to trigger a warning if that field is more than 2 hours old.

So something is definitely wrong at the ABB end. They are not updating the "lastUpdated" field correctly. And sometimes they are providing empty data. Whatever change ABB made 3 weeks ago has broken the data source we are using.

I've checked your logs. They show 3 instances of empty data just a few minutes apart. When that occurs you'll need to wait before trying again. You need the ABB systems to do an update on the usage data. Back in 2019, ABB said that update occurs every 30 to 45 mins. Today, it might be different.

As for getting this fixed, it might be difficult. Back in 2019 we had access to an internal ABB tech person. But I'll start with logging a ticket and see where it goes.

Edit (24/07/2024): Above, I've described the usage data as "appearing accurate". This was not true. I was comparing the API usage data against the web portal usage data. Now that the API usage data appears fixed and is updating, I've realised that the web portal usage data was also wrong. It was not being updated either. That's why the API and the web portal matched.

DavidFW1960 commented 1 month ago

Thanks @protogen much appreciated

protogen commented 1 month ago

Yesterday, someone on the ABB Discord channel commented...

"Is there an issue with the MyAussie API? The app and things that unofficially use the API are inaccurately report NBN usage totals."

So it's not just us. At least one other person is noticing problems.

protogen commented 1 month ago

I've just received a response from someone else on the Discord channel who is also experiencing the same API issues. Their usage data hasn't updated since July 8th either.

They provided the link below. See the last comment "a reply from AussieBB". https://github.com/home-assistant/core/issues/122231

So we're all in the same boat. We just have to wait until AussieBB resolve the issue.

DavidFW1960 commented 1 month ago

So not just us and ABB are looking into it. Thanks

subi75 commented 1 month ago

I've just noted tonight that ABBUsage is reporting data finally, with no action taken on my end, so I'm assuming that ABB have identified and resolved an issue on their end....

protogen commented 1 month ago

Confirmed at my end as well.

I've just tested my automation. The data is accurate and the "lastUpdated" field is "2024-07-23 23:06:44". That's roughly 45 mins ago.

protogen commented 1 month ago

I've just tested my automation again. The data is accurate and the "lastUpdated" field is "2024-07-24 07:06:45". That's roughly 20 mins ago.

DavidFW1960 commented 1 month ago

Thanks. Protogen for confirming. I think we can close this one now.

protogen commented 1 month ago

One last comment, David. Regarding the "RegExp matching" and "Division by 0" errors, I think I'll update the code to catch them and report a user message that AussieBB are providing bad (zeros and nulls) data. Once tested, I'll email the updated code to you.

DavidFW1960 commented 1 month ago

Thanks mate. I'll also update the version number this time..