Core: gpmdp CODE_REQUIRED platform integration failing

Created on 24 Aug 2016  路  5Comments  路  Source: home-assistant/core

Home Assistant release (hass --version):
0.26.3

Python release (python3 --version):
Python 3.4.2

Component/platform:
gpmdp / media_player

Description of problem:
Does not properly pass the expected CODE_REQUIRED variable. The media player first starts up in a state of "OFF" and then when I send service calls manually through media_player I receive the 4 digit code popup on the target computer hosting gpmdp.

Expected:
Media player should correctly show communication state and able to pass commands to GPMDP without the CODE_REQUIRED popup on target machine.

Problem-relevant configuration.yaml entries and steps to reproduce:

# Google Desktop Music Plaer on KUMA-ONGAKU machine
media_player:
  platform: gpmdp
  address: 192.168.1.119
  name: Living Room Music
  1. Download latest version of GPMDP client as of this time,
  2. Using latest stable release of HaSS try to send commands
  3. Observe Results

Most helpful comment

@nkgilley This is so awesome thank you!

I was successful in setting up a secondary development environment on the Home Assistant 0.27.0.dev0 branch.

In my initial round of testing I found that everything works, but users who have a custom default_view over-ride will need to manually add the configurator.gpm_desktop_player Entity before the media_player Entity appears.

Another finding at this moment is the "Play/Pause" button status does not update in real time, even with "Streaming Updates" toggled to ON. In my current session, I have to refresh the whole browser page to view the correct button status.

** EDIT: upon further testing it appears the button does refresh.. some of the time. It's very inconsistent and sometimes fails to update all-together until the next 2-3 clicks where it regains 'sync'.

Otherwise everything appears to be working. I will provide some more feedback over the next week of tinkering or so.

This was a great learning experience, Cheers to you!

All 5 comments

I should also note that no definitive errors were produced in home-assistant.log. I am currently logging at default=INFO.

I see this at the bottom:

16-08-24 14:49:16 homeassistant.core: Invalid service data for media_player.play_media: required key not provided @ data['media_content_id']. Got None required key not provided @ data['media_content_type']. Got None

Also glancing over the code for GPMDP.py - it appears that a Configurator is to be displayed on the client for passing the authentication key over. This is not displayed in my frontend at all.

Please try running the dev branch, I recently made a number of updates. There should be a new stable release this weekend so I'd like to make sure it's working for you.

Thanks

@nkgilley This is so awesome thank you!

I was successful in setting up a secondary development environment on the Home Assistant 0.27.0.dev0 branch.

In my initial round of testing I found that everything works, but users who have a custom default_view over-ride will need to manually add the configurator.gpm_desktop_player Entity before the media_player Entity appears.

Another finding at this moment is the "Play/Pause" button status does not update in real time, even with "Streaming Updates" toggled to ON. In my current session, I have to refresh the whole browser page to view the correct button status.

** EDIT: upon further testing it appears the button does refresh.. some of the time. It's very inconsistent and sometimes fails to update all-together until the next 2-3 clicks where it regains 'sync'.

Otherwise everything appears to be working. I will provide some more feedback over the next week of tinkering or so.

This was a great learning experience, Cheers to you!

@tylerstraub I'm aware that the play/pause was acting a bit funny. Should be fixed in https://github.com/home-assistant/home-assistant/pull/3115

You can close this issue

Thanks @nkgilley

Was this page helpful?
0 / 5 - 0 ratings

Related issues

abouelric picture abouelric  路  165Comments

McGiverGim picture McGiverGim  路  124Comments

neotrunks picture neotrunks  路  169Comments

WilldabeastHA picture WilldabeastHA  路  203Comments

kdschlosser picture kdschlosser  路  374Comments