Home-Assistant Custom Component

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

  1. LenniePaz

    LenniePaz Member

    Thank you! I'll give it a try and report back.
     
  2. LenniePaz

    LenniePaz Member

    Just checked out the lights and they are instant now with the button presses. Thanks again for your help!
     
  3. NoBiluS

    NoBiluS New Member

    Thanks for your Job !

    I'm stuck on an automation between the zidoo and my Hue lighting.
    Just as I created an automation to turn off the lighting when the film starts, and one to turn the lighting on to 50% when the film is paused, I would like to have an automation that resets the lighting to 100% when I stop playing a film and I return to the zidoo menus.
    I tried with the "Z1000 Pro becomes inactive" trigger (idle function?), it works, but... when I turn on the zidoo it automatically turns on the lighting, and I'm just trying to turn the lighting back on when I stop playing the film.
    Any suggestion ?
    if I manually modify the automation by putting "stop reading" or else, it refuses to validate...
     
  4. mrstinky

    mrstinky New Member

    try this for the lights turning off when the film starts (create new automation, click dots in top right, edit in yaml and then paste this in and modify entity names as needed);
    Code:
    description: "zidoo lights off when playback starts"
    mode: single
    trigger:
      - platform: state
        entity_id:
          - media_player.z9x
        to: playing
    condition: []
    action:
      - service: light.turn_off
        data: {}
        target:
          entity_id: light.bedlightstrip_light
    
    and then try this for paused (i would use a scene but you can probably do it with toggle. you just gotta make the scene in the hue app and then it should detect in home assistant);
    Code:
    description: "zidoo lights on when paused"
    mode: single
    trigger:
      - platform: state
        entity_id:
          - media_player.z9x
        to: paused
    condition: []
    action:
      - service: hue.activate_scene
        data: {}
        target:
          entity_id: scene.bedroom_concentrate
    
    and then maybe try this for going from playback back to the menu screen to activate another scene;
    Code:
    description: "zidoo lights on when exiting playback"
    mode: single
    trigger:
      - platform: state
        entity_id:
          - media_player.z9x
        to: idle
        from: playing
    condition: []
    action:
      - service: hue.activate_scene
        data: {}
        target:
          entity_id: scene.bedroom_concentrate
    
     
  5. NoBiluS

    NoBiluS New Member

    Look, this is my actually automation :

    Code:
    platform: device
    device_id: 494522191a6495720e971bca5bd7b6e2
    domain: media_player
    entity_id: 91e7cfdd51b078dcd3dbc9d5dc155e49
    type: playing
    for:
      hours: 0
      minutes: 0
      seconds: 3
    type: turn_off
    device_id: 25e4c75d6ce2c02899acd028256a37db
    entity_id: eb3e41b9caab2fab7346616da4222094
    domain: light
    type: turn_off
    device_id: bc8bdfc3dab3dce69fdc27711571e10a
    entity_id: 97b4e344e81cb7a7fbb07183695a05de
    domain: light
    
    Code:
    platform: device
    device_id: 494522191a6495720e971bca5bd7b6e2
    domain: media_player
    entity_id: 91e7cfdd51b078dcd3dbc9d5dc155e49
    type: paused
    type: turn_on
    device_id: 25e4c75d6ce2c02899acd028256a37db
    entity_id: eb3e41b9caab2fab7346616da4222094
    domain: light
    brightness_pct: 50
    type: turn_on
    device_id: bc8bdfc3dab3dce69fdc27711571e10a
    entity_id: 97b4e344e81cb7a7fbb07183695a05de
    domain: light
    brightness_pct: 50
    
    Code:
    platform: device
    device_id: 494522191a6495720e971bca5bd7b6e2
    domain: media_player
    entity_id: 91e7cfdd51b078dcd3dbc9d5dc155e49
    type: idle
    type: turn_on
    device_id: 25e4c75d6ce2c02899acd028256a37db
    entity_id: eb3e41b9caab2fab7346616da4222094
    domain: light
    brightness_pct: 100
    type: turn_on
    device_id: bc8bdfc3dab3dce69fdc27711571e10a
    entity_id: 97b4e344e81cb7a7fbb07183695a05de
    domain: light
    brightness_pct: 100
    
    The pb is that in idle mode, lights up when i start the zidoo,
    and not only when I stop playing the film...

    I will try with your code :
    to: idle
    from: playing
     
  6. NoBiluS

    NoBiluS New Member

    Hello

    I tested this :
    Code:
    
    alias: Ciné Light On
    description: Zidoo allume éclairage lorsque lecture stoppée
    trigger:
      - platform: state
        entity_id:
          - media_player.z1000_pro
        to: idle
        from: playing
    condition: []
    action:
      - type: turn_on
        device_id: 25e4c75d6ce2c02899acd028256a37db
        entity_id: eb3e41b9caab2fab7346616da4222094
        domain: light
        brightness_pct: 100
      - type: turn_on
        device_id: bc8bdfc3dab3dce69fdc27711571e10a
        entity_id: 97b4e344e81cb7a7fbb07183695a05de
        domain: light
        brightness_pct: 100
    mode: single
    
    
    it doesn't work. Thks !
     
  7. wizmo

    wizmo Member

    Check to see what's happening in the HA Developer Tools/State menu. The standard states are "playing', "paused" and "idle" when playing Movies.

    NOTE: Try to avoid using Music Player. If it has been started, the HA media player state will fall back to the separate music player state. Zidoo allows this to run in the background, and will show "paused" unless you actually empty the music queue. You can empty the queue with the HA service `media-player:media_stop` service , but you'll have to get creative with that (and possible the media_content_type attribute)!
     
  8. ncc1701e

    ncc1701e New Member

    I have one Q.
    How do i use"Zidoo button key command list" i want to add a button to send the "Key.Back"
     
  9. wizmo

    wizmo Member

    Last edited: Dec 12, 2023
  10. wizmo

    wizmo Member

    Is anyone using the HA integration with the latest RTD1619BPD players (z9xpro,z20 etc)?
    Don't have access to a unit and a user has reported a potential issue with a Z20. Right now, I'm thinking it is HA issue, but would be helpful if I knew if the API works on this platform.
     
  11. Sledgehamma

    Sledgehamma Well-Known Member

    Anything specific that I should test?
    [​IMG]
    Browsing not working and I dont see background image (I sued the top right control for that, see below picture)

    [​IMG]
    Left control shows background but playback controls are missing and pressing "pause" has no effect.

    //edit:
    Forget what I said. I had to update everything first, sorry!
    Card looks correct now:
    [​IMG]

    After pausing for some time the card shows the filename instead of Episode name and I have to press play twice before playback resumes:
    [​IMG]
     
    Last edited: Jan 7, 2024
  12. wizmo

    wizmo Member

    Thanks for the feedback.
    The filename when paused thing was originally by design. May need to rethink
     
  13. Sledgehamma

    Sledgehamma Well-Known Member

    Finally got my Remote Two by unfolded circle so I’m going to properly test your integration with it over the weekend.
     
  14. wizmo

    wizmo Member

    I looked at DIYing the original one (since I missed the kits) but never found the time. Would be interested in hearing your feedback on the TWO (to see if it justifies the price tag).
     
  15. Sledgehamma

    Sledgehamma Well-Known Member

    The remote feels absolutely great and I love the big display. Its certainly way sharper than my old Logitech remote but not "retina" like.
    Playback progress report on the remote itself is awesome!
    Having said that, the remote was super buggy to set up. Webinterface was disconnecting all the time, took ages to connect the dock to my wifi....
     
    Last edited: Jan 12, 2024
  16. Sledgehamma

    Sledgehamma Well-Known Member

    The playback time is displayed incorrectly, the progress bar is correct, though:
    [​IMG]
    Watching a 44 minute episode
     
    Last edited: Jan 12, 2024
  17. wizmo

    wizmo Member

    Will take a look. I'm working on a major release so will try an add it with the beta.
     
    mrstinky and Sledgehamma like this.
  18. Sledgehamma

    Sledgehamma Well-Known Member

    Just read it on GitHub :)
    Awesome!
    I also have some strange play/pause behavior but will see if the new remote entity will change that.
    Feedback for that best here or via GitHub?
     
  19. wizmo

    wizmo Member

    Alert system on GitHub is more reliable
     
    Sledgehamma likes this.
  20. mrstinky

    mrstinky New Member

    What's in the pipeline for the next major release?
     

Share This Page