MQTT Plugin (5 Viewers)

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    16,062
    11,144
    Kyiv
    Home Country
    Ukraine Ukraine
    • Thread starter
    • Moderator
    • #51
    Perfect - thanks a lot for your support.
    Config
    YAML:
    media_player: 
      - platform: mediaportal-mqtt-mediaplayer
        name: "Mediaportal PC"
        unique_id: d2f97fe6-35fd-4053-b9a0-23cca0ef7d8e
        multiroom_id: "lounge"
        power_topic: "Mediaportal/PC/status"
        payload_power_off: "Offline"
        media_type_topic: "Mediaportal/PC/Player/type"
        media_type_template: "{{ value }}"
        player_status_topic: "Mediaportal/PC/Player/state"
        payload_player_status_play: "Play"
        payload_player_status_stop: "Stop"
        payload_player_status_pause: "Pause"
        media_title_topic: "Mediaportal/PC/Player/+/data"
        media_title_template: "{{ value_json.title }}"
        media_artist_topic: "Mediaportal/PC/Player/+/data"
        media_artist_template: "{{ value_json.title }}"
        media_album_topic: "Mediaportal/PC/Player/+/data"
        media_album_template: "{{ value_json.genre }}"
        media_track_topic: "Mediaportal/PC/Player/+/data"
        media_track_template: "{{ value_json.filename }}"
        media_genre_topic: "Mediaportal/PC/Player/+/data"
        media_genre_template: "{{ value_json.genre }}"
        media_position_topic: "Mediaportal/PC/Player/playtime"
        media_duration_topic: "Mediaportal/PC/Player/totaltime"
        media_art_url_topic: "Mediaportal/PC/Player/+/data"
        media_art_url_template: "{{ value_json.fanart if value_json.fanart != None else value_json.poster }}"
        source_topic: "musiccast_test/status/kitchen/input"
        sourcelist_topic: "musiccast_test/status/kitchen/features/input"
        volume_topic: "Mediaportal/PC/volume"
        mute_topic: "Mediaportal/PC/volume/mute"
        volume:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/volume"
            payload: "{{ volume }}"
        vol_mute:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "14"
        vol_unmute:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "14"
        power_on:
          service: switch.turn_on
          entity_id: switch.PC
        power_off:
          service: switch.turn_off
          entity_id: switch.PC
        next:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "18"
        previous:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "18"
        play:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "22"
        stop:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "25"
        pause:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "24"
        select_source:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "35"
     

    Attachments

    • mediaportal-mqtt-mediaplayer.zip
      57.1 KB

    applebee1

    Portal Member
    October 25, 2007
    45
    27
    Config
    YAML:
    media_player:
      - platform: mediaportal-mqtt-mediaplayer
        name: "Mediaportal PC"
        unique_id: d2f97fe6-35fd-4053-b9a0-23cca0ef7d8e
        multiroom_id: "lounge"
        power_topic: "Mediaportal/PC/status"
        payload_power_off: "Offline"
        media_type_topic: "Mediaportal/PC/Player/type"
        media_type_template: "{{ value }}"
        player_status_topic: "Mediaportal/PC/Player/state"
        payload_player_status_play: "Play"
        payload_player_status_stop: "Stop"
        payload_player_status_pause: "Pause"
        media_title_topic: "Mediaportal/PC/Player/+/data"
        media_title_template: "{{ value_json.title }}"
        media_artist_topic: "Mediaportal/PC/Player/+/data"
        media_artist_template: "{{ value_json.title }}"
        media_album_topic: "Mediaportal/PC/Player/+/data"
        media_album_template: "{{ value_json.genre }}"
        media_track_topic: "Mediaportal/PC/Player/+/data"
        media_track_template: "{{ value_json.filename }}"
        media_genre_topic: "Mediaportal/PC/Player/+/data"
        media_genre_template: "{{ value_json.genre }}"
        media_position_topic: "Mediaportal/PC/Player/playtime"
        media_duration_topic: "Mediaportal/PC/Player/totaltime"
        media_art_url_topic: "Mediaportal/PC/Player/+/data"
        media_art_url_template: "{{ value_json.fanart if value_json.fanart != None else value_json.poster }}"
        source_topic: "musiccast_test/status/kitchen/input"
        sourcelist_topic: "musiccast_test/status/kitchen/features/input"
        volume_topic: "Mediaportal/PC/volume"
        mute_topic: "Mediaportal/PC/volume/mute"
        volume:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/volume"
            payload: "{{ volume }}"
        vol_mute:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "14"
        vol_unmute:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "14"
        power_on:
          service: switch.turn_on
          entity_id: switch.PC
        power_off:
          service: switch.turn_off
          entity_id: switch.PC
        next:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "18"
        previous:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "18"
        play:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "22"
        stop:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "25"
        pause:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "24"
        select_source:
          service: mqtt.publish
          data:
            topic: "Mediaportal/PC/Player/Command/button"
            payload: "35"

    Very nice - I will test and implement it over the weekend.

    My final challenge is to get the receiver connected and then I can concentrate on the optics, layout and add ons...

    Thanks a lot for sharing :)
     

    Users who are viewing this thread

    Top Bottom