I tested it and the association was made in 2 seconds!
However, it’s impossible to see anything on the dashboard or in a scene.
Given the messages above, maybe I should look into my Gladys installation? I do have an AndroidTV object that is created and associated with my living room, but that’s it.
For info, the wol doesn’t work. But the MiBox 4 goes through a ugreen adapter for ethernet. The Mac is still present on my network because the power is still on, but the USB bus seems to be cut off. So I can’t test it unfortunately
Thank you for your feedback, it has directly shaped this new version. The v1.3.0 is available: go to the Supervision tab of the integration to start the update (or wait for Gladys’ automatic update suggestion).
What’s new in 1.3.0
TV selector on configuration actions (thanks @spenceur for the suggestion )
The actions « Enter MAC address (Wake-on-LAN) », « Remove a paired TV » and « Test connection » now offer a dropdown menu listing your TVs, like on the LG webOS integration: no more IP addresses to retype. A « Backup IP address » field remains available for the specific case of a paired but not yet added TV (it does not yet appear in the list).
Wake-on-LAN: the hardware limit is now documented @spenceur, your diagnosis is correct . Wake-on-LAN requires that the network card remains powered when the device is off. This is the case for the built-in Ethernet of most TVs, but never for a USB-Ethernet adapter: the MiBox cuts the power to the USB bus when turned off, the adapter disappears from the network, and no magic packet can wake it up — which you observe with the power present but the USB bus cut off. Even adb won’t be able to do anything: it goes through the same network, unreachable once the box is off. The right approach for a MiBox: leave it in network standby rather than turning it off completely. In network standby, the Remote v2 protocol is enough to turn it back on from Gladys, without Wake-on-LAN or MAC address. All this is now explained in the README.
Device invisible in the « Device » field of a widget or a scene @lmilcent, glad the pairing went well! As you noticed, the device does exist and is eligible for widgets and scenes: it’s the search filter of the « Device » field that doesn’t always find it — a behavior on the Gladys interface side, not on the integration side. In the meantime, three workarounds (added to the README):
type a fragment of the exact name (e.g., Android TV with the space, or part of the IP), or clear the search and browse the full list;
give a simple name to the TV at step 1 of pairing (e.g., Living Room TV): easier to find than Android TV (192.168.1.50);
check that the device is associated with a room, some widgets list by room.
If you reproduce the case « the search does not find a device yet visible in the full list », share here the exact name of the device and the text typed: it will help to report the bug of the filter on the Gladys side.
Changelog v1.3.0
TV selector (list of created devices) on the actions « Enter MAC address », « Remove a paired TV » and « Test connection », with backup IP field
Documentation of the hardware condition of Wake-on-LAN (built-in Ethernet vs USB-Ethernet adapters, network standby recommendation)
Troubleshooting section for the device not found via the filter of the « Device » field (widgets / scenes)
101 unit tests (5 new ones on the resolution of the selected TV)
The full changelog is visible from the Supervision tab by clicking on the version number.
I found the trick, directly related to Gladys v5 (@pierre-gilles): when I add a device to the dashboard, and I want to filter all the entries in the dropdown menu, for example with « Chromecast », the list becomes empty. You therefore need to type the name + click on the field again for the filtered list to appear this time.
@spenceur pour la remarque, je laisse Claude te répondre:
Thanks for the clarification, you’re right and I’ve corrected the README: the adapter doesn’t disappear from the network — it remains powered and its MAC still responds — but when turned off, the MiBox cuts off the data from the USB bus. The magic packet therefore reaches the adapter… and stops there: with the USB link dead, the adapter has no way to wake up the box. The result is the same (WoL cannot work in this setup), but the mechanism is indeed the one you describe. And that’s also why adb won’t work: it goes through the same network→USB link that’s cut off.
Regarding the network standby note, I specify (and I’ve also clarified the README): an Android TV box has two different « off » states.
Standby: This is what the power button on the remote does on most boxes. The screen turns off but the box remains powered and connected to the network: the Remote v2 protocol port remains reachable, and the « Turn On » button in Gladys wakes it up directly, without Wake-on-LAN or MAC address.
Full shutdown (unplugging, or complete power-off depending on the model): nothing is reachable, and in this case only a network card left powered + WoL could wake it up — impossible with the USB adapter, as seen above.
So in practice for your MiBox: turn it off with the remote control button (standby) rather than cutting the power, and « Turn On » from Gladys should work directly. You can check this: box « turned off » with the remote, run the action « Test TV connection » — if it responds, you’re good to go.
So I’m not a madman who unplugs my Android TV electrically when I want to turn it off, I turn it off like everyone else with the remote control xD
Thanks for the laugh
And I suppose the MiBox is unreachable once turned off, oh well ^^
Thanks anyway @guim31