-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple bulbs setup #27
Comments
For what it's worth, I have 5 of these bulbs and can't get more than 3 to work at a time. What I've found by using gatttool is that the flag "-t random" is needed for these bulbs to work. I'm able to connect to all the bulbs with gatttool but not magicblueshell (exceptions are thrown for 2 bulbs of the 5 - ERROR:magicblue.magicblueshell:Unexpected error with command "connect...). The other 3 connect using magicblueshell just fine (INFO:magicblue.magicblueshell:Connected). The exception seems to be coming from blue.py using addr type Public instead of Random. The function def _figure_addr_type needs to have a check for v8 and setting addr type to random. I have made this change locally and now I'm able to connect to all 5 bulbs. Now, HomeAssistant is still not able to connect to those two, so IDK what's up with that. Magicblueshell connects but HA doesn't. For reference, I have all 5 v8 bulbs. The ones that don't work have MAC starting with F1 and F6. |
This fixes connection issues by always using random address type for v8 bulbs. See issue Betree#27 for background.
@mouth4war This is really interesting. My setup is 2x I've made some changes in experiments/multi-bulbs (commit 52fa1f0) to be able to use magicblueshell with multiple bulbs at the same time, which makes testing easier. The two But regarding your problem, my
The reason it works from magicblueshell but not HA must be that when calling Can you try connecting to the bulb that have a MAC starting with |
The official android app also bugs when I try to use both types (v7/v10) at the same time. |
My mac address check is probably not complete or even invalid. The check I added worked for my bulbs (v10) and the one or articles about hacking the bulbs (can't remember which versions those were.) If you have/know something better... Your best bet if so specify a version when connecting. For the CLI: Please be aware that a new version of |
I fixed the HA issue by copying the magicbluelib file to the deps folder (it maintains a local copy). So with RANDOM, I'm able to connect to all 5 bulbs with magicblueshell and HA both. |
An update after observing the bulbs over a few days. They behave erratically in terms of maintaining a connection. Different bulbs become unresponsive and cannot connect in magicblueshell at different times. Wait for a second or two and retry and viola, you're connected. Some "broken pipe" exceptions pop up from time to time. Examples:
I do remember similar behaviour in the android app. So maybe it's a v8 bulb thing. How is the performance of the later bulbs for you guys? Are they consistent and responsive? |
They do disconnect often, though v10 is more stable than v7 in my case. However I found that using @StevenLooman's fork of the homeassistant component works really well as it now automatically reconnects and doesn't lock the all thing; from the user point of view it's transparent. Another thing I noticed : the range for it to work properly is pretty short and very sensitive to obstacles. |
Thanks for those tips! HA is not throwing up exceptions after switching to that fork. Bulbs seem more responsive, so far. I might just add 3 more of these to my room setup, despite white-only yeelights being around the same price. I prefer the aesthetics of this bulb more than the yeelight. I know I'll probably regret this! |
My 3 v10s are also not 100% stable. Not from Be sure to upgrade to the latest version of To be honest, if you want something (more) stable, you might want to choose another platform. I do have a (white-only) yeelight, but the light is very unnatural and unpleasant. I have no experience with the Philips HUE platform, or any of the compatible blubs. |
I'm a lot happier with the performance with your HA component fork, Steven. They are not 100% but almost 99% reliable now. I ordered 3 more to complete my living room setup so I'll have 8 of these in my living room. I'm partial to ball/globe shaped bulbs so the yeelights and hues look unappealing to me. I can use them in lamps where the bulb isnt exposed, though. OT: I also have 5 of Philips/Xiaomi WW hubless step-less dimming globe-shaped bulbs (220v) that work with the MiHome app and look great too. Wish these could be included in HA but it looks like they can't. |
Great! I'm curious to know how which versions you'll get and how they work. For the Xiami bulbs, interesting. I have no experience with Xiaomi hardware, but am curious how these will work. I am guessing via bluetooth as well, but probably using another protocol. There are some articles about the magicblue bulbs, on how to sniff the bluetooth traffic. Maybe you can do this and figure out any specifics from the used protocol. |
So I got 3 v10 bulbs in the mail today. Plugged them in and tried magicblueshell and then adding to HASS. They work fine, so far. Though HASS scenes take a while to set since the bulbs are sent commands one-by-one, so they respond one-by-one. EDIT: So there's an exception showing up in the HASS log that's making HASS unresponsive. Once the exception happens, HASS logs show repeated failed attempts (timeouts) at updating the lights by fluxer. Is it coming from the library or the HASS component?
|
The update should be happening in a separate thread and the |
Closing this as 0.5 release allows for multiple bulbs usage in magicblueshell. We probably have improvements and optimizations to do in the lib too but we'll open specific issues for them. |
This question is often asked, how many bulbs can we handle at the same time ? There's no theoretical limit in this library, but maybe in
bluepy
?Any feedback on the subject would be welcome. I've personally ordered two more bulbs so I'll be able to check that in a few weeks.
The text was updated successfully, but these errors were encountered: