Zacknetic / HomebridgeMagicHome-DynamicPlatform

Homebridge Plugin for MagicHome LED controllers and light bulbs
Apache License 2.0
61 stars 11 forks source link

Discovers IP but doesn't register Device #4

Closed gitlias closed 3 years ago

gitlias commented 4 years ago

I have two RGB-Strip controllers one of them at least is discovered however the plugin doesn't register it.

[6/8/2020, 01:04:13] [homebridge-magichome-dynamic-platform] Registering new accessory: 6 [6/8/2020, 01:04:13] [homebridge-magichome-dynamic-platform] Discovered IP 192.168.188.48 [6/8/2020, 01:04:13] [homebridge-magichome-dynamic-platform] Registered 0 MagicHome devices.

Zacknetic commented 4 years ago

Interesting. May you please upload your homebridge.log

gitlias commented 4 years ago

This is the whole log from start to finish:

[6/10/2020, 19:50:56] [HB Supervisor] OS: Linux 4.19.118-v7+ arm [6/10/2020, 19:50:57] [HB Supervisor] Homebridge Path: /usr/local/lib/node_modules/homebridge/bin/homebridge [6/10/2020, 19:50:57] [HB Supervisor] UI Path: /usr/local/lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js [6/10/2020, 19:50:57] [HB Supervisor] Starting Homebridge with extra flags: -I [6/10/2020, 19:50:57] [HB Supervisor] Started Homebridge v1.1.0 with PID: 593 [6/10/2020, 19:51:00] Loaded config.json with 0 accessories and 3 platforms. [6/10/2020, 19:51:00] --- [6/10/2020, 19:51:03] Loaded plugin: homebridge-config-ui-x@4.22.0 [6/10/2020, 19:51:03] Registering platform 'homebridge-config-ui-x.config' [6/10/2020, 19:51:03] --- [6/10/2020, 19:51:04] Loaded plugin: homebridge-magichome-dynamic-platform@1.1.8 [6/10/2020, 19:51:04] Registering platform 'homebridge-magichome-dynamic-platform.homebridge-magichome-dynamic-platform' [6/10/2020, 19:51:04] --- [6/10/2020, 19:51:04] Loaded plugin: homebridge-shelly@0.13.0 [6/10/2020, 19:51:06] Registering platform 'homebridge-shelly.Shelly' [6/10/2020, 19:51:06] --- [6/10/2020, 19:51:06] Loading 3 platforms... [6/10/2020, 19:51:06] [Config] Initializing config platform... [6/10/2020, 19:51:06] [Config] Running in Service Mode [6/10/2020, 19:51:06] [Shelly] Initializing Shelly platform... [6/10/2020, 19:51:06] [homebridge-magichome-dynamic-platform] Initializing homebridge-magichome-dynamic-platform platform... [6/10/2020, 19:51:06] [Shelly] 1 accessory loaded from cache [6/10/2020, 19:51:10] [Config] Homebridge Config UI X v4.22.0 is listening on :: port 8581 [6/10/2020, 19:51:06] [Shelly] Admin server is running on port 8181 Setup Payload: X-HM://0023TMD4VFL2H Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 213-12-767 │     
└────────────┘     

[6/10/2020, 19:51:06] Homebridge is running on port 51938. [6/10/2020, 19:51:07] [homebridge-magichome-dynamic-platform] Registering new accessory: 5 [6/10/2020, 19:51:07] [homebridge-magichome-dynamic-platform] Discovered IP 192.168.188.53 [6/10/2020, 19:51:07] [homebridge-magichome-dynamic-platform] Registered 0 MagicHome devices.

shanelord01 commented 4 years ago

I have the same issue. Output from CLI tool is:

pi@homebridge:/var/lib/homebridge $ magic-home scan Found light at '192.168.1.182' with model 'AK001-ZJ210' and id='600194BCF6A3'

macconnolly commented 4 years ago

Same problem here

[6/25/2020, 17:16:54] [homebridge-magichome-dynamic-platform] Registering new accessory: 2 [6/25/2020, 17:16:54] [homebridge-magichome-dynamic-platform] Discovered IP 192.168.4.48 [6/25/2020, 17:16:54] [homebridge-magichome-dynamic-platform] Registered 0 MagicHome devices.

Zacknetic commented 4 years ago

Hi, thank you for your patience on this matter.

I have added extensive new code which should solve your problem. To ensure a clean update, please do the following:

  1. In config ui x>Config: remove all entries relating to "homebridge-magichome-dynamic-platform"> click "save"
  2. In config ui x>plugins>Homebridge Magichome Dynamic Platform: click "uninstall"
  3. In config ui x>plugins: click the "Search for plugins to install..." text entry>search for "magichome">install "Homebridge MagicHome Dynamic Platform"
  4. In config ui x>plugins>Homebridge Magichome Dynamic Platform>Settings: Click "save" without changing any details
  5. Restart Homebridge

Let me know if this works out for you. If not, upload your homebridge.log here and I will look over it.

macconnolly commented 4 years ago

I have added extensive new code which should solve your problem. To ensure a clean update, please do the following:

Hi, thanks for your hard work to resolve this issue. Unfortunately, still not registering the devices found for me. Attaching full log below. Let me know if there is anything I can do to help.

`[7/12/2020, 13:10:33] [HB Supervisor] Starting Homebridge with extra flags: -I [7/12/2020, 13:10:33] [HB Supervisor] Started Homebridge v1.1.1 with PID: 11940 [7/12/2020, 13:10:34] Loaded config.json with 1 accessories and 3 platforms. [7/12/2020, 13:10:34] --- [7/12/2020, 13:10:34] Loaded plugin: homebridge-config-ui-x@4.23.2 [7/12/2020, 13:10:34] Registering platform 'homebridge-config-ui-x.config' [7/12/2020, 13:10:34] --- [7/12/2020, 13:10:34] Loaded plugin: homebridge-dummy@0.4.1 [7/12/2020, 13:10:34] Registering accessory 'homebridge-dummy.DummySwitch' [7/12/2020, 13:10:34] --- [7/12/2020, 13:10:35] Loaded plugin: homebridge-magichome-dynamic-platform@1.2.3 [7/12/2020, 13:10:35] Registering platform 'homebridge-magichome-dynamic-platform.homebridge-magichome-dynamic-platform' [7/12/2020, 13:10:35] --- [7/12/2020, 13:10:35] Loaded plugin: homebridge-roomba-stv@1.6.0 [7/12/2020, 13:10:35] Registering accessory 'homebridge-roomba-stv.Roomba' [7/12/2020, 13:10:35] --- [7/12/2020, 13:10:36] Loaded plugin: homebridge-smartthings-v2@2.3.4 [7/12/2020, 13:10:36] Registering platform 'homebridge-smartthings-v2.SmartThings-v2' [7/12/2020, 13:10:36] --- [7/12/2020, 13:10:36] Loading 3 platforms... [7/12/2020, 13:10:36] [Config] Initializing config platform... [7/12/2020, 13:10:36] [Config] Running in Service Mode [7/12/2020, 13:10:36] [SmartThings-v2] Initializing SmartThings-v2 platform... [7/12/2020, 1:10:36 pm] [SmartThings-v2] INFO: Homebridge Version: 2.6 [7/12/2020, 1:10:36 pm] [SmartThings-v2] INFO: SmartThings-v2 Plugin Version: 2.3.4 [7/12/2020, 1:10:36 pm] [SmartThings-v2] INFO: Checking Package Version for Updates... [7/12/2020, 13:10:36] [homebridge-magichome-dynamic-platform] Initializing homebridge-magichome-dynamic-platform platform... [7/12/2020, 13:10:36] Loading 1 accessories... [7/12/2020, 13:10:36] [I7] Initializing Roomba accessory... [7/12/2020, 13:10:36] [I7] Enabling autoRefresh every 5 seconds [7/12/2020, 13:10:36] Failed to find plugin to handle accessory Celing Light [7/12/2020, 13:10:36] Removing orphaned accessory Celing Light [7/12/2020, 13:10:36] Failed to find plugin to handle accessory Table Bulb [7/12/2020, 13:10:36] Removing orphaned accessory Table Bulb [7/12/2020, 1:10:36 pm] [SmartThings-v2] INFO: Fetching SmartThings-v2 Devices. NOTICE: This may take a moment if you have a large number of device data is being loaded! [7/12/2020, 1:10:36 pm] [SmartThings-v2] GOOD: Refreshing All Device Data | Source: (First Launch) [7/12/2020, 13:10:36] [homebridge-magichome-dynamic-platform] Scanning broadcast-address: '192.168.7.255' on interface: 'wlan0' for Magichome lights...

Setup Payload: X-HM://0024M3I6LB2D4 Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 691-41-709 │     
└────────────┘     

[7/12/2020, 13:10:36] Homebridge is running on port 51328. [7/12/2020, 1:10:37 pm] [SmartThings-v2] NOTICE: Temperature Unit is Now: (F) [7/12/2020, 1:10:37 pm] [SmartThings-v2] NOTICE: Updating Global Values | HubIP: 192.168.4.27 | UseLocal: false [7/12/2020, 1:10:37 pm] [SmartThings-v2] WARN: Devices to Remove: (0) [] [7/12/2020, 1:10:37 pm] [SmartThings-v2] INFO: Devices to Update: (8) [7/12/2020, 1:10:37 pm] [SmartThings-v2] GOOD: Devices to Create: (0) [] [7/12/2020, 1:10:37 pm] [SmartThings-v2] ALERT: Total Initialization Time: (1 seconds) [7/12/2020, 1:10:37 pm] [SmartThings-v2] NOTICE: Unknown Capabilities: ["Holdable Button"] [7/12/2020, 1:10:37 pm] [SmartThings-v2] INFO: SmartThings DeviceCache Size: (8) [7/12/2020, 1:10:37 pm] [SmartThings-v2] INFO: WebServer Initiated... [7/12/2020, 1:10:37 pm] [SmartThings-v2] INFO: Sending StartDirect Request to SmartThings | SendToLocalHub: (false) [7/12/2020, 1:10:37 pm] [SmartThings-v2] INFO: Direct Connect Active | Listening at 192.168.4.59:8000 [7/12/2020, 1:10:38 pm] [SmartThings-v2] INFO: SmartThings-v2 Hub Communication Established [7/12/2020, 1:10:38 pm] [SmartThings-v2] INFO: INFO: Your plugin version is up-to-date [7/12/2020, 1:10:38 pm] [SmartThings-v2] NOTICE: Sending Plugin Status to SmartThings | UpdateAvailable: false | newVersion: 2.3.4 [7/12/2020, 13:10:38] [homebridge-magichome-dynamic-platform] Found 2 devices.

[7/12/2020, 13:10:39] [homebridge-magichome-dynamic-platform] Registered 0 Magichome device(s). New devices: 0 Cached devices that were seen this restart: 0 Cached devices that were not seen this restart: 0`

Zacknetic commented 4 years ago

May I see your config.json?

hoffma0901 commented 4 years ago

I've got the exact same issue. The plugin finds my one device but it doesn't get registered. Anmerkung 2020-07-17 010407 Anmerkung 2020-07-17 010256

Zacknetic commented 4 years ago

Config looks good. I think this is still related to the lack of the original LEDNET protocol. This is something I am working on actively along with a complete overhaul of the plugin. Updates are coming.

caiotadashi commented 4 years ago

same problem here! new plugin user.. i'll wait for the update

Zacknetic commented 4 years ago

@gitlias @caiotadashi @hoffma0901 @scrytch @macconnolly I have just posted a minor update that includes a bug fix which potentially could fix your issue. If not, the major update arriving soon will certainly fix your issue. Please update the plugin and restart homebridge. Let me know!

hoffma0901 commented 4 years ago

@Zacknetic Still no success in registering the device. But thanks for your help. Waiting for the big update :)

Zacknetic commented 3 years ago

@macconnolly @caiotadashi @hoffma0901

I have come up with a new version of the plugin that should solve your issue.

Please update your plugin to version 1.5.1 . Note: if you are updating from version 1.4.x you'll need to purge all your magichome devices after updating. Then restart homebridge to rescan.

Let me know how it goes. Thank you.

hoffma0901 commented 3 years ago

@Zacknetic Thanks for the update. The plugin worked for a couple of days, but then ran into the same problem described in issue #34. I reinstalled the plugin und now my device isn't recognized again (and somehow two devices are found):

[2020-11-1 21:50:59] [homebridge-magichome-dynamic-platform] Discovered 2 devices. [2020-11-1 21:50:59] [homebridge-magichome-dynamic-platform] Warning! Device type could not be determined, please restart homebridge and try again. If problem persists, file an issue. ACCF23B60C38 [2020-11-1 21:51:01] [homebridge-magichome-dynamic-platform] Platform.ts.createAccessory(): Assigning controller to device: UniqueId: 'ACCF23B60C38' IpAddress '192.168.178.48' Model: 'HF-LPB100-ZJ200' Original Light Version: 97 Light Version Modifier: 18 [2020-11-1 21:51:01] [homebridge-magichome-dynamic-platform] Uknown light version: 97... type probably cannot be set. Trying anyway... [2020-11-1 21:51:01] [homebridge-magichome-dynamic-platform] Please create an issue at https://github.com/Zacknetic/HomebridgeMagicHome-DynamicPlatform/issues and post your homebridge.log [2020-11-1 21:51:02] [Homebridge UI] Homebridge Config UI X v4.31.0 is listening on :: port 8081 HAP Warning: Characteristic 000000E3-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 00000043-0000-1000-8000-0026BB765291. Adding anyway. [2020-11-1 21:51:02] [homebridge-magichome-dynamic-platform] Registering new accessory 'Simple RGB' Model: 'HF-LPB100-ZJ200' Unique ID: 'ACCF23B60C38' IP-Address: '192.168.178.48' Light Version 97 Version Modifier: 18 Protocol Version: 97 [2020-11-1 21:51:02] [homebridge-magichome-dynamic-platform] Successfully pruned accessory: Simple RGB which had not being seen for ( 0 ) restart(s). [2020-11-1 21:51:02] [homebridge-magichome-dynamic-platform] Registered 1 Magichome device(s). New devices: 1 Cached devices that were seen this restart: 0 Cached devices that were not seen this restart: 0 [2020-11-1 21:51:05] [homebridge-magichome-dynamic-platform] Warning. Was unable to determine state for device: 'Simple RGB'

After that homebridge stops working

Zacknetic commented 3 years ago

@hoffma0901 @caiotadashi @macconnolly @gitlias Please follow the same steps as before to update to 1.6.2. Be sure to purge your magichome devices using the settings functionality. If it still doesn't work, please upload a sanitized homebridge.log file. The more information I have, the easier it is for me to diagnose your issue.

Zacknetic commented 3 years ago

Be sure to disable "prune all magichome accessories next restart" before you restart... else they will be pruned again...

Zacknetic commented 3 years ago

Let me know, again part of your issue was due to the fact that prune accessories was set to true. Version 1.7.3 has brought many network improvements so I wouldn't be surprised if this solves your issue. I will close this in 48 hours if there are no additional issues.

hoffma0901 commented 3 years ago

With the new update I‘m able to find the device and it is added to my home device. However I‘m not able to change the color or the brightness. I can switch it on and of though.

I will post my log once I‘ve found it. I‘m using a custom image from dresden electronics and somehow the paths for the logs and mostly everything else are different to a normal installation of homebridge. Kind of annoying. The verbose output of the service isn‘t showing an error nor a general output when I‘m trying to change color or brightness.

Zacknetic commented 3 years ago

It makes sense that the device can only be turned off and on. Here's why.

Your magichome device is reporting what I then called the "modifier" as '0x18'. I call that the "device type" now. Device type 0x18 is unknown to me. See below for this spreadsheet I've made of device types, extracted from the magichome android apk. Once you get me the log, send me a purchase link for the device so I can take a look at it.

image

Zacknetic commented 3 years ago

@hoffma0901 let me know about those logs

hoffma0901 commented 3 years ago

@Zacknetic I will. I‘m a bit busy right now, but maybe I got some time on the weekend.

Thanks for the device list. The explanation makes sense, but it‘s definitely the rgbw UFO (ID 0x04 in your list). So I guess there are some problems in the discovery/identification process. Is there a way to set the device type manually?

Zacknetic commented 3 years ago

@hoffma0901

There is no manual configuration. I made this plugin with the soul purpose to avoid manual configuration. It's not something I want to debug in the future and there are plenty of magichome plugins that allow for manual IP mode.

Once I see the logs I will determine if the device is reporting the correct code.

Zacknetic commented 3 years ago

Closing this issue due to lack of activity. Please open a new issue if you continue to experience problems. Thank you