Rule doesn´t work...
Moderators: grovkillen, Stuntteam, TD-er
Rule doesn´t work...
Hi all,
I hope anyone could help me with my rule.
It won´t start.
On Schalter_Solar#State=1 Do
if [RC_Solar#State]=0
GPIO,12,0
TaskValueSet 6,1,0
else
GPIO,12,1
EndIf
EndOn
The only thing which is set is the "TaskValueSet 6,1,0".
thx
sawo
I hope anyone could help me with my rule.
It won´t start.
On Schalter_Solar#State=1 Do
if [RC_Solar#State]=0
GPIO,12,0
TaskValueSet 6,1,0
else
GPIO,12,1
EndIf
EndOn
The only thing which is set is the "TaskValueSet 6,1,0".
thx
sawo
Re: Rule doesn´t work...
If task 6 is a Dummy device, then it looks quite alright.
(how) have you configured your GPIO12 in the Hardware page? For simple output actions it isn't needed to be configured there.
How do you detect 'doesn't work' ? If the TaskValueSet command is working, then the rule works
(how) have you configured your GPIO12 in the Hardware page? For simple output actions it isn't needed to be configured there.
How do you detect 'doesn't work' ? If the TaskValueSet command is working, then the rule works
/Ton (PayPal.me)
Re: Rule doesn´t work...
Hi Ath
it doesn´t turn on the GPIO 12 port. (else)
Yes it is configured in the devices tab and works fine. when use cmd GPIO,12,1 / 0
all other devices also work fine.
This is my complete rule:
On RC_Normal#State=0 Do
GPIO,14,0
TaskValueSet 7,1,0
EndOn
On Schalter_Normal#State=1 Do
if [RC_Normal#State]=0
GPIO,14,0
TaskValueSet 7,1,0
else
GPIO,14,1
EndIf
EndOn
On RC_Solar#State=0 Do
GPIO,12,0
TaskValueSet 6,1,0
EndOn
On Schalter_Solar#State=1 Do
if [RC_Solar#State]=0
GPIO,12,0
TaskValueSet 6,1,0
else
GPIO,12,1
EndIf
EndOn
thx
sawo
it doesn´t turn on the GPIO 12 port. (else)
Yes it is configured in the devices tab and works fine. when use cmd GPIO,12,1 / 0
all other devices also work fine.
This is my complete rule:
On RC_Normal#State=0 Do
GPIO,14,0
TaskValueSet 7,1,0
EndOn
On Schalter_Normal#State=1 Do
if [RC_Normal#State]=0
GPIO,14,0
TaskValueSet 7,1,0
else
GPIO,14,1
EndIf
EndOn
On RC_Solar#State=0 Do
GPIO,12,0
TaskValueSet 6,1,0
EndOn
On Schalter_Solar#State=1 Do
if [RC_Solar#State]=0
GPIO,12,0
TaskValueSet 6,1,0
else
GPIO,12,1
EndIf
EndOn
thx
sawo
Re: Rule doesn´t work...
First, let's use [ code ] tag around your code:
Why is there the extra Dummy device to react on a switch state? And have an event on both?
I'll look into it later today, have other work to complete
Code: Select all
On RC_Normal#State=0 Do
GPIO,14,0
TaskValueSet 7,1,0
EndOn
On Schalter_Normal#State=1 Do
if [RC_Normal#State]=0
GPIO,14,0
TaskValueSet 7,1,0
else
GPIO,14,1
EndIf
EndOn
On RC_Solar#State=0 Do
GPIO,12,0
TaskValueSet 6,1,0
EndOn
On Schalter_Solar#State=1 Do
if [RC_Solar#State]=0
GPIO,12,0
TaskValueSet 6,1,0
else
GPIO,12,1
EndIf
EndOn
I'll look into it later today, have other work to complete
/Ton (PayPal.me)
Re: Rule doesn´t work...
Hi,
this is hard for me to explain.... (english knowledge)
but I will give it a try.
The RC_Solar and _Normal are "LJ12A3-4-Z/AY inductive proximity sensor/switch" these are used as an endpoint of a 3 way ball valve.
Pumpe_Normal / _Solar are replays which control the motor to turn the 3 way ball valve.
Pumpe_normal will turn left until the proximity sensor and Pumpe_Solar will turn right until the proximity sensor. In total max. 180°
If I active the Pumpe_Solar when it already has reached the final position (proximit senor) it will turn a little bit further. (this might damage the construction)
To avoid this I taught it would be good to use a dummy device which will get a certain state and will be read before it will move.
I hope that was understandable.
sawo
this is hard for me to explain.... (english knowledge)
but I will give it a try.
The RC_Solar and _Normal are "LJ12A3-4-Z/AY inductive proximity sensor/switch" these are used as an endpoint of a 3 way ball valve.
Pumpe_Normal / _Solar are replays which control the motor to turn the 3 way ball valve.
Pumpe_normal will turn left until the proximity sensor and Pumpe_Solar will turn right until the proximity sensor. In total max. 180°
If I active the Pumpe_Solar when it already has reached the final position (proximit senor) it will turn a little bit further. (this might damage the construction)
To avoid this I taught it would be good to use a dummy device which will get a certain state and will be read before it will move.
I hope that was understandable.
sawo
Re: Rule doesn´t work...
If you are worried that the motor keeps running too long, you might want to extend your design to have physical end-switches, instead of a software-based solution.
Checking the switch-state before allowing the motor to start is a usual way of protecting, like you already have.
I haven't found anything that is blocking this from working as intended, yet.
You might want to build in a protection to turn both GPIO 12 and 14 on while the other pin is already on.
How is the Schalter_Normal or Schalter_Solar set to 1?
Checking the switch-state before allowing the motor to start is a usual way of protecting, like you already have.
I haven't found anything that is blocking this from working as intended, yet.
You might want to build in a protection to turn both GPIO 12 and 14 on while the other pin is already on.
How is the Schalter_Normal or Schalter_Solar set to 1?
/Ton (PayPal.me)
Re: Rule doesn´t work...
Hi Ath,
okay I will change my setup and use the inductive proximity sensor as endpoint switch.
ThX
Sascha
okay I will change my setup and use the inductive proximity sensor as endpoint switch.
ThX
Sascha
Re: Rule doesn´t work...
Hi,
I finally got the time to rework my setup, the proximity sensors are now configured as endpoint swichtes!
As aspected I have some problems with my rules, maybe any one of you can assist my or give me a hint.
Sorry for the maybe basic and stupid questions!
First off all I want the rule to work only from e.x. 8am - 6pm, but I don´t know how to realize this?
And how can I prevent an action which has alreday been done? In this case to turn GPIO 12 on again.
see this rule:
Here is some more backgroup, I want to add an automated heating of my pool, for this is use 2 temp-sensors.
I calculate the difference temperature from these sensors.
If the value is higher then 8° it should turn pump-solar on and pump-normal off,
if the temperature is lower then 8° it will turn off pump-solar and turn on pump-normal.
thanks a lot
sawo
I finally got the time to rework my setup, the proximity sensors are now configured as endpoint swichtes!
As aspected I have some problems with my rules, maybe any one of you can assist my or give me a hint.
Sorry for the maybe basic and stupid questions!
First off all I want the rule to work only from e.x. 8am - 6pm, but I don´t know how to realize this?
And how can I prevent an action which has alreday been done? In this case to turn GPIO 12 on again.
see this rule:
Code: Select all
On System#Boot do
timerSet,1,300
timerSet,2,1800
endon
On Rules#Timer=1 do
TaskValueSet,12,1,[Pooltemperatur#temp-solar]-[Pooltemperatur#temp-pool]
If [Diff#Temp]>5
TaskValueSet,11,1,[Pooltemperatur#temp-solar]-[Pooltemperatur#temp-pool]
Else
TaskValueSet,11,1,0
EndIf
timerSet,1,300
EndOn
Rules#Timer=2 do
If [Diff#Temp]>8
SendToUDP,192.168.9.155,5353,"gpio,12,1"
Else
SendToUDP,192.168.9.155,5353,"gpio,14,1"
EndIf
timerSet,2,1800
EndOn
EndOn
Here is some more backgroup, I want to add an automated heating of my pool, for this is use 2 temp-sensors.
I calculate the difference temperature from these sensors.
If the value is higher then 8° it should turn pump-solar on and pump-normal off,
if the temperature is lower then 8° it will turn off pump-solar and turn on pump-normal.
thanks a lot
sawo
Re: Rule doesn´t work...
This part does at least have some grammar error (not looked at it functionally)
You're missing an "on" at the beginning and have an "EndOn" too many at the end.
Should be:
And just as a remark.
You're setting the timer again when handling it, so why not use the looptimer?
See: https://espeasy.readthedocs.io/en/lates ... oop-timers
Code: Select all
Rules#Timer=2 do
If [Diff#Temp]>8
SendToUDP,192.168.9.155,5353,"gpio,12,1"
Else
SendToUDP,192.168.9.155,5353,"gpio,14,1"
EndIf
timerSet,2,1800
EndOn
EndOn
Should be:
Code: Select all
on Rules#Timer=2 do
If [Diff#Temp]>8
SendToUDP,192.168.9.155,5353,"gpio,12,1"
Else
SendToUDP,192.168.9.155,5353,"gpio,14,1"
EndIf
timerSet,2,1800
EndOn
You're setting the timer again when handling it, so why not use the looptimer?
See: https://espeasy.readthedocs.io/en/lates ... oop-timers
Re: Rule doesn´t work...
Hi TD-er,
sorry that was a copy / past issue.
I will take a look at looptimer.
Thx
sawo
sorry that was a copy / past issue.
I will take a look at looptimer.
Thx
sawo
Who is online
Users browsing this forum: Google [Bot] and 129 guests