lucky
November 21, 2018, 2:34pm
1
Hello
I’m getting problems with the shell_command it does nothing.
When the switch was in configuration.yaml it worked.
I create switchs.yaml and put the switchs inside.
I put the shell_comand in the configuration.yaml
Here my code:
switchs.yaml
platform: wake_on_lan
name: "PC"
host: "10.0.0.**"
mac_address: "2c:bi:a1:21:5e:45"
turn_off:
service: shell_command.pcdesktop_off
configuration.yaml:
switch: !include switchs.yaml
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
cover: !include covers.yaml
sensor: !include sensors.yaml
shell_command:
pcdesktop_off: 'bash /config/pcoff'
What I did wrong?
thanks
viperk1
(Shannon)
November 21, 2018, 2:45pm
2
Are you obfuscating some data in your code? The host has a ** in it and the mac address has an ‘i’. Also your shell command and turn_off service spacing seems to be off.
What do the logs say about it?
lucky:
host: “10.0.0.**”
In Internet networking, a private network is a computer network that uses a private address space of IP addresses. These addresses are commonly used for local area networks (LANs) in residential, office, and enterprise environments. Both the IPv4 and the IPv6 specifications define private IP address ranges.
Private network addresses are not allocated to any specific organization. Anyone may use these addresses without approval from regional or local Internet registries. Private IP address space...
AKA, even if you give us your internal IP addresses, we can’t do anything with that info, except verify your config is correct.
My router IP is 192.168.254.1. Have at it.
lucky
November 21, 2018, 3:20pm
4
I just changed the MAC and the Ip to other thing
That was it, just put a space before the service and it’s done.
platform: wake_on_lan
name: "PC"
host: "10.0.0.**"
mac_address: "2c:bi:a1:21:5e:45"
turn_off:
service: shell_command.pcdesktop_off
yaml is really annoying with this spaces and tabs… lol
Thanks