Home-Assistant Custom Component

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

  1. wizmo

    wizmo Member

    Added a new release (v1.2.7) with these changes (@Rob W with additional server name formatting).
    Rob W and Sledgehamma like this.
  2. Rob W

    Rob W Active Member

    Yes thats perfect thanks. :cool:
  3. Sledgehamma

    Sledgehamma Well-Known Member

    @wizmo I noticed that the resolution of the pictures while browsing has decreased significantly. can you restore it to the previous resolution?
  4. wizmo

    wizmo Member

    @Sledgehamma , can you let me know which version you are using (HA and Zidoo-Player).

    There have been a few changes in how HA is handling thumbnail images in the last few releases. Its possibly some updates broke things in differnt versions. I checked the lastest releases of 1.2.9 and beta-021922 running on 2022.4 and they appear to be OK.
    Sledgehamma likes this.
  5. Sledgehamma

    Sledgehamma Well-Known Member

    Thanks for the quick response :)
    I'm using 1.2.9 and 2022.4.4 as well.

    just updated to 2022.4.5 but no change.
    Last edited: Apr 17, 2022
  6. wizmo

    wizmo Member

    Looks like the image icon size and aspect ratio in HA has changed slightly, so the image scaling is messed up. I've increased the requested poster image size in the 'main' release (beta only). Seems to do the trick. I have some minor changes to test before the next full release.
    nc88keyz and Sledgehamma like this.
  7. CGI

    CGI Member

  8. wizmo

    wizmo Member

    @CGI Thanks for the feedback. Glad you got it working.
  9. nc88keyz

    nc88keyz Active Member

    Wizmo, Can you change the power on to Wake on Lan. It only seems to power off via HA , Power On is not doing anything. Everything except the Z9S i believe supports Wake-On-Lan due to an incompatibility. RT1295, RT1619 should all be fine.

    ON Z1000Pro,

    The power off is full power off regardless of setting on power button on Zidoo Power App to toggle between standby . power down.

    Just tested with both IR / BT remotes to see if it made a difference.

    Again, if you shut down from the HA component it powers all the way down, but does not wake via LAN (WOL) . Bluetooth and IR place in stanby as set by the zidoo power button apk. Using 1.2.9 and have cleared cache and uninstalled component and redownloaded it setting up from scratch. WOL works normally from magic packet on zidoo in my case. from Asus router. with WOL tool.
    Last edited: Apr 29, 2022
  10. Remco

    Remco New Member

    Wow. This looks amazing! Honestly, HA support was the only reason why I didn't jump on Zidoo earlier. This is a major feature. Thanks for your time in developing it!

    Now I can't wait to put NFC tags in all my Blu-Ray cases and watch Zidoo automatically play the corresponding movie when I scan the case with my phone :)
  11. nc88keyz

    nc88keyz Active Member

    Would be better to use a CueCat and scan a barcode into HomeAssistant. ;) and cheaper mind you. Make it happen!
  12. wizmo

    wizmo Member

    @nc88key Will have a look as I do have a 9x available (although not LAN connected at the moment).

    In the mean time, have a look at https://www.home-assistant.io/integrations/wake_on_lan/ . I have a WebOS LG TV, that uses this service within the integration. Testing from developer tools would confirm if the integration is at fault, and not a network issue.

    Edit: Just tested my Z9X and the WOL worked when connected to the LAN. I did have an issue swapping between WiFi and LAN. It appears that Wifi is disabled if the LAN is connected. Had to remove and re-add to get the integration to recognize the LAN IP correctly. Not sure what is happening with your Z1000 and WOL. If you find HA WOL function works, let me know and I'll look at integrating it.

    P.S. Really impressed with the HDMI CEC on the Zidoo. My excuse to get the 9x was that the remote on the 9s failed. I have the 9x connected to a Sony TV and you really don't need the original remote for normal use.
    Last edited: May 2, 2022
  13. nc88keyz

    nc88keyz Active Member

    I also have a webos 2016 oled. thanks for the tip. I think it's also interesting that power down does a full power down and not just power toggle regardless of how you have the power function set within the zidoo power app. I do not use wifi. The the Mac has been released from my router and reasigned via static dhcp. I have also tried you betas and back to latest HA integration. removed complete from hacs and reinstalled . All functionality works with exception to w
    WOL on on z1000pro. Off does a full power down even though both KY harmony and zidoo remote do a standy power toggle. as directed by the zidoo power app. It's a beautiful integration. Maybe someone else with a z1000 pro could chime in their experience. I also have a z9x and am going to test that as well . I am sure it will work just fine as you have mentioned. Perhaps something is different in the z1000 pro even though it is my understanding the board is same.
  14. wizmo

    wizmo Member

    The power down is an api call, the WOL is only used to power on.

    What's your HA setup? I use hassio on a Rpi. I came across a post re. issues with WOL on docker installs (https://community.home-assistant.io...se-running-home-assistant-in-docker/189376/13). Its associated with WOL only working on the local sub-net.

    I dont think I'm using the power standby function (the Z9S has issues with this mode). If we find out that its this I can look at it.
    Last edited: May 2, 2022
  15. nc88keyz

    nc88keyz Active Member

    I am running in a docker , that would be strange if the case. I will connect a Z9X and attempt the same commands. the power off being the API seems something is buggy than, since it is powering all the way down instead of standby, unless you are hitting the API for full power down. See if it matters wether you have the power function set to standby on yours. I will also try with a z9x and see what gives.

    The wake up magic packet is not fuctioning at all as mentioned. Maybe you are onto something. I dont use WOL through HA for anything else at this time. Maybe there is an API call for toogle vs power off in zidoo. It works normally from the zidoo web remote btw.
  16. wizmo

    wizmo Member

    @nc88keyz The Magic Packet is essentially a broadcast UDP message and as such is not forwarded outside of the local network. To send the WOL message from a Docker container, you either need to reconfigure the container with the '--net=host' argument (you are only allowed one per docker host), or have some type of WOL gateway setup from inside the container (see the link above) Sorry I cant be any more help on this.

    I have just tested the various power modes on the 9x to double check there is not another solution, but the api does not respond in either Power Off or Power Standby Modes. I will add to the configuration in the next release regardless.

    I would have suggested using the HDMI-CEC and the power on/off with your TV, but your WebOS TV needs WOL to work from HA also.
    Last edited: May 3, 2022
  17. nc88keyz

    nc88keyz Active Member

    No thanks, No CEC or ARC or any of that nonsense. I use a harmony elite and am perfectly happy with , including HA integration. and alexa. Google Assistant.
    wizmo likes this.
  18. CGI

    CGI Member

    Want to share my experience on the above topic, so far.
    First things first - strange enough :) in my setup WoL works flawlessly.
    Power off brings my Zidoo Z1000 Pro in stand by, as configured. Also Power on works and brings it up.
    The only exception was yesterday, when I restarted the NAS (late in the night), and forgot to start Homeassistant container. I started it this morning, but - no WoL :( . Then I powered Zidoo with the RC (btw - the RC power button is always IR, while the rest have BT) and since then everything was OK , meaning I powered off/on by Homeassistant several times (about 10) in different time lapse periods, greatest 5 hours (cause I had a suspicion and wanted to check if it enters in a kind of "deep" sleep mode). On second thought, seams logical that when I started the homeassistant container, zidoo was unavailable and it could not initialize the interface/ignored it. When powered up zidoo - interface up and initialized since.
    Homeassistant in a NAS container, z1000 pro, all wired 1Gbps, same subnetwork.
    Glad if this helps :)
    PS - power on/off cycles were done by Android phone and win10 laptop, both WiFi.
    Last edited: May 4, 2022
    wizmo likes this.
  19. nc88keyz

    nc88keyz Active Member

    I have made some progress with WOL , as mentioned I placed on HA on same network stack as Zidoo , and the LG webos tv showed up as well as a crap load of dlna servers. I am partially pleased to announce that WOL works for power on and power off, Still the bug exists that it is powering down all the way from power off. Not sure why that is occuring. Again this is wtih a Z1000pro. I have yet to sub in the z9x that I have to try that. For good measure I deleted the integration and added it back, entering the ip address once again and the password for the zidoo box.

    Zidoo standby behavior solved by editing zidoorc.py. post #40 ( Working as expected on Z1000pro)
    Last edited: May 4, 2022
  20. nc88keyz

    nc88keyz Active Member


    In Zidoorc.py located (at least in docker) in config\custom_components\zidoo

    Change the following from:

    def turn_off(self):
            """Turn off media player."""
    def turn_off(self):
            """Turn off media player."""
    This allows the Zidoo expected behavior to be standby vs powering down the Android 9 OS and thus allows the magic packet to just wake the zidoo player. not boot up with spash and from full power on mode. While it may not matter to some, I prefer the quicker startups as long as things in the OS remain stable and they typically do in my case. Starting at line24 you list these keys as well for reference and testing. Perhaps you could implement a long press OR two buttons on your integration one for power down and one for standby using this debugging.
    Last edited: May 4, 2022

Share This Page