Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple field change trigger action
#1
Dean: Trying to use a field trigger, but can't get it to go.

What I wish to accomplish is having my hue lights come up when the XBMC driver Playmode field is "Paused".

I have enabled the field trigger to send trigger on any field change. That works fine with the following output.

TIME: 14:20:16
cqsl.header
{
    v=1
    sysid=C9532CB6277B38E3-893FF23CA64E9D7F
    class=cqsl.fldchange
    source=cqsl.field:XBMC.PlayMode
}
cqsl.fldval
{
    val=Paused

I have configured a triggered event as such:

Is Field Changed For      Field:  XBMC.Playmode
Fld Value Equals             Field:  XBMC.Playmode
                                        Comp Val: Paused

The action just turns on the lights. 

So far no joy. Likely missing something obvious (to someone who knows what they are doing Blush

In the meantime, this pops up in the logs

10/21 14:37:00-zotac, CQCServer, CQCDrv_XBMCThread27
{
    CQCKit, MEng.System.CQC.Runtime.CQCLogger.128, Status/App Status
    EvalJSON: Exception 2 - Can't convert '' to a MEng.Card4 binary form, Cmd=Player.GetProperties
}
Reply
#2
I think the error is probably unrelated. The driver is getting an empty value for something that it expects to be an unsigned number, so it gets that exception when it tries to convert the value to a number to store it.

On the event, I think you should only need:

Is New Fld Value For: XMBC.Playmode, Paused

You seldom every want to use "Fld Value Equals" because that is looking at the actual field in the driver, not the value that was sent in the event trigger. If you used it by itself, it would pass any time any trigger was seen and that field had the indicated value. In your case, combining it with the other filter would avoid most of the the issues, though if the actual field had changed values before the event trigger is processed you might not get the results you want.

The above filter, checks that it's a change for the playmode field, and it looks at the value passed in the trigger, not at the original field. So it's the best way to handle that sort of thing. Try that and see if it works.
Dean Roddey
Explorans limites defectum
Reply
#3
I actually do the same thing

Is Field Change For : <moniker.PlayMode>

I then check if I am in video mode (I dont want to do this if playing music), it is night and then if it is paused.
If
System::Equals
P1=$(xbmc_Theatre.CurPlayer)
P2=Video
P3=No Case

//
// Only do this if it is night time
//
If
System::IsNight
P1=0

//
// Turn the lights on
//
If
System::Equals
P1=$(xbmc_Theatre.PlayMode)
P2=Paused
P3=Case

Devices::FieldWrite
P1=lighting.GamesBack
P2=35
P3=False
End
Else
End
Else
End

When play is pressed the lights ramp off (same logic checking for play distant of paused)
Mykel Koblenz
Illawarra Smart Home
Reply
#4
(10-21-2017, 07:07 PM)znelbok Wrote: I actually do the same thing

Is Field Change For : <moniker.PlayMode>

I then check if I am in video mode (I dont want to do this if playing music), it is night and then if it is paused.
If
System::Equals
   P1=$(xbmc_Theatre.CurPlayer)
   P2=Video
   P3=No Case

//
// Only do this if it is night time
//
If
System::IsNight
   P1=0

//
// Turn the lights on
//
If
System::Equals
   P1=$(xbmc_Theatre.PlayMode)
   P2=Paused
   P3=Case

Devices::FieldWrite
   P1=lighting.GamesBack
   P2=35
   P3=False
End
Else
End
Else
End

When play is pressed the lights ramp off (same logic checking for play distant of paused)

Thanks Mykel for the example. This and Dean's should get me on the right path.
Reply
#5
(10-21-2017, 10:53 AM)Dean Roddey Wrote: On the event, I think you should only need:

Is New Fld Value For: XMBC.Playmode, Paused
I don't have that command in the dropdown for a triggered event target in an 'if' statement.
Mark Stega
Reply
#6
Mark: The "Paused" value is in the first line as you typed above and not in the Comp Val box below, correct?

I can't get it to work either way, but now upgrading to the latest release in case something got buggered.
Reply
#7
(10-22-2017, 07:38 AM)Bugman Wrote: Mark: The "Paused" value is in the first line as you typed above and not in the Comp Val box below, correct?

I can't get it to work either way, but now upgrading to the latest release in case something got buggered.

I was looking in the wrong place. The IsNewFieldValue is the event filter and in my case the field is SIRT.IRSensor1 and the comp value is True. So in the case above Paused would be in the Comp Value and XBMC.PlayMode would be the field.
Mark Stega
Reply
#8
Kinda going nuts here...

I'm including every detail here, as no triggers (old ones as well that worked before with W800 RF receiver) are working.

So to recap here's my event monitor dump on the field change in question.

TIME: 12:55:13
cqsl.header
{
    v=1
    sysid=C9532CB6277B38E3-893FF23CA64E9D7F
    class=cqsl.fldchange
    source=cqsl.field:XBMC.PlayMode
}
cqsl.fldval
{
    val=Paused
}



I attached a Screen Shot of the trigger.



The only action is the following:

Devices::FieldWrite
    P1=ISY_Insteon.LGHT#Dim_MainMediaMaster
    P2=100
    P3=True

The "only" thing else going on is that while I'm in the Admin page my cursor goes from an arrow to a blue circle about every second or so....


Attached Files
.png   Screen Shot.png (Size: 174.09 KB / Downloads: 10)
Reply
#9
If the cursor is changing like that something may not be right. Of course it may not be the AI that's causing it. Does it stop happening if you move the cursor off the AI?

Do you have any drivers cycling? You should see that in the logs if so. That could cause issues.

Is the machine where you are running the AI and seeing the event trigger the MS? I.e. just making sure that the MS is also seeing the trigger. They are sent via broadcasts, so if you have any lan segmentation (i.e. multiple sub-nets) that could block them. Probably not, but just making sure. If you are seeing the trigger in the AI on the MS, then clearly it's seeing the triggers.

If the machine hosting the driver isn't the MS, then is it correctly upgraded? Also, have you changed any of the ports in the configuration in this case? In particular the event port? That could cause them not to be seen. If it's all running on one machine, none of those things could be an issue really.
Dean Roddey
Explorans limites defectum
Reply
#10
(10-22-2017, 10:50 AM)Dean Roddey Wrote: If the cursor is changing like that something may not be right. Of course it may not be the AI that's causing it. Does it stop happening if you move the cursor off the AI?

     Saw it on a client but not the MS via remote login. I paused all the drivers and restarted them, and have not seen it again.

Do you have any drivers cycling? You should see that in the logs if so. That could cause issues.

     No issues there. 

Is the machine where you are running the AI and seeing the event trigger the MS? I.e. just making sure that the MS is also seeing the trigger. They are sent via broadcasts, so if you have any lan segmentation (i.e. multiple sub-nets) that could block them. Probably not, but just making sure. If you are seeing the trigger in the AI on the MS, then clearly it's seeing the triggers.

      No issues there. Logged into the MS Admin and saw the triggers via trig monitor. No lan subnets, all in the same domain.

If the machine hosting the driver isn't the MS, then is it correctly upgraded? Also, have you changed any of the ports in the configuration in this case? In particular the event port? That could cause them not to be seen. If it's all running on one machine, none of those things could be an issue really. 

      All l the clients were upgraded with no change to ports. All pertinent drivers are on the MS. Stumped at this point. Reinstalled CQC on the MS, but no change. Stumped....any ideas on other things to check?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  6.0.0 Interface Viewer - Action Trace Mark Stega 1 240 03-09-2021, 06:39 PM
Last Post: Dean Roddey
  Escaping Character in Action Parameters gReatAutomation 0 332 09-02-2020, 05:51 AM
Last Post: gReatAutomation
  Get Field Value via HTTP znelbok 3 763 06-11-2020, 03:43 PM
Last Post: Dean Roddey
  HTTP Trigger and Parameters znelbok 1 530 06-11-2020, 03:41 PM
Last Post: Dean Roddey
  Is there a way to change the listening port for the CQC server? ghurty 3 693 04-23-2020, 05:54 PM
Last Post: Dean Roddey
  Timers Driver / Field Time Image / Seconds gReatAutomation 1 693 03-16-2020, 05:48 PM
Last Post: Dean Roddey
  Action wait and exit if variable changes simplextech 8 1,956 02-01-2020, 12:35 PM
Last Post: simplextech
  If statement to check field value simplextech 10 2,479 01-27-2020, 01:32 PM
Last Post: Dean Roddey
  [FEATURE] Event Run Action simplextech 4 1,636 01-09-2020, 02:04 PM
Last Post: simplextech
  Simple device control from Admin Interface simplextech 7 2,099 01-04-2020, 12:18 PM
Last Post: simplextech

Forum Jump:


Users browsing this thread: 1 Guest(s)