lmelon / homebridge-vaillant-vrc9xx

DEPRECATED - Homebridge plugin to control Vaillant Heating system
MIT License
20 stars 5 forks source link

Vaillant #11

Open craigton opened 4 years ago

craigton commented 4 years ago

Hi I can get the Vaillant plugin to work this is what I've put in { "platform": "VaillantVRC9xx", "api": { "debug": false, "polling": 60, "user": { "name": "Username", "password": "password", "device": "1122-44557-7788" }, "rooms": { "disabled": false, "veto_duration": 180 } } }

This is what happens } 21/10/2020, 21:14:08 [VaillantVRC9xx] > undefined - undefined - Right-hand side of 'instanceof' is not an object 21/10/2020, 21:14:12 [VaillantVRC9xx] > retry #2 21/10/2020, 21:14:12 [VaillantVRC9xx] { error: true, status: undefined, body: "Right-hand side of 'instanceof' is not an object", response: TypeError: Right-hand side of 'instanceof' is not an object at fetch (/home/hoobs/.hoobs/node_modules/node-fetch-cookies/src/index.mjs:40:29) at HTTPClient.fetch (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/HttpClient.mjs:25:36) at HTTPClient.execute (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/HttpClient.mjs:61:38) at async VRC9xxAPI.query (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:71:26) at async VRC9xxAPI.logIn (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:128:9) at async VRC9xxAPI.query (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:67:13) at async VRC9xxAPI.getFacilities (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:135:22) at async VaillantAPIPoller.getAllFacilities (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIPoller.mjs:70:30), retry: true

Any help would be great.

acresp commented 4 years ago

I don't know if there was some change on the Vaillant servers but since few days I see some message like "UNAUTHORIZED" and the refreshing is not correctly done, like the schedules I did on the multimatic app, I see automaticaly the temperatures demanded changes on the Home app, but now they don't changes, I have to restart Homebridge to see a correct refresh, or wait very very long time.

lmelon commented 4 years ago

I don't know if there was some change on the Vaillant servers but since few days I see some message like "UNAUTHORIZED" and the refreshing is not correctly done, like the schedules I did on the multimatic app, I see automaticaly the temperatures demanded changes on the Home app, but now they don't changes, I have to restart Homebridge to see a correct refresh, or wait very very long time.

weird ... working correctly on my side ...

it is all the time or only from time to time ?

lmelon commented 4 years ago

Hi I can get the Vaillant plugin to work this is what I've put in { "platform": "VaillantVRC9xx", "api": { "debug": false, "polling": 60, "user": { "name": "Username", "password": "password", "device": "1122-44557-7788" }, "rooms": { "disabled": false, "veto_duration": 180 } } }

This is what happens } 21/10/2020, 21:14:08 [VaillantVRC9xx] > undefined - undefined - Right-hand side of 'instanceof' is not an object 21/10/2020, 21:14:12 [VaillantVRC9xx] > retry #2 21/10/2020, 21:14:12 [VaillantVRC9xx] { error: true, status: undefined, body: "Right-hand side of 'instanceof' is not an object", response: TypeError: Right-hand side of 'instanceof' is not an object at fetch (/home/hoobs/.hoobs/node_modules/node-fetch-cookies/src/index.mjs:40:29) at HTTPClient.fetch (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/HttpClient.mjs:25:36) at HTTPClient.execute (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/HttpClient.mjs:61:38) at async VRC9xxAPI.query (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:71:26) at async VRC9xxAPI.logIn (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:128:9) at async VRC9xxAPI.query (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:67:13) at async VRC9xxAPI.getFacilities (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:135:22) at async VaillantAPIPoller.getAllFacilities (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIPoller.mjs:70:30), retry: true

Any help would be great.

From what I see the pluggin fails when fetching the details of your installation. Could you please explain what you have (which heater / regulator etc ...) ? It may help me understand the issue ...

lmelon commented 4 years ago

@craigton you could also try to activate the "debug" mode ... It will generate a specific file with more info for me to work on.

Attributes Usage
debug If set to "true", it will create a dump file with all queries to the Vaillant API allowing to debug any issue. DO NOT activate this permanently as it will create a huge dump file over time. The path to this dump file will be printed in the logs. The filename is "vaillant-query.log". Your password will not be output in the dump.
acresp commented 4 years ago

I don't know if there was some change on the Vaillant servers but since few days I see some message like "UNAUTHORIZED" and the refreshing is not correctly done, like the schedules I did on the multimatic app, I see automaticaly the temperatures demanded changes on the Home app, but now they don't changes, I have to restart Homebridge to see a correct refresh, or wait very very long time.

weird ... working correctly on my side ...

it is all the time or only from time to time ?

Since 2-3 days its always 🙁 I also have these messages but I think they was there since I installed the plugin.

[10/22/2020, 1:56:23 PM] [VaillantVRC9xx] 409 - Conflict - {"errorCode":"NO_REPORTS_AVAILABLE"} [10/22/2020, 1:56:23 PM] [VaillantVRC9xx] Error while refreshing facility The 33 -- xxxxxxxxxxxxxxxxxxx

(I masked my VR920 serial number)

I put a longer refresh time (I used the default 60sc), set to 300, to see if its not "too much" request for the Vaillant servers. Did you see my post about the domestic hot water & VR51 humidity sensor ? 🙂 Again, lot of thanks from Belgium for your work, it's a great plugin 🙂

craigton commented 4 years ago

Hi Ive activated the debug file but can't fine the dump file. See below. .mjs:70:30), retry: true } 22/10/2020, 15:48:00 [VaillantVRC9xx] > undefined - undefined - Right-hand side of 'instanceof' is not an object 22/10/2020, 15:48:06 [VaillantVRC9xx] > retry #3 22/10/2020, 15:48:06 [VaillantVRC9xx] TOO_MANY_RETRY - Too many retry - 22/10/2020, 15:48:06 [VaillantVRC9xx] Failed to get facilities list ... will retry in 30 seconds 22/10/2020, 15:48:36 [VaillantVRC9xx] Refreshing list of facilities 22/10/2020, 15:48:36 [VaillantVRC9xx] Get all facilities ... 22/10/2020, 15:48:36 [VaillantVRC9xx] [Login] 22/10/2020, 15:48:36 [VaillantVRC9xx] [Authorization] 22/10/2020, 15:48:36 [VaillantVRC9xx] { error: true, status: undefined, body: "Right-hand side of 'instanceof' is not an object", response: TypeError: Right-hand side of 'instanceof' is not an object at fetch (/home/hoobs/.hoobs/node_modules/node-fetch-cookies/src/index.mjs:40:29) at HTTPClient.fetch (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/HttpClient.mjs:25:36) at HTTPClient.execute (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/HttpClient.mjs:61:38) at VRC9xxAPI.query (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:71:48) at VRC9xxAPI.logIn (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:128:20) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async VRC9xxAPI.query (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:67:13) at async VRC9xxAPI.getFacilities (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:135:22) at async VaillantAPIPoller.getAllFacilities (/home/hoobs/.hoobs/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIPoller.mjs:70:30), retry: true } 22/10/2020, 15:48:36

I am running a Vaillant ecoTEC plus 630 boiler with VR70 control box with VRC920 connected to it and the network which is hard wired. Also VR50 rad valves on 8 rads and using VRC700 Multimatic app on ios which is working.

Regards

Craig

msteinbauer commented 4 years ago

Hi, I have the same problem, no connection to my Vaillant VRC900 for two weeks now. After I had contact to the Vaillant Support I received the following answer (translated)

"Yes, that's exactly right, the customer was blocked on 10/12/2010 15:50, because he did not access our API with one of our APPs, which led to an increased load. "Person XXX" gets the information about these interventions, so he would have to pass it on to you.

We could release the customer again if he assures us that he only accesses the system with one app. Unfortunately, we currently have no other way to handle this, even if we don't want to harm this customer (power user!).

Translated with www.DeepL.com/Translator (free version)"

I had a polling interval of 90 seconds ;-)

So it seems to me that Vaillant is blocking non-Vaillant-requests. Hopefully, the will allow that in future.

mountbatt commented 4 years ago

Same problems here …

owohub commented 3 years ago

Same issue as OP - just so that I understand it correctly, your plugin currently doesn't work because Vaillant doesn't allow it? So sad that Vaillant would be running an API just to block users from using it...

TheCurly commented 3 years ago

I have the same problem, same error with a valid username and password. When I give invalid credentials however, I get an authorisation error:

[3/9/2021, 3:24:32 PM] [VaillantVRC9xx] Refreshing list of facilities [3/9/2021, 3:24:32 PM] [VaillantVRC9xx] Get all facilities ... [3/9/2021, 3:24:32 PM] [VaillantVRC9xx] [Login] [3/9/2021, 3:24:32 PM] [VaillantVRC9xx] 401 - Unauthorized - {"errorCode":"NOT_AUTHORIZED"} [3/9/2021, 3:24:32 PM] [VaillantVRC9xx] Failed to get facilities list ... will retry in 30 seconds

So could this be a change in the API or is it really Vaillant blocking the requests?

With good credentials it throws this error, same as other people are having:

[3/9/2021, 3:27:59 PM] [VaillantVRC9xx] { error: true, status: undefined, body: "Right-hand side of 'instanceof' is not an object", response: TypeError: Right-hand side of 'instanceof' is not an object at fetch (/usr/lib/node_modules/homebridge-vaillant-vrc9xx/node_modules/node-fetch-cookies/src/index.mjs:40:29) at HTTPClient.fetch (/usr/lib/node_modules/homebridge-vaillant-vrc9xx/src/api/HttpClient.mjs:25:36) at HTTPClient.execute (/usr/lib/node_modules/homebridge-vaillant-vrc9xx/src/api/HttpClient.mjs:61:38) at VRC9xxAPI.query (/usr/lib/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:71:48) at VRC9xxAPI.logIn (/usr/lib/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:128:20) at processTicksAndRejections (internal/process/task_queues.js:93:5) at VRC9xxAPI.query (/usr/lib/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:67:13) at VRC9xxAPI.getFacilities (/usr/lib/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIClient.mjs:135:22) at VaillantAPIPoller.getAllFacilities (/usr/lib/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIPoller.mjs:70:30) at VaillantAPIPoller.start (/usr/lib/node_modules/homebridge-vaillant-vrc9xx/src/api/VaillantAPIPoller.mjs:26:9), retry: true } [3/9/2021, 3:27:59 PM] [VaillantVRC9xx] > undefined - undefined - Right-hand side of 'instanceof' is not an object

lmelon commented 3 years ago

Apologies to all of you for not answering your comments. This is a small side project for me not intended to annoy or harm anybody (including Vaillant of course) but only aiming at solving a personal problem that I had.

From the error messages I see ... I am guessing that indeed in some occasion the API is not responding with a JSON object like it should but with an HTML page showing some kind of error. That would explain why the code is not working.

There is really nothing I / we can do about it.

Well, to be honest, as there are probably a handful of users of this plugin I have strong doubts about the "overload" argument but it is their call to make of course.