iklein99 / homebridge-smartthings

This is a plugin to Homebridge to connect your Smartthings network into Apple Home Kit.
Apache License 2.0
150 stars 52 forks source link

Fans - Rotation Speed #107

Closed coryabooth closed 1 year ago

coryabooth commented 1 year ago

Just recently migrated all my Z-Wave Fan Controllers to "Edge".

Devices work, except there is a polling delay when turning on and off. Turning the fan on will engage the fan, but Home Kit will revert to "off" until the fan is up to speed. Similarly, when turning off a fan, Home Kit will revert to "on" until the fan is fully "off"

I noticed tons of the following errors in the logs: [12/16/2022, 6:28:42 PM] [homebridge-smartthings-ik] This plugin generated a warning from the characteristic 'Rotation Speed': characteristic was supplied illegal value: null! Home App will reject null for Apple defined characteristics. See https://homebridge.io/w/JtMGR for more info.

1

coryabooth commented 1 year ago

[12/16/2022, 7:55:33 PM] [Smartthings Plug (IK)] DEVICE DATA: {"deviceId":"bcf35735-92e2-45aa-bbeb-4d30b37445e2","name":"ge-fan-assoc","label":"Office Fan","manufacturerName":"SmartThingsCommunity","presentationId":"12a872c0-6b74-3e99-ace1-2ff81e1f283b","deviceManufacturerCode":"0063-4944-3131","locationId":"fdd02356-c8b5-42f0-a6a3-924c828b7bae","roomId":"f905d1be-2173-4b75-9f7d-e2aa4894210c","components":[{"id":"main","label":"main","capabilities":[{"id":"switch","version":1},{"id":"switchLevel","version":1},{"id":"fanSpeed","version":1},{"id":"button","version":1},{"id":"refresh","version":1}],"categories":[{"name":"Fan","categoryType":"manufacturer"}]}],"createTime":"2022-12-16T16:15:52.535Z","parentDeviceId":"61de8775-be9e-45dd-a999-20b6d1ff9907","profile":{"id":"cab66520-c848-3104-a356-b880e8b49a0f"},"zwave":{"networkId":"A4","driverId":"5ad2cc83-5503-4040-a98b-b0fc9931b9fe","executingLocally":true,"hubId":"61de8775-be9e-45dd-a999-20b6d1ff9907","networkSecurityLevel":"ZWAVE_LEGACY_NON_SECURE","provisioningState":"PROVISIONED"},"type":"ZWAVE","restrictionTier":0,"allowed":[]}

[12/16/2022, 7:55:44 PM] [Smartthings Plug (IK)] Updated status for Office Fan: {"button":{"button":{"value":null},"numberOfButtons":{"value":1,"timestamp":"2022-12-16T16:54:20.895Z"},"supportedButtonValues":{"value":["up_2x","down_2x","pushed_2x"],"timestamp":"2022-12-16T16:54:20.935Z"}},"switchLevel":{"level":{"value":66,"unit":"%","timestamp":"2022-12-16T16:47:04.421Z"}},"refresh":{},"fanSpeed":{"fanSpeed":{"value":0,"timestamp":"2022-12-17T01:42:28.064Z"}},"switch":{"switch":{"value":"off","timestamp":"2022-12-17T01:42:28.096Z"}}}

iklein99 commented 1 year ago

@coryabooth , I'm aware that there is a delay at times when you change the state of a device and when the state shows correct. This is due to timing. Homebridge instantly requests and update when you change the state of something and depending upon the timing, smarttthings sometimes returns the old value. Then when the next time the device is polled, the state gets refreshed again. I've tried to do things to improve this, but haven't yet found a way.

As for the error, this would indicate that your device is returning NULL for the 'switchLevel' service which it advertises it supports.

iklein99 commented 1 year ago

Closing.