Chromecast piston


#1

1) Give a description of the problem
I cannot get an event to trigger. it looks like that webcore are not detecting teh change in trackdescription

2) What is the expected behaviour?
That a local variable is trigger to a piston. compare before and after.

3) What is happening/not happening?
the piston will not trigger the piston

**4) Post a Green Snapshot of the piston!

5) Attach logs after turning logging level to Full
9.1.2020 20.58.06 +894ms
+1ms ╔Received event [Aabo].test = 1578599886894 with a delay of 0ms
+72ms ║RunTime Analysis CS > 21ms > PS > 40ms > PE > 11ms > CE
+75ms ║Runtime (37209 bytes) successfully initialized in 40ms (v0.3.110.20191009) (73ms)
+76ms ║╔Execution stage started
+87ms ║║Condition #8 evaluated false (5ms)
+88ms ║║Condition group #1 evaluated false (state did not change) (8ms)
+90ms ║╚Execution stage complete. (14ms)
+91ms ╚Event processed successfully (91ms)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

A trace and a log will help us here. I could be wrong, but it seems to me that this is going to create an infinite loop. You change your trackDescription in the WITH and then trigger on a change in trackDescription.


#3

What are you using for a chromecast device handler? It looked like the interface stuff I had seen with google products required nodered.


#4

This setup works if I setup a time trigger instead.


#5

I am using the Cast-web-api from ST on a windows PC.


#6

I have not tested this but try this :

IF TrackDescription changes
  THEN
    IF TrackDescription does not equal NewTrackDescription
      THEN
        Set NewTrackDescription = TrackDescription
    END IF
END IF

#7

Are you sure that your Music Player 4’s trackDescription is changing?


#8

yes


#9

image

Your trace says that your condition #8 evaluated false, suggesting that it did not change.


#10

You might try logging your trackDescription to the console every 4 minutes or so and see it it is changing.


#11

I am not sure how to do this.


#12

First, I suggest you log your trackDescription to the console every 30 seconds or so and physically change the track every 20 seconds or and let that run for a few minutes and see if your trackDescription does change.


#13

If i do so i works, but i want the piston to activate on changes in trackdescription


#14

image

Replace LOCATION with your Music Player 4


#15

9.1.2020 21.30.35 +112ms
+1ms ╔Received event [Aabo].time = 1578601835753 with a delay of -641ms
+125ms ║RunTime Analysis CS > 36ms > PS > 72ms > PE > 16ms > CE
+128ms ║Runtime (37427 bytes) successfully initialized in 72ms (v0.3.110.20191009) (125ms)
+129ms ║╔Execution stage started
+142ms ║║Cancelling statement #2’s schedules…
+154ms ║║null
+156ms ║║Error executing virtual command [].log: (3ms) groovy.lang.MissingMethodException: No signature of method: physicalgraph.sandbox.TruncatingLoggingListener.now that i think about it spotify alex vargas() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl, null) values: [║║ null, null]
+167ms ║╚Execution stage complete. (38ms)
+169ms ║Setting up scheduled job for Thu, Jan 9 2020 @ 9:31:05 PM CET (in 30.472s)
+178ms ╚Event processed successfully (178ms)
9.1.2020 21.30.05 +139ms


#16

9.1.2020 21.32.53 +146ms
+1ms ╔Received event [Aabo].time = 1578601974476 with a delay of -1330ms
+75ms ║RunTime Analysis CS > 16ms > PS > 45ms > PE > 13ms > CE
+78ms ║Runtime (37646 bytes) successfully initialized in 45ms (v0.3.110.20191009) (76ms)
+79ms ║╔Execution stage started
+90ms ║║Cancelling statement #2’s schedules…
+100ms ║║Executed virtual command setVariable (3ms)
+105ms ║║null
+106ms ║║Error executing virtual command [].log: (1ms) groovy.lang.MissingMethodException: No signature of method: physicalgraph.sandbox.TruncatingLoggingListener.now that i think about it spotify alex vargas() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl, null) values: [║║ null, null]
+113ms ║╚Execution stage complete. (34ms)
+114ms ║Setting up scheduled job for Thu, Jan 9 2020 @ 9:33:24 PM CET (in 31.216s)
+122ms ╚Event processed successfully (122ms)
9.1.2020 21.32.49 +507ms
+1ms ╔Received event [Aabo].test = 1578601969507 with a delay of 0ms
+77ms ║RunTime Analysis CS > 21ms > PS > 40ms > PE > 16ms > CE
+80ms ║Runtime (37642 bytes) successfully initialized in 40ms (v0.3.110.20191009) (77ms)
+81ms ║╔Execution stage started
+134ms ║╚Execution stage complete. (54ms)
+142ms ║Setting up scheduled job for Thu, Jan 9 2020 @ 9:32:54 PM CET (in 4.828s)
+154ms ╚Event processed successfully (154ms)


#17

His trace came from pressing the ‘test’ button, so the trigger will be false.


#18

OH, that’s right. Stupid me…Thank you.


#19

Yes @Lieberkind, your first posted green piston will have to be triggered by a trackDescription change, not with the “test” button.


#20

this works every 30 sec.

I think the better way is to trigger by track changes