That should not be the case. Gmusicproxy is it’s own thing, Can you test that it works stand alone? Are you using @miikkajo addon for gmusicproxy? There are other people using this as well. I am not aware of any breaking changes between miikkajo addon and this gmusic player.
getting the gmusicproxy to work outside gmusic player is a seperate thing. Solving that is needed to fix song advance but I don’t think gmusicproxy will solve the playlist issue.
Well that seems like there are no songs in the playlist…
Can you go to the Google music web page and make a new playlist with exactly 3 songs and then restart Home Assistant – Does the new playlist show up – Can you play any of the songs in the new playlist?
I see there are other things I must do to activate/authorise gmusicproxy, in terms of Playlist I created a new one with three songs, still get same errors, I might have to reinstall everything it seems
Im sorry your having problems with this. I hope a reinstalling gets it sorted. I haven’t given up on this project but I also have not had the time to put toward properly learning python. This really needs to be re-written from the ground up by someone who actually knows what they are doing!
Just updated to 0.2 and there’s an error referring to gmusic_authtoken:
FileNotFoundError: [Errno 2] No such file or directory: '/root/.homeassistant/.gmusic_authtoken'
The issue is that DEFAULT_TOKEN_PATH = get_default_config_dir() + '/.' in media_player.py doesn’t get the correct path on my install (formerly known as Hassio) so I changed it to DEFAULT_TOKEN_PATH ='/config/.'
Hi @Petrica
Sorry about that. There doesn’t seem to be a good way I can get the actually configuration directory. ( At least I haven’t figured it out yet. ) There is an optional setting though
You can change the path by setting token_path in the gmusic_config.yaml package file.
Example
## Google Music Media Player
## gmusic_config.yaml
media_player:
- platform: gmusic_player
device_id: !secret gmusic_device_id
username: !secret gmusic_username
password: !secret gmusic_password
speakers: # media_players
- bedroom_stereo
- workshop_stereo
gmusicproxy: !secret gmusic_proxy
token_path: /config/.
The previous versions used DEFAULT_TOKEN_PATH = "./."
I’m surprised to hear that actually worked
It did seem to work in the FreeNAS plugin as well - I’m just gonna revert that change. I reverted this change in v0.2.1 It should work again without setting token_path
## Google Music Media Player
## Use this 'package.yaml' file to configure "gmusic_player"
media_player:
- platform: gmusic_player
username: !secret gmusic_username
password: !secret gmusic_password
device_id: !secret gmusic_device_id
gmusicproxy: http://192.168.68.134:9999
input_select:
gmusic_player_speakers:
name: Speakers
icon: mdi:speaker
## Add your media_players below
options: # Example media_players
- mainbedroom_tv
- mainbedroom_speaker
and the player is as follows:
## Google Music Media Player
## Supplemental 'package.yaml' file for "gmusic_player"
input_select:
gmusic_player_source:
name: Source
icon: mdi:library-music
options:
- "Playlist"
- "Station"
gmusic_player_speakers:
name: Speakers
icon: mdi:speaker
options: ## Should be empty
- " "
gmusic_player_playlist:
name: Playlist
icon: mdi:playlist-music
options: ## Should be empty
- " "
gmusic_player_station:
name: Station
icon: mdi:playlist-music
options: ## Should be empty
- " "
script:
gmusic_sync_media:
alias: gmusic_player.sync_media
description: 'Update song list from Google Music'
sequence:
- event: gmusic_player.sync_media
gmusic_play_media:
alias: gmusic_player.play_media
description: 'Fire event: gmusic_play_media'
fields:
speakers:
description: Name of the speakers to play music on.
example: bedroom_stereo
source:
description: Media Source. Should be 'station' or 'playlist'
example: station
name:
description: Name of the station or playlist.
example: I'm Feeling Lucky
sequence:
- event: gmusic_player.play_media
event_data_template:
speakers: "{{ speakers }}"
source: "{{ source }}"
name: "{{ name }}"
shuffle: " {{ shuffle }}"
shuffle_mode: " {{ shuffle_mode }}"
## Sensor used for auto track advance.
sensor:
- platform: template
sensors:
gmusic_receiver:
value_template: "{{ states.media_player.gmusic_player.attributes._player_state }}"
automation old:
- alias: "gmusic_player_auto_advance"
initial_state: 'on'
trigger:
platform: state
entity_id: 'sensor.gmusic_receiver'
from: 'playing'
to: 'idle'
for:
seconds: 1
condition:
- condition: state
entity_id: 'media_player.gmusic_player'
state: 'playing'
action:
- service: media_player.media_next_track
entity_id: 'media_player.gmusic_player'
- alias: "gmusic_player_auto_play"
initial_state: 'on'
trigger:
platform: state
entity_id: 'media_player.gmusic_player'
from: 'off'
to: 'idle'
action:
- service: media_player.media_play
entity_id: 'media_player.gmusic_player'
homeassistant:
customize:
media_player.gmusic_player:
friendly_name: "Google Music Player"
sensor.gmusic_receiver:
friendly_name: "Google Music Receiver"
hidden: true
script.gmusic_sync_media:
friendly_name: "Sync Music"
icon: mdi:sync
script.gmusic_play_media:
hidden: true
## This group may only be visable when using the "states UI"
group:
google_music_media_player:
name: Google Music
entities:
- media_player.gmusic_player
- script.gmusic_sync_media
- input_select.gmusic_player_speakers
- input_select.gmusic_player_source
- input_select.gmusic_player_playlist
- input_select.gmusic_player_station
I have not changed the files in the custom_components, what could be the problem, I’m running 105.5 and HassOS 3.11. I need help…
You shouldn’t have to redo everything. Just copy the new config files into place. The biggest change is that speakers are configured under g music player instead of as an input select. Then just add your g music proxy back in to the new config and you should be good to go
I am already redoing it, I’ve deleted everything now, I am thinking maybe I am doing something wrong by tinkering here and there. I’ll Feedback in ten minutes
So for automatic – I don’t know about playlist but it is possible for stations. It’s just that its all or nothing. So for example right now I filter the stations to only include what’s in you library – Without that filter the list of stations is over 200 long. I don’t have a better to allow some automatic stations but not others.
But for thumbs up playlist I think I could add this – Assuming I can filter the same way I do for the stations, I can just look for songs with a thumbs up and only add those songs to a dedicated “Thumbs Up” playlist.
Is there a possibility that you’re willing to share your theme (including the background) and the code to implement it. I like it very much. (I’m only a beginner, that’s why I ask for the code too)