grovkillen wrote: ↑06 Oct 2019, 04:05
I would seriously consider updating the unit to get more functionality = easier rules. But here's my take with older syntax:
But please come back here if you decide to update. There's more delicate ways of doing it with latest versions.
Hi Griovkillen thanks for help and fast reply.
i look your rules and i understand the logic behind and it looks very promising!
i just adapt it and make some comments:
Code: Select all
On System#Boot Do //When the ESP boots, do relay to OFF just to be sure
gpio,13,1 //fan
gpio,14,1 //flame
gpio,4,1 //temp up
gpio,5,1 //temp down
EndOn
On WakeUpRemote Do
If [Dummy#Value]=0
TaskValueSet,12,1,1 //task 12 set as dummy variable, if 0=>asleep if 1=>system wakeup
TimerSet,1,40
gpio,13,0 //simulate button press using fan pusch button
gpio,13,1
EndIf
EndOn
On FlameLevelUp Do
If [Dummy#Value]=0
Event,WakeUpRemote
EndIf
TimerSet,1,40
gpio,14,0
gpio,14,1
EndOn
On FanLevelUP Do
If [Dummy#Value]=0
Event,WakeUpRemote
EndIf
TimerSet,1,40
gpio,13,0
gpio,13,1
EndOn
On TempSetPointUp Do
If [Dummy#Value]=0
Event,WakeUpRemote
EndIf
TimerSet,1,40
gpio,4,0
gpio,4,1
EndOn
On TempSetPointDown Do
If [Dummy#Value]=0
Event,WakeUpRemote
EndIf
TimerSet,1,40
gpio,5,0
gpio,5,1
EndOn
On Rules#Timer=1 Do
TaskValueSet,12,1,0
EndOn
if you would like to change it with new function inside espeasy i will try to update manually the firmware.
Unfortunatly it has 1Mb so i have to flash manually and not using OTA and they are very difficult to reach, but it's a very old fw so i would like to try
thanks again!
p.s. to call the event the command will be for example:
http://<espeasyip>/control?cmd=event,FlameLevelUp
or
http://<espeasyip>/control?cmd=event,TempSetPointDown
that's correct?
but if i would like to use mqtt?
now to control directly a gpio i use:
sudo mosquitto_pub -t /wemos_205/cmd -m gpio,4,0
where wemos_205 is the ESP name, and in this example i set gpio 4 to 0
if i need to control the event with mqtt is it possible?