Skip to content
This repository was archived by the owner on Nov 22, 2025. It is now read-only.
This repository was archived by the owner on Nov 22, 2025. It is now read-only.

homebridge-mrcool.MrCool starts, and crashes.  #3

Closed as not planned
Closed as not planned

Description

@lvnilesh

Thanks for the update. I installed and restarted homebridge.

I notice that homebridge-mrcool.MrCool starts, and crashes.
And then repeats.

[2/12/2023, 9:43:55 PM] Registering platform 'homebridge-mrcool.MrCool'
[2/12/2023, 9:43:55 PM] [homebridge-mrcool] Loaded homebridge-mrcool v1.0.0 child bridge successfully
[2/12/2023, 9:43:55 PM] Homebridge v1.6.0 (HAP v0.11.0) (homebridge-mrcool) is running on port 34070.

/homebridge/node_modules/homebridge-mrcool/node_modules/node-mrcool/MrCool.js:413
        return cookieArray.map((element) => element.split(';')[0]).join(';');
                           ^
TypeError: Cannot read properties of undefined (reading 'map')
    at MrCoolAPIConnection.#getCookiesFromResponse (/homebridge/node_modules/homebridge-mrcool/node_modules/node-mrcool/MrCool.js:413:28)
    at MrCoolAPIConnection.#getApplicationCookies (/homebridge/node_modules/homebridge-mrcool/node_modules/node-mrcool/MrCool.js:237:44)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at MrCoolAPIConnection.establishConnection (/homebridge/node_modules/homebridge-mrcool/node_modules/node-mrcool/MrCool.js:117:36)
    at HomebridgeAPI.<anonymous> (/homebridge/node_modules/homebridge-mrcool/src/platform.ts:57:7)
[2/12/2023, 9:43:55 PM] [homebridge-mrcool] Child bridge process ended
[2/12/2023, 9:43:55 PM] [homebridge-mrcool] Process Ended. Code: 1, Signal: null
[2/12/2023, 9:44:02 PM] [homebridge-mrcool] Restarting Process...

Activity

  1. changed the title [-]I notice that homebridge-mrcool.MrCool starts, and crashes. [/-] [+]homebridge-mrcool.MrCool starts, and crashes. [/+] on Feb 13, 2023
  2. jfarlow12 commented on Feb 28, 2023

    @jfarlow12

    I have the same issue. Were you able to find a resolution?

  3. lvnilesh commented on Mar 1, 2023

    @lvnilesh
    Author

    no :(

  4. ryanfroese commented on Mar 3, 2023

    @ryanfroese

    I have the same problem. I've tried to do some digging, but I'm having trouble accessing the API the code is using. Has anyone tried with postman to see if you are able to get a response?

  5. isaac-webb commented on Mar 4, 2023

    @isaac-webb
    Owner

    Sorry for the radio silence everyone! My installation also broke around the same time, and, after some quick checks on their website, it looks like they changed the way their API works, breaking my plugin/API. I (or anyone really) need to use browser debuggers to do some reverse engineering to figure out how their new API works and change the code to work with it. Some of the changes look good (more RESTful and easier to work with), but I haven't had the time to really dig in yet. If anyone has started, I'd be more than willing to help.

  6. ryanfroese commented on Mar 4, 2023

    @ryanfroese

    I am getting 405 Method Not Allowed when using Method: POST, however GET is working.

    I'm definitely willing to help, but lack experience in this area (usually write self-contained react apps with my own backend). Not used to digging into an API with no documentation. Any suggestions where I should get started?

  7. ryanfroese commented on Mar 4, 2023

    @ryanfroese

    I have made some progress:

    The new API is at https://api.smartcielo.com/web/login as opposed to https://home.cielowigle.com/auth/login.

    I've found a POST for login, which I have working. It's fairly simple.

    There is a GET for Devices and GET for Appliance List. All of these are working for me right now on Postman.

    Major problem I'm having, when I change temperatures from the web app I'm not seeing any in the "Network" activity in my Chrome dev tools. I honestly don't even know how that's possible, so I'm probably missing something.

  8. ryanfroese commented on Mar 5, 2023

    @ryanfroese

    OK, more progress. I have determined that there is an API for login and getting appliance/device lists, however it appears to be using a web socket for all controls.

    The web socket looks like this for a change temperature command:
    websocket request

    Websocket response (status update, which also is periodically/randomly sent):
    Screenshot 2023-03-04 at 4 49 40 PM

  9. jfarlow12 commented on Mar 6, 2023

    @jfarlow12

    Nice work! What else is needed then? Also, do I see an option here to turn off the LED using this API? That would be amazing!

  10. ryanfroese commented on Mar 7, 2023

    @ryanfroese

    The code needs to be altered, which I've begun digging into. Unfortunately I'm not sure how the npm ws package functions (I've never messed with web sockets).

    @isaac-webb , are you familiar with this part of things?

    The new web socket is at: wss://apiwss.smartcielo.com/websocket/?sessionId=<yourSessionId>&token=<yourToken>

    Both <yourSessionId> and <yourToken> come from response to a simple POST https request like this:
    const loginUrl = new URL("https://api.smarcielo.com/web/login"); const loginPayload = { agent: this.#agent, headers: { authority: "api.smartcielo.com", accept: "application/json, text/plain, */*", "accept-language": "en-US,en;q=0.9", "cache-control": "no-cache", "content-type": "application/json; charset=UTF-8", origin: "https://home.cielowigle.com", pragma: "no-cache", referer: "https://home.cielowigle.com/", "x-api-key": <notPostingHere>, }, body: { user: { userId: username, password: password, mobileDeviceId: "WEB", deviceTokenId: "WEB", appType: "WEB", appVersion: "1.0", timeZone: "America/Los_Angeles", mobileDeviceName: "chrome", deviceType: "WEB", ipAddress: ip, isSmartHVAC: 0, locale: "en", }, }, method: "POST", }; const response = await fetch(loginUrl, loginPayload);

    That's where I am so far. I have also found some cookie stuff, but I'm still not entirely sure how that aspect works...

  11. ryanfroese commented on Mar 9, 2023

    @ryanfroese

    I have it working with the exception of the #pingSocket() function! It appears all the cookie stuff is unnecessary with the new code, so I removed all of it. I'm trying to discover if the ping function is really just a refresh token function.

  12. ryanfroese commented on Mar 9, 2023

    @ryanfroese

    Still having some issues with #pingSocket, it disconnects and reconnects but other than that it works! I would be willing to submit a PR from my fork if @isaac-webb would like, but it would be nice to get some help figuring out the ping/disconnect issue first. Give it a shot! I named it homebridge-cielo, so it should come up in a homebridge search.

    My repo is https://github.com/ryanfroese/homebridge-smartcielo

  13. friism commented on Mar 9, 2023

    @friism

    @ryanfroese did you publish it to NPM? It's unclear to me how to install from GitHub in homebridge

  14. jfarlow12 commented on Mar 10, 2023

    @jfarlow12

    Thanks Ryan! I was able to get it installed and configured and I see the command getting sent but nothing happens to the unit. Can I provide any information that might be helpful?

  15. 26 remaining items

  16. arharp commented on Jul 14, 2023

    @arharp

    Woah! It works on my mrcool multi-zone setup

    @friism How did you manage to get it to work?

  17. Taik commented on Jul 14, 2023

    @Taik

    Woah! It works on my mrcool multi-zone setup

    @friism How did you manage to get it to work?

    @arharp The latest version of homebridge-cielo (v1.1.5) should contain the library changes; see here.

  18. friism commented on Jul 17, 2023

    @friism

    @arharp yup, to @Taik 's point I just installed and configured the latest version

  19. brando1972 commented on Oct 27, 2023

    @brando1972

    I have tried for days to get this to work. I am sure its me....can someone please help

    Mac Pro Ventura

    [10/26/2023, 8:32:38 PM] [homebridge-cielo] Launched child bridge with PID 6872
    [10/26/2023, 8:32:38 PM] Registering platform 'homebridge-cielo.cielo'
    [10/26/2023, 8:32:38 PM] [homebridge-cielo] Loaded homebridge-cielo v1.1.5 child bridge successfully
    [10/26/2023, 8:32:38 PM] Loaded 0 cached accessories from cachedAccessories.0E5AA137548F.
    [10/26/2023, 8:32:39 PM] Homebridge v1.6.1 (HAP v0.11.1) (homebridge-cielo) is running on port 57293.
    TypeError: Cannot read properties of undefined (reading 'user')
    at /usr/local/lib/node_modules/homebridge-cielo/node_modules/node-smartcielo-ws/Cielo.js:264:52
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at CieloAPIConnection.#getAccessTokenAndSessionId (/usr/local/lib/node_modules/homebridge-cielo/node_modules/node-smartcielo-ws/Cielo.js:260:23)
    at CieloAPIConnection.establishConnection (/usr/local/lib/node_modules/homebridge-cielo/node_modules/node-smartcielo-ws/Cielo.js:119:5)
    at HomebridgeAPI. (/usr/local/lib/node_modules/homebridge-cielo/src/platform.ts:73:7)
    TypeError: Cannot read properties of undefined (reading 'sessionId')
    at /usr/local/lib/node_modules/homebridge-cielo/node_modules/node-smartcielo-ws/Cielo.js:123:32
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at CieloAPIConnection.establishConnection (/usr/local/lib/node_modules/homebridge-cielo/node_modules/node-smartcielo-ws/Cielo.js:119:5)
    at HomebridgeAPI. (/usr/local/lib/node_modules/homebridge-cielo/src/platform.ts:73:7)
    [10/26/2023, 8:32:39 PM] [homebridge-cielo] Child bridge process ended
    [10/26/2023, 8:32:39 PM] [homebridge-cielo] Process Ended. Code: 1, Signal: null
    [Stairs 4E04] The image snapshot handler for the given accessory is slow to respond! See https://homebridge.io/w/JtMGR for more info.
    [10/26/2023, 8:32:46 PM] [homebridge-cielo] Restarting Process...
    [10/26/2023, 8:32:46 PM] [homebridge-cielo] Launched child bridge with PID 6890
    [10/26/2023, 8:32:46 PM] Registering platform 'homebridge-cielo.cielo'
    [10/26/2023, 8:32:46 PM] [homebridge-cielo] Loaded homebridge-cielo v1.1.5 child bridge successfully
    [10/26/2023, 8:32:46 PM] Loaded 0 cached accessories from cachedAccessories.0E5AA137548F.
    [10/26/2023, 8:32:46 PM] Homebridge v1.6.1 (HAP v0.11.1) (homebridge-cielo) is running on port 57293.
    TypeError: Cannot read properties of undefined (reading 'user')
    at /usr/local/lib/node_modules/homebridge-cielo/node_modules/node-smartcielo-ws/Cielo.js:264:52
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at CieloAPIConnection.#getAccessTokenAndSessionId (/usr/local/lib/node_modules/homebridge-cielo/node_modules/node-smartcielo-ws/Cielo.js:260:23)
    at CieloAPIConnection.establishConnection (/usr/local/lib/node_modules/homebridge-cielo/node_modules/node-smartcielo-ws/Cielo.js:119:5)
    at HomebridgeAPI. (/usr/local/lib/node_modules/homebridge-cielo/src/platform.ts:73:7)
    TypeError: Cannot read properties of undefined (reading 'sessionId')
    at /usr/local/lib/node_modules/homebridge-cielo/node_modules/node-smartcielo-ws/Cielo.js:123:32
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at CieloAPIConnection.establishConnection (/usr/local/lib/node_modules/homebridge-cielo/node_modules/node-smartcielo-ws/Cielo.js:119:5)
    at HomebridgeAPI. (/usr/local/lib/node_modules/homebridge-cielo/src/platform.ts:73:7)
    [10/26/2023, 8:32:47 PM] [homebridge-cielo] Child bridge process ended
    [10/26/2023, 8:32:47 PM] [homebridge-cielo] Process Ended. Code: 1, Signal: null

  20. Taik commented on Oct 28, 2023

    @Taik

    Haven't been able to spend more time on this, but looks like they added a required reCaptcha step during login, which is why auth step fails.

  21. eheikkinen commented on Oct 29, 2023

    @eheikkinen

    Just recently been trying to integrate Cielo also to my home project. I've stumbled upon multiple different repos, but havn't gotten any of them to work. Latest ones probably fail as mentioned above, because they have introduced captcha.

    image

    I wonder would it be possible to:

    Unfortunately I don't have now time to test it out, but will let you know if I progress some day.

  22. SkyJetty commented on Jun 16, 2024

    @SkyJetty

    Tried to get this working and it just crashes and forces home bridge to reboot over and over just like all the other versions.

  23. ryanfroese commented on Jun 17, 2024

    @ryanfroese

    Yup, I believe it's basically dead at this point (due to their changes). I had it working for a whopping 3 months before they changed their API. Unfortunate!

  24. ryanfroese commented on Jun 17, 2024

    @ryanfroese

    If anyone comes up with a solution, submit a PR and I will approve. For now I don't have time to dissect the new API and take the lead on this one.

  25. SkyJetty commented on Jun 17, 2024

    @SkyJetty

    I wish I knew enough to take a look, but I'm more of a mechanical person and code is a mystery.

  26. ryanfroese commented on Nov 21, 2025

    @ryanfroese

    FYI, I now have this working in my repo, but I did have to implement a captcha solver.

  27. brando1972 commented on Nov 21, 2025

    @brando1972
  28. ryanfroese commented on Nov 21, 2025

    @ryanfroese

    It's in the README in my fork: https://github.com/ryanfroese/homebridge-smartcielo
    I won't be responding on this issue/thread anymore, open an issue on my repo if find a bug or have an issue - though my time is VERY limited these days.

  29. isaac-webb commented on Nov 22, 2025

    @isaac-webb
    Owner

    All (@ryanfroese in particular),
    Really appreciate the active interest in my project and the effort put into keeping it alive in my absence (silence). I've moved and, unfortunately, no longer own any of these units, so I'm unable to meaningfully contribute to this repo. Sounds like @ryanfroese has the latest and greatest in his fork. I'll be archiving this repo, please help them out instead, and thanks again for the efforts!
    Best,
    -Isaac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions