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
  Trigger not Working after Move to new Server & V6.0.7 kblagron 4 981 03-02-2022, 05:35 AM
Last Post: sic0048
  Escaping Character in Action Parameters gReatAutomation 0 741 09-02-2020, 05:51 AM
Last Post: gReatAutomation
  Get Field Value via HTTP znelbok 3 1,476 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 1,501 04-29-2020, 04:01 PM
Last Post: Dean Roddey
  HTTP SendPUT simplextech 3 1,734 01-21-2020, 03:05 PM
Last Post: simplextech
  CQC HTTP Events? bjkiller 26 9,695 01-11-2020, 07:27 AM
Last Post: simplextech
  Set value via HTTP Call simplextech 2 1,412 01-07-2020, 04:39 PM
Last Post: simplextech
  NetworkMonitor / Presence Info trigger? gReatAutomation 17 6,525 09-24-2019, 01:08 PM
Last Post: gReatAutomation
  HTTP Trigger Driver - see trained URL's? Shaky 1 1,917 09-15-2019, 12:25 PM
Last Post: Dean Roddey
  What is the trigger? xlurkr 4 2,058 08-04-2019, 05:55 PM
Last Post: xlurkr

Forum Jump:


Users browsing this thread: 1 Guest(s)