sushilks/kumojs

PAC-USWHS002-WF-2

omriasta opened this issue · 6 comments

I have a Mitsubishi Mini Split that has the following wifi module:
PAC-USWHS002-WF-2

It uses Kumo Cloud. It is all setup and the Kumo app is working.

I tried setting this up, the kumo.cfg file is created and is able to read the rooms, the local ip etc. however it can't get status or send any of the commands. It looks like it is failing to connect on port 80 to the device. I tried to telnet to the device on port 80 but no response as well. Is it possible that this device is completely different and does not accept any commands? Any workarounds?
Here is the error I get when trying to get status of a room:

App is running on port: 8084
      PUT:/v0/roomMaster/status
Unable to put data
{ Error: connect ETIMEDOUT 192.168.XX.XXX:80
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1104:14)
  errno: 'ETIMEDOUT',
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '192.168.XX.XXX',
  port: 80 }
Unable to parse result after  put : undefined
SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
    at Request._callback (/home/omri/kumojs/build/kumojs.js:105:39)
    at self.callback (/home/omri/kumojs/node_modules/request/request.js:185:22)
    at Request.emit (events.js:189:13)
    at Request.onRequestError (/home/omri/kumojs/node_modules/request/request.js:881:8)
    at ClientRequest.emit (events.js:189:13)
    at Socket.socketErrorListener (_http_client.js:392:9)
    at Socket.emit (events.js:189:13)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
Error when trying to send command  {"c":{"indoorUnit":{"status":{}}}}  to  192.168.XX.XXX
{ Error: connect ETIMEDOUT 192.168.XX.XXX:80
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1104:14)
  errno: 'ETIMEDOUT',
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '192.168.XX.XXX',
  port: 80 }

Have you tried port scanning the IP? Are any ports open?

Hmmm..this is odd. Port 80 is open but I can't access it from my homeassistant NUC, just my laptop....I'll look into this a bit more.

OK, in my defense this was an odd one. I could not telnet from my ubuntu server on port 80, rebooted the server, still no luck. All other devices were able to telnet on 80. Finally, rebooted all my Google Wifi AP's and it worked. Not sure how Google wifi decided to block one device from accessing port 80 on the mitsubishi....all working now....

OK, reopening this as I'm not sure if this is my network or if anyone else has seen this.
It looks like the Mitsubishi device will BLOCK all packets from kumojs if kumojs is running when the Mitsubishi device is connecting to the network.
Here are the tests I ran when the device was blocked:
Rebooted my NUC, still being blocked
Rebooted all my AP's to reconnect all devices to the network, still being blocked
Stop KumoJS, reboot all AP's, then start KumoJS, All working.

Throughout this test, all other devices can ping and telnet on port 80 to the device. The only thing that is blocked is the device running KumoJS.

I'm not sure if there is something that KumoJS does that causes the device to blacklist it when it connects to the network. Also for clarification, throughout the whole process I did not reboot the actual Mitsubishi device, just the Access Points forcing a reconnect to the network.

That is very strange, There might be some changes in the server running on Mitsubishi side since this project was created.
Let us know if you find a solution to the problem.

Hasn't happened to me since the last comment. I also just switched to the python version so closing this out.