Mi Smart Pedestal Fan

Alright. This isn’t needed in future anymore. I updated the custom component with a few new features. It’s pretty alpha because I’m aware of some bugs which needs to be resolved at python-miio.

Could you describe two features of the Mi Home app? If I select “direction left” what’s the behavior of the fan? If I select “angle 60” what’s happening? Is the fan oscillating in a range of 60 degrees or does it just move into this direction? How do you switch between natural mode (oscillating?) and direct mode in the Mi Home App?

If you select 30 degrees it changing the fan to arc in that same for other degrees. If you select off the fan stops oscillation and you can then use left of right to change the direction of the fan to where you want it to point in a stationary mode.

@jimpower Could you provide the output of:

mirobo --ip <ip> --token <token> raw_command get_prop '["ac_power", "angle", "angle_enable", "battery", "bat_charge", "bat_state", "button_pressed", "buzzer", "child_lock", "humidity"]'
mirobo --ip <ip> --token <token> raw_command get_prop '["led", "led_b", "natural_level", "natural_enable", "power", "poweroff_time", "speed", "speed_level", "temp_dec", "use_time"]'

The command line tool mirobo is part of python-miio.

I get no such file or directory

Did you enter the virtualenv beforehand?

su - homeassistant
source /srv/homeassistant/bin/activate
which mirobo

su - homeassitant

unknown user

How did you install Home Assistant? Do you use hassio or raspbian?

I have updated the custom component and extended the README. I would be happy if you provide some testing for the services: https://github.com/syssi/xiaomi_fan/

My install is hassio.

Will provide some feedback after work today.

I’ve implemented a custom component for easy interfacing a unsupported xiaomi device now:

You don’t need to use the command line tool “mirobo” anymore. Please use this custom component to retrieve the list of properties by the sensor.xiaomi_miio_raw_set_properties services. The values should show up as sensor attributes. Please provide the log messages of the custom component (homeassistant.log).

2018-04-13 20:19:18 INFO (MainThread) [custom_components.sensor.xiaomi_miio_raw] Initializing with host 10.0.100.1 (token 2f4d1…)
2018-04-13 20:19:18 INFO (MainThread) [custom_components.sensor.xiaomi_miio_raw] zhimi.fan.v3 1.2.9_50 MW300 detected
2018-04-13 20:19:18 INFO (MainThread) [custom_components.sensor.xiaomi_miio_raw] New state: {‘power’: ‘off’}

@jimpower As next step: Call the sensor.xiaomi_miio_raw_set_properties and add the following properties:

# http://localhost:8123/dev-service
Service: sensor.xiaomi_miio_raw_set_properties
Service Data: {"properties":["buzzer","child_lock","led","led_b","natural_level","natural_enable","speed","speed_level","use_time","angle","angle_enable","bat_charge","bat_state","button_pressed"]}

And provide your homeassistant.log again. This time the “New state” log message should contain more data.

2018-04-14 05:06:52 INFO (MainThread) [custom_components.sensor.xiaomi_miio_raw] New state: {‘power’: ‘off’}
2018-04-14 05:06:56 INFO (MainThread) [custom_components.sensor.xiaomi_miio_raw] New state: {‘buzzer’: ‘on’, ‘child_lock’: ‘off’, ‘led’: None, ‘led_b’: 0, ‘natural_level’: 0, ‘natural_enable’: None, ‘speed’: 371, ‘speed_level’: 15, ‘use_time’: 0, ‘angle’: 118, ‘angle_enable’: ‘on’, ‘bat_charge’: ‘complete’, ‘bat_state’: None, ‘button_pressed’: ‘speed’}

1 Like

Could you check a last thing: If you select oscillation of 120 degrees. Does the property “angle” alternates between 0 and 120 degrees or is the angle static / always around 120 degrees?

It alternates between 0 and 120 degrees, you need to select “off:” in the angle menu to be able to select to static angle, which is done via the left and right arrows.

Alright. I was looking for a property which indicates the current setting (angle in degrees). It isn’t provided unfortunatly.

Another detail: If you select a speed level is the property speed_level constant or does it vary in a specific range? Does the same behaviour apply for the natural mode and the property natural_speed?

The Speed function no longer work