Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help setting up GeoFancy & HTTP Trigger driver
#1
I've gotten far enough to have GeoFancy installed. Also installed HTTP Trigger driver and have it trained to catch

http://<server>:45821/<Random15DigitNumber>HomeAwayStatus/SetStatus?User=Sendero&Value=Away

Now, how specifically do I parse out the User and Value fields so that I can set a Global Variable value to either true or false and then trigger events based on that?
Reply
#2
The two values will be passed to the action, and will show up as the 2nd parameter. The first parameter is the name of the action invoked. The 2nd parameter will be "Sendero Away", i.e. the two values, space separated.

You can use the System::GetNthToken command to pull out the two separate values to variables.

The parameters are available via the usual sort of tokens, which you can get to via the insert popup menu in the action editor.
Dean Roddey
Explorans limites defectum
Reply
#3
Did you get this figured out?
Dean Roddey
Explorans limites defectum
Reply
#4
yes, was just coming back to post a thank you!

At first I was getting TokenExpansion errors in the logs when calling GetNthToken. But then I first wrote the action parameter value to a local variable before using GetNthToken against the local variable.

Now I have it working as I want. Thanks again for the help!


LocalVars::SetVariable
P1=LVarTonguearams
P2=%(LVar:CQCActParm_2)

System::GetNthToken
P1=%(LVarTonguearams)
P2=
P3=1
P4=LVar:User

System::GetNthToken
P1=%(LVarTonguearams)
P2=
P3=2
P4=LVar:IsHome

Devices::FieldWrite
P1=VariableDriver.HomeStatus_%(LVar:User)
P2=%(LVar:IsHome)
P3=True
Reply
#5
Hijacking thread...

Any idea what I'm doing wrong? I'm not getting the variables returned in the logmsg output. I highlighted all the pieces.

https://s3.amazonaws.com/uploads.hipchat...upload.png

It seems %(LVar:CQCActParm_1) gets populated but %(LVar:CQCActParm_2) does not.

in the screencap the last line in the action is cut off. It has a message field of : act 1%(LVar:CQCActParm_1) 2%(LVar:CQCActParm_2)
--Kill all the serial ports--
Reply
#6
Just looking at it by eye, it looks correct to me. What version of CQC are you on? I know that, there was an issue there for a while during the betas when the HTTP stuff was being redone to support encrypted connections. But that was fixed, presumably, in the 904 beta, so if you are on anything beyond that then that error shouldn't be an issue.
Dean Roddey
Explorans limites defectum
Reply
#7
Using 4.6.912
--Kill all the serial ports--
Reply
#8
I just tried it and it's working fine for me. So, I'm guessing it's just some side effect of the many changes to the HTTP stuff, other than the obvious one I fixed in 904. I can't guarantee that, but it's likely enough (given the enormous changes made to the HTTP stuff and the fact that some remaining issues were just taken care of in the last couple betas) that it's worth moving up to the latest version to be sure.
Dean Roddey
Explorans limites defectum
Reply
#9
I updated to 920 and the same results. I tried re-training it a few different ways (with and without the params).

Any idea what else might be wrong?
--Kill all the serial ports--
Reply
#10
Hmm.... Let's simplify here. Train another one, and set it up to just do nothing but log the values of the first two action parameters, just to be sure there's not something obvious we are missing in the other stuff.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Trigger on Russound F1 button xlurkr 6 2,023 06-01-2020, 01:17 PM
Last Post: Dean Roddey
  RFXcom driver or Tellstick driver kernal69 8 4,100 01-25-2020, 03:06 PM
Last Post: simplextech
  Simple HTTP Call to Device from CQC mjwhite214 19 7,552 01-23-2020, 03:35 PM
Last Post: simplextech
  Dune driver wait for config error ellisr63 44 14,636 11-28-2019, 06:35 PM
Last Post: ellisr63
  Sending HTTP PUT Commands gReatAutomation 2 1,788 09-17-2019, 01:11 PM
Last Post: gReatAutomation
  TTS II Driver requirements znelbok 1 1,372 05-20-2019, 09:34 PM
Last Post: Dean Roddey
  CQC to PowerView Hub via Serial Driver Deane Johnson 18 9,293 05-14-2018, 01:11 PM
Last Post: Deane Johnson
  HAI Driver Issue avtexan 6 4,477 04-06-2018, 02:06 PM
Last Post: Dean Roddey
  Setting up ODBC for CQC IVB 8 3,957 01-21-2018, 09:35 PM
Last Post: potts.mike
  Monoprice 8x8 HDMI matrix Driver NightLight 13 10,745 09-04-2017, 09:45 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)