Giter VIP home page Giter VIP logo

Comments (18)

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024

I will take a look at this, but I suspect it isn't so much a bug as something I haven't built in yet. I don't use Google Assistant so it maybe a challenge to figure it out (I don't even have an Android phone).

No promises how quick I look at it, but I will look at it at some point in the next few weeks.

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024

Been trying to do some research, to be honest I have no idea what it is GA is needing for it to work. If there is anyway for you to see in your environment as to what it needs, then I'd appreciate your thoughts

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024

Maybe worth trying this, it is currently set as a receiver.

You can override the device_class in customize.yaml (also possible from the UI somehow):

media_player.living_room_tv:
  device_class: tv

from home_assistant_skyq_mediaplayer.

snakuzzo avatar snakuzzo commented on August 15, 2024

I need just to turn on/off the SkyQ.
I tried to use device_class: tv but I had this strange behaviour (video)
For now I solved creating a universal media player entity...and I'm exposing this entity

media_player:

  - platform: universal
    name: universal_sky
    children:
      - media_player.sky
    commands:
      turn_on:
        service: media_player.turn_on
        data:
          entity_id: media_player.sky
      turn_off:
        service: media_player.turn_off
        data:
          entity_id: media_player.sky

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024

Ok, I’ll try and do the same and see what looks different. The pain will be setting up GA because it looks quite complex to get going.

from home_assistant_skyq_mediaplayer.

snakuzzo avatar snakuzzo commented on August 15, 2024

It's not complex ;)
There's a step.-by-step guide.

But...as I said in my first post, I don't know if there is a bug on your side...Google sometimes "makes jokes" :)
Just 2 days ago I had a problem with voice commands on every google home...and yesterday everything started working again, just like a magic!

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024

OK, I followed the 'step-by-step' guide, which went on for a while. To be honest I have no visibility as to whether it is hooked up or not. When I try to test in the Google Simulator to 'Discover Devices' I just get an 'Invocation Error' which says I can't test standard Google Assistant features in the simulator. So I suspect I need to go out and buy an android phone or some other device to test it. I'm afraid this is edging towards the 'too hard' pile, especially since you have a work around.

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024

Maybe worth trying this, it is currently set as a receiver.

You can override the device_class in customize.yaml (also possible from the UI somehow):

media_player.living_room_tv:
  device_class: tv

Having installed Google Home on my iPad, the above worked for me and the sky boxes were shown as TVs in Google Home. To me this is wrong, it shouldn't be needed, because the device is correctly listed as a Receiver in HA, and show in Google Home as an AVR.

The Sonos devices which have no device_class assigned to them in HA seem to work find and show in Google Home as Set Top Boxes.

When setting the above in customize.yaml, don't forget you will then need to include it into your config.

homeassistant:
  customize: !include customize.yaml

from home_assistant_skyq_mediaplayer.

snakuzzo avatar snakuzzo commented on August 15, 2024

I already tried in the past days.
Tried again few minutes ago with and without device_class... no way to control my SkyQ :(

Just a thing...
I create "on demand" my package with media_player entity (following your instructions) using my bash script and SkyQ local API to get all available channels...

#!/bin/bash
IP="192.168.1.15"
NAME="Sky"
DIR="/config/packages"
FILE_MP="skyq_mediaplayer.yaml"
FILE_CH="skyq_channels.yaml"

echo "Creating/Updating ${DIR}/${FILE_MP} file..."

echo "
media_player:
- platform:  skyq
  name: ${NAME}
  host: ${IP}
  #output_programme_image: False
  live_tv: False
  country: "ITA"
  #generate_switches_for_channels: true
  sources:" > ${DIR}/${FILE_MP}

echo "Getting SkyQ channel list..."

BODYRESPONSE=$(curl -s --location --request GET ${IP}:9006/as/services)

echo "Updating channel list..."

services=$( jq -r '.services' <<< "${BODYRESPONSE}" )

for row in $(echo "${services}" | jq -r '.[] | @base64'); do
    channelName=`echo ${row} | base64 -d | jq -r ${1} '.t' | tr -d ' ' | tr -d \' | sed 's/#//'`
    channelNr=`echo ${row} | base64 -d | jq -r ${1} '.c'`
    channelNrCmd=`echo ${row} | base64 -d | jq -r ${1} '.c' | sed 's/\(.\{1\}\)/\1,/g' | sed 's/.$//'`
    
    echo "    "${channelName}_${channelNr}: \'${channelNrCmd}\' >> ${DIR}/${FILE_MP}

done
echo "Done!"

this is the "partial" result...

media_player:
- platform:  skyq
  name: Sky
  host: 192.168.1.15
  #output_programme_image: False
  live_tv: False
  country: ITA
  #generate_switches_for_channels: true
  sources:
    SkyTG24HD_100: '1,0,0'
    Rai1_101: '1,0,1'
    Rai2_102: '1,0,2'
    Rai3_103: '1,0,3'
    Rete4HD_104: '1,0,4'
    Canale5HD_105: '1,0,5'
    ...
    ...
    ...
    RadioSwissPop_8892: '8,8,9,2'

The package include about 730 different channels.
On Home Assistant no problem...everything works fine.
Can this create problems on GH? As you can see, consider I'm not exposing channels to GH as switches.

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024

I doubt it will cause a problem, as long as you reboot HA after the YAML file. I don't use Google Home, so have no experience of it apart from testing this.

With regards the device class, make sure it shows correctly in the state list in developer tools tabs to make sure it is applied correctly. The entity should then appear in Google Home as a TV. If it doesn't then your customisation hasn't worked.

from home_assistant_skyq_mediaplayer.

snakuzzo avatar snakuzzo commented on August 15, 2024

Without device_class I see SkyQ like this...
image

If I use device_class: tv on GH I see SkyQ as a TV
image

but when I try to control...look at this video

from home_assistant_skyq_mediaplayer.

snakuzzo avatar snakuzzo commented on August 15, 2024

Tried also without channels... nothing...same result

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024

Try configuring one via the GUI. The Sky Q box below works fine, the Mini does not. Only difference is I overrode the device_class.

Screenshot 2021-08-05 at 08 17 36

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024

I also configured one via YAML and then overrode the device_class, and it worked fine. Have you checked for errors in the event log?

from home_assistant_skyq_mediaplayer.

snakuzzo avatar snakuzzo commented on August 15, 2024

On HA log no errors

from home_assistant_skyq_mediaplayer.

RogerSelwyn avatar RogerSelwyn commented on August 15, 2024

OK, so It's not clear to me what the issue is, but it looks to be something to do with your setup. I'm afraid I'm not going to be able to resolve this issue for you. Sorry.

from home_assistant_skyq_mediaplayer.

snakuzzo avatar snakuzzo commented on August 15, 2024

No problem @RogerSelwyn.
I will try again in next days. If I will find something....I will let you know ;)

from home_assistant_skyq_mediaplayer.

snakuzzo avatar snakuzzo commented on August 15, 2024

I close the issue for now

from home_assistant_skyq_mediaplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.