Closed ricardojdsilva87 closed 2 years ago
Mmmm... we were afraid something like this could happen, sooner or later. Maybe you can try logging in from the Daikin app or using a browser on a PC and see if after you passed the captcha check the tokensaver works? If it does not, we are in big trouble because the integration would probably stop working very soon, and I don't really know how we can overcome this.
I tried the tokensaver myself, and it worked without asking for a captcha. Maybe it's just a one-time-operation you need to perform, try to login to the app or to your web account and see if it solves the issue. Fingers crossed... 🤞
Tried to logout and login again from the app but I'm still getting the same request the captcha... The app redirects me to a website id.daikin.eu, but it seems to me that it's a temporary redirect that acts as a login server. If I try to go there directly there is no option to login with the gmail credentials, it seems that is some kind of backoffice for companies. Do you know where to login via web? Thanks
Just an update. It seems that the code should already enable the captcha check based on the body request:
BODY: // ### server injected code ###
var gigya = window.gigya;
if (typeof gigya == 'undefined' || !gigya.isGigya) {
gigya = {isGigya: true};
}
gigya.apiKey = '3_xRB3jaQ62bVjqXU1omaEsPDVYC0Twi1zfq1zHPu_5HFT0zWkDvZJS97Yw1loJnTm';
gigya.defaultApiDomain = 'gigya.com';
gigya.dataCenter = 'eu1';
gigya.build = {
"number": 12785,
"version": "latest"
};
gigya.gmidVersion = 'ver4';
if (typeof gigya.partnerSettings == 'undefined') {
gigya.partnerSettings = {
"authMode": "cookie",
"globalConf": "{\n // A comma-delimited list of provider names to enable.\n enabledProviders: '*',\n\n // Define the language of Gigya's user interface and error message.\n lang: 'en',\n containerID: 'container',\n authFlow: 'redirect',\n \n // Bind globally to events.\n // See: http://developers.gigya.com/display/GD/Events#Events-OverridingtheDefaultEventMap\n customEventMap: {\n eventMap: [{\n events: '*',\n args: [function(e) {\n return e;\n }],\n method: function(e) {\n if (e.fullEventName === 'login') {\n // Handle login event here.\n } else if (e.fullEventName === 'logout') {\n // Handle logout event here.\n }\n }\n }]\n }\n}",
"captchaProvider": "Google",
"siteGroupGlobalConf": "{\n // A comma-delimited list of provider names to enable.\n enabledProviders: '*',\n\n // Define the language of Gigya's user interface and error message.\n lang: 'en',\n storageDomainOverride: 'cdc.daikin.eu',\n \n // Bind globally to events.\n // See: http://developers.gigya.com/display/GD/Events#Events-OverridingtheDefaultEventMap\n customEventMap: {\n eventMap: [{\n events: '*',\n args: [function(e) {\n return e;\n }],\n method: function(e) {\n if (e.fullEventName === 'login') {\n // Handle login event here.\n } else if (e.fullEventName === 'logout') {\n // Handle logout event here.\n }\n }\n }]\n }\n}",
"recaptchaV2": {
"siteKey": "6Lc-ebkUAAAAAGSmtZU4P3uC4MeiSQUbVR7bDgXy"
},
"plugins": {
"connectWithoutLoginBehavior": "alwaysLogin",
"defaultRegScreenSet": "Default-RegistrationLogin",
"defaultMobileRegScreenSet": "Default-RegistrationLogin",
"sessionExpiration": -2,
"rememberSessionExpiration": 0,
"apiDomain": "eu1.gigya.com"
},
"ssoKey": "3_QebFXhxEWDc8JhJdBWmvUd1e0AaWJCISbqe4QIHrk_KzNVJFJ4xsJ2UZbl8OIIFY",
"baseDomains": "daikin.eu",
"customAPIDomainPrefix": "cdc"
};
}
gigya.providersConfig = {
"facebook": {
"appID": "548543762554249",
"version": "v2.0"
},
"googlePlus": {
"clientId": "1064858507908-5i1n5s67fc2v4mfo31ki7pkrvk1fofkk.apps.googleusercontent.com",
"scopes": "profile email"
}
};
gigya.samlConfig = {
"errorPageURL": "https://my.daikin.eu/content/daikinid-cdc-saml/en/error.html",
"proxyPageURL": "https://my.daikin.eu/content/daikinid-cdc-saml/en/proxy.html"
};
gigya.canary = gigya.canary || { isActive: false, config: {
"version": "12785-3-27379395",
"isEnabled": true,
"probability": 3,
"cookiesNames": {
"isCanary": "gig_canary",
"version": "gig_canary_ver"
}
} };
gigya.errorReport = {
"enabled": true,
"probability": 1
};
gigya.gmidVersion = 'ver4';
gigya.bypassCaptchaV1 = true;
if (gigya.canary && gigya.canary.isActive) {} else if (gigya.__initialized) { console.warn('**** gigya.js loaded twice ****'); }
else {
gigya.__initialized = true;
}
I have removed the last part about the license it was code printed and it was heavy to paste here. For what I see the code enables the captcha check using google (the login method I'm using). Not sure if this helps Thanks
...maybe if you register normally instead of using google to login?
Hello again, just to leave the workaround I've done to make the integration work in HA. I'm still using the google login as the primary login on my phone for example, but created a new account for the HA to work: Google login email - email@gmail.com new login - email+1@gmail.com --> This way you will still receive the confirmation email without the need to create a new email address. Create the account here: https://my.daikin.eu/content/daikinid-cdc-saml/en/login.html
After that I've just shared the home where I had previously added the devices with this new account via the generated QR code. After this I've just added the integration with the new email and password in HA.
@rospogrigio thanks for all the help and for integration :)
Hello, First of all thanks for your work! I've tried adding the residential controller to home assistant adding it trought the UI. Inserted my email address and also password. On the Daikin Residential Controller app, I've created the account using google login connected to my account. On the Home Assistant I'm getting the following error:
I've tried to search the code but couldn't find anything related to captcha requests. Is there anything that I can check? Thanks
UPDATE: Did some more tests with the tokensaver.py script and it seems that somehow the login needs to accept a captcha.
Is there any possibility to integrate that into the UI?