dave-atx / homebridge-platform-smartac

A homebridge plug-in for ThinkEco SmartAC thermostats.
MIT License
14 stars 10 forks source link

No longer working with new Homebridge, Node.js v12.16.3 #14

Open coldash17 opened 4 years ago

coldash17 commented 4 years ago

Hello! And thanks for this, it has been working great for me, up until a few days ago.

Currently running a Pi 3 with the newer "Homebridge Raspberry Pi Image"

I have installed the plugin through the new Homebridge.local control center, input the code lines with my email and password, and nothing is showing up anymore. I had this running successfully up until a few days ago. Any idea what could be causing this issue?

Config file is this:

{ "bridge": { "name": "Homebridge DAC1", "username": "0E:A4:77:F5:B9:9C", "port": 51401, "pin": "227-63-668" }, "accessories": [], "platforms": [ { "name": "Config", "port": 8581, "auth": "form", "theme": "auto", "tempUnits": "c", "lang": "auto", "accessoryControl": { "debug": true }, "platform": "config" }, { "platform": "SmartAC", "name": "ThinkEco SmartAC Platform", "username": "you@example.com", "password": "XXXX" } ] }

Is there something I'm missing?

Much appreciated

Tecnico1931 commented 4 years ago

@coldash17 am seeing some issues.

coldash17 commented 4 years ago

@Tecnico1931 issues w your SmartAC/Homebridge? Or issues w my code string?

@dave-atx - any ideas? Would love to get it up and running again.

Cheers

Tecnico1931 commented 4 years ago

@coldash17 going to try to spend some time on it today I keeper have home bridge crash on me when I removed the plugin and config off it worked fine

coldash17 commented 4 years ago

@Tecnico1931 thanks. Let me know if you have any luck? Much appreciated

Tecnico1931 commented 4 years ago

@coldash17 I got it working again if you post the logs from your homebridge I may be able to help.

bcar1 commented 4 years ago

@dave-atx

@Tecnico1931

having an issue as well- error message below

(node:675) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse () at ThinkEcoAPI.getThermostats (/usr/lib/node_modules/homebridge-platform-smartac/index.js:121:36) at processTicksAndRejections (internal/process/task_queues.js:97:5) (node:675) 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: 1) (node:675) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

joelrichards commented 3 years ago

@Tecnico1931

I believe I'm having the same issue. Relevant log follows. Any suggestions/tips on how your got it working again?

node:2212) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'deviceId' of undefined at /usr/local/lib/node_modules/homebridge-platform-smartac/index.js:126:27 at Array.forEach () at ThinkEcoAPI.getThermostats (/usr/local/lib/node_modules/homebridge-platform-smartac/index.js:122:23) at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ... to show where the warning was created) (node:2212) 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: 1) (node:2212) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. [25/05/2021, 19:38:32] [homebridge-platform-smartac] This plugin is taking long time to load and preventing Homebridge from starting. See https://git.io/JtMGR for more info.

steveb85 commented 2 years ago

i’ve got the same error, anyone find a fix? @joelrichards