H801 : RGB controller based on ESP8266 avalaible from China

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
Dylantje
Normal user
Posts: 255
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
New 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: 281
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: 70
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: 125
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: 70
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: 119
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: 70
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: 70
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: 119
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: 70
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: 119
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: 70
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: 119
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: 70
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: 119
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: 119
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.

luisfcosta
New user
Posts: 8
Joined: 20 May 2017, 07:23

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

#101 Post by luisfcosta » 03 Jun 2017, 09:00

Sorry guys, trying to include plugin 105_rgbw into the lates R2.0 dev10, but my arduino IDE keeps throwing error after error (cannot find file, library, etc)
Is there a more straightforward way than rearranging my .ino's and .h's + .cpp's?

Trying to get my h801 flashed with ESPEasy and the correct plugin (105_rgbw?)
Can connect it with TTL and even upload ESPeasy v2.0 (bin file), but board irresponsive to port commands (WifiSSID, ...).

Any .bin already out there with the plugin?

Thanks for your hints!

xbmcnut
Normal user
Posts: 49
Joined: 17 Mar 2016, 08:49
Location: Auckland, NZ
Contact:

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

#102 Post by xbmcnut » 12 Jun 2017, 03:47

Hey there,

Could someone give me a hint on how to add _P105_RGBW.ino for H801 to Platformio so I can compile? New to Platformio so any assistance would be appreciated.
Numerous Sonoff's and Shelly's, Home Assistant on Intel NUC i3, Aeotec Z-Stick (Gen 5), deCONZ Zigbee Stick, 3 x Echo Dot's and 5 x Google Home

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

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

#103 Post by vojtishek » 12 Jun 2017, 08:21

xbmcnut wrote: 12 Jun 2017, 03:47 Hey there,

Could someone give me a hint on how to add _P105_RGBW.ino for H801 to Platformio so I can compile? New to Platformio so any assistance would be appreciated.
Hi,
I'm using Espeasy r147 http://www.letscontrolit.com/downloads/ ... 47_RC8.zip.
Then you need to copy P105_RGBW.ino into following folder "ESPEasy_R147_RC8\Source\ESPEasy", then compile and flash.

You will select RGBw Milight as a device in ESPeasy and set following parameters, rgbw milight udp port 8899 red pin 15 green pin 13 blue pin 12 white pin 14.
Then add following in Domoticz, If you are using domoticz
Image


Let me know if succesfull, otherwise I can send you better detail as I'm not currently at home.

xbmcnut
Normal user
Posts: 49
Joined: 17 Mar 2016, 08:49
Location: Auckland, NZ
Contact:

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

#104 Post by xbmcnut » 12 Jun 2017, 11:59

vojtishek wrote: 12 Jun 2017, 08:21
Then you need to copy P105_RGBW.ino into following folder "ESPEasy_R147_RC8\Source\ESPEasy", then compile and flash.
@vojtishek. Thank you so much!! Easier than I thought and quite obvious when I think about it. :idea: I'm using Home Assistant so will be controlling the device using MQTT. So this 105 plugin basically emulates a MiLight bridge?
Numerous Sonoff's and Shelly's, Home Assistant on Intel NUC i3, Aeotec Z-Stick (Gen 5), deCONZ Zigbee Stick, 3 x Echo Dot's and 5 x Google Home

xbmcnut
Normal user
Posts: 49
Joined: 17 Mar 2016, 08:49
Location: Auckland, NZ
Contact:

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

#105 Post by xbmcnut » 12 Jun 2017, 12:09

vojtishek wrote: 12 Jun 2017, 08:21 Then you need to copy P105_RGBW.ino into following folder "ESPEasy_R147_RC8\Source\ESPEasy", then compile and flash.
Whoops. Get these errors when trying to compile now. Do I need to define the plugin somewhere?

Code: Select all

Compiling .pioenvs\normal_4096\FrameworkArduino\Updater.o
C:/Users/peters/OneDrive/Home Automation/ESPEasy/ESPEasy_v2.0.0-dev10/Source/src/_P105_RGBW.ino: In function 'boolean Plugin_105(byte, EventStruct*, String&)':
C:/Users/peters/OneDrive/Home Automation/ESPEasy/ESPEasy_v2.0.0-dev10/Source/src/_P105_RGBW.ino:273:36: error: 'Plugin_105_FadingTimer' was not declared in this scope

{
^
C:/Users/peters/OneDrive/Home Automation/ESPEasy/ESPEasy_v2.0.0-dev10/Source/src/_P105_RGBW.ino:331:29: error: 'Plugin_105_ProcessUDP' was not declared in this scope
if (Plugin_105_Pins[PinIndex].CurrentLevel <= Plugin_105_Pins[PinIndex].FadingTargetLevel && Plugin_105_Pins[PinIndex].FadingDirection < 0)
^
C:/Users/peters/OneDrive/Home Automation/ESPEasy/ESPEasy_v2.0.0-dev10/Source/src/_P105_RGBW.ino: In function 'void Plugin_105_ProcessUDP()':
C:/Users/peters/OneDrive/Home Automation/ESPEasy/ESPEasy_v2.0.0-dev10/Source/src/_P105_RGBW.ino:849:109: error: 'Plugin_105_HSL2Rgb' was not declared in this scope
Compiling .pioenvs\normal_4096\FrameworkArduino\WMath.o
Compiling .pioenvs\normal_4096\FrameworkArduino\WString.o
*** [.pioenvs\normal_4096\src\ESPEasy.ino.o] Error 1
 [ERROR] Took 5.11 seconds
Numerous Sonoff's and Shelly's, Home Assistant on Intel NUC i3, Aeotec Z-Stick (Gen 5), deCONZ Zigbee Stick, 3 x Echo Dot's and 5 x Google Home

xbmcnut
Normal user
Posts: 49
Joined: 17 Mar 2016, 08:49
Location: Auckland, NZ
Contact:

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

#106 Post by xbmcnut » 12 Jun 2017, 12:13

Hmmm. Do I need to be using older builds?
Numerous Sonoff's and Shelly's, Home Assistant on Intel NUC i3, Aeotec Z-Stick (Gen 5), deCONZ Zigbee Stick, 3 x Echo Dot's and 5 x Google Home

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

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

#107 Post by vojtishek » 12 Jun 2017, 13:28

xbmcnut wrote: 12 Jun 2017, 12:13 Hmmm. Do I need to be using older builds?
Ah, I didn't try v2.0.0-dev10 so I can't sat if it's functionable or not. Try to compile it for RC147. This one worked for me.

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

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

#108 Post by vojtishek » 12 Jun 2017, 13:31

Did you download whole master zip from https://github.com/ESP8266nu/ESPEasyPluginPlayground and extract only _P105_RGBW.ino?

xbmcnut
Normal user
Posts: 49
Joined: 17 Mar 2016, 08:49
Location: Auckland, NZ
Contact:

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

#109 Post by xbmcnut » 12 Jun 2017, 23:58

vojtishek wrote: 12 Jun 2017, 13:31 Did you download whole master zip from https://github.com/ESP8266nu/ESPEasyPluginPlayground and extract only _P105_RGBW.ino?
I downloaded the RAW data for the plugin and created a file in Notepad++. Will that not work?
Numerous Sonoff's and Shelly's, Home Assistant on Intel NUC i3, Aeotec Z-Stick (Gen 5), deCONZ Zigbee Stick, 3 x Echo Dot's and 5 x Google Home

xbmcnut
Normal user
Posts: 49
Joined: 17 Mar 2016, 08:49
Location: Auckland, NZ
Contact:

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

#110 Post by xbmcnut » 13 Jun 2017, 00:08

Downloaded plugin zip from GitHub and extracted P105 to ESPEasy_v2.0.0-dev10\Source\src. Same error.
Numerous Sonoff's and Shelly's, Home Assistant on Intel NUC i3, Aeotec Z-Stick (Gen 5), deCONZ Zigbee Stick, 3 x Echo Dot's and 5 x Google Home

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

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

#111 Post by vojtishek » 13 Jun 2017, 03:56

Just mention that, because I've downloaded by save as just the plugin from github and that doesnt work. There is need to download whole master zip and extract just the plugin from it and copy into release folder ESPEasy
Try another release

Blacky's Boss
Normal user
Posts: 11
Joined: 20 Jul 2017, 13:11

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

#112 Post by Blacky's Boss » 17 Sep 2017, 23:20

Tonight I Flashed my H801, ESPEasy 2.0.0-dev-11, Arduino 1.8.4, Milight RGBW plugin (P105).

All seems to work, but the colors are wrong.... Because I have a cheap strip with seperate colored led's, it's simple to see...

If I set the color to &h 00ff00, Green is full on. Correct.
If I set the color to &h 0000ff, Blue is full on. Correct.
If I set the color to &h ff00ff, both Red and Blue are on. Correct
If I set the color to &h ff0000, Red is on, but also Green...
[edit]Forgot to mention this is all in Domoticz
Oh, and setting an orange color makes it go green
Something tells me the calculations are off, but am I the only one?[/edit]

Why? :shock:

pearson
New user
Posts: 2
Joined: 11 Apr 2017, 20:29

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

#113 Post by pearson » 19 Sep 2017, 10:13

Blacky's Boss wrote: 17 Sep 2017, 23:20 Tonight I Flashed my H801, ESPEasy 2.0.0-dev-11, Arduino 1.8.4, Milight RGBW plugin (P105).
How did you manage to get ESPEasy 2.0.0-dev-11 to compile with P105? Several of us here are getting "was not declared in this scope" errors when building with it.

(I'd normally think that a header file was missing, but I'm new to Atom and .ino files and I'm a bit mystified at the lack of header files. :) )

Edit: I got it to build by moving those methods to the top of the _P105_RGBW.ino file, but that's obviously a hack. If someone could explain what simple thing I must be missing here, I'd really appreciate it.

Blacky's Boss
Normal user
Posts: 11
Joined: 20 Jul 2017, 13:11

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

#114 Post by Blacky's Boss » 19 Sep 2017, 12:36

These are the steps I took:
- Downloaded from github: https://github.com/letscontrolit/ESPEas ... -dev11.zip
- extracted to a folder ESPEasy_v2.0.0-dev11
- renamed the folder src to ESPEasy
- renamed the folder lib to libraries
- deleted all the other crap
- set the sketchfolder in the Arduino IDE to the ESPEasy_v2.0.0-dev11
- Restarted the IDE
- Ignore the message from the IDE that there are updates for some of your librairies!!!!!
- opened sketch ESPEasy and compiled!

Oh, and offcourse I downloaded the pLugins and dragged the P105 in the ESPEasy folder.

Blacky's Boss
Normal user
Posts: 11
Joined: 20 Jul 2017, 13:11

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

#115 Post by Blacky's Boss » 24 Sep 2017, 09:27

So, no one?

HAMFAM
New user
Posts: 1
Joined: 26 Sep 2017, 09:04

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

#116 Post by HAMFAM » 26 Sep 2017, 11:45

hi Blackys Boss

i am just starting a home automation system (Espeasy + sonoff + yeelight + ledstrips + Domoticz) and i just about got a working ledstrip RGB and getting weird results

ESPEasy v 2.0.0-dev11
arduino v 1.8.4 windows
_P105_RGBW
H801

compiled the plugin and downloaded to the H801 (using 256k spiff) and setup the H801
Milight as a device in ESPeasy, rgbw milight udp port 8899 red pin 15 green pin 13 blue pin 12 white pin 14.

using jason - http://192.168.x.x/control?cmd=pwm,12,1024 (blue) http://192.168.x.x/control?cmd=pwm,13,1024 (green) http://192.168.x.x/control?cmd=pwm,15,1024 (red) so that is working right

but i still have a problem with Domoticz, the ledstrip flashes the colour but then always turns white (0 to 100%) regardless of the target colour on the RGB Dimmer

Can you help me?

Blacky's Boss
Normal user
Posts: 11
Joined: 20 Jul 2017, 13:11

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

#117 Post by Blacky's Boss » 26 Sep 2017, 19:05

I wish I could... I seem to have the same setup, but mine sort of works, except for the wrong colours, offcourse...

pearson
New user
Posts: 2
Joined: 11 Apr 2017, 20:29

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

#118 Post by pearson » 28 Sep 2017, 06:26

Blacky's Boss wrote: 19 Sep 2017, 12:36 These are the steps I took:
- Downloaded from github: https://github.com/letscontrolit/ESPEas ... -dev11.zip
- extracted to a folder ESPEasy_v2.0.0-dev11
- renamed the folder src to ESPEasy
- renamed the folder lib to libraries
- deleted all the other crap
- set the sketchfolder in the Arduino IDE to the ESPEasy_v2.0.0-dev11
- Restarted the IDE
- Ignore the message from the IDE that there are updates for some of your librairies!!!!!
- opened sketch ESPEasy and compiled!

Oh, and offcourse I downloaded the pLugins and dragged the P105 in the ESPEasy folder.
Thank you very much! I was so focused on the PlatformIO / Atom business that I wasn't using the Arduino IDE.

Oddly, I had to change my flash mode for the one I'm trying with ESPEasy. The first one I flashed had an ESP-12S, but the next two (from the same order) have a mystery unshielded (ie. no metal box covering it) ESP unit. The chip is ESP8266, but it has a PN25F08B flash that others in these forums have noted requires the DOUT flash method.

elmicha
New user
Posts: 4
Joined: 30 Sep 2017, 20:12

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

#119 Post by elmicha » 29 Oct 2017, 14:14

pearson wrote: 19 Sep 2017, 10:13 Edit: I got it to build by moving those methods to the top of the _P105_RGBW.ino file, but that's obviously a hack. If someone could explain what simple thing I must be missing here, I'd really appreciate it.
It also works if we just declare these functions before the Plugin_105() function:

Code: Select all

void Plugin_105_FadingTimer();
void Plugin_105_ProcessUDP();
void Plugin_105_HSL2Rgb(float h, float s, float l);
I guess the Arduino IDE automatically extracts the function declarations and prepends them, so the compiler is happy. But Platformio doesn't do this.

rpa
New user
Posts: 3
Joined: 09 Jun 2017, 19:23

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

#120 Post by rpa » 24 Aug 2018, 21:51

Can anybody upload this compiled firmware to.... Google drive and share it.

coolduke
New user
Posts: 5
Joined: 03 Sep 2018, 15:11

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

#121 Post by coolduke » 10 Sep 2018, 12:04

hi,

which is the best plugin for H801?

P141 or P142?

I want to use H801 with MQTT and openhab.

H801 connected to RGB Strip and 2 separate white led strips.

thx!

tparvais
Normal user
Posts: 99
Joined: 28 Oct 2015, 23:13

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

#122 Post by tparvais » 19 Apr 2020, 00:25

Hello

I up this post for some fresh feedback

I use Milight with its remote control to pilot some ledstrip RGB.

Is there still plugin for Espeasy to control it ? (by using UDP gateway) or directly via another element such as the one just on the post above ? can we load espeasy FW on it ?

tparvais
Normal user
Posts: 99
Joined: 28 Oct 2015, 23:13

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

#123 Post by tparvais » 30 Nov 2020, 18:55

Hello

is this plugin usable with Milight Wifi gateway in UDP ?

if yes, +I cannot get compilation properly.

I tried to compile this Plugin 105: RGBW / Milight with last master build from github and platformio without any success: many compilation errors

Platformio/projects/ESPEasy-mega-20201102/src/_P105_RGBW.ino:267:31: error: 'SENSOR_TYPE_DIMMER' was not declared in this scope
Device[deviceCount].VType = SENSOR_TYPE_DIMMER;
^
Platformio/projects/ESPEasy-mega-20201102/src/_P105_RGBW.ino:298:20: error: 'WebServer' was not declared in this scope
String plugin1 = WebServer.arg("plugin_105_port");

...

it seems this plugin is not aligned with last builds and new structure as types are not defined, etc...

Any idea to solve it simply ?

Thomas

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

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

#124 Post by TD-er » 30 Nov 2020, 19:17

WebServer
Change into: web_server


Device[deviceCount].VType = SENSOR_TYPE_DIMMER;
Change into: Device[deviceCount].VType = Sensor_VType::SENSOR_TYPE_DIMMER;

tparvais
Normal user
Posts: 99
Joined: 28 Oct 2015, 23:13

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

#125 Post by tparvais » 02 Dec 2020, 17:44

Thanks, I progress. Now next error:

/src/_P105_RGBW.ino:432:34: error: invalid initialization of non-const reference of type 'String&' from an rvalue of type 'char*'
if (GetArgv(command, TmpStr1, 2)) Par[1] = str2int(TmpStr1);

same for these lines

if (GetArgv(command, TmpStr1, 2)) Par[1] = str2int(TmpStr1);
if (GetArgv(command, TmpStr1, 3)) Par[2] = str2int(TmpStr1);
if (GetArgv(command, TmpStr1, 4)) Par[3] = str2int(TmpStr1);
if (GetArgv(command, TmpStr1, 5)) Par[4] = str2int(TmpStr1);
if (GetArgv(command, TmpStr1, 6)) Par[5] = str2int(TmpStr1);
if (GetArgv(command, TmpStr1, 7)) Par[6] = str2int(TmpStr1);
if (GetArgv(command, TmpStr1, 8)) Par[7] = str2int(TmpStr1);

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

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

#126 Post by TD-er » 02 Dec 2020, 19:14

if (GetArgv(command, TmpStr1, 2)) Par[1] = str2int(TmpStr1);

Can be done in 2 ways:

if (GetArgv(command, TmpStr1, 2)) Par[1] = str2int(TmpStr1.c_str());

or

if (GetArgv(command, TmpStr1, 2)) Par[1] = TmpStr1.toInt());

tparvais
Normal user
Posts: 99
Joined: 28 Oct 2015, 23:13

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

#127 Post by tparvais » 03 Dec 2020, 10:09

hello

thankl you

I tried both , but still the same issue

/src/_P105_RGBW.ino:432:34: error: invalid initialization of non-const reference of type 'String&' from an rvalue of type 'char*'
if (GetArgv(command, TmpStr1, 2)) Par[1] = TmpStr1.toInt();
^


it seems that the problem is in the GetArgv

thank you

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

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

#128 Post by TD-er » 03 Dec 2020, 10:59

Maybe command is of type String here?

Code: Select all

if (GetArgv(command.c_str(), TmpStr1, 2)) Par[1] = TmpStr1.toInt();

tparvais
Normal user
Posts: 99
Joined: 28 Oct 2015, 23:13

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

#129 Post by tparvais » 03 Dec 2020, 11:24

more context:

i tried with first if then , but no results. I think indeed some mismatch in types

case PLUGIN_WRITE:
{
int Par[8];
char command[80];
command[0] = 0;
char TmpStr1[80];
TmpStr1[0] = 0;

string.toCharArray(command, 80);
Par[1] = 0;
Par[2] = 0;
Par[3] = 0;
Par[4] = 0;
Par[5] = 0;
Par[6] = 0;
Par[7] = 0;

String tmpString = string;
int argIndex = tmpString.indexOf(',');
if (argIndex) tmpString = tmpString.substring(0, argIndex);

if (GetArgv(command.c_str(), TmpStr1, 2)) Par[1] = TmpStr1.toInt();
if (GetArgv(command, TmpStr1, 3)) Par[2] = str2int(TmpStr1.c_str());
if (GetArgv(command, TmpStr1, 4)) Par[3] = str2int(TmpStr1.c_str());
if (GetArgv(command, TmpStr1, 5)) Par[4] = str2int(TmpStr1.c_str());

User avatar
Ath
Normal user
Posts: 3517
Joined: 10 Jun 2018, 12:06
Location: NL

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

#130 Post by Ath » 03 Dec 2020, 11:39

tparvais wrote: 03 Dec 2020, 11:24

Code: Select all

		if (GetArgv(command.c_str(), TmpStr1, 2)) Par[1] = TmpStr1.toInt();
		if (GetArgv(command, TmpStr1, 3)) Par[2] = str2int(TmpStr1.c_str());
		if (GetArgv(command, TmpStr1, 4)) Par[3] = str2int(TmpStr1.c_str());
		if (GetArgv(command, TmpStr1, 5)) Par[4] = str2int(TmpStr1.c_str());
Have you updated all those GetArgv calls? If not then I'd expect more compiler errors...

And for code reduction and readability you might want to consider to replace the 8 calls into a for loop using only 1 GetArgv() call:

Code: Select all

		for (uint8_t arg = 0; arg < 8; arg++) {
			if (GetArgv(command.c_str(), TmpStr1, arg + 1)) Par[arg] = TmpStr1.toInt();
		}
(Air code, not at my dev computer atm.)
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 121 guests