2024年11月23日星期六 上午4:04:30

Wake on LAN for Home Assistant Turning the PC on and off

1 年 前
#22486 引用
Wake on LAN for Home Assistant

I want to wake my PC with WOL  packet via HA

https://www.home-assistant.io/integrations/wake_on_lan/



https://community.home-assistant.io/t/turning-the-pc-on-and-off/559667
0
1 年 前
#22487 引用
This Wake on LAN integration cannot be added from the UI

Im trying to setup the wake_on_lan integration but when I to to configuration > integrations > add integration and search for Wake on Lan it doesnt find it. Below is the link

This device cannot be added from the UI

You can add this device by adding it to your 'configuration.yaml'. See the documentation for more information.



0
1 年 前
#22488 引用


source:https://community-assets.home-assistant.io/optimized/4X/f/6/e/f6e93399ffa6dab387677abdb79ecf70d376e214_2_690x396.png
0
1 年 前
#22490 引用
step 1:you have Wake On Lan  added to configuration.yaml.

configuration.yaml


input_select:
  input_select_husband_track_home_away_status_dropdown:
    name: input_select_husband
    options:
      - Home
      - Just Arrived
      - Just Left
      - Away
      - Extended Away
    initial: Home
# Example configuration.yaml entry  https://www.home-assistant.io/integrations/wake_on_lan/
wake_on_lan:


other

Example YAML snippet Example
YAML configuration of a Wake on LAN:


wakeonlan:
switch:
  - platform: wake_on_lan
    name: lg_tv
    mac: "78:5D:C8:53:A9:DF"
  - platform: wake_on_lan
    name: kodi_wol
    host: 192.168.1.5
    mac: "00-1e-06-42-29-bb"


source:https://github.com/home-assistant/core/issues/48139#issue-836739795

0
1 年 前
#22491 引用
step 2: restart ha
0
1 年 前
#22492 引用
step 3: Test Send magic packet via   Developer Tools panel

The service dev tool allows you to call any available service in Home Assistant.Go to Developer Tools → Services. wake_on_lan is the domain, with only one service for wake-on-lan : wake_on_lan.send_magic_packet

Wake on LAN: Send magic packet


service: wake_on_lan.send_magic_packet
data: {}


run ok

Next,add mac address of your pc

service: wake_on_lan.send_magic_packet
data:
  mac: aa:bb:cc:dd:ee:ff
  broadcast_address: 192.168.0.255
  broadcast_port: 9

http://192.168.2.50:38123/developer-tools/service


example



source:https://community.home-assistant.io/t/wake-on-lan-not-doing-anything/197533/8?u=msly

Ohter
Mac

ping the broadcast address for the subnet, and wait

ping -b 255.255.255.255 -i5 -c3


look at the arp table
cat /proc/net/arp


source:https://community.home-assistant.io/t/wake-on-lan-config-flow/294800
0
1 年 前
#22495 引用
1
0
1 年 前
#22496 引用
1
0
1 年 前
#22497 引用
Incorrect MAC address format


MAC address format

aa:bb:cc:dd:ee:ff


This  MAC address can be added from the UI.

run ok

0