xiaomi_fan
xiaomi_fan copied to clipboard
Add dmaker.fan.p45 support
Just tried adding my fan in Home Assistant, getting: "Unsupported device found! dmaker.fan.p45". Are there any plans on implementing it, or some generic way of controlling it, seems that others has got it to work, although not officially supported by your integration, but there are little info on how to.
Thanks in advance.
Today has got same fan and surprised it is a not supported. Please add.
Here is specs: https://home.miot-spec.com/spec?type=urn:miot-spec-v2:device:fan:0000A005:dmaker-p45:1
тоже жду dmaker.fan.p45 . Добавьте, пожалуйста
Please add support for this device. It's new, apparently.
Please add device support. This model is becoming popular.
Please add device support - dmaker.fan.p45
Voting for this issue fix:
Logger: custom_components.xiaomi_miio_fan.fan Source: custom_components/xiaomi_miio_fan/fan.py:519 Integration: xiaomi_miio_fan (documentation, issues) First occurred: 10:45:20 AM (1 occurrences) Last logged: 10:45:20 AM Unsupported device found! Please create an issue at https://github.com/syssi/xiaomi_fan/issues and provide the following data: dmaker.fan.p45
Voting for the support of this device also.
I used this kind of workaround to gain control for Xiomi Tower Fan 2 (p45).
-
Copy this code
-
In HA:
docker exec -it homeassistant bash
cd /usr/local/lib/python3.11/site-packages/miio/integrations/fan/dmaker
mv fan_miot.py fan_miot.py.original
vi fan_miot.py
press i paste code press esc esc
:wq!
exit
-
restart home assistant
-
Add fan Add Integration Xiaomi Miot Auto Add device using host/token Use token and IP, see instructions for getting token
-
Your Fan should be integrated now. I was surprised it still works after upgrade to 2024.1.3, even the fan_miot.py is back to old version.
Workaround by @hpirila haven't worked for me (even after changing python version in path) - I had an error starting the integration. So I tried the following:
docker exec -it homeassistant bash
cd /usr/local/lib/python3.12/site-packages/miio/integrations/fan/dmaker
mdkir bkp
cp fan* ./bkp/
mkdir github
cd github/
wget https://github.com/rytilahti/python-miio/raw/master/miio/integrations/dmaker/fan/fan.py
wget https://github.com/rytilahti/python-miio/raw/master/miio/integrations/dmaker/fan/fan_miot.py
ls -la
cd ..
cp -f ./github/* ./
exit
So, skip the first step, modify the second and follow the other original steps - and now I can control the fan from HA.
Workaround by @hpirila haven't worked for me (even after changing python version in path) - I had an error starting the integration. So I tried the following:
docker exec -it homeassistant bash cd /usr/local/lib/python3.12/site-packages/miio/integrations/fan/dmaker mdkir bkp cp fan* ./bkp/ mkdir github cd github/ wget https://github.com/rytilahti/python-miio/raw/master/miio/integrations/dmaker/fan/fan.py wget https://github.com/rytilahti/python-miio/raw/master/miio/integrations/dmaker/fan/fan_miot.py ls -la cd .. cp -f ./github/* ./ exit
So, skip the first step, modify the second and follow the other original steps - and now I can control the fan from HA.
Eugene, hello!
I am a novice HA user, and I couldn't figure out what I need to do. I have HA in supervized mode. I did the following via terminal in HA:
- went to /root/homeassistant/custom_components/xiaomi_miio_fan folder
- cp -r fan.py fan.old
- wget https://github.com/rytilahti/python-miio/raw/master/miio/integrations/dmaker/fan/fan.py
- wget https://github.com/rytilahti/python-miio/raw/master/miio/integrations/dmaker/fan/fan_miot.py
After rebooting HA I got the following message: Unable to configure xiaomi_miio_fan fan by adding platform: xiaomi_miio_fan to fan configuration. Please see the documentation for more information on how to configure this integration.
To resolve this issue:
Remove platform: xiaomi_miio_fan from the fan: configuration in the YAML configuration file. Restart Home Assistant. An example of a snippet that should be deleted:
fan:
- platform: xiaomi_miio_fan
Workaround by @hpirila haven't worked for me (even after changing python version in path) - I had an error starting the integration. So I tried the following:
docker exec -it homeassistant bash cd /usr/local/lib/python3.12/site-packages/miio/integrations/fan/dmaker mdkir bkp cp fan* ./bkp/ mkdir github cd github/ wget https://github.com/rytilahti/python-miio/raw/master/miio/integrations/dmaker/fan/fan.py wget https://github.com/rytilahti/python-miio/raw/master/miio/integrations/dmaker/fan/fan_miot.py ls -la cd .. cp -f ./github/* ./ exit
So, skip the first step, modify the second and follow the other original steps - and now I can control the fan from HA.
a dubious decision. I don't have a model p45 from the list displayed Miio.
@inhibitz @velizarofff Guys, you mention Miio integration, but @hpirila and I wrote about "Xiaomi Miot Auto" from HACS
Xiaomi Miot Auto
I apologize. I missed it. :)
@inhibitz @velizarofff Guys, you mention Miio integration, but @hpirila and I wrote about "Xiaomi Miot Auto" from HACS
Thank you! I just install this addon and it worked without any edits.