Open Grubs opened 3 years ago
Hi there!
It looks like I have to improve my error handling - but the underlying issue is that your install of vzduch-dotek (the airtouch API) is either not working, or your configuration is pointing at the wrong place.
Have you confirmed your vzduch-dotek install? See the README.md for details.
On reflection - I've taken a look at the underlying API I depend on (vzduch-dotek), and have decided to just port the bits that are relevant straight into the plugin. This means you won't need to install the API, but it may take a few days for me to finish the code.
Absolute Legend! Ill stay tuned.
Shouldn't be long - got half way through today (I'm on 3 months gardening leave, need something to keep me busy!)
@L0rdCha0s my vzduch-dotek API is working all ok. I can connect via browser to the IP and port and I'm also using it in Home Assistant. Althought if you have time I'd prefer not to have to use the API and just use a standard HA Integration oh and the Homebridge plugin without the needing the API sounds great!!!!
Wowsers, customer service!!
@Grubs - interesting that the current plugin isn't working if your vzduch-dotek is. Can you show me your homebridge config for the plugin please?
sure @L0rdCha0s
Excuse the formatting. Posting on my phone
"accessories": [ { "accessory": "homebridge-airtouch3-airconditioner", "name": "Air Conditioner", "apiRoot": "http://192.168.1.13:5353/", "zones": [ { "zoneId": 0, "name": "Dining Room Zone" }, { "zoneId": 1, "name": "Lounge Room Zone" }, { "zoneId": 2, "name": "Z** Room Zone" }, { "zoneId": 3, "name": "Bedroom Zone" }, { "zoneId": 4, "name": "S** Room Zone" }, { "zoneId": 5, "name": "Garage Zone" } ] } ],
Hi @Grubs - ah, just as I've finished the work on removing the vzduch-dotek requirement - I've seen your issue - it's the trailling '/' on your URL - you'd need 'http://192.168.1.13:5353' not 'http://192.168.1.13:5353/'
Regardless, I've just ported the C# code from vzduch-dotek to Typescript and done a few spot checks - everything seems to work.
@shard87 and @Grubs - please update your plugins, and note the new details in the README.md - basically you now need to add a new config option 'airtouchHost' - which is just the IP Address of your Airtouch panel (port can also be set, but the default value should be correct). You can remove the old 'apiRoot' item as it's no longer needed.
** Also - you no longer need vzduch-dotek at all - this new version is entirely self contained in the homebridge plugin.
Please give it a run through and make sure it works for you - the Airtouch supports a number of different configuration patterns and I can't guarantee I've covered all bases - feedback would be very useful!
Hi @L0rdCha0s,
I've tried installing on both my Homebridge Container (slightly behind on updates) and RPi (fully up to date) but both throw the following errors:
Container:
(node:31016) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
(node:31016) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 122)
(node:31016) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
(node:31016) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 124)
(node:31016) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
(node:31016) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 126)
(node:31016) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
(node:31016) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 128)
RPi:
(node:22271) UnhandledPromiseRejectionWarning: Error: Request failed with status code 400
at createError (/usr/local/lib/node_modules/homebridge-airtouch3-airconditioner/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/local/lib/node_modules/homebridge-airtouch3-airconditioner/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/homebridge-airtouch3-airconditioner/node_modules/axios/lib/adapters/http.js:260:11)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
(node:22271) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 34)
(node:22271) UnhandledPromiseRejectionWarning: Error: Request failed with status code 400
at createError (/usr/local/lib/node_modules/homebridge-airtouch3-airconditioner/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/local/lib/node_modules/homebridge-airtouch3-airconditioner/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/homebridge-airtouch3-airconditioner/node_modules/axios/lib/adapters/http.js:260:11)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
(node:22271) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 36)
(node:22271) UnhandledPromiseRejectionWarning: Error: Request failed with status code 400
at createError (/usr/local/lib/node_modules/homebridge-airtouch3-airconditioner/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/local/lib/node_modules/homebridge-airtouch3-airconditioner/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/homebridge-airtouch3-airconditioner/node_modules/axios/lib/adapters/http.js:260:11)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
(node:22271) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 38)
(node:22271) UnhandledPromiseRejectionWarning: Error: Request failed with status code 400
at createError (/usr/local/lib/node_modules/homebridge-airtouch3-airconditioner/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/local/lib/node_modules/homebridge-airtouch3-airconditioner/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/homebridge-airtouch3-airconditioner/node_modules/axios/lib/adapters/http.js:260:11)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
(node:22271) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 40)
Both of these I've tried removing the plugin and re-installing but have had no luck as of yet...
(Thanks again!)
Hi @shard87 ! Looks like you need to update the plugin - you're still on the old version. Make sure the homebridge UI says '1.2.0'.
Also make sure you've added the config entries for 'airtouchHost'
Rodger; ConfigUI still lists the latest plugin at 1.0. I'll have another look..
@shard87 Ooops - looks like my fault - have to update npm. Give me 5 mins
@shard87 OK try now - I've just pushed the correct version to npmjs
That's done it!! You sir are a gentleman! Absolute legend.. 🙏🏻
Good to hear mate - enjoy - and if you run into problems of any kind or odd behaviour - please let me know so I can fix it :)
@L0rdCha0s just did a fresh install and working all good here! Excellent work! (y)
One thing I noticed. I don't have the option for Fan only. Is that more of a HomeKit thing?
Will do. Last question, is fan speed control possible (HomeKit limitation etc)?
@Grubs - unfortunately yes - Homekit's 'HeaterCooler' accessory only provides options for 'auto','heat','cool' and 'off' - but not 'dry' or 'fan'..
@shard87 Possibly yes - but in a round about way - I've seen others achieve it using a 'Window' control (because windows can be opened from 0-100% .. I'll take a look.
Hi @shard87 and @Grubs - I've made a few key changes (update should be available in homebridge). No config changes - but some serious changes under the hood:
Can you both please tell me if you see similar behaviour?
Will do, updating now..
Thanks @shard87 .
In the meantime, there's another issue I'm working on - because Airtouch only provides commands for zone temp +1 or -1 degree (i.e. I can't set it straight from say, 21 to 25 - i have to send 4 commands : up,up,up,up ) - the current plugin gets confused if it gets a lot of temperature commands in a hurry.
Should have a fix for that soon.
@shard87 - Actually, I think I've just fixed both of those bugs.
Let me know if there are further bugs. Version is 1.3.3 with the bugfixes.
@L0rdCha0s just updated and gave a quick test. Could see the fan speed changing all ok.
I changed the temp from 22 to 17 and I think it witnessed your delayed commands. Seemed to work well. Ended up on 17 as expected
Yeah - as long as it gets there in the end..
Ultimately the number of commands I can send is rate limited.. just annoying that setting temperature directly isn’t supported
On 25 Mar 2021, at 8:35 pm, Grubs @.***> wrote:
@L0rdCha0s just updated and gave a quick test. Could see the fan speed changing all ok.
I changed the temp from 22 to 17 and I think it witnessed your delayed commands. Seemed to work well. Ended up on 17 as expected
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
All working the same as per @Grubs from my end too.
Pretty happy right now; thanks so much!
Always good when code works :)
On 25 Mar 2021, at 9:07 pm, shard87 @.***> wrote:
All working the same as per @Grubs from my end too.
Pretty happy right now; thanks so much!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
See log attached and also accessory created in Homebridge
homebridge-airtouch3-airconditioner-error.log