I was seeing the same issue, with the play/pause. If I really hammer my z9X multiple times a second while playing a 4K movie, I can replicate the playing/idle/off issues with the latest code. With 1 second calls it does not seem to be an issue, although I am connected over WiFi and run HA on a RPi3. I do see where the potential problem is, but any resolution is a little more involved. I have opened an issue in Github and will investigate further. In the meantime, I would suggest you do a full reboot (power on/off) on the player and home-assistant. Make sure your automation is in "Single" mode. If you override the update at all times (without a condition), try disabling the automatic polling using the System Options in the Zidoo Integration settings card.
Thanks for all your effort I was not aware of the Automatic Polling option of the integration itself, so when I disabled this and only let the automation run every second it seems stable from my first testing and there is no jumping between states. I added a condition for the automation, so it's not constantly hammering the Zidoo.
@Kcoenen I recently moved from an anamorphic lens to a zoom setup on my projector. With this I have to apply both a zoom and a mask via another HA integration, vs a simple command to switch anamorphic modes on the projector. That all works out very well, but I am running into the same issue you described in this thread - HA reports the Zidoo is flipping back and forth to play/idle state. When it was just the lights in the room coming on occasionally I could deal with that, but now the projector is zooming in and out, which is a WTF moment when watching a movie I am trying to replicate what you have done with your automation, to avoid the state polling issue, but its not clicking for me. Any chance you could share your YAML, and/or a few screenshots from the GUI to help me get over the hump?
@wizmo While I'm digging into the state concern, I am also thinking about a way to not rely on IR commands or bluetooth keyboard commands to control the Zidoo from a remote. Is there a way to execute the commands tied to the physical remote buttons, using your integration? Like say the red button, play button, fast forward, etc? And if so can you help me find a list of the "remote" commands? Thanks!
Under "Devices and Services", I opened the "System Options" of the Zidoo Integration (using the three dots) and then disabled the option "Enable polling for updates". I then created an automation that whenever my Harmony is turned on with the Zidoo, the status of the player needs to be updated every second. The status of the lights is controlled using an automation in NodeRed, but it's basically nothing more than if the Zidoo Status is playing turn off the lights, and when idle or paused turn the lights back on (with an extra check after 5 seconds). 9 out of 10 times this mechanism works perfect, and only a few times I get a "wrong" status when pressing the play button after resuming, but this could also be caused by the second check I do after 5 seconds.
Let me look back into this in the next day or so. I did reproduce the issue on my Z9X where the API reported the wrong state (I assume it's an overrun problem). I added a kludge at the time, but was not particularity happy with it.
On the remote button calls, the api wrapper does support all the remote button calls listed here. I look at adding a service call to the integration on the next release. This would allow calls from automations.
beta-110922 is available through HACS beta for testing. The api wrapper has been reworked to try and address the rapid update issues reported. It also has a new service to support raw button keys. Please give it a try and let me know if you see any issues.
Thanks, installing now. first I’ll tenable my automations that were dependent on the zidoo state being idle (lights and projector or zoom/mask.) Is it okay to leave the “enable polling for updates” option on now?
First tests are going well. I’ll keep an eye on it to see how consistent it is and if I see in issues with reporting the wrong state, or flipping back and forth.
Last report before I head to bed. Keypresses seem to be working well. I am looking forward to using discrete Play and Pause commands. Thanks for your great work!
Hi Wizmo, Major upgrade has happened to my cinema room. I Bought a screen with motorized masks. It would be awesome if the 3000 could somehow make available the video output format (16:9, 2.35:1 or 1.90:1). Something like what Kaledascape players do through they're RS232 ports, so I can use HA to automatic adjust the screen's mask. Do you think its possible ? How ? Thankx Carlos
The API provides - output resolution - raw video resolution - zoom mode Basically, whats is displayed when pressing the info button. I could add some or all of these to the media_player attributes, but I'm not sure if any of them will do what you want. My unit is set to upscale so the output resolution is always 4k 16:9, regardless of the video resolution or Zoom mode. There are api commands to change the zoom mode. I could look at adding this as a service if it would help.
Thankx Wizmo, mine is not upscaling I would only need the picture format 16:9, 2.35:1 or 1.90:1, 1080p or 4K is irrelevant for the mask position . a bit off topic; have you tried a 1080p movie without upscaling ? I find the 1080p without upscaling so much better .. and less grainy overall.
@carlos ventura try the 'main' branch (beta). I added a couple of extra attributes to the media_player, including the video resolution (media_width and media_height). On the assumption that you are using Zoom Fit or Original modes, you should be able to use these to create a script or automation to calculate which aspect ratio you want to use on your screen. For example, Code: template: - sensor: - unique_id: zidoo_aspect_ratio name: Zidoo Aspect Ratio state: > {% set width = state_attr('media_player.zidoo', 'media_width')|float(0) %} {% set height = state_attr('media_player.zidoo', 'media_height')|float(1) %} {% set ratio = (width / height)|round(2) %} {% if ratio >= 2.35 %} 2.35:1 {% elif ratio >= 1.9 %} 1.90:1 {% elif ratio >= 1.77 %} 16:9 {% else -%} 4:3 {% endif %} Update: I just added media_zoom so you can add a condition in your automation