Hier ein kleines LUA Script für DomoticZ welches zur Ansteuerung von RGBW Streifen an einem H801 Controller auf Basis eines ESP8266 und der ESPEasy Firmware verwendet werden kann. Über einen Schalter als RGBW Colour Picker werden die Farben und Zustände des H801 gesteuert.

Auf dem H801 mit ESPEasy Firmware kommt das RGB Plugin _P141_LedStrip zum Einsatz welches soweit ganz gut funktioniert aber noch nicht wirklich ausgereift ist.

--###################################################################
--#Script Name	: h801_rgb.lua                                                                                              
--#Description	: Script to control a China H801 WiFi RGBWW Controller 
--#               based on an ESP8266 ESPEasy FW loaded device
--#Args         :
--#Date         : 20. January 2019
--#Author       : Heiko Zschenderlein                                                
--#Email        : Diese E-Mail-Adresse ist vor Spambots geschützt! Zur Anzeige muss JavaScript eingeschaltet sein!
--#Comments     : Development State, to be improved
--#Disclaimer   : Please read the Disclaimer at the end of the script 
--#             : Bitte lesen Sie den Haftungsausschluss am Ende des Scripts
--###################################################################
commandArray = {}
-- IP Address of H801 Controller
ESPIP = '192.168.10.59'

-- GPIO wher W is connected to
ESPWGpio=14
-- IP Addressand Port of DomoticZ Host
DomIP = '127.0.0.1'
DomPort = '8080'

-- Path to JSON.LUA on Domoticz Host 
DomLUAPath="/home/brainhack/domoticz/scripts/lua/JSON.lua"
-- Initial Parameters
DomValue = 0 -- Brightness
DomDevice = 'RGB' -- Device Name
DomIDX = 9 -- DomoticZ Device Identifier

-- loop through all devices on an change event
for deviceName,deviceValue in pairs(devicechanged) do
--   print ("Device based event fired on '"..deviceName.."', value '"..tostring(deviceValue).."'");
    if (deviceName==DomDevice) then -- desired device changed, sequenze starts here
            json = (loadfile "/home/brainhack/domoticz/scripts/lua/JSON.lua")()
            local acolor = " "
            ab='curl "http://'..DomIP..':'..DomPort..'/json.htm?type=devices&rid='..DomIDX..'"'
            
            local jsondata = assert(io.popen(ab))
            local jsondevices = jsondata:read('*all')
            jsondata:close()
        
            local jsonCPM = json:decode(jsondevices)
            local acolor=jsonCPM.result[1].Color
            local alevel=jsonCPM.result[1].Level
        
                acolorj=acolor:gsub("}",",}")
                aacolor={}
                for k,v in acolorj:gmatch('"(.-)":(.-),') do
                aacolor[k]=v    
                end

        DomR=aacolor['r']
        DomG=aacolor['g']
        DomB=aacolor['b']
        DomValue=tonumber(alevel * 10.23)
        DomValue=DomValue -(DomValue % 1)
        
        if deviceValue == "On" then
            commandstring = 'curl -s "http://'..ESPIP..'/control?cmd=ON"'
        elseif deviceValue == "Off" then
            commandstring = 'curl -s "http://'..ESPIP..'/control?cmd=OFF" && curl -s "http://'..ESPIP..'/control?cmd=PWM,'..ESPWGpio..',0"'
        elseif deviceValue == "Set Color" then
            commandstring = 'curl -s "http://'..ESPIP..'/control?cmd=RGB,'..DomR..','..DomG..','..DomB..'" && curl -s "http://'..ESPIP..'/control?cmd=DIM,'..DomValue..'"'
        elseif deviceValue == "Set Level" then
            commandstring = 'curl -s "http://'..ESPIP..'/control?cmd=DIM,'..DomValue..'"'
        elseif deviceValue == 'Set to White' then
            commandstring = 'curl -s "http://'..ESPIP..'/control?cmd=RGB,255,255,255,255" && curl -s "http://'..ESPIP..'/control?cmd=PWM,'..ESPWGpio..',1023"'
        end
--print(commandstring)
os.execute(commandstring) 

end
end

return commandArray

--# DISCLAIMER :
--# Downloading and using data from this website occurs at the own risk of the User. The Provider does not accept any liability for damages that occur directly or indirectly through the use of provided data.
--# All logos, trademarks and word marks used, even if not expressly marked as such, are the property of their respective owners.
--# Das Herunterladen und Verwenden von Daten von dieser Website erfolgt auf eigenes Risiko des Benutzers. Der Anbieter übernimmt keine Haftung für Schäden, die direkt oder indirekt durch die Verwendung der bereitgestellten Daten entstehen.
--# Alle verwendeten Logos, Markenzeichen und Wortmarken sind, auch wenn nicht ausdrücklich als solche gekennzeichnet, Eigentum ihrer jeweiligen Inhaber.