[SOLVED] WiFI LED Binding - LD741

led
ld741
magichome
Tags: #<Tag:0x00007f014cab0050> #<Tag:0x00007f014cab0e60> #<Tag:0x00007f014cab23a0>

(Philipp) #1

Hi Guys,

today i got my new MAGIC HOME LED Controller ( 9 USD ) and i want to use it in OpenHAB. :wink:
i think this is an LD741 Device

i already installed the WIFI LED Binding in Paper UI but now i am a little bit confused how to set up the device (item/sitemap) :smiley: - The Manual says:

Usually, there is no need to define your WiFi LED controllers via configuration files.

So how do i set up my led strip to work in openhab ? ( items/sitemap )

Thank you!

PS:
This device should work in OpenHAB. i found this Review on Amazon:

I bought it to integrate with the open source project OpenHAB and it has by far outstripped all my expectations. If your looking to increase your IoT presence in your home don’t over look this!


MagicHome with Tasmota and OpenHab2
(Philipp) #2

I GOT IT - works like a charm :slight_smile:

How to set up:

  • Power up the LED Strip
  • open PAPER UI and install the WIFI LED Binding
  • in PaperUI inside THINGS should be something like “AK001-ZJ100” (WiFi LED Device) with corresponding MAC-Adress
  • click on it and u see something like: “wifiled:wifiled:A020A61D34BD:power”
  • add this to your xxx.items File
// LED STRIPE

Switch MyWiFiLight_power "Power-LED" (Light) {channel="wifiled:wifiled:A020A61D34BD:power"}
Dimmer MyWiFiLight_white "White-LED" (Light) {channel="wifiled:wifiled:A020A61D34BD:white"}
Color  MyWiFiLight_color "Color-LED" (Light) {channel="wifiled:wifiled:A020A61D34BD:color"}

  • add this to your .sitemap File:
Colorpicker item=MyWiFiLight_color
Switch item=MyWiFiLight_power
Slider item=MyWiFiLight_white

reboot you Raspberry/OpenHAB

it now should work :wink:

Good Luck!


(Philipp) #3

How do i add some “modes/functions” to it ? like e.g. “Seven color cross fade” or “red strobe flash”

any ideas ? thank you!


(Adam McCormack) #4

I’m not sure exactly how it works but the below info got it working for me. Notice in the rule I’m sending a number. I got this number by using the Magic Home app. When I selected a function (in this case a custom one), it updated the item’s status to 96. I then used that number to send the command.

Item

String program "program to run: [%s]" {channel="wifiled:wifiled:db66c6a4:program"}
Switch ptest //dummy item used for testing

Sitemap

Text item=program

rule

rule "Program"
when Item ptest changed
then
program.sendCommand(96)
end

Hope this helps


(Philipp) #5

That worked :slight_smile: THANK YOU!

How do you know about those “sendCommand” Numbers ?


(Adam McCormack) #6

This string item returned the number of the program state. Use the magic app and change the function to whatever you want and the item’s state should update to the corresponding number. Give it a little time (at most 30 seconds) to update in your sitemap. I did find out that no matter how many custom function you create in the app it will always return the same number (96 in my case). So really I can only have one custom function at a time.

String program "program to run: [%s]" {channel="wifiled:wifiled:db66c6a4:program"}

Examples of other numbers I found if this helps:
Green gradual change = 39
red gradual change = 38
Purple strobe flash = 54


(Philipp) #7

so nice - Thank you man! <3


(Philipp) #8

here is my list of presets i found:
( check the “Mode: ##” comment at the end of a line)

ITEMS:

Group LEDLight <light> // RGB-Strip-Presets Group

String LED_1_program      "LED 1 Preset [MAP(led_preset.map):%s]"    <menu>        {channel="wifiled:wifiled:XXXXXXXXXXX:program"}
Switch LED_1_preset_0     "Strobe"                                   <smoke>        (LEDPresets1)     // Mode: 48
Switch LED_1_preset_1     "Strobe - Custom 1"                        <smoke>        (LEDPresets1)     // Mode: 96
Switch LED_1_preset_2     "Strobe - Rot"                             <smoke>        (LEDPresets1)     // Mode: 49
Switch LED_1_preset_3     "Strobe - Grün"                            <smoke>        (LEDPresets1)     // Mode: 50
Switch LED_1_preset_4     "Strobe - Blau"                            <smoke>        (LEDPresets1)     // Mode: 51
Switch LED_1_preset_5     "Strobe - Cyan"                            <smoke>        (LEDPresets1)     // Mode: 53
Switch LED_1_preset_6     "Strobe - Lila"                            <smoke>        (LEDPresets1)     // Mode: 54
Switch LED_1_preset_7     "Strobe - Gelb"                            <smoke>        (LEDPresets1)     // Mode: 52
Switch LED_1_preset_8     "Strobe - Weiß"                            <smoke>        (LEDPresets1)     // Mode: 55
Switch LED_1_preset_9     "Strobe - R/G/B"                           <smoke>        (LEDPresets1)     // Mode: 57
Switch LED_1_preset_10    "CrossFade - Rot/Grün"                     <flow>         (LEDPresets1)     // Mode: 45
Switch LED_1_preset_11    "CrossFade - Rot/Blau"                     <flow>         (LEDPresets1)     // Mode: 46
Switch LED_1_preset_12    "CrossFade - Blau/Grün"                    <flow>         (LEDPresets1)     // Mode: 47
Switch LED_1_preset_13    "Fade"                                     <colorlight>   (LEDPresets1)     // Mode: 37
Switch LED_1_preset_14    "Fade - Weiß"                              <colorlight>   (LEDPresets1)     // Mode: 44
Switch LED_1_preset_15    "Fade - Grün"                              <colorlight>   (LEDPresets1)     // Mode: 39
Switch LED_1_preset_16    "Fade - Dunkelblau"                        <colorlight>   (LEDPresets1)     // Mode: 40
Switch LED_1_preset_17    "Fade - Gelb"                              <colorlight>   (LEDPresets1)     // Mode: 41
Switch LED_1_preset_18    "Fade - Rot "                              <colorlight>   (LEDPresets1)     // Mode: 38
Switch LED_1_preset_19    "Fade - Hellblau "                         <colorlight>   (LEDPresets1)     // Mode: 42
Switch LED_1_preset_20    "Fade - Lila"                              <colorlight>   (LEDPresets1)     // Mode: 43
Switch LED_1_preset_21    "Fade - R/G/B"                             <colorlight>   (LEDPresets1)     // Mode: 45
Switch LED_1_preset_22    "Jump"                                     <chart>        (LEDPresets1)     // Mode: 56
Switch LED_1_preset_23    "Jump - R/G/B"                             <chart>        (LEDPresets1)     // Mode: 99

For the lazy ones:
RULES::

////////////////////////////
// LED PRESET RULES
////////////////////////////

rule "Program - Strobe"
when Item LED_1_preset_0 received command ON
then
LED_1_program.sendCommand(48)
end

rule "Program - Strobe - Custom 1"
when Item LED_1_preset_1 received command ON
then
LED_1_program.sendCommand(96)
end

rule "Program - Strobe - Rot"
when Item LED_1_preset_2 received command ON
then
LED_1_program.sendCommand(49)
end

rule "Program - Strobe - Grün"
when Item LED_1_preset_3 received command ON
then
LED_1_program.sendCommand(50)
end

rule "Program - Strobe - Blau"
when Item LED_1_preset_4 received command ON
then
LED_1_program.sendCommand(51)
end

rule "Program - Strobe - Cyan"
when Item LED_1_preset_5 received command ON
then
LED_1_program.sendCommand(53)
end

rule "Program - Strobe - Lila"
when Item LED_1_preset_6 received command ON
then
LED_1_program.sendCommand(54)
end

rule "Program - Strobe - Gelb"
when Item LED_1_preset_7 received command ON
then
LED_1_program.sendCommand(52)
end

rule "Program - Strobe - Weiß"
when Item LED_1_preset_8 received command ON
then
LED_1_program.sendCommand(55)
end

rule "Program - R/G/B"
when Item LED_1_preset_9 received command ON
then
LED_1_program.sendCommand(57)
end

rule "Program - CrossFade - Rot/Grün"
when Item LED_1_preset_10 received command ON
then
LED_1_program.sendCommand(45)
end

rule "Program - CrossFade - Rot/Blau"
when Item LED_1_preset_11 received command ON
then
LED_1_program.sendCommand(46)
end

rule "Program - CrossFade - Blau/Grün"
when Item LED_1_preset_12 received command ON
then
LED_1_program.sendCommand(47)
end

rule "Program - Fade"
when Item LED_1_preset_13 received command ON
then
LED_1_program.sendCommand(37)
end

rule "Program - Fade - Weiß"
when Item LED_1_preset_14 received command ON
then
LED_1_program.sendCommand(44)
end

rule "Program - Fade - Grün"
when Item LED_1_preset_15 received command ON
then
LED_1_program.sendCommand(39)
end

rule "Program - Fade - Dunkelblau"
when Item LED_1_preset_16 received command ON
then
LED_1_program.sendCommand(40)
end

rule "Program - Fade - Gelb"
when Item LED_1_preset_17 received command ON
then
LED_1_program.sendCommand(41)
end

rule "Program - Fade - Rot"
when Item LED_1_preset_18 received command ON
then
LED_1_program.sendCommand(38)
end

rule "Program - Fade - Hellblau"
when Item LED_1_preset_19 received command ON
then
LED_1_program.sendCommand(42)
end

rule "Program - Fade - Lila"
when Item LED_1_preset_20 received command ON
then
LED_1_program.sendCommand(43)
end

rule "Program - Fade - R/G/B"
when Item LED_1_preset_21 received command ON
then
LED_1_program.sendCommand(45)
end

rule "Program - Jump"
when Item LED_1_preset_22 received command ON
then
LED_1_program.sendCommand(56)
end

rule "Program - Jump - R/G/B"
when Item LED_1_preset_23 received command ON
then
LED_1_program.sendCommand(99)
end

SITEMAP:

      Text item=LED_1_program
    Switch item=LED_1_preset_0
    Switch item=LED_1_preset_1
    Switch item=LED_1_preset_2
    Switch item=LED_1_preset_3
    Switch item=LED_1_preset_4
    Switch item=LED_1_preset_5
    Switch item=LED_1_preset_6
    Switch item=LED_1_preset_7
    Switch item=LED_1_preset_8
    Switch item=LED_1_preset_9
    Switch item=LED_1_preset_10
    Switch item=LED_1_preset_11
    Switch item=LED_1_preset_12
    Switch item=LED_1_preset_13
    Switch item=LED_1_preset_14
    Switch item=LED_1_preset_15
    Switch item=LED_1_preset_16
    Switch item=LED_1_preset_17
    Switch item=LED_1_preset_18
    Switch item=LED_1_preset_19
    Switch item=LED_1_preset_20
    Switch item=LED_1_preset_21
    Switch item=LED_1_preset_22
    Switch item=LED_1_preset_23

Led Strips Controlled with OpenHAB2
(Sergey M) #9

You have all the rules have one name, that is not right!


(Philipp) #10

you are right, but its working :wink: and feel free to change the rule names :wink:

also works great with this SUNIX (RGBWW) controller - i needed to switch from LD 382 to LD 686 in PaperUI
(for the white2 channel)


(Quang Tuyen Tran) #11

Hi,

i have problem with Wifi Led Binding, I added successfully the Thing LED, and controlled it on the Paper UI. But after some minutes i can not controlled it, and it showed this :

Status: OFFLINE - COMMUNICATION_ERROR java.net.NoRouteToHostException: No route to host (Host unreachable)

maybe someone can help me to solve it.

Thanks


(Philipp) #12

sounds like the LED Controller isnt finding your WiFi (WLan)

check the “MagicHome App” or similar to reconnect your controller to your WiFi (WLan)

good luck


(Daniel Calvo Gonzalez) #13

Hi, I have a couple of these cheap controllers with different firmware versions. One of them, goes offline from time to time while the other remains always online. I can’t find any other difference between them beyond firmware version. I tried to reconnect to my wifi from scratch, change power adaptor and so on, but it always disconnects.

My five cents.


(Quang Tuyen Tran) #14

Hi, With Magic Home App i don’t have any problem to control this Led. I must always delete this thing and add it again. But after some minutes it’s again offline


(Philipp) #15

so your LED Controller is always ON in the MagicHome App ?
and you only have problems in openhab ?

i have so too, but without any problems


(Quang Tuyen Tran) #16

Hi,
Yes, the Led ist always Available with MagiHome App.

I am using Alexa amazon, and Alexa can turn on and off this Led, but with OpenHAB the Led ist offline


(Philipp) #17

sounds like an openhab config issue

maybe you should open a new thread with you problem and provide us with your settings - otherwise , help is impossible :wink:


(Michael Brunner) #18

hi,

first of all thanks for the help here!
i would like to know how i could update the status of the light?
For example i switch the light on with google home but in basicui or habpanel it says off… do i need to send a string or how could i get the status update?

thanks a lot

mike


(Chase Mixon) #19

I have a very simular led strip, maybe just a newer version it’s the AK001-ZJ200, and I was able to use the above to setup and use with mine, but I wanted to create a rule that turned on the strip with a white light, then at say 9 PM change the color to a very low brightness red light so when I get up early in the morning, I can see but it doesn’t keep everyone up. do you know how I can change just the color and or brightness with a rule or something like that? I have those changes in the magic home app and I can do it easily there, but haven’t been able to figure out how to do with rules in my openhab. I do know how to turn it on and off with rules and that is already working, but changing the color and brightness seems to be beyond my abilities.


(Philipp) #20

i can give you an example of my rule - its color changing, but driven by the charging state of my mobile phone .

it looks like this:

rule "iPHONE - AKKUZUSTAND - LADEN/GELADEN"
    when
        //  Time cron "0 0/10 * * * ?"        // Alle 10 Minuten   16:30 / 16:40 / 16:50
        Item iPhone5s_Philipp_Battery_Status changed
    then
        LED_1_power.sendCommand(ON)
        if (iPhone5s_Philipp_Battery_Status.state == "Charging")
            LED_1_color.sendCommand("100,100,100") // Green
    else
        if (iPhone5s_Philipp_Battery_Status.state == "Charged")
        LED_1_program.sendCommand("37") // Fade
    else
        LED_1_color.sendCommand("360,100,100") // Red
end

hope that helps a bit, at the moment i do not really have time for a more detailed answer - sorry