Giter VIP home page Giter VIP logo

kumojs's People

Contributors

edward3h avatar gregorymartin avatar lweighall avatar rikbrown avatar sushilks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kumojs's Issues

Lend any help?

A couple of us are trying to get our split systems / kumos into Homebridge to use HomeKit to control them along with our other HVAC and such. I am stumped by the key and crypt parts of your code which I am using for bootstrapping my testing...is there any chance you can explain what the flow is there around sending a command back to the system to make it change state? I just need a little bit of a "map" on your "mountain" and I can start "hiking" :)

Type errors on install

I'm having all sorts of issues trying to even get this installed. I've got an Ubuntu 18.04 server running with Node 8.10 installed.

I installed typescript definitions after I got initiali errors trying to sudo npm install kumojs, so ran this:

sudo npm install @types/node --save-dev

Now I'm getting 4 errors from src/kumojs.ts:

src/kumojs.ts:60:25 - error TS2345: Argument of type 'unknown[]' is not assignable to parameter of type 'number[]'.
  Type 'unknown' is not assignable to type 'number'.

60                         Array.prototype.map.call(p+dt, function (m2:any) {
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61                             return m2.charCodeAt(0)
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62                         })
   ~~~~~~~~~~~~~~~~~~~~~~~~~~

src/kumojs.ts:75:43 - error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[number, number, ...any[]]'.
  Type 'number[]' is missing the following properties from type '[number, number, ...any[]]': 0, 1

75         Array.prototype.splice.apply(dt3, [32, 32].concat(dt1_l));
                                             ~~~~~~~~~~~~~~~~~~~~~~

src/kumojs.ts:87:43 - error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[number, number, ...any[]]'.

87         Array.prototype.splice.apply(dt3, [0, 32].concat(W))
                                             ~~~~~~~~~~~~~~~~~

src/kumojs.ts:124:57 - error TS2345: Argument of type 'Number' is not assignable to parameter of type 'number'.
  'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible.

124       return new Promise(resolve => setTimeout(resolve, ms));
                                                            ~~
Found 4 errors.

InvalidCharacterError communicating with PAC-WHS01WF-E

Hello,

I have 8 Mitsubishi air conditioners in my house, each with a kumoCloud module installed. 7 of the 8 have PAC-WHS01WF-E (old) WiFi modules, but one has a PAC-USWHS002-WF-1 (new) WiFi module.

When I use KumoJS to send commands to the new module, located in my kitchen, things work as expected. When I try to send a command to any of the 7 old modules, such as the one located in my office, I get this the following.

All 8 modules work fine with the iOS app, with the exception of the fact that using Mitsubishi's scheduling feature stopped working as soon as I added the new WiFi module to the mix. Unfortunately, the old version is discontinued so I can't create a homogeneous network without purchasing 7 new modules at $175 a pop. This is what led me to try KumoJS.

Any ideas?

Thanks,
-Mat

curl http://127.0.0.1:8084/v0/room/Office/status

PUT:/v0/roomOffice/status
Error when trying to send command {"c":{"indoorUnit":{"status":{}}}} to 192.168.31.103
{ InvalidCharacterError
at /home/mpk/kumo/kumojs-master/node_modules/base-64/base64.js:23:36
at Object. (/home/mpk/kumo/kumojs-master/node_modules/base-64/base64.js:165:2)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/home/mpk/kumo/kumojs-master/build/kumojs.js:12:16)
message: 'Invalid character: the string to be decoded is not correctly encoded.' }

Config Download Doesn't Capture Units in Zones

I have grouped all the units upstairs in my home into a zone, when I run the config it seems to only pull back my main floor unit that is at the top level of my Kumo configuration.

here is the kumo.cfg

$ more kumo.cfg
module.exports =
{"username":{"key":{"serial":"key","label":"Main Floor","cryptoSerial":"serial","cryptoKeySet":"F","password":"password","address":"ip","S":0,"W":"guid"}}}

and here is a screenshot of my setup, there are 4 units in "Upstairs" that don't come through.

June 05, 2019 at 1010PM

cryptokeyFromAddress

I'm trying to create a python version of this for home assistant. Do you know what type of cryptology is being used in the function "cryptokeyFromAddress"? Is it a standard one or proprietary crypto from Mitsubishi?

Issues Installing

I've cloned the git repository and have npm installed. I've tried running "npm install kumojs" from both the directory above the kumojs directory and within the kumojs directory. From running in the parent directory it appears that some of the files or directories are missing. I'm attaching the debug log to help diagnose what I'm doing wrong.

npm-debug.log

PAC-USWHS002-WF-2

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 }

Installation fails on Ubuntu 18.04.3

root@ubuntu18:/home/russ# npm install kumojs

[email protected] postinstall /home/russ/node_modules/kumojs
npm run build

[email protected] build /home/russ/node_modules/kumojs
tsc

sh: 1: tsc: not found

npm ERR! Linux 5.0.0-23-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] build: tsc
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] build script 'tsc'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the kumojs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs kumojs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls kumojs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/russ/node_modules/kumojs/npm-debug.log
npm WARN enoent ENOENT: no such file or directory, open '/home/russ/package.json'
npm WARN russ No description
npm WARN russ No repository field.
npm WARN russ No README data
npm WARN russ No license field.
npm ERR! Linux 5.0.0-23-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "kumojs"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: npm run build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'npm run build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the kumojs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs kumojs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls kumojs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/russ/npm-debug.log
root@ubuntu18:/home/russ#

Feature feasibility request: Dry Mode Automation

Background: In iOS version 2.22.0 of the Kumo app, under the Settings > System Setup menu, is now "Dry Mode Automation". This allows a unit in auto or cool mode to "remove additional moisture from the air", per the help screen. Turning this on for a particular unit exposes two set points which can be used to modify the extremes of cooling permitted while drying out the air, as well as a slider for more efficiency / more comfort balance.

Request: Are these controls exposed via the API? If so, can they be added to the integration in the future?

Thanks as always for the great work!

Is it possible to SET room temp?

I am wondering if it's possible to use the kumojs interface to set the room temp the indoor unit is running against, so I can avoid buying a kumo remote temp unit?

Sanity Check / Behavior of "roomTemp"

When set to heat, roomTemp will return 20.5 degrees. When set to off, roomTemp will return 20.5 degrees. When set to vent, roomTemp will return 22.5 degrees -- this is weird enough, but when I set the mode back to off, the reading stays at 22.5 degrees -- the only thing that seems to set roomTemp back to 20.5 degrees (as far as I can tell, the actual temperature) is setting the mode to heat.

Is there something I'm misunderstanding about what roomTemp means or how to interpret it? I assumed it would pretty much always be the room temperature.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.