Closed andywaplinger closed 3 years ago
Hi and thank you for your patience.
I think I have tracked down the source of the problem to the broadcast address. The code that I have just uploaded now bases your broadcast address dynamically on your primary network interface. Please update the plugin and restart and let me know how it goes.
Let me know if this solved your issue.
I'm having a similar issue. My controller shows up in the Magic Home app and works fine there, but when I installed and ran this plugin, the controller never shows up in Homebridge or in the Home app.
May you please upload your Homebridge.log and config.json as text files?
Sure! BTW, I also tried uninstalling and re-installing the plugin, just in case, but still no luck.
I don't even see my plugin running at all. I am going to open another issue for this so you and I will continue there.
Sorry! Thought Github would send me a notification when you responded.
It's now finding the 9 devices! It says that it registered 0 new devices, but I assume that's because I'm still running the other MagicHome plugin. I'll disable that plugin later and let you know how things go. Thank you @Zacknetic!
@andywaplinger It has come to my attention that there may be yet another underlying issue that will prevent the devices from being registered.
A feature addition is needed to support devices that use the original LEDnet protocol. Unfortunately I will not be able to add that feature until I perform a major overhaul of the plugin.
Let me know if removing the other plugin works, but I would not be surprised if your issue is related to this bug or really lack of a feature.
Original LEDnet protocol is coming, I just need time to sit down, learn proper interfaces, and untangle a few hundred lines of code.
If anyone with programming knowledge would like to team up with me, I'd be very grateful for your help.
Thank you for your patience.
@Zacknetic as an experiment, I just added another controller to my wifi network but didn't add it as a MagicHome accessory using the other plugin. Your plugin found it, but still didn't register it, so it seems that the lack of LEDnet protocol support is likely the issue.
No worries about needing time to figure this out! I just really appreciate you taking the time to work on this plugin - it's what I've been wanting for a while.
Out of curiosity, which LED controllers have you found that already work with this plugin?
I'm not sure I have enough knowledge to contribute (I work on light programming projects every now and then), but if I do I'd love to contribute! I love having these LED controllers integrated into my home automation setup and have been wanting an easier way to do it as I add more. 😄
@andywaplinger Any device that incorporates a white channel including bulbs and strips are supported as they MUST use the new protocol. The new protocol includes optional byes for warm-white and cold-white channels.
The RGB+CCT strips are my particular favorite because they can illuminate both their dedicated white LEDs simultaneously to achieve any white "temperature" desired. Additionally they can illuminate their white LEDs AND color LEDs simultaneously to create any tinted white color desired. i.e. I like red and warm white as it creates a bit of a rose color. I've created logic so in this mode, the brightness slider only decreases the brightness of the white channels, allowing for some very relaxing colors. This helps offset the sometimes blinding 'color-only' light.
There are many places to purchase these, it all depends on how fast you want them to arrive. They are all made in shen-zhen china so if you don't care too much about delivery speed you might as well order from there.
Here is one option from aliexpress. Be sure to choose 6-pin RGBWW. Also you will need to buy 6 pin RGBWW LED strips.
If you are looking for LED bulbs, they cannot do simultaneous RGB and CCT but are very convenient for automating your home. Here is one such option.
In terms of help, I could use all the help I could get. I need to separate all the LED types into different classes using an interface. If you have the time you can email me at zackavino@gmail.com or add me on discord at Zacknetic#8888. Alternative you can join the homebridge magichome channel in discord here. Just mention me.
Today I'm focused on coding. Hope to see the results come soon.
Ahh, I see, so this plugin currently supports the separate channel RGB controllers/strips out of the box. I use the SPI controllers that support SK6812 and WS2812B strips. I purchased some RGBW strips in hopes of having better quality white along with RGB control, but the old MagicHome plugin doesn't support a white channel, so those strips are just lying around unused. It'd be great to be able to use the white channel with the SPI controllers!
I'll hit you up and see if there's any way that I can help. Good luck!
@andywaplinger I have just posted a minor update that includes a bug fix that may solve your issue. Please update the plugin and restart homebridge. Let me know. Otherwise the major update which will arrive soon will definitely solve it. Fingers crossed on this one though.
Concerning your SPI controllers, I'm unfamiliar with the their protocol and this plugin probably won't work with it. I do have a method of determining the protocol however if you are interested. If so, get in contact with me privately and I will walk you through the details.
Thanks for the update! It's progress! My 21 devices now register but homebridge crashes right afterwards. Sharing my log in hopes that it helps.
`[7/21/2020, 7:37:20 PM] [HB Supervisor] Restarting Homebridge... [7/21/2020, 7:37:20 PM] [HB Supervisor] Starting Homebridge with extra flags: -I [7/21/2020, 7:37:20 PM] [HB Supervisor] Started Homebridge v1.1.1 with PID: 20391 [7/21/2020, 7:37:21 PM] Loaded config.json with 0 accessories and 4 platforms. [7/21/2020, 7:37:21 PM] --- [7/21/2020, 7:37:21 PM] Loaded plugin: homebridge-config-ui-x@4.23.2 [7/21/2020, 7:37:21 PM] Registering platform 'homebridge-config-ui-x.config' [7/21/2020, 7:37:21 PM] --- [7/21/2020, 7:37:21 PM] Loaded plugin: homebridge-dyson-pure-cool@1.7.11 [7/21/2020, 7:37:21 PM] Registering platform 'homebridge-dyson-pure-cool.DysonPureCoolPlatform' [7/21/2020, 7:37:21 PM] --- [7/21/2020, 7:37:21 PM] Loaded plugin: homebridge-harmony@1.3.12 [7/21/2020, 7:37:21 PM] Registering platform 'homebridge-harmony.HarmonyHubWebSocket' [7/21/2020, 7:37:21 PM] --- [7/21/2020, 7:37:21 PM] Loaded plugin: homebridge-magichome-dynamic-platform@1.2.6 [7/21/2020, 7:37:21 PM] Registering platform 'homebridge-magichome-dynamic-platform.homebridge-magichome-dynamic-platform' [7/21/2020, 7:37:21 PM] --- [7/21/2020, 7:37:21 PM] Loading 4 platforms... [7/21/2020, 7:37:21 PM] [Bedroom Harmony] Initializing HarmonyHubWebSocket platform... [7/21/2020, 7:37:21 PM] [Bedroom Harmony] HarmonyPlatform Init [7/21/2020, 7:37:21 PM] [DysonPureCoolPlatform] Initializing DysonPureCoolPlatform platform... [7/21/2020, 7:37:21 PM] [Config] Initializing config platform... [7/21/2020, 7:37:21 PM] [Config] Running in Service Mode [7/21/2020, 7:37:21 PM] [homebridge-magichome-dynamic-platform] Initializing homebridge-magichome-dynamic-platform platform... [7/21/2020, 7:37:21 PM] [Bedroom Harmony] DidFinishLaunching [7/21/2020, 7:37:21 PM] [Bedroom Harmony] (Bedroom Harmony)INFO - Loading activities... [7/21/2020, 7:37:21 PM] [Bedroom Harmony] (Family Room Harmony)INFO - Loading activities... [7/21/2020, 7:37:21 PM] [DysonPureCoolPlatform] Got devices from config. [7/21/2020, 7:37:21 PM] [homebridge-magichome-dynamic-platform] Scanning broadcast-address: '192.168.1.255' on interface: 'en0' for Magichome lights...
Setup Payload: X-HM://XXXXXXXXXX Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
┌────────────┐
│ XXX-XX-XXX │
└────────────┘
[7/21/2020, 7:37:21 PM] Homebridge is running on port 51826. [7/21/2020, 7:37:22 PM] [Bedroom Harmony] (Bedroom Harmony)INFO - configuring Main TV Service [7/21/2020, 7:37:22 PM] [Bedroom Harmony] (Bedroom Harmony)INFO - Configuring Main Activity TiVo [7/21/2020, 7:37:22 PM] [Bedroom Harmony] (Family Room Harmony)INFO - configuring Main TV Service [7/21/2020, 7:37:22 PM] [Bedroom Harmony] (Family Room Harmony)INFO - Configuring Main Activity TiVo [7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Found 21 devices.
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 1 Model: 'AK001-ZJ2134' Unique ID: 'C82E475E0F92' IP-Address: '192.168.1.27' Version 1 Version Modifier: 6
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 9 Model: 'AK001-ZJ210' Unique ID: 'C44F339BB057' IP-Address: '192.168.1.42' Version 9 Version Modifier: 68
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: 'C44F3397C555' IP-Address: '192.168.1.48' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: 'C44F3397CD4F' IP-Address: '192.168.1.46' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: '840D8E6890B5' IP-Address: '192.168.1.30' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: 'C44F3397A5A1' IP-Address: '192.168.1.41' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: 'C44F3397CFB4' IP-Address: '192.168.1.52' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: 'C44F3397CDC1' IP-Address: '192.168.1.50' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: 'DC4F22E1A854' IP-Address: '192.168.1.31' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: '600194D867AA' IP-Address: '192.168.1.38' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: '600194D864B4' IP-Address: '192.168.1.21' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: 'C44F3397D44C' IP-Address: '192.168.1.33' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: 'C44F3397D508' IP-Address: '192.168.1.51' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: 'C44F3397CBDA' IP-Address: '192.168.1.37' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 1 Model: 'AK001-ZJ2134' Unique ID: 'C82E475E103C' IP-Address: '192.168.1.28' Version 1 Version Modifier: 6
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: 'C44F3397CD47' IP-Address: '192.168.1.39' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: '840D8E6911A9' IP-Address: '192.168.1.40' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: '600194D8853B' IP-Address: '192.168.1.53' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: 'C44F3397AF41' IP-Address: '192.168.1.49' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 7 Model: 'AK001-ZJ2101' Unique ID: '840D8E68CB52' IP-Address: '192.168.1.34' Version 7 Version Modifier: 53
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registering cached accessory 10 Model: 'AK001-ZJ200' Unique ID: 'C44F33AE5124' IP-Address: '192.168.1.32' Version 10 Version Modifier: 4
[7/21/2020, 7:37:23 PM] [homebridge-magichome-dynamic-platform] Registered 21 Magichome device(s). New devices: 0 Cached devices that were seen this restart: 21 Cached devices that were not seen this restart: 0
[7/21/2020, 7:37:23 PM] Error: read ECONNRESET at TCP.onStreamRead (internal/stream_base_commons.js:205:27) [7/21/2020, 7:37:23 PM] Got SIGTERM, shutting down Homebridge... [7/21/2020, 7:37:23 PM] [Bedroom Harmony] INFO - shutdown [7/21/2020, 7:37:23 PM] Error: read ECONNRESET at TCP.onStreamRead (internal/stream_base_commons.js:205:27) [7/21/2020, 7:37:27 PM] [HB Supervisor] Stopping services... [7/21/2020, 7:37:28 PM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null `
Prior to today's update, my results were no registered devices (old log below).
`[7/14/2020, 3:57:17 PM] [HB Supervisor] Restarting Homebridge... [7/14/2020, 3:57:17 PM] [HB Supervisor] Starting Homebridge with extra flags: -I [7/14/2020, 3:57:17 PM] [HB Supervisor] Started Homebridge v1.1.1 with PID: 62669 [7/14/2020, 3:57:17 PM] Loaded config.json with 0 accessories and 4 platforms. [7/14/2020, 3:57:17 PM] --- [7/14/2020, 3:57:18 PM] Loaded plugin: homebridge-config-ui-x@4.23.2 [7/14/2020, 3:57:18 PM] Registering platform 'homebridge-config-ui-x.config' [7/14/2020, 3:57:18 PM] --- [7/14/2020, 3:57:18 PM] Loaded plugin: homebridge-dyson-pure-cool@1.7.10 [7/14/2020, 3:57:18 PM] Registering platform 'homebridge-dyson-pure-cool.DysonPureCoolPlatform' [7/14/2020, 3:57:18 PM] --- [7/14/2020, 3:57:18 PM] Loaded plugin: homebridge-harmony@1.3.12 [7/14/2020, 3:57:18 PM] Registering platform 'homebridge-harmony.HarmonyHubWebSocket' [7/14/2020, 3:57:18 PM] --- [7/14/2020, 3:57:18 PM] Loaded plugin: homebridge-magichome-dynamic-platform@1.2.4 [7/14/2020, 3:57:18 PM] Registering platform 'homebridge-magichome-dynamic-platform.homebridge-magichome-dynamic-platform' [7/14/2020, 3:57:18 PM] --- [7/14/2020, 3:57:18 PM] Loading 4 platforms... [7/14/2020, 3:57:18 PM] [Bedroom Harmony] Initializing HarmonyHubWebSocket platform... [7/14/2020, 3:57:18 PM] [Bedroom Harmony] HarmonyPlatform Init [7/14/2020, 3:57:18 PM] [DysonPureCoolPlatform] Initializing DysonPureCoolPlatform platform... [7/14/2020, 3:57:18 PM] [Config] Initializing config platform... [7/14/2020, 3:57:18 PM] [Config] Running in Service Mode [7/14/2020, 3:57:18 PM] [homebridge-magichome-dynamic-platform] Initializing homebridge-magichome-dynamic-platform platform... [7/14/2020, 3:57:18 PM] [Bedroom Harmony] DidFinishLaunching [7/14/2020, 3:57:18 PM] [Bedroom Harmony] (Bedroom Harmony)INFO - Loading activities... [7/14/2020, 3:57:18 PM] [Bedroom Harmony] (Family Room Harmony)INFO - Loading activities... [7/14/2020, 3:57:18 PM] [DysonPureCoolPlatform] Got devices from config. [7/14/2020, 3:57:18 PM] [homebridge-magichome-dynamic-platform] Scanning broadcast-address: '192.168.1.255' on interface: 'en0' for Magichome lights...
Setup Payload: X-HM://XXXXXXXXXX Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
┌────────────┐
│ XXX-XX-XXX │
└────────────┘
[7/14/2020, 3:57:18 PM] Homebridge is running on port 51826. [7/14/2020, 3:57:19 PM] [Bedroom Harmony] (Bedroom Harmony)INFO - configuring Main TV Service [7/14/2020, 3:57:19 PM] [Bedroom Harmony] (Bedroom Harmony)INFO - Configuring Main Activity TiVo [7/14/2020, 3:57:19 PM] [Bedroom Harmony] (Family Room Harmony)INFO - configuring Main TV Service [7/14/2020, 3:57:19 PM] [Bedroom Harmony] (Family Room Harmony)INFO - Configuring Main Activity TiVo [7/14/2020, 3:57:20 PM] [homebridge-magichome-dynamic-platform] Found 21 devices.
[7/14/2020, 3:57:20 PM] [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
`
@solomonj1963 Okay, one step further. I think one of your devices is using the original LEDnet protocol. It should be a RGB only strip or bulb.
Can you attempt to single it out and unplug it for testing purposes? Then restart Homebridge. It will be available for use with this plugin after the major update.
Let me know.
Sorry for the slow response. I don't have any RGB only devices, all RGBW or RGBWW. But I did go through removing each device from my network and the app and didn't find any combination that didn't result in the same error. I'm 99% sure I'd replaced all my older devices with the newer ones as well.
But, I did notice one fascinating thing, so maybe it's not your code. I was watching TV on my TiVo Mini as I tried them all. Every time, the instant I removed the MagicHome device from my Wi-Fi, my TiVo mini lost its connection to the main TiVo. And that's all over wired Ethernet. I think it's probably related to an MDNS broadcast issue. That would make some sense since I've also recently had issues with HomeKit pairing on all my HomeKit bridges (HASS, MyQ, and HomeBridge).
@Zacknetic I just updated to the latest version, pruned all accessories (just in case), and restarted, and now it has found all of my controllers! So far things are working as expected. Is there anything I should specifically test to help you? Or is there anything else planned for future updates that I should keep an eye out for?
Thanks!
@solomonj1963 There's a new update that may solve your problem OR now give me better insight to the actual device type you have.
Please update in config ui x > plugins > homebridge-magichome-dynamic-platform > update
(!Important!) Next purge all magic-home accessories by going to config ui x > plugins > homebridge-magichome-dynamic-platform > settings > checkmark "Prune All Accessories Next Restart (Warning Dangerous!)" > restart homebridge at least twice > un-checkmark "Prune All Accessories Next Restart (Warning Dangerous!)" > restart homebridge
I will be closing this issue soon, but feel free to open a new issue to post results.
@andywaplinger That's really great to hear. This has been a long time coming.
In terms of new updates, I have a rudimentary animation system in the works. But I have two major issues.
I thought about having the user add a unique name to their device but I don't think anyone wants to confuse their Siri with oddly named devices.
Alternatively I could generate a list of each device in the config ui x interface. Then the user could choose which animations they'd want per device.
Take a look at this post where I made some progress with animations.
https://github.com/Zacknetic/HomebridgeMagicHome-DynamicPlatform/issues/13#issuecomment-671039114
I will close this now, but feel free to give any feedback about color animations there. Or open this issue again if you run into trouble. Or if you have other feature requests, open a new issue.
Again, really glad we could finally solve your issue. Fingers crossed.
I have 8 MagicHome LED controllers setup in my home. I've been successfully using https://github.com/steve228uk/homebridge-magichome for years, so it's not like I haven't been using MagicHome controllers with Homebridge.
I see that it successfully loads and initializes this platform, but it finds no devices and rescans, then registers 0 devices.
I have pruning turned off (initially had it prune after 4 restarts) and have tried it with "allow simultaneous color and white" both on and off.
Let me know what other info would be helpful. Thanks!