Home-Assistant Custom Component

Discussion in 'General Development' started by wizmo, Oct 13, 2021.

  1. lawdawg

    lawdawg Active Member

    Cool stuff, might have to break out the Zidoo and give it a try (I have been using a firetv 3 cube because I just had enough of HT4 quirks, media scan, limitations compared to Plex server and official client combo.) but stuff like your work here is awesome!
     
    wizmo likes this.
  2. ZidooFan2

    ZidooFan2 New Member

    This is awesome! I'm fairly new to HA. Is there a way to make the browse media window bigger?
     
  3. wizmo

    wizmo Member

    The Media tab (from the LH menu bar) takes you to a full screen browser.
     
    ZidooFan2 likes this.
  4. ZidooFan2

    ZidooFan2 New Member

    Is it possible to trigger off of when a specific movie starts playing? I see the following attributes that are being reported:

    Is Volume Muted
    Media Content Type
    Media Position Updated At
    Media Season
    Media Episode
     
  5. wizmo

    wizmo Member

    Look at the media_title attribute. (filename or the move db title)

    What are you actually wanting to achieve with the automate? The 'main' beta has some additional fields including the video size and format, There is other info I can expose as an attribute. for example, something more unique like the file url, or the movie db id.
     
  6. ZidooFan2

    ZidooFan2 New Member

    In the version I have, the media_title attribute is not exposed, at least not as an option for the visual automation configuration.

    I'm trying to trigger specific criteria off of a specific movie. For instance, let's take The Fifth Element UHD as an example. It is mastered at 10,000 nits and most DTM doesn't play nicely, resulting in a washed out picture. I'd like to tell my projector to set it's DTM to a specific level when that movie is playing and then change back once it stops.
     
  7. wizmo

    wizmo Member

    Many of the custom attributes for the media player are only available when a particular source is playing. If you start a new Automation while a movie is playing, the movie specific attributes should be listed.

    I have just updated the 'main' beta release with some extra custom attributes including the uri, bitrate, audio and video out formats. Thinking you maybe able to do something with one or more of these.
     
    ZidooFan2 likes this.
  8. ZidooFan2

    ZidooFan2 New Member

    Is the name of the movie just the name that is displayed in the HA media browser?
     
  9. wizmo

    wizmo Member

    the `media_title` attribute is either the filename or the db movie title from HT4. The db title is only displayed when playing (when paused its the filename). The HA Media Browser displays the db title in the Movie folder, and the filename in the Directory and Share folders
     
    ZidooFan2 likes this.
  10. mrstinky

    mrstinky New Member

    Legendary integration!

    Any way to omit which folders are shown when browsing media to play to the media player?
     
  11. wizmo

    wizmo Member

    Not right now.
    I did look at including shortcuts to specific folders, but it made the integration a little complex. I ended up using 'Navigation' links to the relevant HA Media Browser page (see github discussions https://github.com/wizmo2/zidoo-player/discussions/13). Disclaimer - I have to admit , there are some issues during initialization that I have not had a chance to look at with the this technique!
     
  12. mrstinky

    mrstinky New Member

    Is there any way to add playback of a specific and also a random file from a folder/show/whatever via automation or script with this?

    Thanks again for making this. Much easier to select videos this way without having to use my broadlink to send remote IR codes for navigation.
     
  13. wizmo

    wizmo Member

    you can use the Media player: Play media service to play a specific file. You can use the url for the file or the media id. Not aware of a random play function, but the automation and customization within HA, I'm sure its possible.
     
  14. wizmo

    wizmo Member

    Went ahead and released the previous changes along with some new features associated with Music Player support. (v1.4.0)

    Browsing Music Player information has been available in the beta version for a while. You will need to add the Music, Artist, Album, and Playlist shortcuts in the device configuration to see them in the Media browser panel.

    Music (and movie) Browsing is pretty useless on large media collections without some type of search capabilities, which HA does not provide out of the box. This release includes a custom card to address this. The readme has been updated on how to install and use the custom card.

    Let me know if anyone has any issues with any of the new functions. (It's been fairly well tested, but I don't use the zid00 for playing music. With all the new Zidoo devices moving in this direction I figured it was time to release)
     
    Sledgehamma likes this.
  15. LenniePaz

    LenniePaz Member

    Is there an easier way to install this than the manual way described on GitHub? I'm new to all this HA and I don't understand how to do that manual install. I just picked up a Z9X and I'm trying to control the lights in my movie room with Play, Pause, and Stop. My Z9X only gets discovered in HA as an ATV for some weird reason and I can't control it from HA
     
  16. wizmo

    wizmo Member

    HACS is the easiest way to install the integration, although installing this (https://hacs.xyz/docs/setup/download) is not the simplest.
    Once this is done, installing the Zidoo integration is straight forwards.
    To add a device, you currently do need the IP address of the unit.
     
  17. LenniePaz

    LenniePaz Member

    Thank you. I was able to figure out how to install HACS and install the Zidoo integration. I'm able to control my lights with button presses but there is a delay of about 5 seconds for the lights to react. Is there any way to get them to react instantly? They were instant when I had it set up on my Shield.
     
  18. wizmo

    wizmo Member

    have a look at https://github.com/wizmo2/zidoo-player/blob/main/notes.md and the 'rapid update' section. You may want to use a not "off" condition, to make play and pause more responsive.

    Have not found access to push events on the Zidoo (which the Nvidia may have) but hopefully this method will work for you.
     
  19. LenniePaz

    LenniePaz Member

    I checked out the rapid update section. I looked at the integration but I don't see where those changes are to be made. Do I need to use Terminal to change the settings?
     
  20. wizmo

    wizmo Member

    This is the yaml setup in configuration files. If your not familiar with this you can use the Settings menu to add the automation.

    1. Go to Settings / Automations & Scenes
    2. Press '+ Create Automation' button and select 'Create New Automation'
    3. In the Trigger section add a TIME PATTERN and enter '/1' for every 1 second
    4. In the Condition section add a NOT
    5. Under the NOT, add a STATE Condition, set the Zidoo media_player entity, and enter 'off' in the state
    6. In the Action section add a CALL SERVICE, set the service to 'Home Assistant Core Integration: Update entity', press Entity to select the media player as the target.
    7. Press the Save button

    It should look something like this
    upload_2023-8-25_15-43-57.png
     

Share This Page