Windows > Third Party Plug-ins, Programs, and Skins
Home Assistant integration for jriver
bob:
--- Quote from: beatonnz on September 29, 2024, 05:59:47 pm ---Thanks for the quick response. Because I am running on pi3b+ I have stayed with MC29 so I am a little behind current releases as I believe pi3 has a hard time supporting bullseye/bookworm releases.
I retried the "pushing" the power button on the same recommended mini-media-player card while watching the server over VNC connection. It definitely stops MC but leaves it hung in a state where it shows as still playing and won't respond to any commands. Only solution seems to be a reboot.
I will build a MC33 on a pi4 or pi 5 and give that a try to see if it resolves the issues.
Thanks for your help.
--- End quote ---
A bit off topic but the IdPi runs bookworm on the 3b+ fine.
beatonnz:
Thanks mattkahn & bob:
Upgraded pi3b+ to bullseye and then to MC33. Playlists work as advertised and that plus sjhilton tip to hide the power button I am all good on running MC via home assistant.
mattkhan:
I tested MCC 20007,0 on linux and it simply kills the process which means any subsequent power on (implemented as 22009,0) does nothing as there's no server process responding
it's completely different behaviour to windows as the server stays alive and just the client is killed
10014 doesn't work on Linux either so I guess it would have to be 22009,-1000 to "turn off" but that seems a bit unpleasant, any other suggestions on how to handle this on linux?
bob:
--- Quote from: mattkhan on October 01, 2024, 02:15:39 am ---I tested MCC 20007,0 on linux and it simply kills the process which means any subsequent power on (implemented as 22009,0) does nothing as there's no server process responding
it's completely different behaviour to windows as the server stays alive and just the client is killed
10014 doesn't work on Linux either so I guess it would have to be 22009,-1000 to "turn off" but that seems a bit unpleasant, any other suggestions on how to handle this on linux?
--- End quote ---
20007,0 should just close the UI if media server is running. I can take a look at that. I know that media server is somewhat different on linux than windows.
sjhilton:
--- Quote from: beatonnz on September 29, 2024, 10:09:12 pm ---Thanks sjhilton:
Your solution re hiding the power button worked perfectly.
I would be interested in your JRiver code which will facilitate my own learning in how I can improve my own install.
--- End quote ---
Not a problem. For the info card I use the following:
--- Code: --- - type: entities
entities:
- entity: sensor.[your player_zone]_playing_now
type: attribute
name: Album
attribute: Album
icon: mdi:album
- entity: sensor.[your player_zone]_playing_now
type: attribute
name: 'Track #'
attribute: 'Track #'
icon: mdi:numeric-1-box-multiple
- entity: sensor.[your player_zone]_playing_now
type: attribute
name: Duration
attribute: Duration
icon: mdi:timelapse
- entity: sensor.[your player_zone]_playing_now
type: attribute
name: Year
attribute: Date (year)
icon: mdi:timer
- entity: sensor.[your player_zone]_playing_now
type: attribute
name: Times played
attribute: Number Plays
icon: mdi:timer-play
- entity: sensor.[your player_zone]_playing_now
type: attribute
name: Last Played
attribute: Last Played
icon: mdi:timeline-clock-outline
- entity: input_text.bitdepth
type: simple-entity
name: Bit Depth
icon: mdi:chart-bar-stacked
- entity: input_text.samplerate
type: simple-entity
name: Sample Rate
icon: mdi:waveform
- entity: input_text.input_text_media_player_direct
type: simple-entity
name: Is output direct?
--- End code ---
The last three entries rely on an MCWS command and a couple of automations.
You would need to insert some lines into configuration.yaml.
--- Code: ---hifiaudiopath:
url: http://[yourip]:52199/MCWS/v1/Playback/AudioPath?Zone=-1&ZoneType=ID
method: GET
--- End code ---
And then the automations follow the form of:
--- Code: ---alias: Set bitdepth, sample rate and filename
description: ""
mode: single
triggers:
- seconds: /30
trigger: time_pattern
conditions: []
actions:
- action: rest_command.hifiplayback
data: {}
response_variable: hifiplayback
- delay: "00:00:02"
- action: input_text.set_value
data:
value: >-
{{ (hifiplayback | regex_findall_index('<Item
Name="Bitdepth">(.*?)</Item>')) }}
target:
entity_id: input_text.bitdepth
- action: input_text.set_value
data:
value: >-
{{ (hifiplayback | regex_findall_index('<Item
Name="SampleRate">(.*?)</Item>')) }}
target:
entity_id: input_text.samplerate
- action: input_text.set_value
data:
value: >-
{{ (hifiplayback | regex_findall_index('<Item
Name="Name">(.*?)</Item>')) }}
target:
entity_id: input_text.mediafilename
--- End code ---
The next project will be to develop a card that displays the playlist/running times and hopefully shows the now playing track in bold or similar. That might be done by more sophisticated scraping of MC via MCWS.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version