Closed dilruacs closed 5 years ago
If you wan't to solve that problem please use the v4 branch as base, otherwise I'll solve it myself :)
The wake on lan library supports this sort of already but using always 255.255.255.255 as broadcast
I can solve this problem later today, when I am in the same building as the device again :-)
The problem with using 255.255.255.255 is that it didn't work correctly on my multi-homed Home Assistant VM.
I can solve this problem later today, when I am in the same building as the device again :-)
The problem with using 255.255.255.255 is that it didn't work correctly on my multi-homed Home Assistant VM.
Maybe it would be better to implement the discovery of the broadcast address in the wakeonlan library.
I do not think we should make something overly complicated and build a detection. For example: the Home Assistant WOL component (https://www.home-assistant.io/components/wake_on_lan/) just sends to 255.255.255.255 as a default (works all the time, if just a single LAN adapter is available) and offers a configuration item for those that have special needs.
Solved in #25
https://github.com/alexmohr/sonyapilib/blob/367490d53dbd8b4c20ea145f14600e3e3356ef71/sonyapilib/device.py#L132
Problem: if the device uses DHCP and the device was powered down long enough for the lease to expire, the WOL sequence won't work. Possible solutions: