Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HTTP Trigger and Parameters
#1
I've done this before and had no issues, but I am setting up another driver based on the HTTP Trigger driver and having some issues that must be just a simple oversight on my behalf.

Trained URL is http://<ip>:45101/fauxmo?fld=kitchenmain&fldcmd=on

Two parameter pairs.  fld is the field to be changed and fldcmd is the value to be passed to the field

Simple so far.

Trained the driver on that URL.  There is only one field to be used as the parameters will be used in if statements.

This is what I have so far (note P2 is not blank, but a whitespace)


// Get the tokens from the URL. 1 - Field to be written to, 2 - value to write
System::GetNthToken
    P1=%(LVar:CQCActParm_2)
    P2=
    P3=1
    P4=LVar:Field

System::GetNthToken
    P1=%(LVar:CQCActParm_2)
    P2=
    P3=2
    P4=LVar:FieldCmd

System::LogMsg
    P1=FauxMo Command
    P2=0
    P3=FauxMo Sent a Command for %(LVar:Field):%(LVar:FieldCmd)
    P4=Status


So this should dump a message in the log indicating the two parameters but I get nothing at all - the parameters from the URL are not getting assigned to the local variables.

06/12 08:53:09-Zeus01, CQCServer, CQCIRActThread_FauxMo
{
    CQCAct, FauxMo Command.0, Status/App Status
    FauxMo Sent a Command for :
}



I've done it this way before and it works, but I can not see what I have wrong here and for it to not work.  I guess I am just out of practice
Mykel Koblenz
Illawarra Smart Home
Reply
#2
No error showing up in the logs?
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Escaping Character in Action Parameters gReatAutomation 0 228 09-02-2020, 05:51 AM
Last Post: gReatAutomation
  Get Field Value via HTTP znelbok 3 627 06-11-2020, 03:43 PM
Last Post: Dean Roddey
  I cant enter parameters for sizing into the webcam widget. I get errors about invalid ghurty 2 559 04-29-2020, 04:01 PM
Last Post: Dean Roddey
  HTTP SendPUT simplextech 3 928 01-21-2020, 03:05 PM
Last Post: simplextech
  CQC HTTP Events? bjkiller 26 5,961 01-11-2020, 07:27 AM
Last Post: simplextech
  Set value via HTTP Call simplextech 2 703 01-07-2020, 04:39 PM
Last Post: simplextech
  NetworkMonitor / Presence Info trigger? gReatAutomation 17 3,695 09-24-2019, 01:08 PM
Last Post: gReatAutomation
  HTTP Trigger Driver - see trained URL's? Shaky 1 960 09-15-2019, 12:25 PM
Last Post: Dean Roddey
  What is the trigger? xlurkr 4 1,039 08-04-2019, 05:55 PM
Last Post: xlurkr
  What would the proper trigger to be for a time or a X min before sundown? ghurty 1 1,044 01-10-2019, 10:08 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)