Xiaomi Gateway Integration

If you have added it as a custom component, you should do like this: https://github.com/Danielhiversen/home-assistant_config/blob/master/configuration.yaml#L46

Yeah I had the same thing happen, glad it’s not just me. I will try block its internet access as well, I wondered why they were so affordable!

I don’t understand your comment … you think are affordable becasue chinese government is spying in our house? :smiley: hope not!

Thanks for the tip @rave

I turned it on… where can I find the log?

All I get in the normal log file

17-02-08 19:41:47 custom_components.xiaomi: No gateway discovered
17-02-08 19:41:47 homeassistant.bootstrap: component xiaomi failed to initialize

Does anyone have a simple example on blocking internet for the gateway?
My router is ISP provided and rather “dump”, it can only block access to IP. Is xiaomi.com on a stable IP?

edit: Actually, I might be able to use “parental control” to exclude xiaomi.com :slight_smile:

what components are you turning off? My HA is only fresh install with this xiaomi component as the component. or do you mean turning off each sensor? can you elaborate?

Also realised that the graph for temperature, which shows a flat line, doesn’t actually align with anything. Currently 26C here but line is at 30C

EDIT: I think i solved it. I copied the configure files including known_devices.yaml from my windows machine into a linux shared folder. Somehow the owner of the file became root. I chown all the files and it all started working magically!

EDIT2: turns out 2 devices are buggy with the device tracker. enabled them and everything stopped recording properly again.

I hope the ghost sensors get solved as well. This is the main reason why I haven’t set up an alarm profile yet to arm the place. Didn’t want ghost sensors waking me up at night or blasting off the alarm when no one is around.

That’s the log.

In the log, the gateway isn’t even discovered. i thought you said only the switches not being discovered?

Nope nothing comes up :frowning:

I was mentioning before about s20 orvbio switches that I had that also had issues - but seem fine now (I actually have one before my hub so I can power cycle it with each HASS restart)

While I figure out the connection issue - how do you solve the default naming of door sensors?

I did this in my customisation file

binary_sensor.door_window_sensor_158d0000fa9117:
 friendly_name: 'Back Door'
 sensor_class: opening

I also read above that you need to add this to your sensor file

- platform: template
  sensors:
    doorshere:
      friendly_name: 'Front Door'
      value_template: "{{ states.binary_sensor.door_window_sensor_158d00012d76d0.state == 'open' }}"
      sensor_class: opening
      entity_id:
          - binary_sensor.door_window_sensor_158d00012d76d0

But this is throwing an error… am I on the right track here?

17-02-08 21:36:23 homeassistant.util.yaml: while parsing a block collection
in “/home/homeassistant/.homeassistant/devices/sensors.yaml”, line 15, column 1
expected , but found ‘’
in “/home/homeassistant/.homeassistant/devices/sensors.yaml”, line 46, column 2

Back door sensor’s friendly name looks right in the yaml and it shows correctly in the dashboard too. What did you put in the yaml for the other sensor?

Forgot to mention I just wanted to change the on / off to open / closed.

Something just doesn’t look right in the config. What if you put the entity id Value directly instead of making it a list?

I don’t have access to my yaml now but you can also check sample configuration.yaml in the home page.

Data is valuable right, would be a shame to waste it! :wink:

sensor:
  - platform: template
    sensors:
        opening_door:
          friendly_name: 'Door Sensor'
          value_template: '{% if states.binary_sensor.door_window_sensor_158d000118xxxx.state == "on"%} Open {%- else -%} Closed {%- endif -%}'

4 Likes

@accelle
how do you do this?

just arrived, very cool camera, but can’t find http or rtsp instruction

Hi, can someone help ?!

When my iptables firewall disabled everything works. Which rules I need to configure ?

I see multcast, 9898, 4321. But none of then work.

The live feed is not yet working though.

but which is the command to connect to the camera?

camera yicam01:
  platform: ffmpeg
  name: living room
  input: -rtsp_transport tcp -i rtsp://192.168.1.115:554/ch0_1.h264
  extra_arguments: -pred 1

You’ll have to find on how to configure ffmpeg on your device. There’s a tutorial somewhere here if you are using rpi.

I can try but this command is not working on VLC