@Danielhiversen Do you plan including it as an official component? The initial setup didn’t work for several days so I started looking using ipython to look for clues, however that stuff is in Chinese before realizing the custom component has been modified
Or, is it any way of getting a notification in HA when the custom component in git?
@JKW I commented 149 and changed 150 and 197 to " self.schedule_update_ha_state()" and now it works
I’m no good at python at all, but I did follow most of the steps, I installed gmusicapi inside the virtual env.
I am also NO good at configuring HA at all, I’m running raspian, not hassio (god why all this confusion!!)
I install ipython though sudo apt-get install ipython (and to confuse me more there is ipython3 too, which i installed)
your gmusic.py is executable, what do i do with it?
I’m also using iPhone, no android, how to get the android ID?
When running hass it says:
Blockquote
ERROR (Thread-2) [homeassistant.util.yaml] Secret [email protected] not defined
my configurations.yaml looks like this:
Blockquote
customize: !include gmusic.yaml
My gmusic.yaml looks like this:
Blockquote
input_select:
music:
name: Musikk
options:
- " " # Should be empty
icon: mdi:music-note
media_player:
name: Media player
options: # entity_ids of your media players
- “media_player.chromecast”
icon: mdi:music-note
switch:
platform: gmusic
user: !secret [email protected]
password: !secret mypassword
device_id: !secret gmusic_device_id # (HOW TO GET THIS?) Mobileclient Interface — gmusicapi 13.0.0 documentation
media_player: media_player # entity id of the input select used for mediaplayer
playlist: music # entity id of the input select used for playlist
OPTIONAL
group:
google_music:
name: Google Music
entities:
- input_select.music
- input_select.media_player
- switch.google_music
Well, the error message is pretty clear what the problem is. You haven’t set a secret with your email address in it, you’ve just literally copied the line !secret [email protected] in to your config.
Once you have sorted that out, put a random string in the device_id and run homeassistant and you’ll get another error message saying that the device id is incorrect, but listing your available ones, just copy one of them over and restart homeassistant again.
Ok I put the correct values and was able from ipython to get the device ID: 0x72c532b0
So I put those back but now i get this when starting hass:
Blockquote
ERROR (MainThread) [homeassistant.config] Invalid config for [homeassistant]: [input_select] is an invalid option for [homeassistant]. Check: homeassistant->customize->input_select. (See /home/pi/.homeassistant/configuration.yaml, line 2).
Umm, the input_select is already first thing in line, however, I moved all gmusic.yaml to configurations.yaml as follows:
Blockquote
input_select:
music:
name: Thumbs up
options:
- " " # Should be empty
icon: mdi:music-note
media_player:
name: Media player
options: # entity_ids of your media players
- “media_player.chromecast”
icon: mdi:music-note
I also changed this media_player to media_player.chromecast (not sure if thats right or wrong)
input_select:
music:
name: Thumbs up
options:
- " " # Should be empty
icon: mdi:music-note
media_player:
name: Media player
options: # entity_ids of your media players
- "media_player.chromecast"
icon: mdi:music-note
switch:
- platform: gmusic
user: [email protected]
password: pass
device_id: ios0CD34363-3EB1-42AC-902C-0999F5439E75 # http://unofficial-google-music-api.readthedocs.io/en/latest/reference/mobileclient.html#gmusicapi.clients.Mobileclient.l$
media_player: media_player.chromecast # entity id of the input select used for mediaplayer
playlist: Thumbs up # entity id of the input select used for playlist
GOD, THANK YOU FOR LETTING ME KNOW HOW TO PASTE THE FRIGGIN CODE!!! LOL!
input_select:
music:
name: Thumbs up
options:
- " " # Should be empty
icon: mdi:music-note
media_player:
name: Media player
options: # entity_ids of your media players
- "media_player.chromecast"
icon: mdi:music-note
switch:
- platform: gmusic
user: [email protected]
password: pass
device_id: ios0CD34363-3EB1-42AC-902C-0999F5439E75
media_player: media_player
playlist: music
And put the correct email and password in, and confirm you have a media player called media_player.chromecast ?