NorDroN / homebridge-wideq

MIT License
12 stars 5 forks source link

Have Washer & dryer, can help test whatever is exposed #2

Open kaicherry opened 4 years ago

kaicherry commented 4 years ago

hi. I have this running on my homebridge right now and can report the washer shows up, as a switch, that show on and off. Status is logged when debug is on, such as:

[2/20/2020, 16:26:56] [WideQ] [INFO] Status: XXXXXX0-92ee-11e9-####-2c2bf9ABcDef0: WASHR (WASHER F3L2CYV5W_WIFI)
[2/20/2020, 16:26:56] [WideQ] [INFO] - state: @WM_STATE_SPINNING_W
[2/20/2020, 16:26:56] [WideQ] [INFO] - stateText: Spinning
[2/20/2020, 16:26:56] [WideQ] [INFO] - previousState: @WM_STATE_RINSING_W
[2/20/2020, 16:26:56] [WideQ] [INFO] - previousStateText: Rinsing
[2/20/2020, 16:26:56] [WideQ] [INFO] - isOn: true
[2/20/2020, 16:26:56] [WideQ] [INFO] - isRemoteStart: false
[2/20/2020, 16:26:56] [WideQ] [INFO] - isChildLock: false
[2/20/2020, 16:26:56] [WideQ] [INFO] - remainingTime: 6
[2/20/2020, 16:26:56] [WideQ] [INFO] - initialTime: 56
[2/20/2020, 16:26:56] [WideQ] [INFO] - reserveTime: 0
[2/20/2020, 16:26:56] [WideQ] [INFO] - course: null
[2/20/2020, 16:26:56] [WideQ] [INFO] - smartCourse: SmallLoad
[2/20/2020, 16:26:56] [WideQ] [INFO] - error: No Error

As far as "issues" go, none of this is reflected in the Home app in any way, but of more urgent concern, this does not seem to be persisting the accessory in the system. When homebridge is rebooted, this goes back to being rediscovered/default

stibbzy commented 4 years ago

I have the same issue with my washer accessory. As soon as I restart Homebridge, the accessory is renamed to 'Power' and placed into the 'Default Room'.

Further, is the accessory supposed to display anything other than an on/off state switch? Regardless of what mode the washer is in, the status of the switch is just 'on'.

ncovercash commented 4 years ago

My PR #11 fixes the accessory re-adding issue, however, @NorDroN has not made a new release since then so the changes are not live in npm.

You should be able to test the latest commit here by either cloning it locally or using something like npm -g install git://github.com/NorDroN/homebridge-wideq. However, you may need to manually npm install and npm run build inside the module's folder once this is done.

ncovercash commented 4 years ago

@kaicherry @stibbzy as for the issue with on/off being shown incorrectly likely lies in ssut/wideq-js (as the accessory here is rather simple).

If I had to guess, the issue is in https://github.com/ssut/wideq-js/blob/e2453555fbca3f29a905cbac94bea4770fe504ad/lib/devices/washer.ts#L80 . Since there are tons of states that might reflect end/off, e.g. COMPLETE, END, ERROR_AUTO_OFF, OFF, PAUSE,. I do not have any devices like this, so I can not test, however, this is what I would assume.

cbuscontrol commented 4 years ago

My PR #11 fixes the accessory re-adding issue, however, @NorDroN has not made a new release since then so the changes are not live in npm.

You should be able to test the latest commit here by either cloning it locally or using something like npm -g install git://github.com/NorDroN/homebridge-wideq. However, you may need to manually npm install and npm run build inside the module's folder once this is done.

I have tried to install the latest commit as mentioned above however Homebridge reports the plugin is not installed and fails. I’ve tried npm install and npm run build but no luck....Any tips?

ncovercash commented 4 years ago

@cbuscontrol Hmm, looks like something strange is going on when I try that. I'm sure there are lots of reasons why this is a bad idea, but this is how I set it up during development (and was able to reliably recreate for ya during testing):

  1. Clone https://github.com/NorDroN/homebridge-wideq.git somewhere
  2. cd into that folder and npm install && npm run-script build
  3. Install release homebridge-wideq globally (npm i -g homebridge-wideq) and then copy (or symlink) the code compiled/cloned in step 1.

It seems like pulling from git stripped some information needed for proper compilation and running, therefore, this is what I set up when I was working on testing it with my homebridge server. It will probably be overwritten by npm at some point, maybe even as soon as you install or upgrade anything else, no idea as I am sure this kind of behavior is not supported or recommended.