i thing so.
the mihome app send notificacion with a "timer" no more

Moderator: leecollings
So how does Mi Home notify about cleaning the dust bin?
Thank you for your reply. So I think I will implement notifications through a timer in domoticz to remember to clean the dust bin after some hours of use. I see in the python script that there is an option to get all time cleaned, do you know if we are able to read it from domoticz?
I'm looking for this also. I found the manuals but there is no "apt-get" available on my synology. It seemed Debian Chroot did this in the past, but isn't available anymore. Who knows a solution?
Code: Select all
(.env) pi@raspberrypi:~/domoticz/plugins/xiaomi-mi-robot-vacuum $ pip3 install -r pip_req.txt
Code: Select all
...
Using cached https://files.pythonhosted.org/packages/6b/88/48dbe88b10098f98acef33218763c5630b0081c7fd0849ab4793b1e9b6d3/zeroconf-0.19.1-py2.py3-none-any.whl
Installing collected packages: android-backup, asn1crypto, attrs, pycparser, cffi, click, construct, six, idna, cryptography, enum-compat, greenlet, gevent, msgpack-python, netifaces, pretty-cron, pycrypto, pytz, typing, zeroconf, python-miio
Could not install packages due to an EnvironmentError: [Errno 13] Prístup odmietnutý: '/home/pi/domoticz/plugins/xiaomi-mi-robot-vacuum/.env/lib/python3.5/site-packages/android_backup-0.1.0.dist-info'
Consider using the `--user` option or check the permissions.
Code: Select all
pi@raspberrypi:~/domoticz/plugins/xiaomi-mi-robot-vacuum/.env/lib/python3.5/site-packages $ ls
Code: Select all
easy_install.py pip-18.1.dist-info __pycache__ setuptools-40.5.0.dist-info wheel-0.32.2.dist-info
pip pkg_resources setuptools wheel
Jheronymus wrote: ↑Saturday 02 June 2018 15:09So, I fixed my earlier problem. I noticed I was using sudo a lot. And you have to be carefull with that while in the virtualenv. As you can see in the logs posted before, the msgpack was installed, but outside the virtual env. /usr/local/lib/python3.4/dist-packages/msgpackJheronymus wrote: ↑Thursday 17 May 2018 16:56Geitje wrote: ↑Tuesday 06 March 2018 1:29 I already found out.
See this post: http://www.domoticz.com/forum/viewtopic ... ck#p163889.
Note: insert:
sys.path.append('/usr/local/lib/python3.5/site-packages')
after "import domoticz" in the plugin.py file.
so WITHOUT the and /b codes mentioned in the post, if you insert them too it does nog work I found out!
Hi, I have a similar problem, but the solution didn't work for me.
When I try to add the line, domoticz won't boot (ie. the browser keeps indicating domoticz is offline or not available)
The error in the domoticz log (without the line)I've added this:Code: Select all
Error: (xiaomi-mi-robot-vacuum) failed to load 'plugin.py', Python Path used was '/home/jeroen/domoticz/plugins/xiaomi-robot/:/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'. Error: (Robottest) Module Import failed, exception: 'ImportError' Error: (Robottest) Module Import failed: ' Name: msgpack'
FYI:Code: Select all
sys.path.append('/usr/local/lib/python3.4/dist-packages')
I get this response for searching for msgpack:
I've no idea how to debug this at this point. When I run the test script:Code: Select all
jeroen@Domoticz:~ $ sudo find / -name msgpack* [sudo] password for jeroen: /home/jeroen/domoticz/plugins/xiaomi-robot/.env/lib/python3.4/site-packages/pip/_vendor/msgpack /home/jeroen/.cache/pip/wheels/62/f3/0d/f77f20fce259496b053d6c0dc0eea7114527cf0a7da115a980/msgpack_python-0.4.8-cp34-cp34m-linux_armv6l.whl /usr/local/lib/python3.4/dist-packages/msgpack_python-0.4.8-py3.4.egg-info /usr/local/lib/python3.4/dist-packages/msgpack
But if I start the server from the command line and run the test.py from another console, I can get valid output.jeroen@Domoticz:~/domoticz/plugins/xiaomi-robot $ sudo ./test.py
test: python modules path: ././.env/lib/python3.4/site-packages
test: trying connect to 127.0.0.1:22222
Traceback (most recent call last):
File "./test.py", line 22, in <module>
client = socket.create_connection((args.host, args.port))
File "/usr/lib/python3.4/socket.py", line 509, in create_connection
raise err
File "/usr/lib/python3.4/socket.py", line 500, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
jeroen@Domoticz:~/domoticz/plugins/xiaomi-robot $sudo python3 miio_server.py 192.168.1.43 token
server: Starting server on 127.0.0.1 22222
server: connected ('127.0.0.1', 42656)
server: got socket msg: ['status']
server: vac result {'clean_area': 62.4725, 'error': None, 'battery': 100, 'cmd': 'status', 'state_code': 8, 'clean_seconds': 4418, 'fan_level': 60}
server: send reply ('127.0.0.1', 42656)
server: closed connection ('127.0.0.1', 42656)
You can test it like this:You might also upgrade setuptools in the virtualenv.Code: Select all
> which python /usr/bin/python > which pip3 /usr/bin/pip3 >source .env/bin/activate >which python3 /home/jeroen/domoticz/plugins/xiaomi-mirobot/.env/bin/python3 >which pip3 /home/jeroen/domoticz/plugins/xiaomi-mirobot/.env/bin/pip3 >sudo which pip3 /usr/bin/pip3 <= sudo points outside the virtualenv
then just run the pip3 install -r pip_req.txt command
All should be fine. Close the virtualenv withNow you can actualy see the packages in the virtualenv:Code: Select all
>deactivate
Code: Select all
>~/domoticz/plugins/xiaomi-mirobot/.env/lib/python3.5/site-packages $ ls Crypto msgpack __pycache__ msgpack_python-0.4.8.dist-info _cffi_backend.cpython-35m-arm-linux-gnueabihf.so netifaces-0.10.6.dist-info android_backup netifaces.cpython-35m-arm-linux-gnueabihf.so android_backup-0.1.0.dist-info pip asn1crypto pip-10.0.1.dist-info asn1crypto-0.23.0.dist-info pkg_resources attr pretty_cron attrs-17.2.0.dist-info pretty_cron-1.0.2.dist-info cffi psutil cffi-1.11.2.dist-info psutil-5.4.5.dist-info click pycparser click-6.7.dist-info pycparser-2.18.dist-info construct pycrypto-2.6.1.dist-info construct-2.8.16.dist-info python_miio-0.3.1.dist-info cryptography pytz cryptography-2.1.3.dist-info pytz-2017.3.dist-info easy_install.py setuptools enum_compat-0.0.2.dist-info setuptools-39.2.0.dist-info gevent six-1.11.0.dist-info gevent-1.2.2.dist-info six.py greenlet-0.4.12.dist-info typing-3.6.2.dist-info greenlet.cpython-35m-arm-linux-gnueabihf.so typing.py idna wheel idna-2.6.dist-info wheel-0.31.1.dist-info miio zeroconf-0.19.1.dist-info mirobo zeroconf.py
Code: Select all
pi@raspberrypi:~/domoticz/plugins/xiaomi-mi-robot-vacuum $ virtualenv -p python3 .env
Code: Select all
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/pi/domoticz/plugins/xiaomi-mi-robot-vacuum/.env/bin/python3
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/virtualenv.py", line 762, in main
symlink=options.symlink,
File "/usr/local/lib/python3.5/dist-packages/virtualenv.py", line 998, in create_environment
install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages=site_packages, clear=clear, symlink=symlink)
File "/usr/local/lib/python3.5/dist-packages/virtualenv.py", line 1318, in install_python
make_exe(py_executable)
File "/usr/local/lib/python3.5/dist-packages/virtualenv.py", line 449, in make_exe
os.chmod(fn, newmode)
PermissionError: [Errno 1] Operation not permitted: '/home/pi/domoticz/plugins/xiaomi-mi-robot-vacuum/.env/bin/python3'
Code: Select all
sudo pip uninstall virtualenv
Code: Select all
virtualenv -p python3 .env
Code: Select all
>sudo which pip3
/usr/bin/pip3
Code: Select all
> sudo which pip3
/usr/local/bin/pip3
Code: Select all
pi@raspberrypi:~/domoticz/plugins/xiaomi-mirobot $ sudo ./test.py
test: python modules path: ././.env/lib/python3.5/site-packages
test: trying connect to 127.0.0.1:22222
Traceback (most recent call last):
File "./test.py", line 22, in <module>
client = socket.create_connection((args.host, args.port))
File "/usr/lib/python3.5/socket.py", line 712, in create_connection
raise err
File "/usr/lib/python3.5/socket.py", line 703, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Code: Select all
pi@raspberrypi:~/domoticz/plugins/xiaomi-mirobot $ sudo service miio_server stop
pi@raspberrypi:~/domoticz/plugins/xiaomi-mirobot $ sudo ./miio_server.py IP token --host 127.0.0.1 --port 22222
Traceback (most recent call last):
File "./miio_server.py", line 18, in <module>
from miio import Vacuum, DeviceException
File "/usr/local/lib/python3.5/dist-packages/miio/__init__.py", line 2, in <module>
from miio.airconditioningcompanion import AirConditioningCompanion
File "/usr/local/lib/python3.5/dist-packages/miio/airconditioningcompanion.py", line 8, in <module>
from .device import Device, DeviceException
File "/usr/local/lib/python3.5/dist-packages/miio/device.py", line 16, in <module>
from .protocol import Message
File "/usr/local/lib/python3.5/dist-packages/miio/protocol.py", line 190, in <module>
Const(0x2131, Int16ub),
File "/usr/local/lib/python3.5/dist-packages/construct/core.py", line 1930, in __init__
super(Const, self).__init__(subcon)
File "/usr/local/lib/python3.5/dist-packages/construct/core.py", line 288, in __init__
raise TypeError("subcon should be a Construct field")
TypeError: subcon should be a Construct field
I am just testing by the sequence given in the manual...Stimpy68 wrote:Can't seem to find it anywhere, how do you update the miirobo part?
I already found it, just execute
Code: Select all
sudo pip3 install python-miio
Same case here. I've updated to latest stable version and I can't see any device, even if I remove and add hardware again.droop wrote:Hello,
I have installed the plugin with the last stable version of Domoticz on a Rpi3.
test.py works well and i can add the hardware in domoticz interface.
The logs shows that domoticz can communicate with the server.
My problem is that no new devices are available into domoticz.
does someone have any idea ?
Thanks for the suggestion droop!droop wrote:I have solved my problem by activating "Accept new Hardware Devices" in Domoticz "Settings" before creating the Hardware.
Did you find a way to do this ? i know that Home Assistant can do it. I try it and it works so it must be possible to do the same in domoticz. I hope soStimpy68 wrote: ↑Saturday 11 August 2018 13:22 Is there anyway to use the "spot" function? There is a button in Domoticz, but when I push it, the vacuum says that I have to place the vacuum in the target area. Usually you draw the target area in the map with the app and start the zoned cleanup.
The protocol had the command for it: https://github.com/marcelrv/XiaomiRobot ... d_clean.md
Would be nice to incorperate that in the plugin, also the "mop" option would be nice to have.
Im also "fighting" on Synology , but im also loosing..
I find a way to get it working so now i can choose wich room would be cleanedaxel2906 wrote: ↑Saturday 05 January 2019 17:32Did you find a way to do this ? i know that Home Assistant can do it. I try it and it works so it must be possible to do the same in domoticz. I hope soStimpy68 wrote: ↑Saturday 11 August 2018 13:22 Is there anyway to use the "spot" function? There is a button in Domoticz, but when I push it, the vacuum says that I have to place the vacuum in the target area. Usually you draw the target area in the map with the app and start the zoned cleanup.
The protocol had the command for it: https://github.com/marcelrv/XiaomiRobot ... d_clean.md
Would be nice to incorperate that in the plugin, also the "mop" option would be nice to have.
That's a great implementation to do zoned clean in domoticz.axel2906 wrote:I find a way to get it working so now i can choose wich room would be cleanedaxel2906 wrote: ↑Saturday 05 January 2019 17:32Did you find a way to do this ? i know that Home Assistant can do it. I try it and it works so it must be possible to do the same in domoticz. I hope soStimpy68 wrote: ↑Saturday 11 August 2018 13:22 Is there anyway to use the "spot" function? There is a button in Domoticz, but when I push it, the vacuum says that I have to place the vacuum in the target area. Usually you draw the target area in the map with the app and start the zoned cleanup.
The protocol had the command for it: https://github.com/marcelrv/XiaomiRobot ... d_clean.md
Would be nice to incorperate that in the plugin, also the "mop" option would be nice to have.
you need
python 3.5 or above (i've followed this https://gist.github.com/dschep/24aa6167 ... 824400d37f)
set python 3.x as default (update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2)
sudo apt-get install python3-pip
pip3 install python-miio
try in command line : sudo -H -u pi mirobo --ip MYIP --token MYTOKEN status
create sh script in /home/pi/domoticz/scripts (sudo -H -u pi mirobo --ip MYIP --token MYTOKEN zoned-clean [[26044,17953,30944,21153,1]]
chmod +x sh file
then make in domoticz a dummy selector switch, set your room adn set for each room the link to each script
dagasoft wrote: ↑Sunday 13 January 2019 13:13That's a great implementation to do zoned clean in domoticz.axel2906 wrote:I find a way to get it working so now i can choose wich room would be cleaned
Capture4.PNG
you need
python 3.5 or above (i've followed this https://gist.github.com/dschep/24aa6167 ... 824400d37f)
set python 3.x as default (update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2)
sudo apt-get install python3-pip
pip3 install python-miio
try in command line : sudo -H -u pi mirobo --ip MYIP --token MYTOKEN status
create sh script in /home/pi/domoticz/scripts (sudo -H -u pi mirobo --ip MYIP --token MYTOKEN zoned-clean [[26044,17953,30944,21153,1]]
chmod +x sh file
then make in domoticz a dummy selector switch, set your room adn set for each room the link to each script
Capture5.PNG
By the way, how do you determine limits to input the numbers in each room?
Users browsing this forum: No registered users and 1 guest