kiwi-cam / homebridge-broadlink-rm

[This fork supports TV accessories] Broadlink RM Mini and Pro plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
297 stars 96 forks source link

Since moving to Docker, devices are no longer found with "locked" warning, without being locked #716

Open carsontwilson opened 1 week ago

carsontwilson commented 1 week ago

Describe the bug Hi there,

Since moving to docker I get the following error:

[7/7/2024, 8:13:51 PM] Homebridge v1.8.3 (HAP v0.12.2) (Broadlink RM) is running on port 42463. [7/7/2024, 8:14:28 PM] [Broadlink RM] Projector Screen setSwitchState: false [7/7/2024, 8:14:28 PM] [Broadlink RM] [ERROR] Projector Screen sendData (no device found, ensure the device is not locked) [7/7/2024, 8:14:30 PM] [Broadlink RM] Projector Screen setSwitchState: true [7/7/2024, 8:14:30 PM] [Broadlink RM] Projector Screen setSwitchState: (brightness: 100) [7/7/2024, 8:14:30 PM] [Broadlink RM] Projector Screen setBrightness: 100 [7/7/2024, 8:14:30 PM] [Broadlink RM] Projector Screen setBrightness: (turn on, wait 0.1s)

Prior to moving to docker, the devices worked without issue (there are a number of devices, this is just one example).

I followed the steps on the troubleshooting page, but I could not execute the command successfully, it returned as follows: root@HomeBridge:/homebridge $ which node /opt/homebridge/bin/node root@HomeBridge:/homebridge $ sudo setcap cap_net_raw+ep /opt/homebridge/bin/node ERROR: sudo / root access is not allowed by the homebridge service account. You can use "su " to swap to your local user account.

I tried without sudo and it was successful, however after restarting I get the same issue:

[7/7/2024, 8:25:58 PM] Homebridge v1.8.3 (HAP v0.12.2) (Broadlink RM) is running on port 42463. [7/7/2024, 8:26:06 PM] [Broadlink RM] Projector Screen setSwitchState: false [7/7/2024, 8:26:06 PM] [Broadlink RM] [ERROR] Projector Screen sendData (no device found, ensure the device is not locked) [7/7/2024, 8:26:09 PM] [Broadlink RM] Projector Screen setSwitchState: true [7/7/2024, 8:26:09 PM] [Broadlink RM] Projector Screen setSwitchState: (brightness: 100) [7/7/2024, 8:26:09 PM] [Broadlink RM] Projector Screen setBrightness: 100 [7/7/2024, 8:26:09 PM] [Broadlink RM] Projector Screen setBrightness: (turn on, wait 0.1s) [7/7/2024, 8:26:09 PM] [Broadlink RM] [ERROR] Projector Screen sendData (no device found, ensure the device is not locked) [7/7/2024, 8:26:09 PM] [Broadlink RM] Projector Screen setHue: (wait 0.1s then send data) [7/7/2024, 8:26:09 PM] [Broadlink RM] Projector Screen setBrightness: (closest: 100) [7/7/2024, 8:26:09 PM] [Broadlink RM] [ERROR] Projector Screen sendData (no device found, ensure the device is not locked)

I have tried locking and unlocking the device without luck.

If I make the change using the broadlink app, it works successfully.

To Reproduce Not much to add except I moved to docker and executed as above

Expected behavior The signal is sent to the associated devices

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information): I don't think this is relevant, I'm actually trying from the Homebridge interface on the browser.

Additional context Add any other context about the problem here.

carsontwilson commented 1 week ago

Oh I just realized the MAC Address change - whoops! Trying that :)

carsontwilson commented 1 week ago

Ok that's confusing - the mac address is not one on my network - maybe the child bridge has a random mac address. The mac address is the same for all plugins using a child bridge, and this is the only one not working. I did open the port it's running on in the firewall, and bound that port in homebridge, but the result is the same. Here are some additional log excerpts:

[7/8/2024, 3:41:18 PM] Plugin 'homebridge-broadlink-rm-pro' tried to register with an incorrect plugin identifier: 'homebridge-broadlink-rm'. Please report this to the developer! [7/8/2024, 3:41:18 PM] Registering platform 'homebridge-broadlink-rm-pro.BroadlinkRM' [7/8/2024, 3:41:18 PM] [Broadlink RM] Loaded homebridge-broadlink-rm-pro v4.4.15 child bridge successfully [7/8/2024, 3:41:18 PM] Loaded 0 cached accessories from cachedAccessories.0E78AB376788. [7/8/2024, 3:41:18 PM] [Broadlink RM] [INFO] Automatically discovering Broadlink RM devices. [7/8/2024, 3:41:18 PM] [Broadlink RM] [INFO] Running Homebridge Broadlink RM Plugin version 4.4.15 [7/8/2024, 3:41:18 PM] [Broadlink RM] Projector Screen Accessory Ready [7/8/2024, 3:41:18 PM] [Broadlink RM] Screen 1 Accessory Ready [7/8/2024, 3:41:18 PM] [Broadlink RM] Screen 2 Accessory Ready [7/8/2024, 3:41:18 PM] [Broadlink RM] Screen 3 Accessory Ready [7/8/2024, 3:41:18 PM] [Broadlink RM] Sign Accessory Ready [7/8/2024, 3:41:18 PM] Initializing platform accessory 'Learn'... [7/8/2024, 3:41:18 PM] Initializing platform accessory 'Scan Frequency'... [7/8/2024, 3:41:18 PM] Initializing platform accessory 'Projector Screen'... [7/8/2024, 3:41:18 PM] Initializing platform accessory 'Screen 1'... [7/8/2024, 3:41:18 PM] Initializing platform accessory 'Screen 2'... [7/8/2024, 3:41:18 PM] Initializing platform accessory 'Screen 3'... [7/8/2024, 3:41:18 PM] Initializing platform accessory 'Sign'... [7/8/2024, 3:41:18 PM] Publishing bridge accessory (name: Broadlink RM, publishInfo: { username: '0E:78:AB:37:67:88', port: 42463, pincode: '*-*-', category: 2, bind: [ [length]: 0 ], mdns: undefined, addIdentifyingMaterial: true, advertiser: undefined }). [7/8/2024, 3:41:18 PM] Homebridge v1.8.3 (HAP v0.12.2) (Broadlink RM) is running on port 42463.

And then when trying to activate, the results are the same:

[7/8/2024, 3:44:50 PM] [Broadlink RM] Projector Screen setSwitchState: true [7/8/2024, 3:44:50 PM] [Broadlink RM] Projector Screen setSwitchState: (brightness: 100) [7/8/2024, 3:44:50 PM] [Broadlink RM] Projector Screen setBrightness: 100 [7/8/2024, 3:44:50 PM] [Broadlink RM] Projector Screen setBrightness: (turn on, wait 0.1s) [7/8/2024, 3:44:50 PM] [Broadlink RM] [ERROR] Projector Screen sendData (no device found, ensure the device is not locked) [7/8/2024, 3:44:50 PM] [Broadlink RM] Projector Screen setHue: (wait 0.1s then send data) [7/8/2024, 3:44:50 PM] [Broadlink RM] Projector Screen setBrightness: (closest: 100) [7/8/2024, 3:44:50 PM] [Broadlink RM] [ERROR] Projector Screen sendData (no device found, ensure the device is not locked)