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

Unable use xiaomi_miio (decode() takes 3 positional arguments but 4 were given) #12471

Closed
SebRut opened this issue Feb 17, 2018 · 4 comments
Closed

Comments

@SebRut
Copy link

SebRut commented Feb 17, 2018

Home Assistant release (hass --version):
0.63.2

Python release (python3 --version):
Python 2.5.4

Component/platform:
xiaomi miio

Description of problem:
After updating to 0.63.2 I am no longer able to add my Xiaomi vacuum and WiFi socket.

Expected:
Beeing able to control my WiFi socket and vacuum using home-assistant.

Problem-relevant configuration.yaml entries and steps to reproduce:

switch:
  - platform: xiaomi_miio
    name: Lautsprecher
    host: _IP_
    token: _REDACTED_

Traceback (if applicable):

2018-02-17 11:28:53 WARNING (Thread-2) [homeassistant.components.vacuum.xiaomi_miio] Got exception while fetching the state: Unable to discover the device rockrobo.lan
2018-02-17 11:29:13 WARNING (Thread-9) [miio.device] error while reading discover results: _decode() takes 3 positional arguments but 4 were given
2018-02-17 11:29:13 ERROR (Thread-9) [miio.device] Unable to discover a device at address rockrobo.lan

Additional info:
This might be related.

@Lukeid
Copy link

Lukeid commented Feb 17, 2018

Same happens to me with 0.63.2.

I just set it up, so I can not confirm you if it worked with previous versions.

@nlienard
Copy link

nlienard commented Feb 17, 2018

Same here, i can't confirm with previous versions as i just received it today and got error after adding it to hass.

Home Assistant release (hass --version):
0.63.0

Python release (python3 --version):
Python 3.6.4

Component/platform:
xiaomi miio

Description of problem:
Installing Xiaomi WiFi Smart Plug socket.

Expected:
Beeing able to control my WiFi socket using home-assistant.

Problem-relevant configuration.yaml entries and steps to reproduce:

 switch:
   - platform: xiaomi_miio
     name: Xiaomi Mi Smart WiFi Socket 2
     host: 192.168.1.48
     token: 28e8c37798b083fbfc24260a0fb17bda

Traceback (if applicable):

 2018-02-17 22:53:00 WARNING (MainThread) [miio.device] error while reading discover results: _decode() takes 3 positional arguments but 4 were given
 2018-02-17 22:53:00 ERROR (MainThread) [miio.device] Unable to discover a device at address 192.168.1.48

@nlienard
Copy link

nlienard commented Feb 19, 2018

By changing the requirement version (python-miio==0.3.6), it fixed the issue

 root@osmc:/usr/local/lib/python3.6/site-packages/homeassistant/components/switch# diff   xiaomi_miio.py xiaomi_miio.py.bak
 28c28
 < REQUIREMENTS = ['python-miio==0.3.6']
 ---
 > REQUIREMENTS = ['python-miio==0.3.5']

in LOG:

 2018-02-19 13:43:41 INFO (MainThread) [homeassistant.components.switch.xiaomi_miio] Initializing with host 192.168.1.48 (token 28e8c...)
 2018-02-19 13:43:42 INFO (MainThread) [homeassistant.components.switch.xiaomi_miio] zimi.powerstrip.v2 1.2.4_51 MW300 initialized

I found the information on this commit:

a4944da#diff-9322b056aa2e0b9060e2778c1ff24fa6

@SebRut
Copy link
Author

SebRut commented Feb 19, 2018

fixed by #12392

@SebRut SebRut closed this as completed Feb 19, 2018
@balloob balloob mentioned this issue Feb 22, 2018
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants