Controlling wifi devices

So I’m a noob when it comes to automation, raspberry pi and home assistant. I’m trying to see if I can have home assistant automate my whole house, controlling the AC units, lights and any conected device on my wifi network(Smart tvs, xbox one and computer). The problem is I don’t know how or did I find a tutorial that I could understand. I set up my raspberry with Hass.io and installed the samba,ssh,duckdns and mosquitto broker. Samba, Ssh and Duckdns are all working. I don’t actually know if mosquitto is working too. When I run the configuration checker it says its all good so I assume that mosquitto is working, but I can’t access it with its port. Currently i’m trying to make home assistant find my smart tvs and xbox. I put the xbox live sensor code in my configuration.yaml file but I don’t actually see anything anywhere about my xbox account. Could anyone give me a hand?

As a start, it would be helpful to share your configuration,yaml - but make sure that your location, passwords tokens, etc. are not visible by e.g. by using the ‘secrets’ option.

Without the configuration file, it’s hard to see what could be wrong.

And: please make sure that your code is formatted properly, take a look at the blue box at the top.

Sure thing. So I got my xbox api to work now I see my gamertag and when i"m gaming, the thing is its always reaching api rate limit. How do I fix that?

Also got hassio to find my sony tv and a phillips I have in the living room. For some odd reason I can only control the sony tv. The phillips one doesn’t turn on(I have to manually turn it on) after that it gets detected and I can control it until I turn it off.

I want to be able to control any device that’s connected to my WiFi network, like my Xbox One, Desktop computer and tvs. On my phone I have Fing and it can turn on my xbox if I click on “wake on LAN”. My xbox is set to turn on my sony tv and my sound system when it turns on. Id like to make a switch and in the future set up a command that when I get home it turns on(just for the lols).

Here goes my config.yaml

  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: !secret latitude
  longitude: !secret longitude
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: !secret elevation
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: !secret time_zone
  # Customization file
  customize: !include customize.yaml

# Show links to resources in log and frontend
introduction:

# Enables the frontend
frontend:

# Enables configuration UI
config:

http:
  # Secrets are defined in the file secrets.yaml
  # api_password: !secret http_password
  # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  # base_url: example.duckdns.org:8123

# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
  # Optional, allows Home Assistant developers to focus on popular components.
  # include_used_components: true

# 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:

# Enables a map showing the location of tracked devices
map:

# Track the sun
sun:

# Weather prediction

# Text to speech
tts:
  - platform: google

# Cloud
cloud:

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml





switch:
  - platform: wake_on_lan
    mac_address: !secret xbox_mac
    name: Central jogos
    host: 192.168.0.106
    broadcast_address: 255.255.255.255
    
sensor:
  - platform: openweathermap
    api_key: !secret api_key_weather
    monitored_conditions:
      - weather
      - temperature
  
  - platform: xbox_live
    api_key: !secret api_key_xboxlive
    xuid:
      - !secret xuid_key
      
media_player:
  - platform: braviatv
    host: 192.168.0.104
    
  - platform: philips_js
    host: 192.168.0.107
    
mqtt:
  broker: core-mosquitto
  username: !secret mqtt_user
  password: !secret mqtt_pass
  
duckdns:
  domain: !secret duck_domain
  access_token: !secret duck_token```

the switch I made doesn’t wake the xbox. Would like help here too.

I’d say you wont be able to fix the issue with the Phillips TV as it appears that it doesn’t allow Wake on LAN (unless you can find an option in the TV settings to turn that on).

easy once you set up a device_tracker for your phone linking onto the wifi.

first things first, I advise you to log into your router and assign fixed IP addresses to all of your network devices as creating these as hard coded items in your HassIO config is better than relying on the discovery component

I already have all the components in the router with fixed IP’s. What I need and want right now is to be able to make my xbox turn on via wake on lan and find a ways to utilize the raspberry’s GPIO for some switch controllers.

I don’t have any experience with these components but they should be easy enough to set up.


Another problem now. I updated Hassio because it said it had an update and duck dns and xbox live are getting errors when starting and don’t actually start up. Any way to revert to last version?

did you take a snapshot before upgrading?

I always create a snapshot before hitting upgrade. I think there may be another way to do it. Search this forum

Yes I have 2 snapshots. I tried using one and not hitting the 0.71 box but it got me the same error.

Got it to return to 0.70.1 by using the oldest snapshot. Luckily I had the config.yaml open and didn’t lose the code.

So I’m still trying to figure out how to use Hassio. Don’t know much yet and still can’t get my home assistant to turn on my Xbox. I found this link but I didn’t understand if already works on python or if it is still a to be released project. I am really trying to get my home assistant to control my Xbox and if someone could help me with this I’d really appreciate it.