Chromecast piston


#21

Yes, it does. Because your trigger is a timed trigger, every 30 seconds. But you are wanting to trigger on a trackDescription change right?


#22

correct


#23

If you are certain that your trackDescription is changing, then try running your first posted green piston. But let it trigger with a trackDescription change and not the “test” button.


#24

Then it does not trigger


#25

I do not have a Chromecast so I cannot be sure. But I did a test run with my Kodi, changing the songs every 5 seconds…I did not get a change in the trackDescription. I am not sure what that means.


#26

I even tried it with trackdata…no change when tracks were changed.


#27

When I stopped the player and started a new song, the data was updated. But if I let it play into another song, the data is not updated. You might have to use a GET. I will investigate.


#28

For info, that error means that you put the trackDescription in the ‘log type’ instead of the ‘messages’ field when creating the ‘log to console’ action. You need to leave the ‘log type’ set to ‘value’ and one of the default values. Leaving it at ‘info’ is fine.

However the two logs with that error do indicate that the trackDescription was ‘now that i think about it spotify alex vargas’ on both occasions.

Returning to the original piston …

Just as a check, it might be worth setting the webCoRE logs to full and pausing and resuming the piston (or editing and saving it). When you do that you see a log for the start event which shows the devices being subscribed to. The ones coloured in cyan with the device name and attribute are the true subscriptions to events, the ones in black are fake subscriptions to controlled devices (apparently this is so the piston gets listed as a SmartApp using the device). You just need to make sure the trackDescription is being subscribed to and there are no signs of errors. I suspect there won’t be.

You might also considering opening a browser on the ‘Live Logging’ page in the IDE and looking at the page for your music player. Then set the log level on music player to 4 in its device settings. That should make it spew out debug messages, including one in its generateTrackDescription() method which is where it creates the event that webCoRE needs to see. You might want to reduce the log level back down when you’ve finished testing.


#29

tried that.

10.1.2020 16.55.58 +540ms
+2ms ╔Starting piston… (v0.3.110.20191009)
+288ms ║╔Subscribing to devices…
+323ms ║║Subscribing to ChromeCastAudio2.level…
+335ms ║║Subscribing to ChromeCastAudio2.status…
+345ms ║║Subscribing to ChromeCastAudio2.trackDescription…
+355ms ║║Subscribing to ChromeCastAudio2.switch…
+364ms ║║Subscribing to ChromeCastAudio2.$status…
+374ms ║║Subscribing to ChromeCastAudio2.mute…
+494ms ║╚Finished subscribing (210ms)
+553ms ╚Piston successfully started (553ms)

I found out that if I send a “refresh” to the chromecast it send current trackdescription.


#30

It would seem that there is a way to get trackdescription each time a new track is started.


#31

Sure, but how?

EDIT: I just removed and installed again and now it is working… thank you for the help

I have another question - do you know how to get radio streams with metadata, such as “playing now” info?


#32

Here’s my Chromecast piston…


#33

@Alwas, do you set your piston state because you use a tile on the dashboard or ActionTiles?


#34

I don’t use WebCoRE tiles, just use the Piston State headers thing. But if anyone knows how to get the track description into some kind of tile for ActionTiles I’m all ears!


#35

Thanks.

does any of you know if it is possible to send request to Google assistant to get it to play to chromecast devices?

I can write to google assistant from my phone and it begins to play musik om selected device. is this possible with webcore?


#36

You might find your answer here.


#37

I have removed and installed again, and now i get track description in actiontiles


#38

@WCmore I’m sure you’ll know. Is it possible for webCoRE to dynamically change a picture/image/media ActionTile tile when I change radio stations by flipping a tile on ActionTiles? I’d like an image tile to show the current official radio station icon being played.


#39

ActionTiles can display any image as a tile. The trick is, there is no logic in ActionTiles, so the image URL is static. You can use a RaspberryPi (or other local server) to change the static.jpg into a new image.

ActionTiles will update the image based on the refresh rate you have set in settings.

pic


#40

Very interesting, I already have a local server on a RaspberryPi, I use that to display the background image of the panels. I’m curious how I could use, ('m presuming webCoRE?) to seamlessly update/change that static jpeg, when I activate a piston to start a radio station? On the fly? Without manually going deep into ActionTiles settings?