ooii/pySuez

List of sub-providers (inputs needed)

Opened this issue · 11 comments

ooii commented

Hi,
Please use this issue to provide me with the list of sub-providers.
To get yours, go to your Suez account. Once connected, you should see your dashboard. The URL should be something like https://www.toutsurmoneau.fr/mon-compte-en-ligne/tableau-de-bord. Please provide me with the first part of this url.

Up to now, I have the following:

Hi @ooii , maybe you should have a look at @ybizeul PR #18
which finally managed to resolve this problem without having to configure any sub provider base URL, just by allowing redirection during the POST resquest.

Thank you for your time

ooii commented

Thanks @Kelesis for pointing me to this PR, it's now merged.
Can someone with another provider than toutsurmoneau test with the new pysuez library please?

I thought it’d never happen 😂
Thanks man for getting around to it. My internet is down for 10d now, I’ll give it a shot with SEOP (but it was working)

« Il a free, il a tout compris. »

ooii commented

Sorry but I'm really busy with other stuff (et la dernière mise à jour d'AppDaemon qui a tout cassé dans mon chauffage et qui me fait perdre ma soirée).

Hello,
In Orléans, once logged on on toutsurmoneau.fr, I am redirected to https://www.orleanaise-des-eaux.fr/mon-compte-en-ligne/tableau-de-bord

Can you test with the new library and report if it's working or not?

It's not working. I've got this error message:

$python3 ./.local/bin/pysuez -u email@gmail.com -p 'password' -c counterID
list index out of range

With a wrong password:

$python3 ./.local/bin/pysuez -u email@gmail.com -p 'wrong_password' -c counterID
Issue with yesterday data

With a wrong counter ID:

$python3 ./.local/bin/pysuez -u email@gmail.com -p 'password' -c wrong_counterID
list index out of range

Hi,
On my side, it's still working. Would you like to share your login/password with me to check what's going on?

Hello
How can I provide them to you ?

Hi @ooii , it's now working again in home assistant, which has been updated. No need for me to patch anymore after each update 🙂

But ... not everytime the script is being run and I know why :
sometime the token itself contains special characters (we can think about it as utf-8 encoding inside utf-8 encoding)

We can fix that by changing one line :
Change this line
token = result.group(1)
into this one
token = result.group(1).encode().decode('unicode_escape')

I have been using this for one year now and it's working everytime.
Sorry I can't propose MR since I don't have any computer around.


Also I found another issue, not so bothering, which I have not tried to fix in my patch (made from an Android Phone anyway 😅) When reaching each first day of a month, the logic to compute yesterday date is not always fixing the delay for data to be available .. so sometimes there is no data when begining a new month.

Seems to be working here, the only thing is that state_class: total_increasing is missing from the entity. Without it, the sensor cannot be added to energy dashboard.

home-assistant/core#107858 (comment)