H801 : RGB controller based on ESP8266 avalaible from China

Moderators: Voyager, BertB, rtenklooster, Stuntteam, grovkillen, TD-er

Message
Author
sozkara
Normal user
Posts: 14
Joined: 02 Jun 2016, 09:07

Re: H801 : RGB controller based on ESP8266 avalaible from China

#51 Post by sozkara » 06 Jun 2016, 11:03

I opened this bulb because its 12v/3v supply fried. The board is intact, so i powered it on via the headers and analyzed packets its applications sending to the bulb. It runs on UDP port and hex rgb values are sent to the bulb like this:

For R:0 G:0 B:255:
7e:07:05:03:00:00:ff:00:ef
These digits are rgb values: 00:00:ff
So i guess it is hackable.
When its powered on, it defaults to warm white mode with 100% dim so yeah, it can be used like a conventional bulb.

msev
Normal user
Posts: 33
Joined: 13 Feb 2016, 18:24

Re: H801 : RGB controller based on ESP8266 avalaible from China

#52 Post by msev » 06 Jun 2016, 21:53

So you would not recommend this bulb, since its power supply fried? Does it pose a fire-hazard?

msev
Normal user
Posts: 33
Joined: 13 Feb 2016, 18:24

Re: H801 : RGB controller based on ESP8266 avalaible from China

#53 Post by msev » 12 Jun 2016, 09:16

Did the bulb fry just from normal use or?

sozkara
Normal user
Posts: 14
Joined: 02 Jun 2016, 09:07

Re: H801 : RGB controller based on ESP8266 avalaible from China

#54 Post by sozkara » 14 Jun 2016, 17:19

msev wrote:Did the bulb fry just from normal use or?
Sorry for late reply been on vcation.

In short, i can't say anything about recommendation because my experience with it was around 10 minutes. It could be my fault that its power supply has gone bad because the fixture was connected to another wifi plug that i made myself, from which i turned it off/on repeatedly (don't ask why). It does NOT pose a fire hazard as its power supply is in its thick aluminum (or whatever the metal is) body from my point of view and there was no capacitor boom or any smoke or smthing like that. it's PCB is aluminum too. The seller which i bought it from sent me a replacement right away when i said it doesnt turn on, and the replacement is yet to arrive. When i have it, i will have a conclusion.

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: H801 : RGB controller based on ESP8266 avalaible from China

#55 Post by Deennoo » 15 Jun 2016, 19:10

Of this bulb is a great new device, does ESPEasy can use led ?

Once again this need a domoticz intégred protocol to be use with (milight, m'y sensors v2.0 or 1.6 or what they want to name it who use an esp), a first step was made with one plugin.

On m'y side i try to develop it but that a totally fail.

I'm sure that Lunarock can made a Jeedom plugin to drive them with their native Fw...

sozkara
Normal user
Posts: 14
Joined: 02 Jun 2016, 09:07

Re: H801 : RGB controller based on ESP8266 avalaible from China

#56 Post by sozkara » 15 Jun 2016, 19:21

There is no need for custom FW in my opinion as this device is controlled locally and not cloud enabled. Only thing missing is integration with existing setups (domoticz, openhab) etc. As commands are simple UDP packets, i guess its only trivial to hack the protocol used. I already provided some sample data. When i get the new one, i'll try to get it working with openhab.

Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

Re: H801 : RGB controller based on ESP8266 avalaible from China

#57 Post by Ger » 15 Jun 2016, 19:57

It would be nice if there is a HUE bridge emulator in combination with ESP Easy

sozkara
Normal user
Posts: 14
Joined: 02 Jun 2016, 09:07

Re: H801 : RGB controller based on ESP8266 avalaible from China

#58 Post by sozkara » 15 Jun 2016, 21:55

Ger wrote:It would be nice if there is a HUE bridge emulator in combination with ESP Easy
AFAIK openhab 2 has hue bridge emulator built in. But i have no experience with it.

sozkara
Normal user
Posts: 14
Joined: 02 Jun 2016, 09:07

Re: H801 : RGB controller based on ESP8266 avalaible from China

#59 Post by sozkara » 16 Jun 2016, 20:44

Received the new bulb today and I'm dumping the UDP packets. I tried sending raw packets from my computer and controlled the led easily. I can share my dump data if anyone interested.

Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

Re: H801 : RGB controller based on ESP8266 avalaible from China

#60 Post by Ger » 16 Jun 2016, 23:24

sozkara wrote:Received the new bulb today and I'm dumping the UDP packets. I tried sending raw packets from my computer and controlled the led easily. I can share my dump data if anyone interested.
I am very interested :D

sozkara
Normal user
Posts: 14
Joined: 02 Jun 2016, 09:07

Re: H801 : RGB controller based on ESP8266 avalaible from China

#61 Post by sozkara » 16 Jun 2016, 23:49

well here are my findings:
commands consists of 9 bytes, first 3 bytes represent the mode and last byte value always is ef.
preset modes always start with: 7e:05:03. RGB mode RGB value bytes are 5. 6. and 7. bytes (0 - 255) in hex.
Dimming values are 00 - 64 in hex (100 values).

off:
7e:04:04:00:00:ff:ff:00:ef
on:
7e:04:04:01:00:ff:ff:00:ef

R:0 G:0 B:255
7e:07:05:03:00:00:ff:00:ef

R:0 G:2 B:255
7e:07:05:03:00:02:ff:00:ef

R:9 G:0 B:255
7e:07:05:03:09:00:ff:00:ef

dimmer %0 (preset)
7e:05:03:80:01:ff:ff:00:ef

dimmer %10 (preset)
7e:05:03:81:01:ff:ff:00:ef

dimmer %20 (preset)
7e:05:03:82:01:ff:ff:00:ef

dimmer %100 (preset)
7e:05:03:8a:01:ff:ff:00:ef

dimmer %3
7e:05:05:01:03:ff:ff:08:ef

dimmer %4
7e:05:05:01:04:ff:ff:08:ef

color temp warm:0 cold:99
7e:04:01:64:ff:ff:ff:00:ef

color temp warm: 9 cold 90
7e:06:05:02:09:5a:ff:08:ef

color temp warm: 99 cold 0
7e:06:05:02:63:00:ff:08:ef

color temp warm: 50 cold 49
7e:06:05:02:32:31:ff:08:ef

color temp warm: 50 cold 50 (preset)
7e:05:03:85:02:ff:ff:00:ef

static red mode:
7e:05:03:80:03:ff:ff:00:ef

static blue mode:
7e:05:03:81:03:ff:ff:00:ef

red gradient mode:
7e:05:03:8b:03:ff:ff:00:ef

red gradient 100% dim:
7e:04:01:64:ff:ff:ff:00:ef

Send these values to port 5000 UDP

msev
Normal user
Posts: 33
Joined: 13 Feb 2016, 18:24

Re: H801 : RGB controller based on ESP8266 avalaible from China

#62 Post by msev » 30 Jun 2016, 08:48

Sozkara thanks for the protocol! So how is the reliability now with the new bulbs? :)

Each bulb has its own IP probably and you can control it with that right? So you can address each bulb separately right?

sozkara
Normal user
Posts: 14
Joined: 02 Jun 2016, 09:07

Re: H801 : RGB controller based on ESP8266 avalaible from China

#63 Post by sozkara » 30 Jun 2016, 11:40

msev wrote:Sozkara thanks for the protocol! So how is the reliability now with the new bulbs? :)

Each bulb has its own IP probably and you can control it with that right? So you can address each bulb separately right?
I have no problems so far with the new bulb. I further investigated the old blown bulb and saw that only the bridge rectifier on the ac input has blown, not sure why. all the circuits are solid made to my eyes. once i replace the bridge rect. it would be up too hopefully.
Yes, each bulb has its own IP. I can turn the bulb on/off with openhab quite easily, but nothing more, cause i dont know java enough (cant convert decimal to hex) ;)

User avatar
renearts
Normal user
Posts: 9
Joined: 26 May 2016, 13:31
Location: Volkel, NL
Contact:

Re: H801 : RGB controller based on ESP8266 avalaible from China

#64 Post by renearts » 04 Aug 2016, 15:54

I'm currently experimenting with ESPEasy on my H801 dimmer, is it possible to use the PWM-fade feature via MQTT? It works fine via HTTP, but I haven't been able to sort out how to use this via MQTT :)

pzygmunt
Normal user
Posts: 1
Joined: 08 Aug 2016, 12:51

Re: H801 : RGB controller based on ESP8266 avalaible from China

#65 Post by pzygmunt » 08 Aug 2016, 13:30


wutu
Normal user
Posts: 35
Joined: 05 Feb 2016, 07:33

Re: H801 : RGB controller based on ESP8266 avalaible from China

#66 Post by wutu » 12 Oct 2016, 12:32

With R120 does not operate PWM through a MQTT (OpenHAB MQTT). ESP freezes. Http command working OK.
With the R137_RC1 everything is OK.

EDIT: On wemos d1 mini with R121 does not work too.

User avatar
ledfreak3d
Normal user
Posts: 48
Joined: 21 Oct 2016, 12:41

Re: H801 : RGB controller based on ESP8266 avalaible from China

#67 Post by ledfreak3d » 11 Nov 2016, 08:37

all works fine on the h801 with espy easy
can control all the channels just fine

both rgb and double white
Last edited by ledfreak3d on 16 Nov 2016, 10:04, edited 1 time in total.
Domoticz Synology Esp easy Location Netherlands /Hoorn

madhouse
Normal user
Posts: 1
Joined: 11 Nov 2016, 13:56

Re: H801 : RGB controller based on ESP8266 avalaible from China

#68 Post by madhouse » 11 Nov 2016, 14:07

The H801 seems to be getting discontinued - not easy to find at the moment. Has anybody got any luck looking inside any of the other Wifi enabled LED controllers yet?

Like these:
https://www.aliexpress.com/item/Free-sh ... 4a5d&tpp=1
(looks like an ESP8266?)

https://www.aliexpress.com/item/MINI-Wi ... 1861ca753f

https://www.aliexpress.com/item/DC7-5-2 ... 1861ca753f


thanks

papperone
Normal user
Posts: 474
Joined: 04 Oct 2016, 23:16

Re: H801 : RGB controller based on ESP8266 avalaible from China

#69 Post by papperone » 11 Nov 2016, 14:50

madhouse wrote:The H801 seems to be getting discontinued - not easy to find at the moment. Has anybody got any luck looking inside any of the other Wifi enabled LED controllers yet?

Like these:
https://www.aliexpress.com/item/Free-sh ... 4a5d&tpp=1
(looks like an ESP8266?)

https://www.aliexpress.com/item/MINI-Wi ... 1861ca753f

https://www.aliexpress.com/item/DC7-5-2 ... 1861ca753f


thanks
Discontinued? I just bought one today --> https://www.aliexpress.com/item/DC5-24V ... 86022.html
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

User avatar
ledfreak3d
Normal user
Posts: 48
Joined: 21 Oct 2016, 12:41

Re: H801 : RGB controller based on ESP8266 avalaible from China

#70 Post by ledfreak3d » 16 Nov 2016, 09:56

you can also get this one

http://www.banggood.com/ARILUX-AL-LC01- ... 58603.html

officlaly its only rgb but the white channel is also present on the board
so no problem to mod it with espeasy

have one on order so ill post the results

pretty sure this one is also a esp8266

https://www.aliexpress.com/item/Free-sh ... 4a5d&tpp=1
Attachments
CqxdnOXW8AAArpf.jpg
CqxdnOXW8AAArpf.jpg (61.23 KiB) Viewed 4573 times
CqxdnOiXgAESgsb.jpg
CqxdnOiXgAESgsb.jpg (70.98 KiB) Viewed 4573 times
Domoticz Synology Esp easy Location Netherlands /Hoorn

r_255
Normal user
Posts: 32
Joined: 20 Nov 2015, 20:42

Re: H801 : RGB controller based on ESP8266 avalaible from China

#71 Post by r_255 » 16 Nov 2016, 19:38

Looks nice and small,

but i did order some extra h801 as they work nice here and i like the 2 extra channels.
and i am replacing my 4 com port controlled chromoflex controllers.
The milight plugin runs here fine with the old rgb stripes, and i am very happy with it.

But after playing this weekend with my neopixels
https://plus.google.com/u/0/+RobinFrant ... 7395573438
( 4x esp8288 driving 128x ws2812b each )

i felt like having more disco lights :O) so next plan is to incorporate the 12v led stripes into the disco.

H801 artnet
https://github.com/overflo23/H801_ARTne ... artnet.ino

ws2812b artnet
https://github.com/rstephan/ArtnetWifi

Only downside is that i keep flashing those esp devices from milight(esp easy ) to artnet and back.
it would be great to have artnet as a plugin, as i do love the candle plugin and the ws2812 plugin but they are a bit to limited to me.

Software like Jinx and glediator can do funky stuff with leds and esp and even play video, do animations on music.
ehhhr, so yes i got to admit this is kind of a disco plugin request :ugeek:

User avatar
ledfreak3d
Normal user
Posts: 48
Joined: 21 Oct 2016, 12:41

Re: H801 : RGB controller based on ESP8266 avalaible from China

#72 Post by ledfreak3d » 16 Nov 2016, 20:26

Hey Robin.

I see my neopixel boards are atill working fine.
the neopixel display looks great
tested the artnet firmware this morning seems to work just fine on the neopixels
haven't tested it on the h801 yet
currently running espeasy with temp sensors and rgbww on both my h801's
not using the milight plugin but just using the build in fade commands with the script posted in this topic
Domoticz Synology Esp easy Location Netherlands /Hoorn

r_255
Normal user
Posts: 32
Joined: 20 Nov 2015, 20:42

Re: H801 : RGB controller based on ESP8266 avalaible from China

#73 Post by r_255 » 17 Nov 2016, 07:42

Hi Martijn,

Yeah they work fine! and Artnet loves them like me .. :D It really syncs up nice and make the hue disco look like kids stuff.
I did not test the h801 with artnet, but did try it on the esp witty and the rgb led syncs up nice, so there is no reason why it would not work on the h801 or any other esp led controller.

Imagine, driving 12v leds and 5v neopixels on one h801, on two universes. Its a shame artnet does not incorporate that well in home automation.
But it could be done in esp easy, as all arduino code is available ;o)

The only thing is that it would be nice to set the protocol thru a http command, so switching between home and disco mode for all esp easy controllers could be done by a button press.

Good to hear you got the 2 white channels working, i also found a mqtt version on github

Cheers,
Robin

User avatar
ledfreak3d
Normal user
Posts: 48
Joined: 21 Oct 2016, 12:41

Re: H801 : RGB controller based on ESP8266 avalaible from China

#74 Post by ledfreak3d » 27 Nov 2016, 21:55

ok small update

I have below dimmer now running successfully
its running esp easy 145 via the standard build in pwm commands.
so domoticz can talk directly to esp easy without any additional plugins
works fine for both rgb and single led channels

http://www.banggood.com/ARILUX-AL-LC01- ... ds=myorder

its really tiny and has 4 channels you can control and its cheap
there are only 3 channels soldered to the header but you can just add one extra pin
the mosfer for the 4th channel is already on the board
rx and tx are solder pads on the board and there are pads for an ir receiver on the board.
but these can of course also be used for a temp sensor or ir transmitter
Domoticz Synology Esp easy Location Netherlands /Hoorn

Dylantje
Normal user
Posts: 253
Joined: 11 Oct 2015, 16:51

Re: H801 : RGB controller based on ESP8266 avalaible from China

#75 Post by Dylantje » 28 Nov 2016, 08:08

@ Ledfreak3d... Great job!!

Did order 1 of these to..
so hope i get it fast..

Please can give a small how to...
do i need to flash the esp on it?
How? [ see no pins or something.. ]
Or just directly from my Wifi to the controller?
And rgb incl a extra pin... can a controll a rgbw?
How is it show in Domoticz? rgb bulb? or how do i set the colors?

User avatar
ledfreak3d
Normal user
Posts: 48
Joined: 21 Oct 2016, 12:41

Re: H801 : RGB controller based on ESP8266 avalaible from China

#76 Post by ledfreak3d » 28 Nov 2016, 09:13

yep you have to flash it with espeasy no extra plugin needed

there are 4 pads on the board
Untitled-1.jpg
Untitled-1.jpg (96.16 KiB) Viewed 5361 times
rx tx ground and 3.3 volt for the esp

the pad near R14 IS the + 3.3 volt
the pad next to R11 IS ground

the only pad that is not on he board is gpio0 you will have to short that one to ground to be able to flash it.

you can see one pin it mixing next to the rgb output just solder an extra pin on and you have a extra white channel you can control
esp easy has build in pwm dimming
so I use the following script in domoticz for that

Code: Select all

local lights = {
  ['Aqua Dimmer R/W'] = {ip = '192.168.1.98', pin = '14', rgb = false},
  ['Aqua Dimmer B/W'] = {ip = '192.168.1.98', pin = '4', rgb = false},
  ['keuken'] = {ip = '192.168.1.65', pin = '12', rgb = false},
  ['Kamer1'] = {ip = '192.168.33.64', pin = '13', rgb = false},
  ['Kamer2'] = {ip = '192.168.33.67', pin = '14', rgb = false},
  ['Kamer3'] = {ip = '192.168.33.66', pin = '14', rgb = false},
  ['Kamer4'] = {ip = '192.168.33.67', red = '15', grn = '13', blu = '12', rgb = true},
  ['Kamer5'] = {ip = '192.168.33.61', red = '15', grn = '13', blu = '12', rgb = true},
  ['Garden'] = {ip = '192.168.33.66', red = '15', grn = '13', blu = '12', rgb = true}
}

function setlight (ip, pin, dvalue)
    os.execute("curl 'http://" .. ip.. "/control?cmd=PWM,".. pin .."," .. tostring(dvalue) .. ",1028'")
end

commandArray = {}

for deviceName,deviceValue in pairs(devicechanged) do
    if (lights[deviceName]) then
        if (deviceValue == 'Off') then
            dvalue = 0
        elseif (deviceValue == 'On') then
            dvalue = 1024
        else
            inputValue = tonumber(otherdevices_svalues[deviceName])
            
            curve = 1.5848931924611
            normalizedCurVal  =  (inputValue - 1.0) / 99.0
            rangedValue =  (math.pow(normalizedCurVal, curve) * 1023.0) + 1.0
            
            dvalue = math.ceil(rangedValue)
        end
    
        if (lights[deviceName]['rgb']) then
            setlight(lights[deviceName]["ip"], lights[deviceName]["red"], dvalue)
            setlight(lights[deviceName]["ip"], lights[deviceName]["grn"], dvalue)
            setlight(lights[deviceName]["ip"], lights[deviceName]["blu"], dvalue)
        else
            setlight(lights[deviceName]["ip"], lights[deviceName]["pin"], dvalue)
        end
    end
end
return commandArray
for every light in the script you will have to make a hardware a hardware dummy device with the same name.
Manually create a device and set it to selector switch and afterward's change it back to a dimmer device
this will give you the best dimming control over your light

make sure you setup the ip addresses to match the script and make sure you set the pins correctly

example ['Aqua Dimmer R/W'] = {ip = '192.168.1.98', pin = '14', rgb = false}, is a dimmer called Aqua Dimmer R/W' with ip addres 192.168.1.98 ad the physical light is connected to pin 14
if you set rgb to true you can choose a rgb device instead of dimmer and you can mix the color but you will also have to select 3 output pins in the script
Last edited by ledfreak3d on 28 Nov 2016, 09:17, edited 1 time in total.
Domoticz Synology Esp easy Location Netherlands /Hoorn

Dylantje
Normal user
Posts: 253
Joined: 11 Oct 2015, 16:51

Re: H801 : RGB controller based on ESP8266 avalaible from China

#77 Post by Dylantje » 28 Nov 2016, 09:17

thanks, for the fast repay..
Only i do not understand the gpi0 part.
Perhaps when i got the controller.:-)

Hope you will help me when i got it @ home..

User avatar
ledfreak3d
Normal user
Posts: 48
Joined: 21 Oct 2016, 12:41

Re: H801 : RGB controller based on ESP8266 avalaible from China

#78 Post by ledfreak3d » 28 Nov 2016, 09:41

ofcourse ;)
Domoticz Synology Esp easy Location Netherlands /Hoorn

Dylantje
Normal user
Posts: 253
Joined: 11 Oct 2015, 16:51

Re: H801 : RGB controller based on ESP8266 avalaible from China

#79 Post by Dylantje » 13 Dec 2016, 15:47

got him....

When i have time..

Just flash ESP
Then mount the strip. [ picture please? ]
Only what type of script is it? [ how do i set the script? ]
And in Domoticz run a dummy, or can i run a dummy rgbw? [ what type? ]
i do have 1 ESP do i need to change the script ?
Or can i run it, when i buy more esp modify the script?

User avatar
ledfreak3d
Normal user
Posts: 48
Joined: 21 Oct 2016, 12:41

Re: H801 : RGB controller based on ESP8266 avalaible from China

#80 Post by ledfreak3d » 13 Dec 2016, 16:57

See my post on page 8.
Everything is explained there you can run multiple light from the same script.
Both rgb and single colorml.
And on muktiple controllers running espeasy
Domoticz Synology Esp easy Location Netherlands /Hoorn

Dylantje
Normal user
Posts: 253
Joined: 11 Oct 2015, 16:51

Re: H801 : RGB controller based on ESP8266 avalaible from China

#81 Post by Dylantje » 17 Dec 2016, 00:26

mmm try to understand this with Domoticz...

For 1 controller.
I need to solder the pins
I need to flash the ESPeasy firmware [ what setting do i need for the pin or why do i flash with ESPeasy??? ]
I need to create 1 dummy RGBW switch
Make sure the ip and names are correct,
Make the 777 or? What map or type of script..
Do i not need place the adres to the script in the dummy switch

And what can i do with this option make all colors in Domoticz with the slicers?

sorry i am dombo ....on this script..


Is there no build in RGBW in the ESPeasy? [ almost? ]

Mijn.Handen
Normal user
Posts: 7
Joined: 23 Dec 2016, 07:56

Re: H801 : RGB controller based on ESP8266 avalaible from China

#82 Post by Mijn.Handen » 28 Dec 2016, 21:04

ledfreak3d wrote:yep you have to flash it with espeasy no extra plugin needed

there are 4 pads on the board
...
so I use the following script in domoticz for that

Code: Select all

local lights = {
  ['Aqua Dimmer R/W'] = {ip = '192.168.1.98', pin = '14', rgb = false},
  ['Aqua Dimmer B/W'] = {ip = '192.168.1.98', pin = '4', rgb = false},
  ['keuken'] = {ip = '192.168.1.65', pin = '12', rgb = false},
  ['Kamer1'] = {ip = '192.168.33.64', pin = '13', rgb = false},
  ['Kamer2'] = {ip = '192.168.33.67', pin = '14', rgb = false},
  ['Kamer3'] = {ip = '192.168.33.66', pin = '14', rgb = false},
  ['Kamer4'] = {ip = '192.168.33.67', red = '15', grn = '13', blu = '12', rgb = true},
  ['Kamer5'] = {ip = '192.168.33.61', red = '15', grn = '13', blu = '12', rgb = true},
  ['Garden'] = {ip = '192.168.33.66', red = '15', grn = '13', blu = '12', rgb = true}
}

function setlight (ip, pin, dvalue)
    os.execute("curl 'http://" .. ip.. "/control?cmd=PWM,".. pin .."," .. tostring(dvalue) .. ",1028'")
end

commandArray = {}

for deviceName,deviceValue in pairs(devicechanged) do
    if (lights[deviceName]) then
        if (deviceValue == 'Off') then
            dvalue = 0
        elseif (deviceValue == 'On') then
            dvalue = 1024
        else
            inputValue = tonumber(otherdevices_svalues[deviceName])
            
            curve = 1.5848931924611
            normalizedCurVal  =  (inputValue - 1.0) / 99.0
            rangedValue =  (math.pow(normalizedCurVal, curve) * 1023.0) + 1.0
            
            dvalue = math.ceil(rangedValue)
        end
    
        if (lights[deviceName]['rgb']) then
            setlight(lights[deviceName]["ip"], lights[deviceName]["red"], dvalue)
            setlight(lights[deviceName]["ip"], lights[deviceName]["grn"], dvalue)
            setlight(lights[deviceName]["ip"], lights[deviceName]["blu"], dvalue)
        else
            setlight(lights[deviceName]["ip"], lights[deviceName]["pin"], dvalue)
        end
    end
end
return commandArray
for every light in the script you will have to make a hardware a hardware dummy device with the same name.
Manually create a device and set it to selector switch and afterward's change it back to a dimmer device
this will give you the best dimming control over your light

make sure you setup the ip addresses to match the script and make sure you set the pins correctly

example ['Aqua Dimmer R/W'] = {ip = '192.168.1.98', pin = '14', rgb = false}, is a dimmer called Aqua Dimmer R/W' with ip addres 192.168.1.98 ad the physical light is connected to pin 14
if you set rgb to true you can choose a rgb device instead of dimmer and you can mix the color but you will also have to select 3 output pins in the script
I am using this LUA script for my dimmer here but if you use the on button it always puts it on on full power. Not the set value. Would it be possible to set the value of the slider? What code change should there be made?

Thanks
MH

User avatar
ManS-H
Normal user
Posts: 201
Joined: 27 Dec 2015, 11:26
Location: the Netherlands

Re: H801 : RGB controller based on ESP8266 avalaible from China

#83 Post by ManS-H » 10 Jan 2017, 13:22

cherowley wrote:I've created a basic plugin (29) for Milight emulation. Only responds to group 1.
New item in devices - Milight RGBW. Set pins used and udp port for milight emulation.
Only does basic colour/brightness plus a couple new other http commands.
To use drop the plugin into the source directory and compile/flash as usual...
cherowley, did we talk here about the same, plugin basic plugin (29) and _P105 from the ESPEasyPluginPlayground-master?

vojtishek
Normal user
Posts: 69
Joined: 12 Jan 2017, 08:00

Re: H801 : RGB controller based on ESP8266 avalaible from China

#84 Post by vojtishek » 18 Jan 2017, 11:43

Hello guys,

Thanks for nice guide how to use this device in domoticz. Currently playing with sonoff with same chip, without luck yet, problems to get chip in flash mode.
Anyway I have one question If somebody know related to powering H801.

Input is 5-24V, so I wondering if the output to led strip is always transformed to 12V or not, just don´t want to burn it.
Asking as I have 24V power power adapter.

Thanks
Vojta

nygma
Normal user
Posts: 25
Joined: 26 Nov 2016, 11:16

Re: H801 : RGB controller based on ESP8266 avalaible from China

#85 Post by nygma » 26 Jan 2017, 09:58

Hi Guys,

I also got my H801. I have installed R147_RC8, but I can see that pwmfade is not yet available in this release. Do you have any idea when this is going to be made available? I am trying to use only the released versions instead of building my own firmware.

Thanks,
Csongor

cherowley
Normal user
Posts: 104
Joined: 14 Jan 2016, 09:39

Re: H801 : RGB controller based on ESP8266 avalaible from China

#86 Post by cherowley » 26 Jan 2017, 14:14

ManS-H wrote:
cherowley wrote:I've created a basic plugin (29) for Milight emulation. Only responds to group 1.
New item in devices - Milight RGBW. Set pins used and udp port for milight emulation.
Only does basic colour/brightness plus a couple new other http commands.
To use drop the plugin into the source directory and compile/flash as usual...
cherowley, did we talk here about the same, plugin basic plugin (29) and _P105 from the ESPEasyPluginPlayground-master?
Hi, sorry for late reply!

Yep its the _p105 in the playground ....

vojtishek
Normal user
Posts: 69
Joined: 12 Jan 2017, 08:00

Re: H801 : RGB controller based on ESP8266 avalaible from China

#87 Post by vojtishek » 03 Mar 2017, 00:33

Hi ledfreak3d,

thanks for guidance.
I´ve succesfully flashed h801 with espeasy r120.

My question is do I need higher version release and what settings do I need to perform on espeasy?

Any help much appreciated
Thanks

bobbybeans
Normal user
Posts: 115
Joined: 26 Feb 2017, 17:30

Re: H801 : RGB controller based on ESP8266 avalaible from China

#88 Post by bobbybeans » 03 Mar 2017, 11:04

vojtishek wrote:Hi ledfreak3d,

thanks for guidance.
I´ve succesfully flashed h801 with espeasy r120.

My question is do I need higher version release and what settings do I need to perform on espeasy?

Any help much appreciated
Thanks
with the h801 you can't just use the stock r120 bin you have to take the master branch and compile it with the milight plugin. when I get home I can give you the binary that is I believe r130+ milight plugin

vojtishek
Normal user
Posts: 69
Joined: 12 Jan 2017, 08:00

Re: H801 : RGB controller based on ESP8266 avalaible from China

#89 Post by vojtishek » 03 Mar 2017, 18:26

bobbybeans wrote:
vojtishek wrote:Hi ledfreak3d,

thanks for guidance.
I´ve succesfully flashed h801 with espeasy r120.

My question is do I need higher version release and what settings do I need to perform on espeasy?

Any help much appreciated
Thanks
with the h801 you can't just use the stock r120 bin you have to take the master branch and compile it with the milight plugin. when I get home I can give you the binary that is I believe r130+ milight plugin
Hi, just sucessfully flashed the plugin. My bad, that I dowloaded just "_P105_RGBW.ino" code from git instead of whole zip.
Little bit challenging with settings in domoticz, but now it's working like charm.

Thanks a lot

(Strange that normal manual remote controllel with max input 6A per channel has lower brightness than from h801, which is 4A per channel)

vojtishek
Normal user
Posts: 69
Joined: 12 Jan 2017, 08:00

Re: H801 : RGB controller based on ESP8266 avalaible from China

#90 Post by vojtishek » 04 Mar 2017, 19:55

Hi, do you know why White colour on RGB doesn't work?
Just small thing, but wondering how to achieve that.

THX

bobbybeans
Normal user
Posts: 115
Joined: 26 Feb 2017, 17:30

Re: H801 : RGB controller based on ESP8266 avalaible from China

#91 Post by bobbybeans » 06 Mar 2017, 12:54

white does work however you have to setup a script to control it individually via a slider / dimmer in domoticz to control it on etiher pin 4 or 14 depending which white channel you use

I'll see if I can find the script when I get home

vojtishek
Normal user
Posts: 69
Joined: 12 Jan 2017, 08:00

Re: H801 : RGB controller based on ESP8266 avalaible from China

#92 Post by vojtishek » 06 Mar 2017, 13:41

bobbybeans wrote:
06 Mar 2017, 12:54
white does work however you have to setup a script to control it individually via a slider / dimmer in domoticz to control it on etiher pin 4 or 14 depending which white channel you use

I'll see if I can find the script when I get home
Fact is that I have RGB Led strip and would like to "simulate" white colour.
I will truly appreciate If you will find some script for that.

Thank you

bobbybeans
Normal user
Posts: 115
Joined: 26 Feb 2017, 17:30

Re: H801 : RGB controller based on ESP8266 avalaible from China

#93 Post by bobbybeans » 08 Mar 2017, 11:56

Hey there
sorry forgot to post this..
below is the script to do this.
so there is a little more setup than just this script

Code: Select all


commandArray = {}
DomDevice = 'Door_H801_1_White'; --your dymmy LightWave RF Dimmer
IP = '192.168.0.227'; --change for your h801 ip
PIN = "14"; -- for w1 pin
if devicechanged[DomDevice] then
   if(devicechanged[DomDevice]=='Off') then 
     DomValue = 0;
   else
     DomValue = otherdevices_svalues[DomDevice];   
   CalcValue = (DomValue-1) * 34;
   end
   if CalcValue==nil then CalcValue=0 end
   runcommand = "curl 'http://" .. IP .. "/control?cmd=PWM,"  ..PIN.. "," .. CalcValue .. "'";
   os.execute(runcommand);
   print("PWM value= "..CalcValue);
end
return commandArray
so for the h801 you have to change the ip to your h801 so 192.168.0.* or w/e it is.
also you need to change the name to w/e you want so everywhere it says "Door_H801_1_White" replace it with your name. remember this name as you will need it later. also future reference you will have to spell it EXACTLY as you wrote it even capitals
Once you're done you will need to add this to the LUA script just copy and paste it into it and save it


also one other thing. the pin 14 this depends which white channel you hook up your white to. its either 14 or 4 so if one doesn't work try the other pin . sorry i dont have the hardware in front of me and i can't remember right now.
now go to hardware and add a dummy device and the name of the dummy device needs to have the name of what you just named it so my example it would be "Door_H801_1_White" again has to be EXACTLY the same. you don't have to have _ i just did it for my naming schema

save this dummy device in the hardware tab. now, don't go to device tab but instead go to the switches tab and click in the top left add "Manual light/switch"
a box will come up and in the list you will select the device that you just created. so my example it would be "Door_H801_1_White"
in the other sections fill it out like the image below. The ID and Unit Code does not to be changed/ defaults can be left. Once done click save and now if everything is setup correctly you should be able to turn the dimmer on and off and move the slider and it will work provided that you have the h801 easy mi light firmware setup correctly as well
http://imgur.com/v5yyxpw

vojtishek
Normal user
Posts: 69
Joined: 12 Jan 2017, 08:00

Re: H801 : RGB controller based on ESP8266 avalaible from China

#94 Post by vojtishek » 08 Mar 2017, 21:57

Thank you, much appreciated. Currently I have only RGB led strip, but I will order RGBW.
Script is clear, even for me 😊.

Do you know If there is any way how to achieve white colour on RGB led strip?

bobbybeans
Normal user
Posts: 115
Joined: 26 Feb 2017, 17:30

Re: H801 : RGB controller based on ESP8266 avalaible from China

#95 Post by bobbybeans » 15 Mar 2017, 15:07

vojtishek wrote:
08 Mar 2017, 21:57
Thank you, much appreciated. Currently I have only RGB led strip, but I will order RGBW.
Script is clear, even for me 😊.

Do you know If there is any way how to achieve white colour on RGB led strip?
nope you can't if your referencing the rgb 5050 led strips they literally don't have a white channel
just buy a white strip or a combo rgbw strip they're cheap

vojtishek
Normal user
Posts: 69
Joined: 12 Jan 2017, 08:00

Re: H801 : RGB controller based on ESP8266 avalaible from China

#96 Post by vojtishek » 16 Mar 2017, 07:50

Ok, I will buy.
Thanks

User avatar
ledfreak3d
Normal user
Posts: 48
Joined: 21 Oct 2016, 12:41

Re: H801 : RGB controller based on ESP8266 avalaible from China

#97 Post by ledfreak3d » 22 Mar 2017, 21:50

this one will do the job a lot beter
both for rgb and rgbw

setup is the same just create a dummy hw device and a a device as a selector switch first and then change it to a dimmer else you wont have full range of brightness
then change the name and ip and corresponding pins in the script
this script will handle all your esp dimmers
and with a nice fade in and out effect
the time of the fade can be customised ofcourse

Code: Select all

local lights = {
  ['Aqua Dimmer R/W'] = {ip = '192.168.1.98', pin = '14', rgb = false},
  ['Aqua Dimmer B/W'] = {ip = '192.168.1.98', pin = '4', rgb = false},
  ['keuken'] = {ip = '192.168.1.65', pin = '12', rgb = false},
  ['Blokhut'] = {ip = '192.168.1.93', pin = '14', rgb = false},
  ['Lampjes'] = {ip = '192.168.1.93', pin = '4', rgb = false},
  ['Trap'] = {ip = '192.168.1.40', pin = '5', rgb = false},
  ['Kontorhylde W'] = {ip = '192.168.33.67', red = '15', grn = '13', blu = '12', rgb = true},
  ['Stuereol W'] = {ip = '192.168.33.61', red = '15', grn = '13', blu = '12', rgb = true},
  ['Seng W'] = {ip = '192.168.33.66', red = '15', grn = '13', blu = '12', rgb = true}
}

function setlight (ip, pin, dvalue)
    os.execute("curl 'http://" .. ip.. "/control?cmd=PWM,".. pin .."," .. tostring(dvalue) .. ",1150'")
end

commandArray = {}

for deviceName,deviceValue in pairs(devicechanged) do
    if (lights[deviceName]) then
        if (deviceValue == 'Off') then
            dvalue = 0 ; 
        elseif (deviceValue == 'On') then
            dvalue = 1024
        else
            inputValue = tonumber(otherdevices_svalues[deviceName])
            
            curve = 1.5848931924611
            normalizedCurVal  =  (inputValue - 1.0) / 99.0
            rangedValue =  (math.pow(normalizedCurVal, curve) * 1023.0) + 1.0
            
            dvalue = math.ceil(rangedValue)
        end
    
        if (lights[deviceName]['rgb']) then
            setlight(lights[deviceName]["ip"], lights[deviceName]["red"], dvalue)
            setlight(lights[deviceName]["ip"], lights[deviceName]["grn"], dvalue)
            setlight(lights[deviceName]["ip"], lights[deviceName]["blu"], dvalue)
        else
            setlight(lights[deviceName]["ip"], lights[deviceName]["pin"], dvalue)
        end
    end
end
return commandArray
the only issue i have is that the slider vallues do not get updated but thats probably easy to fix
Last edited by ledfreak3d on 24 Mar 2017, 20:53, edited 1 time in total.
Domoticz Synology Esp easy Location Netherlands /Hoorn

bobbybeans
Normal user
Posts: 115
Joined: 26 Feb 2017, 17:30

Re: H801 : RGB controller based on ESP8266 avalaible from China

#98 Post by bobbybeans » 24 Mar 2017, 20:39

hey man I just tried this script it works great, sorta....
when i turn it off, it updates and turns off (PWM 0), when i turn it on it turns on at full brightness. (PWM 1023) But when I move the slider it updates as well but even at 100% it only ever sets a maximum PWM of 156. is the math wrong somewhere. did I do something wrong? I didn't change the script except add my devices

I still have them setup as a milight with the plugin and the switches interact as a lightwave. which is based on how you normally set them up i believe, did you do anything different?
Last edited by bobbybeans on 24 Mar 2017, 20:58, edited 1 time in total.

User avatar
ledfreak3d
Normal user
Posts: 48
Joined: 21 Oct 2016, 12:41

Re: H801 : RGB controller based on ESP8266 avalaible from China

#99 Post by ledfreak3d » 24 Mar 2017, 20:49

make sure you add devices first as a selector switch and then change them to a dimmer that should restore a full range of brightness

not sure why this happens in domoticz but its easy to fix
Domoticz Synology Esp easy Location Netherlands /Hoorn

bobbybeans
Normal user
Posts: 115
Joined: 26 Feb 2017, 17:30

Re: H801 : RGB controller based on ESP8266 avalaible from China

#100 Post by bobbybeans » 24 Mar 2017, 21:03

what i did was change it to selector, save it. flipped it on and off again a few times, then saved it as a dimmer again, still nothing.
Should I just resetup the entire switch? (id preferably not like to do that as I have quite a few of them) but i can if needed.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests