##Wake on LAN
1 messages · Page 1 of 1 (latest)
Is your Wake on LAN config working?
I was searching for help to deploy my Wake on LAN config and finally I have a working config.
I added this to my configuration.yaml
# Wake on LAN integration
wake_on_lan:
switch:
- platform: wake_on_lan
name: sw_wake_pc1
mac: "01:02:03:04:05:06"
host: "192.168.1.100"
- platform: wake_on_lan
name: sw_wake_pc2
mac: "11:12:13:14:15:16"
host: "192.168.1.101"
- platform: wake_on_lan
name: sw_wake_tv
mac: "21:22:23:24:25:26"
host: "192.168.1.102"
And this to create buttons on my panel
type: horizontal-stack
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: switch.sw_wake_pc1
icon: mdi:desktop-classic
show_state: false
name: PC1
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: switch.sw_wake_pc2
icon: mdi:desktop-classic
name: PC2
show_state: false
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: switch.sw_wake_tv
icon: mdi:television-classic
name: TV
show_state: false
And it shows like this: https://ibb.co/1bV5XyF
It will write info in the log if it's actually performing something when you press the button so I suggest you look there and if there is nothing about wake_on_lan at least you know it's something with your dashboard which is wrong
If it writes something it's something wrong with your config or network
no I don't think so
sorry newbie question but where do i paste the code to create buttons on the panel with the color etc I still don't know how to add colors to the home assistant
can i add the device status like the connectivity? i have added previously a few entities in the ping integration but it'll take me forever to configure all of them there's 39 total
or is there an easier way
The color changes according to the status of the host, yellow for a running PC and blue for a PC that is turned off.
In your configuration.yaml you need to inform host IP in the switch configuration:
# Wake on LAN integration
wake_on_lan:
switch:
- platform: wake_on_lan
name: sw_wake_pc1
mac: "01:02:03:04:05:06"
host: "192.168.1.100" #The IP address or hostname to check the state of the device (on/off)
The easy way:
Add new card in the control panel, no matter the type chosen and then we click on "show code editor" delete all the code and paste the one for the buttons.
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: switch.sw_wake_pc1
icon: mdi:desktop-classic
show_state: false
name: PC1
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: switch.sw_wake_pc2
icon: mdi:desktop-classic
name: PC2
show_state: false
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: switch.sw_wake_pc3
icon: mdi:desktop-classic
name: PC3
show_state: false
- type: horizontal-stack
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: switch.sw_wake_pc4
icon: mdi:desktop-classic
show_state: false
name: PC4
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: switch.sw_wake_pc5
icon: mdi:desktop-classic
name: PC5
show_state: false
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: switch.sw_wake_pc6
icon: mdi:desktop-classic
name: PC6
show_state: false
You can use a combination of vertical and horitzontal stack, but take care with the indentation!!
I just improved my Wake on LAN configuration using the "RPC Shutdown" addon.
Now I can turn on and off my PC (Windows) with only one button and monitor the status (on/off) with the colour of this button.
Config for RPC Shutdown addon:
- alias: PC1
address: 192.168.1.100
credentials: UserName%Password
delay: 30
message: >-
Home Assistant is shutting down this PC. This cannot be canceled. Please
save your work!
Switch config on configuration.yaml
# Wake on LAN integration
wake_on_lan:
switch:
- platform: wake_on_lan
name: "sw_wake_PC1"
mac: "01:02:03:04:05:06"
host: "192.168.1.100" #The IP address or hostname to check the state of the device (on/off)
turn_off:
service: hassio.addon_stdin
data:
addon: core_rpc_shutdown
input: PC1 #Same name used for "alias" on RPC Shutdown addon config
I hope this can be useful for someone looking for a Wake on LAN configuration as I did 4 days ago
ahh oke thank you got it working now thank you
I have an existing admin account on all the pc and a user account can i use the admin account?
Yes, you can