Xiaomi Gateway Integration

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

for the square cam?

Could not find anything

if you do this in VLC with you can see the video?

Looks like issue no longer exist after I upgrade the xiaomi.py file.
Will have ti monitoring on it.

Hi,

First of all, you must be sure if camera support rtsp protocol to view image in vlc.

If camera firmware not support rtsp, you must find a custom firmware that permit this option, and then add in HA.

In my case i have it, but with other version of camera…

The ghost openings are not occuring atm, i still keep an eye on it and let the debugger run, hopefully i will see more information when it happens next time.

Mine we all happening really badly a few nights ago and seem to have come good ever since. No change in any versions either…

Can someone please hook me up with the door sensor version of this:

trigger:
    platform: event
    event_type: motion
    event_data:
        entity_id: binary_sensor.motion_sensor_158d000113702f

<3

Sorry for the spam, but has anyone looked into the battery life of the Xiaomi gear.

I’ve got the motion, switch, door, and temperature sensors and I read that the temp sensors will only last 1 month before needing replacement. Has anyone had to replace any batteries yet, and is it hard?

From the documentation:

  trigger:
    platform: event
    event_type: door_window_action
    event_data:
        entity_id: binary_sensor.door_window_sensor_158d000xxxxxc2
        action_type: open # open / close / no_close
1 Like

Its easy to replace battery. Just look at the photo in the manual. And i have been using for 3 months already with existing battery. Where did you read about that?

Finally found it again:

From the banggood site.

Okay great, glad they are easy to replace, they looked difficult to dismantle at a glance!