Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New App Shortcut]: Emby #18

Closed
1 task done
michaelhenningersrb opened this issue Nov 21, 2022 · 28 comments
Closed
1 task done

[New App Shortcut]: Emby #18

michaelhenningersrb opened this issue Nov 21, 2022 · 28 comments
Assignees
Labels
enhancement New feature or request New App Shortcut Request for a new Firemote app shortcut

Comments

@michaelhenningersrb
Copy link

App Name

Emby

Can this app be freely downloaded through official means?

  • Yes

Optional Comments

No response

@michaelhenningersrb michaelhenningersrb added enhancement New feature or request New App Shortcut Request for a new Firemote app shortcut labels Nov 21, 2022
PRProd added a commit that referenced this issue Nov 22, 2022
New App shortcuts pre-release for community testing
 - CyberGhost #19
 - Emby #18
 - Zattoo #14
@PRProd
Copy link
Owner

PRProd commented Nov 22, 2022

Pre-release v1.8.8 is now available for testing. Please download the new version and let me know if the emby app shortcut is working as expected. Thanks.

@PRProd PRProd added this to the In Pre-Release For Testing milestone Nov 22, 2022
@michaelhenningersrb
Copy link
Author

@PRProd Works ;) Thanks a lot

PRProd added a commit that referenced this issue Nov 23, 2022
- Added support for the Amazon Cube 3rd Gen
 - Added app shortcut for ShopHQ app
 - Added official app shortcut for CyberGhost VPN app #19 @jamhotld
 - Added official app shortcut for Emby app #18 @michaelhenningersrb
 - Added official (unconfirmed) shortcut for Zattoo app #14 @Icecoke7
 - Code Cleanup: alphabetically sorted apps in JSON object and CSS block
 - Updated README.md
@PRProd
Copy link
Owner

PRProd commented Nov 23, 2022

Thanks!

This is now available in the Firemote official release v1.9.0

@PRProd PRProd closed this as completed Nov 23, 2022
@ChristophCaina
Copy link

Hi,
I've just tested this card with my Android TV Remote (basic remote control.
So far, it is working pretty much perfect...

I've added the following Apps:

--> jellyfin (working)
--> prime video (working)
--> netflix (working)
--> youtube (working)
--> emby (not working)

unfortunately, the Shortcut for Emby seems not working...
The remote is from Nokia (Streaming Box 8000) - but as far as I could see, all controls are working so far... so the only difference seems to be calling the EMBY App...

image

@PRProd PRProd reopened this Mar 27, 2023
@PRProd
Copy link
Owner

PRProd commented Mar 27, 2023

@ChristophCaina - Let's diagnose the problem! Could you open the emby app on your Nokia Streaming Box 8000, follow the steps listed here, and post your results?

@ChristophCaina
Copy link

Hi :)
thanks for the quick response ... :)

I'm still learning all the stuff related to ADB... since I've just started with this whole thing yesterday... :D

Hope, that this is correct?

adb_response: >-
  mSurface=Surface(name=tv.emby.embyatv/tv.emby.embyatv.browsing.MainActivity)/@0x25aede
        mSurface=Surface(name=com.android.systemui.ImageWallpaper)/@0x242014e

@PRProd
Copy link
Owner

PRProd commented Mar 27, 2023

Hmmm... puzzling. I'm not quite sure why it's not working based off of what you sent me. Could you try that process again, but this time send me all of the data in the Attributes field? (not just the adb_response)

@ChristophCaina
Copy link

sure :)
Here it is:

source_list:
  - Android TV Launcher
  - Spotify
  - Google Cast
  - Magenta TV
  - Emby
  - Jellyfin
  - Play Store
volume_level: 0.13333333333333333
is_volume_muted: false
adb_response: >-
  mSurface=Surface(name=tv.emby.embyatv/tv.emby.embyatv.browsing.MainActivity)/@0x9e7b81c
        mSurface=Surface(name=com.android.systemui.ImageWallpaper)/@0x242014e
hdmi_input: null
device_class: tv
entity_picture: >-
  /api/media_player_proxy/media_player.android_tv_192_168_52_73?token=a1a1dac6014c8cb9c0b5bf54651689dddfd1396ddd6d2843bad3b9d9d7e357f3&cache=1679945229.963202
friendly_name: Android TV
supported_features: 23997

compared with another app which is working (Jellyfin)

source_list:
  - Android TV Launcher
  - Spotify
  - Google Cast
  - Magenta TV
  - Emby
  - Jellyfin
  - Play Store
volume_level: 0.13333333333333333
is_volume_muted: false
adb_response: >-
  mSurface=Surface(name=org.jellyfin.androidtv/org.jellyfin.androidtv.ui.startup.StartupActivity)/@0x19f0db3
        mSurface=Surface(name=com.android.systemui.ImageWallpaper)/@0x242014e
hdmi_input: null
device_class: tv
entity_picture: >-
  /api/media_player_proxy/media_player.android_tv_192_168_52_73?token=a1a1dac6014c8cb9c0b5bf54651689dddfd1396ddd6d2843bad3b9d9d7e357f3&cache=1679945319.967976
friendly_name: Android TV
supported_features: 23997

@PRProd
Copy link
Owner

PRProd commented Mar 27, 2023

Wow! That's certainly different! For some reason, there are missing entries in that dump that all other devices I've encountered seem to have, specifically app_id, source, and the 2nd half of the ADB response:

image

I might have a solution to that problem, but I'll need some time to work on it. I'll let you know when I have something available for you to test if you are willing to help. I don't yet own a Nokia Streaming Box 8000 to test with.

@ChristophCaina
Copy link

what I don't understand in that case:
Why are the other buttons working then?

I know, there are other issues with this device, since the media player / android tv integration is also not working as expected...
In case that it help: The device is based on Android10 ...

I'm looking forward to support and test on that device :)
Beta is already enabled ;)

@PRProd
Copy link
Owner

PRProd commented Mar 27, 2023

Other things aren't working with the integration? Hmmm... I wonder if your Android device needs to be removed and re-added into Home Assistant. Do you remember what you chose when you first added it? auto or androidtv - I wonder if you'll have different results if you try one, then remove it, and then try the other.
image

image

@ChristophCaina
Copy link

ChristophCaina commented Mar 27, 2023

good point :)
I think, I've used "auto"...

I'll try to remove it and add it again.

EDIT:
SO, I installed the integration again (but without restarting HA after uninstalling the app)...
Now, It seems that on hitting "Play" on the Media-Player, its starting to stream spotify - which I've played earlier... But the mediaplayer still cannot switch between the sources and / or display the state (playing / pause, etc.)

It seems, that there is some incompatibility with the Android 10 based devices and this integration.
Therefore, the remote-control was my approach to "workaround" this, since I can controll most of the device functions with it...

@ChristophCaina
Copy link

btw:
here's the EMBY application logo :)
I think, it would still look better with that icon ;)

image

https://www.pngegg.com/en/png-semtj

@PRProd
Copy link
Owner

PRProd commented Mar 27, 2023

Unfortunately, that's a .png file and I actually need a .svg, of the smallest possible file size. I looked for a little while yesterday, but gave up and moved on since I had others to find. Feel free to post one if you find it! (as long as it has a small file size!)

I had a very similar conversation with @jrspowers today already.

@ChristophCaina
Copy link

something like this?
https://www.svgrepo.com/svg/330370/emby

@PRProd
Copy link
Owner

PRProd commented Mar 27, 2023

Yes, but with the word emby next to it

@ChristophCaina
Copy link

ah okey ... can you please have a look if this would be ok?
It might not be 100% accurate....

OmLzxEm_adobe_express

@PRProd
Copy link
Owner

PRProd commented Mar 27, 2023

THANKS!! That'll work! I got the 14.3kB file down to 2.9kB too!

PRProd added a commit that referenced this issue Mar 28, 2023
Xiaomi Mi Box Beta 2

Changes:
 - Added additional SVG logos
 - Test fix for emby launch command (needs testing #18 @ChristophCaina)
 - Added Telenet TV shortcut (needs testing #56 @jrspowers)
 - Added Magenta TV shortcut (needs testing #58 @ChristophCaina)
 - Fixed a few SVG namespace collisions
- Enabled app launch access for TVNZ+ and Three Now on all devices (#55
@moh-Brent - needs testing)

Not finished yet:
 - warning dialog/confirmation before executing a restart function
@PRProd
Copy link
Owner

PRProd commented Mar 28, 2023

@ChristophCaina Version 2.1.0-beta2 is ready for you to download and test! It has the shiny new logo on it too!

@ChristophCaina
Copy link

thanks :)
Button looks great - unfortunately, it seems that it still doesn't start the emby app... :-(

I will do some more tests tomorrow... here it is already 3:00 am - so I should go to bed :D

@PRProd
Copy link
Owner

PRProd commented Mar 28, 2023

Thanks for staying up so late with me yesterday! Let's try a slightly different approach today. Please run the following command in the Developer Tools console, and let me know if this command will launch emby properly:

adb shell am start -a android.intent.category.LEANBACK_LAUNCHER -d -n tv.emby.embyatv/.startup.StartupActivity

Developer Tools -> Services -> Android TV: ADB command
image

@ChristophCaina
Copy link

that was satisfying :)
worked well with the command

@PRProd
Copy link
Owner

PRProd commented Mar 28, 2023

YAY!!! That change will be in the next release, either the Beta or the Official. I'll let you know when it's ready to test. THANKS!

@ChristophCaina
Copy link

hm... not sure if this needs to be implemented for the existing devices (I don't know, if it is failing with shield or so)
Maybe... release it as an beta with an alternate device - just to be sure not breaking something for working shield devices?

@PRProd
Copy link
Owner

PRProd commented Mar 28, 2023

I have a high confidence that this will work properly on all other devices. In fact, adb launch commands like this one will typically generate a MUCH faster response from your device, so this will be an improvement for emby app launch users.

I always try to use a command like this to launch applications, but my first attempt at it for emby resulted in a permissions error. I defaulted back to one that I know "always works", and everything was OK... until it met your Nokia device. 😄

PRProd added a commit that referenced this issue Mar 28, 2023
Changes:
- Default event changed for Mi Box S from event3 to event2.  This could
have been the cause of the report from @moh-Brent in #55 that the
"apps-button" was not doing anything
- On the topic of the apps button not working, I replaced the Xiaomi
command tied to that button with an adb start command which does not
require a proper "event" number to be selected, and is faster than a
"Strong" config.  Hopefully I've double solved this issue.
- Adjusted the launch command for the emby app as reported by
@ChristophCaina in #18 to be problematic.  This change should make it
more stable and even faster for everyone who uses it.
- Adjusted the launch command for Magenta TV as reported by
@ChristophCaina in #58.  This needs testing/confirmation.
- Added a confirmation dialog before executing a function: restart
button press command as noted by @moh-Brent in #55 (good call Kiwi)

Not finished yet:
 - nothing!  (let me know if I missed something)
@PRProd
Copy link
Owner

PRProd commented Mar 28, 2023

v2.1.0-beta3 is ready for you to download and confirm that it's working now. Please let me know.

@ChristophCaina
Copy link

ChristophCaina commented Mar 28, 2023

thanks for the effort.
I am not sure - but at the moment, it still seems not working as expected :-(

I've updated to beta3 - removed the card and re-added it to the dashboard, but the emby button still does not work :-(
I will try to remove the card completely and reinstall it again - it might still be an issue with my "not yet" supported hardware...?

EDIT / UPDATE:
After removing the Card and adding it again, I can confirm that the EMBY button seems to work.
Device: Shield PRO 2019 - on a Nokia Streaming box :)
Thanks for the effort 👍

@PRProd
Copy link
Owner

PRProd commented Mar 28, 2023

SWEET!!!!!

Home Assistant has a very very sticky cache, so sometimes when you've done everything you can think of to try to clear it, TWICE, it still wants to use the cache that shouldn't even exist anymore. I have a rhythm of keystrokes that I just do now without thinking about them since development takes a lot of writing / testing / rewriting / retesting... without my cache purge routines, I wouldn't get anywhere with a cache that doesn't want to forget my mistakes. Sometimes destruction (like deleting your card and adding it again) can do the trick. Glad it worked for you in this case!

I'm going to re-close this issue now since we're confident that it works. Thanks for your help!

@PRProd PRProd closed this as completed Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request New App Shortcut Request for a new Firemote app shortcut
Projects
None yet
Development

No branches or pull requests

3 participants