awahlig / homebridge-casambi

Homebridge Casambi Plugin
Apache License 2.0
18 stars 3 forks source link

Issue with Casambi device #3

Closed Alfa166-GIT closed 3 years ago

Alfa166-GIT commented 3 years ago

I have been trying out this plugin and have made some progress. I have successfully set it up on Homebridge and my accessory (a CBU-ASD https://casambi.com/ecosystem/cbu-asd/ ) is visible both in the Homebridge accessories page and also in the Homekit page, see screen shots. I can switch the icon on/off in both HomeBrdige and Homekit and it looks like everything is working but the light does not switch off. I am able to control the light as expected in the Casambi APP without any problem. I was wondering if this is because the CBU-ASd is not a conventional dimmer. Is there a list of compatible Casambi devices that have been tested with this plugin? Screenshot 2021-01-05 at 17 58 35 Screenshot 2021-01-05 at 17 58 26 Screenshot 2021-01-05 at 17 57 59 Screenshot 2021-01-05 at 17 57 51 Screenshot 2021-01-05 at 17 30 45

awahlig commented 3 years ago

The plugin has only been tested with a limited number of devices, mostly just what I have at my home.

There was no list of tested devices so I just created one in the Wiki: https://github.com/awahlig/homebridge-casambi/wiki/Tested-devices

Thanks for the screenshots. First step in debugging the problem with your control unit would be to take a look at the Homebridge logs. Could you provide them?

Also, does the state in HomeKit change when you switch the light using the physical controls or the Casambi App?

Alfa166-GIT commented 3 years ago

Hi and thanks for the reply. So I went to check the issue again and record the log. I checked and the Homebridge and Home icons for my accessory were both responding to commands initiated on the Casambi APP. So I could see that the device was switching on/off. I then had a look at the log and I noticed it seemed to be searching for a scene and I guessed that maybe there needed to be an on or off scene available for Home/Homebridge to work so I created one and straight away I had control of the device in both Home and Homebridge. I then deleted the scene just to be sure and now I have control of the device in all three apps even without a scene on Casambi. So I'm not really sure what the issue was but following is the log that I recorded from today which shows activity before I created the scene, with the scene in place and finally after I deleted the scene. Hope this helps and makes sense. Ignore the scenes referred to in 159 IP address, this is not connected to the Casambi

[1/6/2021, 11:16:12 AM] Homebridge v1.2.5 is running on port 53690. [1/6/2021, 11:16:12 AM] [Casambi] Successfully logged in to Casambi network Home [1/6/2021, 11:16:12 AM] [Casambi] Found 1 unit(s) in the network Home [1/6/2021, 11:16:12 AM] [Casambi] Unit DALI 1xDIM [A0] is a Luminaire with fixtureId 93 [1/6/2021, 11:16:12 AM] [Casambi] Restoring accessory DALI 1xDIM [A0] [1/6/2021, 11:16:13 AM] [Casambi] Connection successful NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 [1/6/2021, 11:16:18 AM] [eWeLink] [Xmas Tree] initialised and found locally with IP [192.168.1.43]. [1/6/2021, 11:16:18 AM] [eWeLink] [Dimmer 1] initialised and LAN mode unavailable as not supported. [1/6/2021, 11:16:18 AM] [eWeLink] [Garage Door] initialised and found locally with IP [192.168.1.18]. [1/6/2021, 11:16:18 AM] [eWeLink] [Kettle] initialised and found locally with IP [192.168.1.99]. [1/6/2021, 11:16:18 AM] [eWeLink] [SONOFF Bridge] initialised and LAN mode unavailable as not supported. [1/6/2021, 11:16:18 AM] [eWeLink] [Shed Xmas Lights] initialised and found locally with IP [192.168.1.160]. [1/6/2021, 11:16:18 AM] [eWeLink] [Shed Lights] initialised and found locally with IP [192.168.1.214]. [1/6/2021, 11:16:18 AM] [eWeLink] [Porch Lights] initialised and LAN mode unavailable as unreachable. [1/6/2021, 11:16:18 AM] [eWeLink] [Garage look @ Door] see the homebridge-ewelink wiki for details to enable the camera. [1/6/2021, 11:16:18 AM] [eWeLink] [Camera over oller door] see the homebridge-ewelink wiki for details to enable the camera. [1/6/2021, 11:16:18 AM] [eWeLink] ✓ Setup complete. Don't forget to ☆ this plugin on GitHub if you're finding it useful! NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 [1/6/2021, 12:28:53 PM] [Homebridge UI] [admin] Accessory layout changes saved. [1/6/2021, 12:29:05 PM] [Homebridge UI] [admin] Accessory layout changes saved. NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 [1/6/2021, 12:32:00 PM] [Homebridge UI] Homebridge restart request received [1/6/2021, 12:32:00 PM] [Homebridge UI] UI / Bridge settings have not changed; only restarting Homebridge process [1/6/2021, 12:32:00 PM] [HB Supervisor] Sending SIGTERM to Homebridge [1/6/2021, 12:32:00 PM] Got SIGTERM, shutting down Homebridge... [1/6/2021, 12:32:05 PM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [1/6/2021, 12:32:10 PM] [HB Supervisor] Restarting Homebridge... [1/6/2021, 12:32:10 PM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /homebridge/node_modules [1/6/2021, 12:32:10 PM] [HB Supervisor] Started Homebridge v1.2.5 with PID: 795 [1/6/2021, 12:32:10 PM] Loaded config.json with 7 accessories and 3 platforms. [1/6/2021, 12:32:10 PM] --- [1/6/2021, 12:32:10 PM] Loaded plugin: homebridge-casambi@0.3.0 [1/6/2021, 12:32:10 PM] Registering platform 'homebridge-casambi.Casambi' [1/6/2021, 12:32:10 PM] --- [1/6/2021, 12:32:10 PM] Loaded plugin: homebridge-dummy@0.4.1 [1/6/2021, 12:32:10 PM] Registering accessory 'homebridge-dummy.DummySwitch' [1/6/2021, 12:32:10 PM] --- [1/6/2021, 12:32:10 PM] Loaded plugin: homebridge-ewelink@4.0.2 [1/6/2021, 12:32:10 PM] Registering platform 'homebridge-ewelink.eWeLink' [1/6/2021, 12:32:10 PM] --- [1/6/2021, 12:32:11 PM] Loaded plugin: homebridge-modelighting@0.0.9 [1/6/2021, 12:32:11 PM] Registering accessory 'homebridge-modelighting.modelighting' [1/6/2021, 12:32:11 PM] --- [1/6/2021, 12:32:11 PM] Loaded plugin: homebridge-vera@0.8.2 VeraLink initializing [1/6/2021, 12:32:11 PM] Registering platform 'homebridge-vera.Vera' [1/6/2021, 12:32:11 PM] --- [1/6/2021, 12:32:11 PM] Loaded plugin: homebridge-config-ui-x@4.36.0 [1/6/2021, 12:32:11 PM] Registering platform 'homebridge-config-ui-x.config' [1/6/2021, 12:32:11 PM] --- [1/6/2021, 12:32:11 PM] Loading 3 platforms... [1/6/2021, 12:32:11 PM] [Config] Initializing config platform... [1/6/2021, 12:32:11 PM] [Config] Running in Service Mode [1/6/2021, 12:32:11 PM] [eWeLink] Initializing eWeLink platform... [1/6/2021, 12:32:11 PM] [Casambi] Initializing Casambi platform... [1/6/2021, 12:32:11 PM] Loading 7 accessories... [1/6/2021, 12:32:11 PM] [Utility] Initializing modelighting accessory... [1/6/2021, 12:32:11 PM] [Path Lights] Initializing modelighting accessory... [1/6/2021, 12:32:11 PM] [Patio Lights] Initializing modelighting accessory... [1/6/2021, 12:32:11 PM] [Bedroom Lights] Initializing modelighting accessory... [1/6/2021, 12:32:11 PM] [RGB] Initializing modelighting accessory... [1/6/2021, 12:32:11 PM] [Bathroom] Initializing modelighting accessory... [1/6/2021, 12:32:11 PM] [External Lights] Initializing modelighting accessory... [1/6/2021, 12:32:11 PM] [Casambi] Loading accessory from cache: DALI 1xDIM [A0] [1/6/2021, 12:32:11 PM] [eWeLink] Plugin [v4.0.2] initialised. Syncing with eWeLink... [1/6/2021, 12:32:11 PM] [Casambi] Logging in to Casambi network Setup Payload: X-HM://0024RAWOQH011 Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 778-85-178 │     
└────────────┘     

[1/6/2021, 12:32:11 PM] Homebridge v1.2.5 is running on port 53690. [1/6/2021, 12:32:11 PM] [Casambi] Successfully logged in to Casambi network Home [1/6/2021, 12:32:11 PM] [Casambi] Found 1 unit(s) in the network Home [1/6/2021, 12:32:11 PM] [Casambi] Unit DALI 1xDIM [A0] is a Luminaire with fixtureId 93 [1/6/2021, 12:32:11 PM] [Casambi] Restoring accessory DALI 1xDIM [A0] [1/6/2021, 12:32:11 PM] [Casambi] Connection successful NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1 [1/6/2021, 12:32:16 PM] [eWeLink] [Xmas Tree] initialised and found locally with IP [192.168.1.43]. [1/6/2021, 12:32:16 PM] [eWeLink] [Dimmer 1] initialised and LAN mode unavailable as not supported. [1/6/2021, 12:32:16 PM] [eWeLink] [Garage Door] initialised and LAN mode unavailable as unreachable. [1/6/2021, 12:32:16 PM] [eWeLink] [Kettle] initialised and found locally with IP [192.168.1.99]. [1/6/2021, 12:32:16 PM] [eWeLink] [SONOFF Bridge] initialised and LAN mode unavailable as not supported. [1/6/2021, 12:32:16 PM] [eWeLink] [Shed Xmas Lights] initialised and found locally with IP [192.168.1.160]. [1/6/2021, 12:32:16 PM] [eWeLink] [Shed Lights] initialised and found locally with IP [192.168.1.214]. [1/6/2021, 12:32:16 PM] [eWeLink] [Porch Lights] initialised and LAN mode unavailable as unreachable. [1/6/2021, 12:32:16 PM] [eWeLink] [Garage look @ Door] see the homebridge-ewelink wiki for details to enable the camera. [1/6/2021, 12:32:16 PM] [eWeLink] [Camera over oller door] see the homebridge-ewelink wiki for details to enable the camera. [1/6/2021, 12:32:16 PM] [eWeLink] ✓ Setup complete. Don't forget to ☆ this plugin on GitHub if you're finding it useful! [1/6/2021, 12:33:10 PM] [eWeLink] [Devicee63f28] has been reported [online] via LAN. [1/6/2021, 12:35:03 PM] [Casambi] Network updated { wire: 1, method: 'networkUpdated', revision: 14 } NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 [1/6/2021, 12:35:50 PM] [Casambi] Network updated { wire: 1, method: 'networkUpdated', revision: 15 } NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 [1/6/2021, 12:36:50 PM] [Casambi] Network updated { wire: 1, method: 'networkUpdated', revision: 16 } NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 169 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 163 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 152 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 035 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 167 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 141 attempt number: 1 NPU: 192.168.1.159 cmd: ?scn, scene: 181 attempt number: 1

awahlig commented 3 years ago

Thanks for the log, it confirms that your device is supported by the plugin. Like the luminaries that I tested, it exposes a "dimmer" control type so from the point of view of the plugin, it works the same way. I've added it to the list of tested devices.

Creating and deleting the scene should have no impact.

In my experience, a more likely reason why it didn't work before is some kind of a problem communicating with the device. The commands go from the Homebridge plugin to the Casambi servers, then to your Gateway device over WiFi and from there to the light or control unit over Bluetooth. There's a lot that can go wrong on that path, particularly with the Gateway device, which must be in radio range of WiFi and Bluetooth and running the Casambi app at all times. Personally I had problems finding a good spot for it with no interference.

I'll close the issue for now, let me know if you'll keep having problems.