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

Script problem after uptdate python #25

Open
xAsKeYx opened this issue Feb 19, 2020 · 4 comments
Open

Script problem after uptdate python #25

xAsKeYx opened this issue Feb 19, 2020 · 4 comments

Comments

@xAsKeYx
Copy link

xAsKeYx commented Feb 19, 2020

Hello,

I have update python 3.5 to 3.7, i follow again the instruction for install it and i have this error :

(.env) root@srv-askey:/opt/domoticz/plugins/xiaomi-mirobot# ./miio_server.py 192.168.1.42 "******************************************" --host 127.0.0.1 --port 22222
Traceback (most recent call last):
File "./miio_server.py", line 17, in
from miio import Vacuum, DeviceException
File "/usr/local/lib/python3.7/site-packages/miio/init.py", line 2, in
from miio.airconditioningcompanion import (
File "/usr/local/lib/python3.7/site-packages/miio/airconditioningcompanion.py", line 8, in
from .device import Device, DeviceException
File "/usr/local/lib/python3.7/site-packages/miio/device.py", line 14, in
from .protocol import Message
File "/usr/local/lib/python3.7/site-packages/miio/protocol.py", line 206, in
Const(0x2131, Int16ub),
File "/usr/local/lib/python3.7/site-packages/construct/core.py", line 1930, in init
super(Const, self).init(subcon)
File "/usr/local/lib/python3.7/site-packages/construct/core.py", line 288, in init
raise TypeError("subcon should be a Construct field")
TypeError: subcon should be a Construct field

Regards

@Sateetje
Copy link

Same problem here:

Traceback (most recent call last):
File "./miio_server.py", line 17, in
from miio import Vacuum, DeviceException
File "/usr/local/lib/python3.7/dist-packages/miio/init.py", line 2, in
from miio.protocol import Message, Utils
File "/usr/local/lib/python3.7/dist-packages/miio/protocol.py", line 155, in
Const(Int16ub, 0x2131),
File "/usr/local/lib/python3.7/dist-packages/construct/core.py", line 2504, in init
super(Const, self).init(subcon)
File "/usr/local/lib/python3.7/dist-packages/construct/core.py", line 670, in init
raise TypeError("subcon should be a Construct field")
TypeError: subcon should be a Construct field

@xAsKeYx
Copy link
Author

xAsKeYx commented Jun 11, 2020

my plugin working :
I solve my problem with
https://ehoco.nl/roborock-vacuum-cleaner-bedienen-domoticz/
and https://github.com/mrin/domoticz-mirobot-plugin

@Sateetje
Copy link

This did the trick: python-miio==0.4.5

This problem was solved in v0.3.5, pip installs v0.3.1 by default

@AlexCoursi
Copy link

I used the following versions in pip_req.txt

gevent==1.4.0
greenlet==0.4.15
python-miio==0.4.5
attrs==17.4.0
construct==2.10.56

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

3 participants