emotuzas / homebridge-motionblinds

MIT License
0 stars 1 forks source link

Curtains showing up two times. #1

Open SchmidtGundersen opened 7 months ago

SchmidtGundersen commented 7 months ago

Hello, I am using your plugin for my Homebridge to control my curtains and it works great! But in Apple Home, I have both my named curtain and another one which has the same name as the curtain's MAC address. The curtain that I have named works as it should, but the one named after the MAC address is not working. Is there a way to remove the one that is showing up but not working?

The log is saying the following: [4/4/2024, 7:09:31 PM] [MOTION Blinds] readDevice(MAC ADDRESS, 10000000) failed: Error: timed out after 1664ms at Timeout._onTimeout (/volume1/homebridge/node_modules/@emotuzas/homebridge-motionblinds/node_modules/motionblinds/src/index.ts:485:18) at listOnTimeout (node:internal/timers:569:17) at processTimers (node:internal/timers:512:7) [4/4/2024, 7:09:31 PM] [MOTION Blinds] readDevice(MAC ADDRESS, 02000002) failed: Error: timed out after 1634ms at Timeout._onTimeout (/volume1/homebridge/node_modules/@emotuzas/homebridge-motionblinds/node_modules/motionblinds/src/index.ts:485:18) at listOnTimeout (node:internal/timers:569:17) at processTimers (node:internal/timers:512:7) [4/4/2024, 7:09:31 PM] [MOTION Blinds] readDevice(MAC ADDRESS, 10000000) failed: Error: timed out after 1671ms at Timeout._onTimeout (/volume1/homebridge/node_modules/@emotuzas/homebridge-motionblinds/node_modules/motionblinds/src/index.ts:485:18) at listOnTimeout (node:internal/timers:569:17) at processTimers (node:internal/timers:512:7) [4/4/2024, 7:09:32 PM] [MOTION Blinds] readDevice(MAC ADDRESS, 02000002) failed: Error: timed out after 1616ms at Timeout._onTimeout (/volume1/homebridge/node_modules/@emotuzas/homebridge-motionblinds/node_modules/motionblinds/src/index.ts:485:18) at listOnTimeout (node:internal/timers:569:17) at processTimers (node:internal/timers:512:7)

After I have rebooted the Homebridge I get this message in the log:

[4/4/2024, 8:12:06 PM] [MOTION Blinds] Restoring existing accessory from cache [MAC ADDRESS], status={"type":12,"operation":2,"currentPosition":100,"currentAngle":0,"currentState":3,"voltageMode":1,"batteryLevel":1621,"chargingState":0,"wirelessMode":1,"RSSI":-52} [4/4/2024, 8:12:06 PM] [MOTION Blinds] Removing 1 accessories that are no longer present

And for some time it's gone, but comes back eventually.

mlinzner commented 6 months ago

I see the same issues:

a) The second device is your gateway/bridge, which is exposed as a separate device. My PR is fixing this: https://github.com/emotuzas/homebridge-motionblinds/pull/3 b) The large amount of timeouts. I see them a lot less since fixing (a), but they are still there. It seems that the bridge sometimes needs slightly longer than 1.6s to respond. Unfortunately, I'm not sure how to extend the timeout.

@emotuzas do you have a pointer for me regarding (b)? I am happy to test and prepare another PR.