CoRE and Piston Rules Engine, first design steps

@Jim, also, powerSource and locationMode are missing from the documentation. Maybe someone please wants to go over the Capabilities list and refresh it?

Thank you for your very quick reply

2 Likes

<delegating>
Thanks, @unixbeast recently did a capabilities docs request. He can shed more light on why those aren’t in the docs.
</delegating>

:slight_smile:

2 Likes

Real-time follow-up: locationMode isn’t documented because it’s not supported and may be removed.

When you say powerSource do you mean the powerSource attribute of the Power capability? That should be documented, we’ll get it fixed.

@Jim @unixbeast It’s a capability, according to Platform Update - Release Notes - 4/13/16

That’s not correct, unfortunately. powerSource was a new attribute added to the Power capability. Sorry for the confusion :confused:

1 Like

Ok, so the new capability is called Power…

Power Capability updated (the attribute name was wrong before), and Timed Session updated with correct setTimeRemaining() command signature.

Thanks and apologies for the confusion!

3 Likes

[quote=“ady624, post:525, topic:46546”]
And it all boils down to ST’s lack of documentation and standardization. [/quote]
The commands below aren’t included in the documentation for the Music Player capability, but I’ve found that SmartThings apps like Speaker Notify with Sound and SHM are using them instead of what’s documented.

I recently helped a user get their Samsung M5 Speakers to work with Smart Alarm by replacing the documented playText command with the undocumented playTrackAndRestore command in the SmartApp.

Maybe @Jim explain why SmartThings is creating and publishing SmartApps and Device Handlers that aren’t using the Music Player Capability as documented, but it might be worth including them in your “table” anyways.

  • playSoundAndTrack
  • playTrackAndRestore
  • playTrackAndResume
  • playTextAndResume
  • playTextAndRestore
4 Likes

Thank you, I will. Parameters?

I can’t remember where I ran into the last one so I was unable to verify it, but the rest of the list should be correct:

playSoundAndTrack(uri, duration, selectedSong, volume)
playTrackAndResume(uri, duration, volume)
playTrackAndRestore(uri, duration, volume)
playTextAndRestore(text, volume)
playTextAndResume(text, volume) ?

1 Like

Thank u. Is volume a 0-100%? How about selectedSong? String?

Yes, volume appears to be integer 1-100.

The Notify w/ Sound SmartApp appears to be using a value retrieved from the trackData attribute as the song so I’m thinking the selectedSong parameter is JSON.

Quick question, maybe I missed the answer along the way…

Will there be a way to disable a Piston when we don’t want it to run vs. deleting it and recreating it at a later time?

Holiday or special lights come to mind or when I am trying to figure stuff out, it’s nice to be able to go back and compare and have it disabled.

Thanks in advance
Rick

3 Likes

These aren’t commands defined on any capability. Perhaps they are custom commands for particular devices?

If that’s the case then why are SHM, Speaker Notify with Sound, and Speaker Weather Forecast calling those commands on a musicPlayer input?

All of those SmartApps were written by SmartThings and there’s even a comment in one of them that says the attribute “description” is there for backwards compatibility and will be removed in the future.

Also, the playText command doesn’t work on the Samsung M5 or Samsung M7 Speakers, but the playTrackAndRestore command does.

1 Like

Yes, pausing is a planned-for feature. There will also be a global maintenance mode where all pistons will come to a halt…

3 Likes

Are you going through the RM thread and picking up all of the requests that Bruce didn’t get a chance to implement, or what??? lol

1 Like

I haven’t. Said before, trying to not to be biased… This idea came to me when you asked for count of pistons under statistics. That’s when I added Paused pistons in the stats… Lol

1 Like

Devices can specify custom commands outside of any capability, and that is the case with the commands listed above. They are not capability-based commands, but device-specific commands.

Just remember if attempting to use non-capability commands on a capability-based input to check that the specific device supports that command using hasCommand().

The question of if they should be part of the capability definition is valid, and is something I’ll raise for consideration.

2 Likes

Hmmm…

3 Likes