Tasmota LED Dimmer & DzVents

Moderator: leecollings

Post Reply
Inhumierer
Posts: 1
Joined: Wednesday 26 December 2018 7:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Tasmota LED Dimmer & DzVents

Post by Inhumierer »

Hi, I made a 3 channel LED dimmer based on ESP-01 running Tasmota firware and had some difficulties to set it up running with Domoticz. The 3 channels are inidividual lights, not a RGB color setting for one LED strip. You need to tell Tasmota with Setoption68 https://tasmota.github.io/docs/#/Comman ... etoption68. To get it running with Domoticz you may write a short DZVents script under Setup - More Options - Events containing:

Code: Select all

return {
	on = {
		devices = {'Esszimmer Schrank Licht','Balkon Pumpe','WZ Sofa Licht'},
	},
	execute = function(dz, triggeredItem)
        if (triggeredItem.name=='Esszimmer Schrank Licht') then
            channel=2
        elseif (triggeredItem.name=='Balkon Pumpe') then
            channel=1
        else
            channel=3
        end
	    baseurl='http://tasmota-9.fritz.box/cm?cmnd='
	    if (triggeredItem.active) then
--    	    dz.log('Switch '..channel..'an, Level'..triggeredItem.level)
            dz.openURL({url = baseurl..'Power'..channel..'%20On'})
            dz.openURL({url = baseurl..'channel'..channel..'%20'..triggeredItem.level})
        else
--    	    dz.log('Switch '..channel..'aus')
            dz.openURL({url = baseurl..'Power'..channel..'%20Off'})
    	end
    end
}
The names and IP address are only an example, but I think you will get the idea because it's quite simple. I searched the net, but couldn't find any similar. Hope it is useful for someone. If it's the wrong section here, pls move and tell me, I'm quite new to this stuff.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest