Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Modlet/SmartAC went down this morning and now AC is stuck updating #10

Open
jsaltzman opened this issue Jul 25, 2019 · 3 comments
Open

Comments

@jsaltzman
Copy link

This morning the Modlet service went down. I contacted tech support to confirm it was down. The app did not work nor the website. Now it is back online but my Modlet is stuck "updating" in the Home app. Any idea what the issue is? Please let me know if you need additional info to troubleshoot.

@dave-atx
Copy link
Owner

dave-atx commented Jul 25, 2019 via email

@jsaltzman
Copy link
Author

jsaltzman commented Jul 25, 2019 via email

@elesueur
Copy link

elesueur commented Sep 6, 2019

Seems like the plugin doesn't handle well when the ThinkEco API returns a gateway timeout (which is usually an HTML response). I noticed that my entire homebridge system seems to become unresponsive periodically, and when I look back through the logs, I see

`
[2019-9-1 00:18:12] [ThinkEco SmartAC Platform] api updating thermostat status...
(node:454) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (:null:null)
at ThinkEcoAPI.getThermostats (/usr/local/lib/node_modules/homebridge-platform-smartac/index.js:121:36)
at :null:null
at process._tickCallback (internal/process/next_tick.js:118:7)

(node:454) 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(). (rejection id: 1)
(node:454) [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.
`

The unexpected < is the opening bracket of the <html> tag that is returned.

The smart AC plugin code needs to be improved to handle the case when the API does not return JSON.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants