Now it’s not working again. I DO NOT get it.
(Did figure out how to issue the sleep command though. So that’s great, but it makes correct reporting of on vs. off even more critical. :P)
Now it’s not working again. I DO NOT get it.
(Did figure out how to issue the sleep command though. So that’s great, but it makes correct reporting of on vs. off even more critical. :P)
Okay, here we go, as requested, my configuration.yaml:
homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: !secret home_latitude
  longitude: !secret home_longitude
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: !secret home_elevation
  # metric for Metric, imperial for Imperial
  unit_system: imperial
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: America/Los_Angeles
  customize: !include customize.yaml
# Show links to resources in log and frontend
introduction:
# Enables the frontend
frontend:
http:
  # Uncomment this to add a password (recommended!)
  api_password: !secret pi_pw
# Checks for available updates
updater:
# Discover some devices automatically
discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
# Enables support for tracking state changes over time.
history:
# View all events in a logbook
logbook:
# Track the sun
sun:
# Weather Prediction
sensor:
  platform: yweather
  woeid: 55862615
  forecast: 3
  name: Redmond
  monitored_conditions:
   - weather
   - temp_min
   - temp_max
mqtt:
  broker: 127.0.0.1
  port: 1883
  client_id: home-assistant-1
  username: pi
  password: raspberry
# Philips Hue emulator
emulated_hue:
  host_ip: 192.168.1.106
  listen_port: 8300
  expose_by_default: true
  exposed_domains:
    - script
    - switch
# Harmony hub
remote:
  - platform: harmony
    name: Fred's Harmony Hub
    username: !secret harmony_user
    password: !secret harmony_pw
    host: 192.168.1.111
# iOS Component
ios:
# iOS Notify platform
notify:
  - platform: ios
group: !include group.yaml
# script: !include script.yaml
script: !include_dir_merge_named script/
shell_command: !include shell_command.yaml
switch: !include_dir_merge_list switch/
input_select: !include_dir_merge_named input_select/
automation: !include_dir_merge_list automation/
zone: !include zones.yaml
            Hmm. So weirdly, now it isn’t responding to pings. But I know it’s on the network.
(I think in troubleshooting a non-sleeping problem last night I ended up turning off File And Printer Sharing. Let that back through the firewall, it’s pinging and things work again. Yay!)
Hey all,
Just want to add my 2 cents.
I was able to remotely hibernate my Windows 10 HTPC by running a shell_command (see below).
I had to install/enable ssh module in windows 10 (see this link).
I also had to install sshpass as well.
sudo apt-get install sshpass
I have hassbian installed and had to ssh into the HTPC from the homeassistant user (not the pi user) to get the rsa key. To do this login into the RPI and then change user to homeassistant.
sudo su -s /bin/bash homeassistant
Then…
ssh user@hostname
It will then give you the rsa key (click yes). Then after this the below commands should work from home assistant
shell_command:
  turn_off_htpc: 'sshpass -p [password] ssh [user]@192.168.1.16 \"shutdown /h\"'
The switch looks like this below:
switch:
  - platform: wake_on_lan
  mac_address: "12-34-56-78-90-AB"
  name: Home Theatre PC
  host: 192.168.1.16
  turn_off:
    service: shell_command.turn_off_htpc