We have moved at community.getvera.com

Author Topic: Recommendations for Next/Previous SiteMap/Item representation for Sonos and DLNA  (Read 737 times)

Offline lolodomo

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
@guessed: what would be your advice to define a playlist ctrl with two commands "Previous" and "Next" for Sonos (or DLNA).
In the sitemap, of course I define a Switch with a mapping to have my two buttons "Previous" and "Next".
Then, of course I could define rules to send a HTTP request to trigger a "Previous" or "next" action.
But do I have another option (without any rule) associating my item to the Mios binding using a command transformation like you do for the playing mode ? The problem is that I only want to send a command and I don't want to attach my item to a Vera state variable.

I hope I am almost clear in my request...
« Last Edit: December 22, 2014, 07:23:35 am by lolodomo »

Offline guessed

  • Moderator
  • Master Member
  • *****
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
@guessed: what would be your advice to define a playlist ctrl with two commands "Previous" and "Next" for Sonos (or DLNA).
In the sitemap, of course I define a Switch with a mapping to have my two buttons "Previous" and "Next".
Then, of course I could define rules to send a HTTP request to trigger a "Previous" or "next" action.
But do I have another option (without any rule) associating my item to the Mios binding using a command transformation like you do for the playing mode ? The problem is that I only want to send a command and I don't want to attach my item to a Vera state variable.

In order to send the Command to the right Vera Device, the MiOS Binding will [minimally] need:
a) to be bound to the specific Device#,
b) have NO in: parameter present
c) have a command: parameter present

The command mapping would need to have the relevant ServiceId/Action information present, similar to other Actions.

Also, since these are true stateless actions, you'll want to have the autoupdate=false set in the binding declaration (this prevents the "button" from sticking when pressed)

eg. Switch   item=FamilySonosTransportState label="Current State" mappings=[PLAYING="Play", STOPPED="Stop", PAUSED="Pause"]

The main difference here is that I Map the TransportState to the underlying StateVariable in Vera.