Im very new to HA but my experince with the Xiaomi gateway is that the I only need to press the buttom and not hold it to register. I noted that automations take a long time to excecute at the moment, but I didn’t look into this.
You can’t see the last trigger on the badges, but I think it would be a excellent addition, e.g. see the cube triggers, and angels for rotation. I used to use Openhab, and there is was tracked by default. I think you can make a custom sensor badge template with this crazy yaml, but I failed to do it. Would be nice though!
Has anyone got this working with the new HASSIO (docker) installation of home assistant?
I’ve tried setting it up as a custom component (even though the description on github says its not working as a Custom component)
As far as i can tell the HASSIO method of installation doesnt give access to the actual components directory
Hello guys, thanks for all the work you’ve done so far on this integration. started diving into it a couple of days ago and it’s been working very well.
I do have a question. i want to use the alarm function of the bridge (arming it by using a single button press of the xiaomi button and it will be triggered by the door sensor in state open). Is the alarm supported in the integration ?
I saw that on Daniel’s fork in the release notes there is support for Gateway Sensor / Ringtone play. What is gateway sensor ? what does it do ? Are any of the two suitable for my alarm automation use case ?
The button events of the gateway are not exposed to home assistant, so we cannot use it. You’ve to arm your alarm by another button (the wireless one f.e.). The alarm has to be implemented as automation in home assistant. You cannot re-use the internal logic of the gateway.
I just installed Home Assistant, connected the Xiaomi Hub successfully. The sensors (button, motion) seem to work great, but I can’t seem to use it to start a light. Is it ok to post my scene code?
@Danielhiversen do you think it’s a good idea to start working on HA documentation for this platform? I would love to help and hopefully see this soon included in HA. I could start working on it and PR on your repo, for example
@syssi Just checked and it is working just fine. I have a followup question though. How do i know what ringtone id is associate to a specific ringtone in the xiaomi app ? Also what is the max ringtone volume. Thanks again for the help.
I think you have to use trial and error. If you click on the ringtone in the mihome app the gateway rings. Try the same at the developer tools -> “services” of home assistant (http://hassbian.local:8124/dev-service):
domain: xiaomi
service: play_ringtone
service data: {"ringtone_id":"13", "ringtone_vol":"8", "gw_sid":"xxxxxxxxxxxx"}
You can write down a mapping. The highest volume is 100(%).
Hi, can anyone tell me what’s wrong with my code? I just started using HA this week.
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: 52.3878
longitude: 4.8841
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 3
# 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: Europe/Amsterdam
# Show links to resources in log and frontend
introduction:
# Enables the frontend
frontend:
# Enables configuration UI
config:
http:
# Uncomment this to add a password (recommended!)
# api_password: PASSWORD
# Uncomment this if you are using SSL or running in Docker 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:
# 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: yr
# Text to speech
tts:
platform: google
group: !include groups.yaml
automation: !include automations.yaml
xiaomi:
gateways:
- sid:
key: zzz
automation:
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0001132962
click_type: single
action:
service: switch.toggle
entity_id: light.living_room
It’s giving me this error:
Jun 16 16:51:08 hassbian systemd[1]: Starting Home Assistant for homeassistant...
Jun 16 16:51:08 hassbian systemd[1]: Started Home Assistant for homeassistant.
Jun 16 16:52:01 hassbian hass[674]: 2017-06-16 16:52:01 ERROR (Thread-1) [homeassistant.util.yaml] duplicate key: "automation"
Jun 16 16:52:01 hassbian hass[674]: in "/home/homeassistant/.homeassistant/configuration.yaml", line 60, column 0
Jun 16 16:52:01 hassbian hass[674]: in "/home/homeassistant/.homeassistant/configuration.yaml", line 65, column 0
Jun 16 16:52:01 hassbian hass[674]: 2017-06-16 16:52:01 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: duplicate key: "automation"
Jun 16 16:52:01 hassbian hass[674]: in "/home/homeassistant/.homeassistant/configuration.yaml", line 60, column 0
Jun 16 16:52:01 hassbian hass[674]: in "/home/homeassistant/.homeassistant/configuration.yaml", line 65, column 0
Jun 16 16:52:01 hassbian hass[674]: Config directory: /home/homeassistant/.homeassistant