HTTP Receiver Point
-
Dear , R doesn't goes to 1 when I send R=0 using url and I have this alarm when I test that ??
-
My mistake, I for whatever reason did this in the meta script,
target.set(!trigger.value); return UNCHANGED;
And that caused that event. It should have been,
if(trigger.value === 1) target.set(0); else if(trigger.value === 0) target.set(1); return UNCHANGED;
Edit: I fixed the JSON in the last post and confirmed that it does in fact set the virtual point back to the other value after the execution delay since the last received Http receiever value for R. So, the virtual point has the desired data set.
-
dear, I have this script for my shutter door :
if( door.value==false && R.value==0 ) button.set(false);
after I used access card the R send me value = 0 "which mean open the door " and run this script , after that I want the door close after 3 min or 5 min but my problem R value doesn't goes to 1 to close the door !!
I followed your steps and I have this :
virtual goes 1 but R still 0 .... I need R goes 1 to run my script and my door close .
-
I think some details are missing, then. You could connect the door control to the virtual point, but how're you supposed to close the door? Is the Http Receiver supposed to be setting values out to some URL that was not included in your original question?
-
I create a point R and I recived value from access card "access door database" , this data base send me R value using url
http://192.168.0.17:8080/httpds?R=0
and it is send me the value = 0 by using access card and I take this value then run my script then my door is open . After 3 min I need my door closed but I also need R goes to 1 because database dosen't include timer to send R=1 ( R value : when I using card to open the door the database send me R=0 ) -
So, could you use the virtual point in the script context that opens the door instead of using the Http Receiver point?
-
How ??
my database using R value and my script using R . -
This script,
if( door.value==false && R.value==0 ) button.set(false);
is in Mango right? So R is a context point for that script. Use the virtual point instead.
-
yes in mango .
you mean thisif( door.value==true && R.value==0 && virtual.value==1) button.set(false);
-
No I mean
if( door.value==false && virtual.value==0 ) button.set(false);
And then remove the R point from context, since we don't want the script to update when it gets a value (its value is immediately set to the virtual point by the point link)
I should say I didn't get informed about this portion of the question, so I'm presuming that script did what you wanted in the first place. Seems to me you want to handle the
virtual.value == 1 && door.value == true
condition too, maybe. -
On Sunday I will try these solutions and I will tell you what I will get .
Thank you very very much :)