I want to dimm up / down some LEDS (triggered by a PIR), connected with a FET
I saw i could send PWM values, but is it possible to send something to fade ?
maybe a rule with a counter ?
i read somewhere that the ESP8266 is not really good in pwm in generall, is it worth going on that way or better look for something completely different ?
PWM fade up / down possible
Moderators: grovkillen, Stuntteam, TD-er
Re: PWM fade up / down possible
Using the following fades GPIO 2 to level 0 over 1 second
http://192.168.0.44/control?cmd=PWM,2,0,1000
Using the following fades GPIO 2 to 0
Using the following GPIO 2 to level 200 over 1 second
http://192.168.0.44/control?cmd=PWM,2,200,1000
the following lua script in domoticz works really well.
http://192.168.0.44/control?cmd=PWM,2,0,1000
Using the following fades GPIO 2 to 0
Using the following GPIO 2 to level 200 over 1 second
http://192.168.0.44/control?cmd=PWM,2,200,1000
the following lua script in domoticz works really well.
Code: Select all
commandArray = {}
-- Check for wifidimmer changed
DomDevice = 'wifidimmer'
for i, v in pairs(devicechanged) do
if (i == DomDevice) then
if (v == 'Off') then DomValue = 0
commandArray['OpenURL']='http://192.168.0.44/control?cmd=PWM,0,0,1048'
print("wifidim1-off")
else
DomValue = otherdevices_svalues[DomDevice]
CalcValue = (DomValue*6.5 - 5.5)
print(CalcValue)
url= 'http://192.168.0.44/control?cmd=PWM,0,' ..(CalcValue).. ',1048'
print (url);
print ("Dimming1 " .. (DomDevice) .. " to " .. (CalcValue) .. " ");
--commandArray['SendNotification']="test"
commandArray['OpenURL']= url
end
end
end
Who is online
Users browsing this forum: No registered users and 38 guests