Zacknetic / HomebridgeMagicHome-DynamicPlatform

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

More of a question #9

Closed vascott1 closed 3 years ago

vascott1 commented 4 years ago

I have 2 sets of lightstrips from a company named DALS. The app that is used looks like MagicHome so I decided to try this. I just installed the plugin and restarted and am not picking up any devices. When I installed the MagicHome app on my phone it found the lightstrips right away so they are on the platform. Do you have any ideas? If not, totally understandable and apologies for taking up your time.

Thanks

Zacknetic commented 4 years ago

Hey, thanks for getting in contact with me.

If it works on the magichome app, it most likely can work on my plugin. It's just a matter of finding out why they aren't detected. May I see your homebridge.log? Just upload it instead of pasting it in the text field.

vascott1 commented 4 years ago

Thanks. Appreciate your taking a look.

Just did a full reboot as well and updated the plugin to 1.2.4.

daemon.log syslog.txt

Zacknetic commented 4 years ago

This is the exact same bug as another issue. I will merge those.

Please upload your config.json so I test a theory.

Edit* actually I will keep these issues separate as I predict that after solving the initial issue, your device will require additional logic

vascott1 commented 4 years ago

Sounds good. Thanks so much for checking this out.

File renamed so it will upload.

config.json.txt

Zacknetic commented 4 years ago

No issues there. Turns out the devices are being discovered, but for some reason they aren't being registered. Same issue as issue #4. Not entirely sure how to solve this as I have no idea why this is happening.

Only thing I can think of is the cache is messed up somehow. Is there any way you could test this on another device. Perhaps install homebridge, my plugin, and config ui x on a windows machine. Also, using config ui x allows you to delete individual cached devices. Could you see if you can delete your magichome devices through there?

vascott1 commented 4 years ago

Let me see what I can do. I have a Mac mini I could get it installed on. I think I had it there so might just be doing some updates. I am not sure how to remove individual devices. I do not see anything matching my lightstrips anywhere. The hod not show on the accessories page and the settings panel for your plugin doesn't show anything either. Just let me know how and I will do it :) I will work on another install after work today and have an update on that soon.

vascott1 commented 4 years ago

I think I found what you are referring to. I set pruneAllAccessoriesNextRestart: true and restarted..

[7/13/2020, 16:15:13] [homebridge-magichome-dynamic-platform] Found 2 devices. [7/13/2020, 16:15:13] [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

Also, not sure if it shows in the logs but I am using Version 1.1.2-beta.2 of HomeBridge

vascott1 commented 4 years ago

Just installed a fresh version of homebridge on my Mac Mini. It is version 1.1.1. Then installed the latest version of your plugin. Still not working. Here is a the log from that system.

config.json.txt homebridge.log.txt

Zacknetic commented 4 years ago

I'm at a complete loss as to why this is happening... perhaps when it inquires for information it doesn't get back info that's expected. Thus no accessory is registered from the discovered devices.

One possible fix is to add logic for the original 8byte LEDNET protocol. The problem is my code is a big if-statement mess. I need to clean it up and use an interface for each controller type.

Until I do that, adding code for an 8 byte protocol will have to wait. I will be working on that with a friend Wednesday morning EST.

Update coming sometime Wednesday. Might not solve your issue immediately but I have more ideas for solutions if that doesn't work. Either way, I'm fairly confident we will have your lights working soon.

vascott1 commented 4 years ago

No rush! I really appreciate your doing this and putting the plugin out there for us to use! Hopefully we figure it out. I might look and see if I can buy a bulb or something that is specifically on this platform. See if it is something to do with the strips?

Either way, thanks!

Scott

On Jul 14, 2020 at 3:01 AM, <Zacknetic (mailto:notifications@github.com)> wrote:

I'm at a complete loss as to why this is happening... perhaps when it inquires for information it doesn't get back info that's expected. Thus no accessory is registered from the discovered devices.

One possible fix is to add logic for the original 8byte LEDNET protocol. The problem is my code is a big if-statement mess. I need to clean it up and use an interface for each controller type.

Until I do that, adding code for an 8 byte protocol will have to wait. I will be working on that with a friend Wednesday morning EST.

Update coming sometime Wednesday. Might not solve your issue immediately but I have more ideas for solutions if that doesn't work. Either way, I'm fairly confident we will have your lights working soon.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub (https://github.com/Zacknetic/HomebridgeMagicHome-DynamicPlatform/issues/9#issuecomment-658007915), or unsubscribe (https://github.com/notifications/unsubscribe-auth/ALLAX25YOLTGGUFTTT2CNS3R3P7GBANCNFSM4OYTU6RA).

Zacknetic commented 4 years ago

It's definitely a protocol issue. Your strips will work eventually.

these bulbs on aliexpress are pretty cheap just go with the faster shipping.

MWDelaney commented 4 years ago

Just chiming in: I'm having the same issue:

[7/15/2020, 7:02:05 PM] [homebridge-magichome-dynamic-platform] 
Found 1 devices.

[7/15/2020, 7:02:05 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

It's clearly seeing the device, but it's not registering it.

Here's the device I bought if that's helpful at all: https://www.amazon.com/gp/product/B0746654D5/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

Thanks for your hard work on this!

broadcastthebadger commented 4 years ago

Encountering the same issue here. Saying that I really appreciate your work @Zacknetic

Zacknetic commented 4 years ago

@broadcastthebadger , @MWDelaney , @vascott1 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!

MWDelaney commented 4 years ago

@Zacknetic It worked! It registered my controller as a device named "8" which is a little odd, but other than that it's working great.

Thank you!

Zacknetic commented 4 years ago

Awesome to hear! The initial naming is just the number the controller sends me which I use to determine its type.

8 means you have a light bulb that probably has a metal casing and has RGB and warm white LEDs. Also, it can't turn on the color and white LEDs simultaneously. Only one at a time.

I think I will change the naming convention in the future. The numbers were just the easiest. You can change the name to anything you want and the plugin will remember the name (but not the room/automations) in case you want to use oznu's backup / restore function in the future.

Anyways, enjoy and feel free to create any other issue reports with bugs or features.

MWDelaney commented 4 years ago

Will do. This is fun to play with.

I wonder if a device type key in the README might help. I was trying to get simultaneous white/color working not knowing my device didn't do that!

Zacknetic commented 4 years ago

Will do. This is fun to play with.

I wonder if a device type key in the README might help. I was trying to get simultaneous white/color working not knowing my device didn't do that!

The "User Interface" section of the readme does explain the different functionalities.

How would you change it so that it would be more clear?

MWDelaney commented 4 years ago

Well, for instance once this plugin was working, I took my eyes off Homebridge and focused on the Home app on my phone, which gave me the aforementioned "8" as the device name (and therefore type).

If everything goes smoothly during setup, and all devices are detected and added to the Home app without issue then it's possible the user won't ever see the "User Interface" details in the Homebridge log.

Having the devices broken out by the name they're given in the Home app (or just naming them in the Home app by the values shown in the "User Interface" section of the README!) might help users understand their devices better.

Zacknetic commented 4 years ago

Great suggestions. Perhaps naming them RGBW_Non-Simultaneous and RGBW_Simultaneous is the way to go.

Thanks!

vascott1 commented 4 years ago

Hi there. I can happily report that this is now working with my lights! I had it removed for a while since I was debugging some other issues but glad to have it back. I have not played with it for colors yet but seems like it is all there. Thanks!

Zacknetic commented 4 years ago

Very happy to hear that. Thank you for sticking around and trying it again. Let me know how the colors go.

Zacknetic commented 4 years ago

@broadcastthebadger could you give the new update a try? See if it solves your issue?

Zacknetic commented 3 years ago

Closing issue due to successful resolution.