datagutten / apc-smartconnect-py

A Python class to get info from APC SmartConnect
GNU General Public License v3.0
5 stars 0 forks source link

apc-smartconnect broken? #6

Open vmpr opened 3 months ago

vmpr commented 3 months ago

Hi @datagutten ,

thanks for your great work! we are using your script with our Icinga to monitor one of our smart apcs. It worked until the 29th of April 2024 but not the script doesn't give back any response anymore and times out.

Is it the same for you? Did schneider change something in their API?

thanks and have a great day! cheers Ringo

here are some connect tests from our server and I think that's the problem:

curl https://secureidentity.schneider-electric.com/identity/UserLogin

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

<script>
function redirectOnLoad() {
if (this.SfdcApp && this.SfdcApp.projectOneNavigator) { SfdcApp.projectOneNavigator.handleRedirect('/identity/idmserrorfound'); }  else
if (window.location.replace){
window.location.replace('/identity/idmserrorfound');
} else {
window.location.href ='/identity/idmserrorfound';
}
}
redirectOnLoad();
</script>

</head>

</html>

curl https://smartconnect.apc.com/auth/login

curl https://smartconnect.apc.com/api/v1/
{"code":"CECE-1006","error":"The requested route is not recognised"}
ACasey1 commented 2 months ago

Yea mine stopped working 8th of May. Haven't started troubleshooting yet.

datagutten commented 1 day ago

It seems to be related with some Python or requests version, on Python 3.9 it hangs on one the first authentication requests, but with Python 3.11 it seems to be working.

Edit: It is only working when I run it through Fiddler debugging proxy