[Release] Magic Home Wifi (Drivers) + MagicHome Manager (App)

Maybe @adamkempenich can add a note that says 99=Speed 1 / 1=Speed 99 somewhere on the driver page? Or change the driver to make 1=1 and 99=99. I've not used these in the year plus I've been using these lights so I can't say this quirk is a deal breaker.

Huh. I thought I’d already been doing that. I’ll see what’s up.

I have a Smart Switch that's using the 'MagicHome Wifi -- Controller (Smart Plug)' driver that also stopped working after the upgrade.
I couldn't find a way to change the Refresh Settings so I went into the source for the driver and changed every instance of 60 to 59. This is known as the 'Shotgun approach". :wink:
I'm sure this is non-optimal but it did the trick and is now working.

1 Like

Very sorry - i actually thought we were talking about the Time to Refresh. Having three devices connected when i was playing around i had set all three to refresh every second. That was when i noticed a delay in overall hub actions. as soon as i increased this number on all three drivers, things returned to the usual response times.
image

1 Like

I'll push a hotfix in GitHub today.

:slight_smile:

2 Likes

For anyone wondering --- the fix has been pushed out :slight_smile:

2 Likes

Thanks Adam.

Not that it was really affecting me but I will be sure to update.

1 Like

Hey Adam,
Thank you so much for these! I have been using them for the last month without any issues until they suddenly stopped working last night. Not sure what the issue is but the Controllers aren't responding to commands through Hubitat anymore. They all have reserved IP addresses on my router (I double checked them to be sure) so the local IP address hasn't changed. They work through the Magic Home app so they haven't stopped working either. Not really sure what's up and would be very grateful for any assistance in this regard.

Thank you so much for all your work! Immensely grateful!

Edit: I updated the code to the latest version and rebooted the hub and it seems to be working. Thank you so much!

Glad to hear you got it working! I think that scheduling bug would cause the devices to sporadically kill. Let me know if you have it disconnect again --- and if so, I'd be interested to see if the device is attempting to reconnect and simply failing to do so, or if it's become unscheduled altogether. I'd been encountering the latter bug, and thought it was fixed, but there's a chance it may not have been.

Hi @adamkempenich,
I'm interested in using Magic home to control a WiFi led bulb.. here is the link

https://www.amazon.com.au/HaoDeng-Sunrise-Dimmable-Multicolor-Changing/dp/B07VZD5CLL?th=1&psc=1

It's a RGB Color + 2700K to 6500K Tunable White
Is this supported with any of your driver?

It sure is! :slight_smile: RGB + CCT bulb driver

Thanks @adamkempenich for the quick response!

@adamkempenich I've had my RGB controller connected with this DH for about 1½ years with no trouble. But something went wrong and the controller became unreachable. So, I reset it successfully (blinking lights for confirmation).

But now, I'm going crazy with what I am sure is a very simple problem. Even after reading this entire thread! I can't get my local network you see the reset device.

I downloaded the MH app (Magic Home Pro) and scanned and found the broadcast SSID of LEDnetxxxxxx. If I connect to that network, the MH app can control the lights just fine.

For reference, it was previously on my local network as 192.268.1.214. My HE hub is at 192.168.1.140. Now the MH controller has an ip of 10.10.123.3.

Please tell me how I can set the ip on the MH to one that my local network can see and I can put into the device parameters. Thank you!

Strange. If you use something like Angry IP scanner (Mac or Windows) can you see the device on your network? Does your router show what address it’s on?

Your controller is not connected to your WiFi network. You need to get it connected to your WiFi network after a reset. Once you have a 192.168.1.xxx address you can then set that in the driver page.

Makes sense, but how do I change the device ip from the 10.10.123 subnet to my network of 192.168.1.xxx?

I've scanned the entire network and there is no sign of it. From the Magic Home Pro app, I see the MAC address and I'm looking for that with no avail. Given that it's at 10.10.123.3, I'm not surprised my home network doesn't see it.

When it arrives new, or after a reset like I performed, what makes the it get an ip from the home network? Does it come out-of-the box looking for a DHCP-assigned ip address? Is there a better app (I'm using v1.5.0 Build 90) that will facilitate getting an ip from my network? [I ask because way back there was a differentiation betweeh MH with a solid blue logo and one with a gradient blue.]

Thanks for all help!!

EDIT: Got it! Just after posting the above, I saw a little innocuous + sign in the top right that led to an Add Device menu which let me pick an access point and give the WPA2 password. It then assigned an ip address on my network. All good now. Thanks.

4 Likes

Hi Adam,

I am using this driver RGB + CCT bulb driver and the setup was working well but I am getting errors off late as below.. any suggestions?

2020-06-15 06:16:48.058 pm errorgroovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.math.BigDecimal#multiply. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.Character] [class java.lang.Number] on line 353 (setLevel)

app:5472020-06-15 06:16:47.852 pm infoLiving room motion after sunset Turn On & Set Level

dev:4492020-06-15 06:16:47.692 pm infoLiving room sensor is active

--- Live Log Started, waiting for events ---

Looks like there's some type conversion I'll need to add in. :slight_smile: Thank you!

I am glad to see this thread is still active, and grateful for @adamkempenich 's contributions. I finished my basement and used 10 of the Magic Home controllers for the LED accents. The driver and app work great in Hubitat. My question is on new features, if it is technically possible to integrate the camera/music functionality of the OE Magic Home app into the Hubitat infrastructure. I realize this functionality may not be best integrated into Hubitat (though I don't know that for sure and would be excited to learn this is being considered)... but I'm wondering how much of the API has been reverse engineered in development of this driver to determine if it would be possible to integrate a camera (IP based?) and feed that to the controller(s) to enable that functionality outside of the app. I imagine the app is simply taking a histogram of camera image and sending a color value according to some algorithm to the controller -- could a camera instead send that to this driver running in Hubitat via a port? Similarly, could the reactivity to music (or even just a mic?) be added? Perhaps an RPi running with camera and mic dedicated to this purpose -- sending requisite commands to the controller via Hubitat? I'd be willing to contribute / test if that would be helpful -- just need a starting point.

1 Like

Technically ... yes. Feasibly ... no. :confused:

The way the app works on the phone is that it creates a TCP link to your lights, and then sends a (very fast) stream of data to the device based on its color readout. This would probably be too stressful for a hub with its current TCP implementation, and timing would be too slow to keep up.

That being said --- it's something that I've played around with, and would be open to finding a way to make it work. Right now, there's just too much overhead and latency.