Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration seems to be broken after update to Home Assistant 2021.4.1 #105

Closed
jemmerich opened this issue Apr 9, 2021 · 9 comments
Closed

Comments

@jemmerich
Copy link

After update to Home Assistant 2021.4.1 integration does not work anymore

Logger: homeassistant.components.fan
Source: custom_components/xiaomi_miio_fan/fan_1c.py:113
Integration: Fan (documentation, issues)
First occurred: 21:22:36 (1 occurrences)
Last logged: 21:22:36

Error while setting up xiaomi_miio_fan platform for fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 205, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/xiaomi_miio_fan/fan.py", line 303, in async_setup_platform
fan = Fan1C(host, token)
File "/config/custom_components/xiaomi_miio_fan/fan_1c.py", line 113, in init
super().init(_MAPPING, ip, token, start_id, debug, lazy_discover)
File "/usr/local/lib/python3.8/site-packages/miio/device.py", line 150, in init
self._protocol = MiIOProtocol(
File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 43, in init
self.token = bytes.fromhex(token)
ValueError: non-hexadecimal number found in fromhex() arg at position 3

@johnjoemorgan
Copy link

johnjoemorgan commented Apr 10, 2021

On upgrade to 2021.4.x for these 2 fans:

NAME: Aunt Fanny
ID: 240xxxx4
IP: 192.168.0.xx
TOKEN: 82540fxxxxxxxxxxxxxxx5e2
MODEL: dmaker.fan.1c

NAME: Fanny
ID: 721xxxx1
IP: 192.168.0.1.xxx
TOKEN: 1b927xxxxxxxxxxxxxx8578ff6f
MODEL: zhimi.fan.sa1

The zhimi.fan.sa1 continues to respond as before but he dmaker.fan.1c is unavailable.

Looking at the github notes I see that the zhimi is under airpurifier code and dmaker is in the fan code.

Currently I have downgraded to 2021.3.x but I can upgrade again so I can give you exact config files and results

I am based in Asia/PH GMT-8

Let me know, as I'm not a coder this is the best way I can contribute.

@syssi
Copy link
Owner

syssi commented Apr 10, 2021

Please update the custom component and give it another try.

@jemmerich
Copy link
Author

Reinstalled the component in HACS, same error

Logger: homeassistant.components.fan
Source: custom_components/xiaomi_miio_fan/fan_1c.py:113
Integration: Fan (documentation, issues)
First occurred: 22:24:32 (1 occurrences)
Last logged: 22:24:32

Error while setting up xiaomi_miio_fan platform for fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 205, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/xiaomi_miio_fan/fan.py", line 303, in async_setup_platform
fan = Fan1C(host, token)
File "/config/custom_components/xiaomi_miio_fan/fan_1c.py", line 113, in init
super().init(_MAPPING, ip, token, start_id, debug, lazy_discover)
File "/usr/local/lib/python3.8/site-packages/miio/device.py", line 150, in init
self._protocol = MiIOProtocol(
File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 43, in init
self.token = bytes.fromhex(token)
ValueError: non-hexadecimal number found in fromhex() arg at position 3

@syssi
Copy link
Owner

syssi commented Apr 10, 2021

@jemmerich The file fan_1c.py isn't part of this custom component. It looks like you are using this fork:

https://github.com/damianpasek/xiaomi_fan

The dmaker.fan.c1 isn't supported at this custom component right now.

@JeroLajHub
Copy link

I am too using this fork. His author already wrote to you somewhere in your forum to let you implement it in your custom component, if I am not wrong. Do you consider this, as we would have the both advantages in one place : your active development and Fan 1C support ? Best regards.

Right now no fan custom component (fan or airpurifier) works in my updated home assistant for 1C. I have no other Xiamoi fan to compare. I am continuing to try with you lastest udgrades in the last hour.

@jemmerich
Copy link
Author

used to work very reliably until the last update...

@syssi
Copy link
Owner

syssi commented Apr 10, 2021

I've prepared a PR to add the device support of the dmaker.fan.c1 to python-miio. As soon the device is available there I can add it to this custom component.

@JeroLajHub
Copy link

I've prepared a PR to add the device support of the dmaker.fan.c1 to python-miio. As soon the device is available there I can add it to this custom component.

That(s great ! Thanks.

#101

@syssi
Copy link
Owner

syssi commented Apr 18, 2021

I'm closing this issue because it's unrelated to this custom component.

@syssi syssi closed this as completed Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants