wizmo2 / zidoo-player

Home-assistant custom component and api wrapper for Zidoo Media Players
20 stars 4 forks source link

Unable to add integration in home assistant #2

Closed Mr-Lucas closed 2 years ago

Mr-Lucas commented 2 years ago

I am able to add this integration (Version 1.2.4) via HACS, and reboot Home Assistant. However, the integration does not appear when I attempt to +Add Integration, under the home Assistant configuration/integration area.

Should I try an older version?

wizmo2 commented 2 years ago

Please try and clear your browser cache and then refresh the page. (I have read that this can sometime be an issue after adding 3rd Party integrations)

Are you able to confirm if the files were installed correctly? (Should be a folder called zidoo in the config/custom_components directory)

What version of HA are you using?

Mr-Lucas commented 2 years ago

Clearing the browser cache in Edge and refresh did not resolve the issue. I also tried it in the Brave browser, where I had yet to use HA, no go.

There is not a zidoo folder in the config/custom_components directory.

I know that I can add custom components in HA, as I added an integration for my JVC projector today. It shows up in HA, and in the config/custom_components directory.

Version is core-2021.11.5

Screenshots of your component showing installed in HACS. image image

Thanks for the quick reply!

wizmo2 commented 2 years ago

There is something wrong with the releases, but don't know what yet. They don't download on my test system either!

The pre-release "dev" version will download if you want to try it out. Just watch out for the auto discover (There's no user input right now!)

Mr-Lucas commented 2 years ago

I'll hang for a bit until you get it sorted. If you want me to test anything, let me know.

wizmo2 commented 2 years ago

Should be good now. I had to delete and rebuild all the releases, as there was an issue with the HACS configuration file.

Unfortunately, you need to remove the integration from HACS and re-download it to clear the fault.
See Add / Remove HACS Integration for help on that.

The current version is v1.2.5a.

Let me know how you get on (and what player you are using)

Mr-Lucas commented 2 years ago

Sucess! It took a few tries to get it to add, as it did not initially show up in HA, after adding to HACS. I ended up removing it, rebooting the VM that HACS/HA runs on, adding the integration in HACS, rebooting that VM again, then I could see it in HA.

I have a Z9x, and my hope for this integration is to be able to detect when the Zidoo is playing or idle. I will then use that state to trigger automations for my lights in the room. I have this working for the Nvidia shield, so I basically will copy those automations and use a different trigger, based on the Zidoo.

I will let you know how it works out. Thanks again for creating this integration.

Mr-Lucas commented 2 years ago

So I got the "Zidoo is Playing" automation to work easily. Just had to change the Entity to media_player.z9x

However, it appears that the Zidoo doesn't report a discrete idle state. It reports a state of paused when it is in the poster wall, media details, as well as when it is actually paused. I don't like to turn the lights on when a movie is paused, but only when someone has backed out of watching a movie entirely.

Any chance of separate idle and paused states being reported?

Thanks!

wizmo2 commented 2 years ago

Sucess! It took a few tries to get it to add

Thanks, I added the extra boot to the add/remove procedure just to be safe.

doesn't report a discrete idle state

Try downloading the 'main' version. It now reports the idle state when there is no playing info. I still need to look at if its possible to implementing media_stop, but I think this will do what you need for now. Just bear in mind that both the Video Player and the Music Player can be paused (with active playing info) in the background. The Zidoo API has limitations, so its not possible to detect all conditions and there is no playing info available for other apps (Amazon, VLC, etc)

Mr-Lucas commented 2 years ago

Thanks, I'll give the main version a try, and bear in mind the limitations of the Zidoo API. I really do appreciate you providing this and helping me out. Have a great day!

Mr-Lucas commented 2 years ago

After playing around, I think I'm going to base my automations on the Media content type attribute.

The value is app when navigating in the home theater 4 app The value is movie when a movie is playing The value is tvshow when a tv show is playing

I can use those values as triggers to turn the lights up/down, zoom the projector in/out, turn masks off/on, etc. I could also use the play/pause state as condition if I wanted to get really fancy.

wizmo2 commented 2 years ago

Issues resolved with Release 1.2.6.