"LED Light bulb" with Magic Home app" integration?

Hey, thanks for the comment, unfortunately, for my light bulbs (which are controlled by “MagicHome” app), the python library does not seem to work:

>>> import magichue
>>> light = magichue.Light(‘192.168.2.158’)
Traceback (most recent call last):
File “”, line 1, in
File “/home/pi/.local/lib/python3.7/site-packages/magichue/magichue.py”, line 141, in init
self._connect()
File “/home/pi/.local/lib/python3.7/site-packages/magichue/magichue.py”, line 146, in _connect
self._sock.connect((self.addr, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
>>> from magichue import discover_bulbs
>>> print(discover_bulbs())

(Running from my RaspPi which are on the same network as the bulbs)

Hello i am trying to connect the bulb but i am new in this world so it is difficult for me to do the things that you are saying, do you have a guide or something to follow?
Thannks for the work that you are doing.

Interesting…I bought a few of these and they work just fine on my HA install. I just added the following to my configuration.yaml:

light:
    - platform: flux_led
      automatic_add: true
      devices:
        192.168.10.170:
          name: flux_mb_bulb1
          mode: "rgbw"
        192.168.10.171:
          name: flux_mb_bulb2
          mode: "rgbw"
        192.168.10.172:
          name: flux_mb_bulb3
          mode: "rgbw"

All 3 are in a single light and it even works as a group. Came out of the same box in the pic further up this thread.

Are you sure those are Magic Home and not Magic Hue? The Magic Hue ones work with the flux_led integration, Magic Home don’t. It’s confusing as even the app looks almost the same.

The box looks exactly the same as yours and the app is ‘Magic Home’. My bulbs are RGBW, bought from Aliexpress.

To be honest, with what I know now, I should have just stuck with Tuya. Ignorance is a SOB. It doesn’t seem like there is a way to flash these to get them out of the cloud. I have some more on the way (D’oh!) so I may give tuya-convert a go one one of them.

Can you check what firmware is your lights running (should be possible from the MagicHome app)

Interestingly, I just went in the app to check and it forced me to push v57231. It wouldn’t let me check current version without doing that.

Yep, I just saw that as well, thought maybe its the difference between my lights and yours (besides yours being RGB and mine just W). I updated one of my lights to v57231 but still can’t control them from HA using “flux_led” (even when changing the mode to “w”).

BTW I had no luck with tuya-convert on these, from my understanding they are using a chip made by Broadlink which is a different thing…

I’m not without some weird behaviour that I haven’t had time to sort out yet. I can tell Google “Turn on/off the Master Bedroom Lights” and it happens, then she announces that ‘Master Bedroom Lights are not available’.

I have a group set up in the Magic Home app AND in HA. I wondered if Google was just interacting directly with the lights through the app and bypassing HA but I can also control the lights through a switch in HA that toggles the group so I guess that HA is integrated.

Hi Mark,
I tried to do this with the flux_led.
In HA entities the light bulbs appear with the error “need unique id”
Where to set the unique id . I cannot find the place for the unique id.
Can anybody help me.
Grtz.
Petty

I suspect that with the error you are getting, you are setting the devices up in the automations.yaml

The problem with these bulbs is that they use a Broadcom chip in the hardware and there seems to be no method to flash it with something like Tasmota. I had success with the earlier firmware but as soon as it got updated, they stopped responding via HA and were only controllable via Google or Amazon assistants.

It would help if you could describe what you have in place and show us the code you are using in which files. Remember to use the code tags and make sure you have no usernames or passwords accessible.

Just found this thread while trying to setup this lamps in HA.
Having the same problems with the new version of the firmware and I can’t even find an open port on the lamps to start tinkering with them.
Does anyones has any idea on to work with these lamps?

There is a blog post out there somewhere - I had a quick look but couldn’t locate it in the time I had - that details a tear-down of these bulbs. The outcome is that they do not use an ESP chip but something else entirely. The post explained that the user had a custom PCB manufactured on which he soldered an ESP12 and then flashed that. He didn’t detail the schematics for the custom PCB and it had already gone past what I wanted to do with that bulb.

My solution was just to order alternatives. I bought the FCmila RGBW bulbs but they also needed a chip replacement with an ESP12F but at least they were a direct swap with the Broadcom chip that was on them.

Unfortunately, unless you want to learn to reverse engineer the firmware on the bulb, these are a dead duck for our purposes.

Thanks for the feedback.
I did an nmap scan on it and it seems to believe that it has an ESP chip:
Running: Espressif embedded, lwIP, NodeMCU embedded
OS CPE: cpe:/a:lwip_project:lwip cpe:/o:nodemcu:nodemcu
OS details: Espressif esp8266 firmware (lwIP stack), NodeMCU firmware (lwIP stack)

Strange…

It is entirely possible that they have switched to different chips but here is a picture of the Broadcom chip that is in the bulbs I have:

1 Like

Didn’t opened my lamp but went along and tried to use the python broadlink implementation and it seems to detect the lamp. Still no luck in controlling them but at least they are discovered:

There is a thread about this lamps with broadlink here:

Also after resetting the lamp and configure it using the official broadlink app I can now use the python-broadlink to control the lamp.
I did tried the broadlink integration in home assistant but that one doesn’t seem to be working (at least not yet)

Hey, I tried controlling my bulbs with the latest version of the ‘python-broadlink’ library but I get:

broadlink.exceptions.AuthorizationError: [Errno -7] Control key is expired

I tried running auth() but that gives me the following error:

broadlink.exceptions.AuthenticationError: [Errno -1] Authentication failed

broadlink.discover is able to discover all the bulbs and identifies them as model=‘LB1’. My bulbs are not RGB but only white/warm colors (device id: 0x60C7). Might that be the issue?

I had a similar problem and opened an issue in the python-broadlink:

It seems that in my case the device is locked. Unfortunatly I can’t find a way to unlock but using the broadlink app to configure the lamp instead of the magichome app sort of did the trick to unlock the lamp (although then the broadlink app complains that it can’t add the lamp…)

1 Like

yeah I tried to configure it with the broadlink app (instead of magichome) and it failed as well. Can you please specify the exact steps you did so I can try it myself? :slight_smile:

Update: I tried setting the lights using the Broadlink app and although it did fail, I am now able to control my lights using the python-broadlink library! Great find! Thanks for sharing!!