Beetje een kick, maar ik heb eindelijk tijd gevonden om de juiste spullen te bestellen en bouwen. Bedankt @
Milmoor voor de tips!
Voor de duidelijkheid het moet de
SONOFF 4CHPROR3 zijn en niet de Sonoff 4CH3. De Pro heeft een 12V voedingsoptie en die heeft de niet-pro niet. Kortom, dan kan je de Brell controller en Sonoff niet voeden vanuit hetzelfde punt.
Mijn setup ziet er erg vergelijkbaar uit:
Via de standaard app kon ik hem mooi aansturen, echter werkt die standaard app niet samen met Domoticz. Kortom. Tijd om Tasmota te flashen.
Via deze guides is het vrij straight forward:
-
Tasmota informatie voor aansluiten programmer
- General
Tasmota flash informatie. Ik heb de
Tastomta Web installer gebruikt.
Na het flahsen en verbinden met wifi moet je nog het volgende doen:
1. Instellen van juiste module via: Configuration -> Configure Module -> Sonoff 4CH Pro (23)
2. Interlock instellen via de console met de volgende commando's:
code:
1
2
3
| SetOption80 1
Interlock 1,2,3,4
Interlock ON |
3. Auto turn off instellen voor alle kanalen
code:
1
2
| Rule1 ON Power1#state=1 DO RuleTimer1 1 ENDON ON Rules#Timer=1 DO Power1 Off ENDON ON Power2#state=1 DO RuleTimer2 1 ENDON ON Rules#Timer=2 DO Power2 Off ENDON ON Power3#state=1 DO RuleTimer2 1 ENDON ON Rules#Timer=2 DO Power3 Off ENDON ON Power4#state=1 DO RuleTimer3 1 ENDON ON Rules#Timer=3 DO Power4 Off ENDON
Rule1 1 |
4. Instellen MQTT voor Domoticz: Ik heb MQTT ingesteld en vervolgens drie losse IDX toegevoegd. Nu vond ik dit zelf niet zo mooi, dus heb nog een 4e dummy gemaakt die de zaak combineert:
Dat vervolgens gekoppeld via het volgende Dz script:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
| --*------------------------------------------------------------------------------------*--
--Creator: Rens
--Date: 11-10-2023
--Last update:
--Changelog:
--Source:
--Description: Used to combine the three blinds switches into one
--*------------------------------------------------------------------------------------*--
--Declarations
local StopNum = 651
local UpNum = 652
local DownNum = 650
local SwitchNum = 649
return {
on = {
devices = {
SwitchNum -- Schakelaar
}
},
execute = function(domoticz, device)
--Declarations
local Switch = domoticz.devices(SwitchNum) --Schakelaar
local Stop = domoticz.devices(StopNum) --Stop
local Up = domoticz.devices(UpNum) --Up
local Down = domoticz.devices(DownNum) --Down
--Function
if (Switch.state == 'Stop') then -- Toggle on Stop
Stop.cancelQueuedCommands()
Up.cancelQueuedCommands()
Down.cancelQueuedCommands()
Up.switchOff()
Down.switchOff()
Stop.switchOn().forSec(1)
elseif (Switch.state == 'Down') then -- Toggle on Down
Stop.cancelQueuedCommands()
Up.cancelQueuedCommands()
Down.cancelQueuedCommands()
Stop.switchOff()
Up.switchOff()
Down.switchOn().forSec(1)
elseif (Switch.state == 'Up') then -- Toggle Up
Stop.cancelQueuedCommands()
Up.cancelQueuedCommands()
Down.cancelQueuedCommands()
Stop.switchOff()
Down.switchOff()
Up.switchOn().forSec(1)
end
end
} |
[
Voor 27% gewijzigd door
rens-br op 11-10-2023 08:58
]