Moderators: grovkillen, Stuntteam, TD-er
-
anthropo
- New user
- Posts: 8
- Joined: 23 Oct 2019, 21:50
#1
Post
by anthropo » 23 Oct 2019, 21:55
Hello,
sorry but it's minutes i can't get a solution. My if always goes to // On allume, trop froid
even when
EVENT: Consignes#Jour=23.00
EVENT: Consignes#Nuit=17.00
EVENT: Consignes#Hysteresis=1.00
EVENT: Consignes#Actuelle=23.00
EVENT: Capteur#Temperature=26.00
Code: Select all
on Capteur#Temperature do
if [Capteur#Temperature] > [Consignes#Actuelle] //+[Consignes#Hysteresis]
// On éteint, trop chaud
gpio,12,0
endif
if [Capteur#Temperature] < [Consignes#Actuelle] //-[Consignes#Hysteresis]
// On allume, trop froid
gpio,12,1
endif
endon
Can you help please ?
-
anthropo
- New user
- Posts: 8
- Joined: 23 Oct 2019, 21:50
#2
Post
by anthropo » 23 Oct 2019, 22:56
One detail : i'm using global sync. Capteur#Temperature is on another Unit. Do i have do prefix if ? How ?
Thank you
-
grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
-
Contact:
#3
Post
by grovkillen » 24 Oct 2019, 09:01
Just as a test:
Code: Select all
on Capteur#Temperature do
if [Capteur#Temperature] > [Consignes#Actuelle]
// On éteint, trop chaud
gpio,12,0
else
// On allume, trop froid
gpio,12,1
endif
endon
-
anthropo
- New user
- Posts: 8
- Joined: 23 Oct 2019, 21:50
#4
Post
by anthropo » 24 Oct 2019, 09:52
I tried at the beginning. But it doesn't work.
In fact it is Capteur#Temperature that is in fault. I read it from another unit, and it gets no value . If for example i do a taskValueSet with Capteur#Temperature, in the log there is a blank behind TaskValueSet 12,1,
I have no idea how to get Capteur#Temperature value from this another unit. But the log shows EVENT: Capteur#Temperature=26.00.
I suppose there is a bug
If on the unit with the temperature sensor i try the if statement with Capteur#Temperature it works.
-
grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
-
Contact:
#5
Post
by grovkillen » 24 Oct 2019, 10:21
Do you have the task left free on the receiving unit?
-
anthropo
- New user
- Posts: 8
- Joined: 23 Oct 2019, 21:50
#6
Post
by anthropo » 24 Oct 2019, 10:37
yes. And as i said i see the temperature and it is updated every 30s as i asked. But i cant get the value in rules
-
Attachments
-
- Sélection_042.png (46.34 KiB) Viewed 9101 times
-
anthropo
- New user
- Posts: 8
- Joined: 23 Oct 2019, 21:50
#7
Post
by anthropo » 24 Oct 2019, 10:40
On the 'emitting' unit :
-
Attachments
-
- Sélection_043.png (50.13 KiB) Viewed 9098 times
-
anthropo
- New user
- Posts: 8
- Joined: 23 Oct 2019, 21:50
#8
Post
by anthropo » 24 Oct 2019, 10:48
On the emitting unit if i set a rule :
Code: Select all
on Capteur#Temperature do
if [Capteur#Temperature] > 23 do
// On éteint, trop chaud
gpio,13,1
else
// On allume, trop froid
gpio,13,0
endif
endon
it works, and i see it in the logs.
BUT the same rule on the receiving unit doesn't work. Capteur#Temperature is always empty
-
grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
-
Contact:
#9
Post
by grovkillen » 24 Oct 2019, 10:57
You should have it enabled.
-
anthropo
- New user
- Posts: 8
- Joined: 23 Oct 2019, 21:50
#10
Post
by anthropo » 24 Oct 2019, 14:00
So simple ? i spent hours on this.
THANK YOU
Who is online
Users browsing this forum: No registered users and 14 guests