Open maxmulready opened 6 years ago
Ah, yep, you're right -- looks like the website got redesigned. I'll try to see if I can make some updates over the weekend to fix things.
This is the error I see from within homebridge plugin in Hassio.
Hope the new website is more responsive, faster and just better overall than it has been the last couple years.
(node:713) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): StatusCodeError: 302 - "<html><head><title>Object moved</title></head><body>\r\n<h2>Object moved to <a href=\"/Account/Login\">here</a>.</h2>\r\n</body></html>\r\n"
(node:713) [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.
Their site would almost have to be better!
I've been attempting to get this to work but no luck. For some reason It's either not logging in or the cookie is not persiting
async auth() {
if (Date.now() - this.lastLogin > LOGIN_FREQUENCY) {
this.log('api', 'logging in...');
const response = await this.session.post(
'https://web.mymodlet.com/Account/Login',
{
// form: {'returnUrl': '/Dashboard/Index'},
json: {data: {'Email': this.username, 'Password': this.password}},
followRedirect: false,
simple: false,
}
);
return response;
}
}
// return an iterable of all of the Thermostats in the account
// will retain a reference to and update the current status of
// all returned Thermostats each time it's called
async getThermostats() {
// we only want a single concurrent call to mymodlet.com
// because this is quite expensive. without a lock, multiple
// concurrent operations here makes updating multiple attributes
// on a thermostat(s) is pretty slow.
await this.lock.acquire();
if (Date.now() - this.lastUpdate > UPDATE_FREQUENCY) {
this.log('api', 'updating thermostat status...');
const auth = await this.auth();
const statusTxt = await this.session.get('https://web.mymodlet.com/Devices/UpdateData');
console.log(statusTxt);
I was able to get this working in #5. For whatever reason, responses are given as stringified JSON and requests must be formatted as stringified JSON inside a data
property... 🤔
Not to be a pain, but I am now getting an error that says
Unable to read/write thermostat.
at Thermostat.handleErrors (/usr/local/lib/node_modules/homebridge-platform-smartac/index.js:191:19)
at /usr/local/lib/node_modules/homebridge-platform-smartac/index.js:247:12
at
Something on my end perhaps?
**To clarify, the plugin will run fine until I initiate any commands through the Home iOS app, and then this error occurs
Not a programmer, just a regular user of this extension.
Dave-ATX - Thanks for your hard work and I am sure you'll get this resolved. DFurnes - Reading over your changes in #5, I hope that Dave will implement them.
I Can’t tell you how much I miss this app working, and now that I know a fix is in sight I’m hopeful, given the current heat in NYC that my favourite and most used home automation app returns soon. You really forget how reliant you are on them and after having such great control it’s awful to now be back at 4am waking up because the ac is back to its old tricks and the rooms so cold you need the comforter. I know everyone does this in spare time and it’s appreciated.
Imagine much begging to see it working again as I realise my apt just hit 90 and the Modlets have all disconnected.
Help me Obi AC Kenobi. You’re my only hope.
For what it's worth, this works for me:
npm i https://github.com/DFurnes/homebridge-platform-smartac/tarball/heater-cooler
This will add @DFurnes's fixed branch as a dependency directly, so you don't have to wait for #5 to be merged.
Alternatively, you can replace the dependency manually in package.json:
From:
"homebridge-platform-smartac": "^1.1.2"
To:
"homebridge-platform-smartac": "https://github.com/DFurnes/homebridge-platform-smartac/tarball/heater-cooler"
Stay cool. ❄️
Sorry to be such a newb, but can you let me know the full path to the file I need to change? Stumbling around I had found two different config.json files (one for SmartAC and one for Homebridge itself) but didn't find the line you reference in either. Thanks!
@MRyanNYC That line goes in package.json. If you have vanilla homebridge, try running:
sudo npm uninstall -g homebridge-platform-smartac
sudo npm i -g https://github.com/DFurnes/homebridge-platform-smartac/tarball/heater-cooler
@RickyRomero Thanks, that worked for me. @DFurnes Thank you as well.
I am running Hassio using the builtin Homekit library (the homebridge addon is being deprecated as the homekit integration is built out) Is it possible to install into latest Hassio 74.2 on HassOS (the newest non resin based)
These modlets are so much more useful when they're working through Homebridge. I've learned a ton from the coding efforts here - kudos @dave-atx. Thanks @RickyRomero for noting @DFurnes fork with those great fixes. They're working for me and hope they can be incorporated in the master.
Couldn't agree more @metameric. Without Homebridge and this platform, they are more frustrating than useful. It astounds me how bad the smartAC app is and how ThinkEco could let it go for this long without any updates...especially when the modlets themselves are so valuable and in demand.
Anyway, one odd thing... my temp selector will not stop at 79 degrees. It just skips from 78 to 80. Is anyone else seeing this?
Both my Smart AC units are showing the dreaded "No Response" message. Rebooted my computer, where HomeBridge runs, and still nothing. All other non-HomeBridge Homekit items are working.
Anyone else seeing this? SmartAC issue?
Mines is still working and all ac u it’s connectwd and working.
Hi,
This plugin has been working great for months, but today it stopped and I noticed that I'm getting an unhandled promise rejection warning when I try to run homebridge. Seems like ThinkEco has updated their website...maybe this has something to do with it?