Python plugin: Xiaomi Mi Robot Vacuum Topic is solved

Python and python framework

Moderator: leecollings

laszlo
Posts: 1
Joined: Saturday 23 January 2021 22:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Xiaomi Mi Robot Vacuum

Post by laszlo »

Hi
I have a problem with plugin for Mi Robot. In domoticz logs there is something like that:

Code: Select all

Error: (PP-MANAGER) failed to load 'plugin.py', Python Path used was ':/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
Error: (Python) Module Import failed, exception: 'ModuleNotFoundError'
Error: (Python) Module Import failed: ' Name: plugin'
Error: (Python) Error Line details not available. 
Domoticz version: 2020.2
OS detail:

Code: Select all

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
Does anyone know what could be the problem?
DarkAllMan
Posts: 52
Joined: Friday 23 December 2016 9:41
Target OS: Linux
Domoticz version:
Contact:

Re: Python plugin: Xiaomi Mi Robot Vacuum

Post by DarkAllMan »

Could latest beta be the issue for not communicating anymore?

Code: Select all

~/domoticz/plugins/xiaomi-mirobot$ sudo ./test.py
test: python modules path: ././.env/lib/python3.6/site-packages
test: python modules path: ././.env/lib/python3.5/site-packages
test: trying connect to 192.168.1.120: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.8/socket.py", line 808, in create_connection
    raise err
  File "/usr/lib/python3.8/socket.py", line 796, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

Code: Select all

  File "/home/user/domoticz/plugins/xiaomi-mirobot/miio_server.py", line 9, in <module>
    from gevent import monkey
  File "/home/user/domoticz/plugins/xiaomi-mirobot/./.env/lib/python3.6/site-packages/gevent/__init__.py", line 86, in <module>
    from gevent._hub_local import get_hub
  File "/home/user/domoticz/plugins/xiaomi-mirobot/./.env/lib/python3.6/site-packages/gevent/_hub_local.py", line 101, in <module>
    import_c_accel(globals(), 'gevent.__hub_local')
  File "/home/user/domoticz/plugins/xiaomi-mirobot/./.env/lib/python3.6/site-packages/gevent/_util.py", line 148, in import_c_accel
    mod = importlib.import_module(cname)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'gevent._gevent_c_hub_local'
tontze
Posts: 317
Joined: Thursday 12 January 2017 15:30
Target OS: Linux
Domoticz version: Beta Ch
Location: Finland
Contact:

Re: Python plugin: Xiaomi Mi Robot Vacuum

Post by tontze »

.
Last edited by tontze on Monday 22 March 2021 11:16, edited 1 time in total.
-----------------------------------------
Smartthings
zigbee2mqtt
RFLink 433mhz / Nrf 2.4Ghz
Mi Light
esp8266MiLight Hub
OpenHab/HomeAssistant/Domoticz
HP T610 & Debian 5.10.19-1 x86_64[/b]
tontze
Posts: 317
Joined: Thursday 12 January 2017 15:30
Target OS: Linux
Domoticz version: Beta Ch
Location: Finland
Contact:

Re: Python plugin: Xiaomi Mi Robot Vacuum

Post by tontze »

axel2906 wrote: Sunday 13 January 2019 12:31
axel2906 wrote: Saturday 05 January 2019 17:32
Stimpy68 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.
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 so
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
Thanks for this, but im getting some errors @axel2906 :

Code: Select all

tontze@T610:~/domoticz/plugins/xiaomi-mirobot$ sudo -H -u tontze mirobo --ip 192.168.1.xx --token xxxxxxxxxxxxxxxxxxxx status
Traceback (most recent call last):
  File "/usr/local/bin/mirobo", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.9/dist-packages/miio/click_common.py", line 59, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1256, in invoke
    Command.invoke(self, ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/miio/vacuum_cli.py", line 61, in cli
    with open(id_file, "r") as f, contextlib.suppress(
FileNotFoundError: [Errno 2] No such file or directory: '/home/tontze/.cache/python-miio/python-mirobo.seq'
-----------------------------------------
Smartthings
zigbee2mqtt
RFLink 433mhz / Nrf 2.4Ghz
Mi Light
esp8266MiLight Hub
OpenHab/HomeAssistant/Domoticz
HP T610 & Debian 5.10.19-1 x86_64[/b]
tontze
Posts: 317
Joined: Thursday 12 January 2017 15:30
Target OS: Linux
Domoticz version: Beta Ch
Location: Finland
Contact:

Re: Python plugin: Xiaomi Mi Robot Vacuum

Post by tontze »

tontze wrote: Monday 22 March 2021 11:15
axel2906 wrote: Sunday 13 January 2019 12:31
axel2906 wrote: Saturday 05 January 2019 17:32

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 so
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
Thanks for this, but im getting some errors @axel2906 :

Code: Select all

tontze@T610:~/domoticz/plugins/xiaomi-mirobot$ sudo -H -u tontze mirobo --ip 192.168.1.xx --token xxxxxxxxxxxxxxxxxxxx status
Traceback (most recent call last):
  File "/usr/local/bin/mirobo", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.9/dist-packages/miio/click_common.py", line 59, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1256, in invoke
    Command.invoke(self, ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/miio/vacuum_cli.py", line 61, in cli
    with open(id_file, "r") as f, contextlib.suppress(
FileNotFoundError: [Errno 2] No such file or directory: '/home/tontze/.cache/python-miio/python-mirobo.seq'
Others having this problem, its a bug and can be fixed by creating that missing file, and adding {} inside it.
-----------------------------------------
Smartthings
zigbee2mqtt
RFLink 433mhz / Nrf 2.4Ghz
Mi Light
esp8266MiLight Hub
OpenHab/HomeAssistant/Domoticz
HP T610 & Debian 5.10.19-1 x86_64[/b]
maomanna
Posts: 94
Joined: Monday 30 November 2015 16:21
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Xiaomi Mi Robot Vacuum

Post by maomanna »

I found an easy way to retreive the token.

https://github.com/PiotrMachowski/Xiaom ... -extractor

Just log in and get it :)
User avatar
remb0
Posts: 499
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Python plugin: Xiaomi Mi Robot Vacuum

Post by remb0 »

This is a great tip! it helps a lot of Xiaomi integration problems with vacuums, fans, and all other xiaomi devices that needs a Key :)
maomanna wrote: Friday 21 May 2021 12:22 I found an easy way to retreive the token.

https://github.com/PiotrMachowski/Xiaom ... -extractor

Just log in and get it :)
maomanna
Posts: 94
Joined: Monday 30 November 2015 16:21
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Xiaomi Mi Robot Vacuum

Post by maomanna »

I read the whole thread and other sites discussing this plugin, but I still get this error.

Reinstalled everything.
Updated all the packages.

Code: Select all

test: python modules path: ././.env/lib/python3.8/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.8/socket.py", line 808, in create_connection
    raise err
  File "/usr/lib/python3.8/socket.py", line 796, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
In domoticz

Code: Select all

2021-05-24 12:12:15.152 (Mees) Processing 'onDisconnectCallback' message
2021-05-24 12:12:15.153 Mees: (Mees) Calling message handler 'onDisconnect'.
2021-05-24 12:12:15.153 Mees: (Mees) MIIOServer disconnected
2021-05-24 12:12:30.051 Mees: (Mees) Pushing 'onHeartbeatCallback' on to queue
2021-05-24 12:12:30.102 (Mees) Processing 'onHeartbeatCallback' message
2021-05-24 12:12:30.102 Mees: (Mees) Calling message handler 'onHeartbeat'.
2021-05-24 12:12:30.102 Mees: (Mees) Pushing 'ConnectDirective' on to queue
2021-05-24 12:12:30.102 Mees: (Mees) Trying connect to MIIOServer 127.0.0.1:22222
2021-05-24 12:12:30.102 (Mees) Processing 'ConnectDirective' message
2021-05-24 12:12:30.102 Mees: (Mees) Transport set to: 'TCP/IP', 127.0.0.1:22222.
2021-05-24 12:12:30.102 Mees: (Mees) Connect directive received, action initiated successfully.
2021-05-24 12:12:30.102 Mees: (Mees) Pushing 'onConnectCallback' on to queue
2021-05-24 12:12:30.103 Mees: (Mees) Pushing 'DisconnectedEvent' on to queue
2021-05-24 12:12:30.152 (Mees) Processing 'onConnectCallback' message
2021-05-24 12:12:30.153 Mees: (Mees) Calling message handler 'onConnect'.
2021-05-24 12:12:30.153 Mees: (Mees) MIIOServer connection status is [111] [Connection refused]
2021-05-24 12:12:30.153 (Mees) Processing 'DisconnectedEvent' message
2021-05-24 12:12:30.153 Mees: (Mees) Disconnect event received for '127.0.0.1:22222'.
2021-05-24 12:12:30.153 Mees: (Mees) Pushing 'onDisconnectCallback' on to queue
2021-05-24 12:12:30.153 (Mees) Processing 'onDisconnectCallback' message
2021-05-24 12:12:30.153 Mees: (Mees) Calling message handler 'onDisconnect'.
2021-05-24 12:12:30.153 Mees: (Mees) MIIOServer disconnected
2021-05-24 12:12:45.047 Mees: (Mees) Pushing 'onHeartbeatCallback' on to queue
2021-05-24 12:12:45.097 (Mees) Processing 'onHeartbeatCallback' message
2021-05-24 12:12:45.097 Mees: (Mees) Calling message handler 'onHeartbeat'.
2021-05-24 12:12:45.097 Mees: (Mees) Pushing 'ConnectDirective' on to queue
2021-05-24 12:12:45.097 Mees: (Mees) Trying connect to MIIOServer 127.0.0.1:22222
2021-05-24 12:12:45.097 (Mees) Processing 'ConnectDirective' message
2021-05-24 12:12:45.097 Mees: (Mees) Transport set to: 'TCP/IP', 127.0.0.1:22222.
2021-05-24 12:12:45.098 Mees: (Mees) Connect directive received, action initiated successfully.
2021-05-24 12:12:45.098 Mees: (Mees) Pushing 'onConnectCallback' on to queue
2021-05-24 12:12:45.098 Mees: (Mees) Pushing 'DisconnectedEvent' on to queue
2021-05-24 12:12:45.148 (Mees) Processing 'onConnectCallback' message
2021-05-24 12:12:45.148 Mees: (Mees) Calling message handler 'onConnect'.
2021-05-24 12:12:45.148 Mees: (Mees) MIIOServer connection status is [111] [Connection refused]
2021-05-24 12:12:45.148 (Mees) Processing 'DisconnectedEvent' message
2021-05-24 12:12:45.148 Mees: (Mees) Disconnect event received for '127.0.0.1:22222'.
2021-05-24 12:12:45.148 Mees: (Mees) Pushing 'onDisconnectCallback' on to queue
2021-05-24 12:12:45.148 (Mees) Processing 'onDisconnectCallback' message
2021-05-24 12:12:45.148 Mees: (Mees) Calling message handler 'onDisconnect'.
2021-05-24 12:12:45.148 Mees: (Mees) MIIOServer disconnected
2021-05-24 12:13:00.042 Mees: (Mees) Pushing 'onHeartbeatCallback' on to queue
2021-05-24 12:13:00.092 (Mees) Processing 'onHeartbeatCallback' message
2021-05-24 12:13:00.092 Mees: (Mees) Calling message handler 'onHeartbeat'.
2021-05-24 12:13:00.092 Mees: (Mees) Pushing 'ConnectDirective' on to queue
2021-05-24 12:13:00.092 Mees: (Mees) Trying connect to MIIOServer 127.0.0.1:22222
2021-05-24 12:13:00.092 (Mees) Processing 'ConnectDirective' message
2021-05-24 12:13:00.092 Mees: (Mees) Transport set to: 'TCP/IP', 127.0.0.1:22222.
2021-05-24 12:13:00.092 Mees: (Mees) Connect directive received, action initiated successfully.
2021-05-24 12:13:00.092 Mees: (Mees) Pushing 'onConnectCallback' on to queue
2021-05-24 12:13:00.092 Mees: (Mees) Pushing 'DisconnectedEvent' on to queue
2021-05-24 12:13:00.092 (Mees) Processing 'onConnectCallback' message
2021-05-24 12:13:00.092 Mees: (Mees) Calling message handler 'onConnect'.
2021-05-24 12:13:00.092 Mees: (Mees) MIIOServer connection status is [111] [Connection refused]
2021-05-24 12:13:00.092 (Mees) Processing 'DisconnectedEvent' message
2021-05-24 12:13:00.092 Mees: (Mees) Disconnect event received for '127.0.0.1:22222'.
2021-05-24 12:13:00.092 Mees: (Mees) Pushing 'onDisconnectCallback' on to queue
2021-05-24 12:13:00.093 (Mees) Processing 'onDisconnectCallback' message
2021-05-24 12:13:00.093 Mees: (Mees) Calling message handler 'onDisconnect'.
2021-05-24 12:13:00.093 Mees: (Mees) MIIOServer disconnected
2021-05-24 12:13:14.153 Error: Mees hardware (3) nothing received for more than 1 Minute!....
2021-05-24 12:13:15.088 Mees: (Mees) Trying connect to MIIOServer 127.0.0.1:22222
2021-05-24 12:13:15.088 (Mees) Processing 'ConnectDirective' message
2021-05-24 12:13:15.088 Mees: (Mees) Transport set to: 'TCP/IP', 127.0.0.1:22222.
2021-05-24 12:13:15.088 Mees: (Mees) Connect directive received, action initiated successfully.
2021-05-24 12:13:15.089 Mees: (Mees) Pushing 'onConnectCallback' on to queue
2021-05-24 12:13:15.089 Mees: (Mees) Pushing 'DisconnectedEvent' on to queue
2021-05-24 12:13:15.139 (Mees) Processing 'onConnectCallback' message
2021-05-24 12:13:15.139 Mees: (Mees) Calling message handler 'onConnect'.
2021-05-24 12:13:15.139 Mees: (Mees) MIIOServer connection status is [111] [Connection refused]
2021-05-24 12:13:15.139 (Mees) Processing 'DisconnectedEvent' message
2021-05-24 12:13:15.139 Mees: (Mees) Disconnect event received for '127.0.0.1:22222'.
2021-05-24 12:13:15.139 Mees: (Mees) Pushing 'onDisconnectCallback' on to queue
2021-05-24 12:13:15.139 (Mees) Processing 'onDisconnectCallback' message
2021-05-24 12:13:15.139 Mees: (Mees) Calling message handler 'onDisconnect'.
2021-05-24 12:13:15.139 Mees: (Mees) MIIOServer disconnected
2021-05-24 12:13:15.154 Mees: (Mees) Pushing 'onStopCallback' on to queue
2021-05-24 12:13:15.154 (Mees) Processing 'onStopCallback' message
2021-05-24 12:13:15.154 Mees: (Mees) Calling message handler 'onStop'.
2021-05-24 12:13:15.156 (Mees) Deallocating connection object 'MIIOServer' (127.0.0.1:22222).
2021-05-24 12:13:15.254 Mees hardware started.
2021-05-24 12:13:15.344 Mees: (Mees) Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL
2021-05-24 12:13:15.344 Mees: (Mees) 'HardwareID':'3'
2021-05-24 12:13:15.344 Mees: (Mees) 'HomeFolder':'/opt/domoticz/plugins/xiaomi-mirobot/'
2021-05-24 12:13:15.344 Mees: (Mees) 'StartupFolder':'/opt/domoticz/'
2021-05-24 12:13:15.344 Mees: (Mees) 'UserDataFolder':'/opt/domoticz/'
2021-05-24 12:13:15.344 Mees: (Mees) 'Database':'/opt/domoticz/domoticz.db'
2021-05-24 12:13:15.344 Mees: (Mees) 'Language':'en'
2021-05-24 12:13:15.344 Mees: (Mees) 'Version':'0.1.3'
2021-05-24 12:13:15.344 Mees: (Mees) 'Author':'mrin'
2021-05-24 12:13:15.344 Mees: (Mees) 'Name':'Mees'
2021-05-24 12:13:15.344 Mees: (Mees) 'Port':'0'
2021-05-24 12:13:15.344 Mees: (Mees) 'Key':'xiaomi-mi-robot-vacuum'
2021-05-24 12:13:15.344 Mees: (Mees) 'Mode2':'15'
2021-05-24 12:13:15.344 Mees: (Mees) 'Mode4':'Debug'
2021-05-24 12:13:15.344 Mees: (Mees) 'Mode5':'selector'
2021-05-24 12:13:15.344 Mees: (Mees) 'Mode6':'127.0.0.1:22222'
2021-05-24 12:13:15.344 Mees: (Mees) 'DomoticzVersion':'2021.1 (build 13241)'
2021-05-24 12:13:15.344 Mees: (Mees) 'DomoticzHash':'6c4786843'
2021-05-24 12:13:15.344 Mees: (Mees) 'DomoticzBuildTime':'2021-04-29 09:57:25'
2021-05-24 12:13:15.344 Mees: (Mees) Device count: 9
2021-05-24 12:13:15.344 Mees: (Mees) Device: 1 - ID: 25, Name: 'Mees - Status', nValue: 0, sValue: 'Charging'
2021-05-24 12:13:15.344 Mees: (Mees) Device ID: '25'
2021-05-24 12:13:15.344 Mees: (Mees) Device Name: 'Mees - Status'
2021-05-24 12:13:15.344 Mees: (Mees) Device nValue: 0
2021-05-24 12:13:15.344 Mees: (Mees) Device sValue: 'Charging'
2021-05-24 12:13:15.344 Mees: (Mees) Device LastLevel: 0
2021-05-24 12:13:15.344 Mees: (Mees) Device: 2 - ID: 26, Name: 'Mees - Control', nValue: 0, sValue: ''
2021-05-24 12:13:15.344 Mees: (Mees) Device ID: '26'
2021-05-24 12:13:15.345 Mees: (Mees) Device Name: 'Mees - Control'
2021-05-24 12:13:15.345 Mees: (Mees) Device nValue: 0
2021-05-24 12:13:15.345 Mees: (Mees) Device sValue: ''
2021-05-24 12:13:15.345 Mees: (Mees) Device LastLevel: 0
2021-05-24 12:13:15.345 Mees: (Mees) Device: 4 - ID: 27, Name: 'Mees - Fan Level', nValue: 0, sValue: ''
2021-05-24 12:13:15.345 Mees: (Mees) Device ID: '27'
2021-05-24 12:13:15.345 Mees: (Mees) Device Name: 'Mees - Fan Level'
2021-05-24 12:13:15.345 Mees: (Mees) Device nValue: 0
2021-05-24 12:13:15.345 Mees: (Mees) Device sValue: ''
2021-05-24 12:13:15.345 Mees: (Mees) Device LastLevel: 0
2021-05-24 12:13:15.345 Mees: (Mees) Device: 5 - ID: 28, Name: 'Mees - Battery', nValue: 100, sValue: '100'
2021-05-24 12:13:15.345 Mees: (Mees) Device ID: '28'
2021-05-24 12:13:15.345 Mees: (Mees) Device Name: 'Mees - Battery'
2021-05-24 12:13:15.345 Mees: (Mees) Device nValue: 100
2021-05-24 12:13:15.345 Mees: (Mees) Device sValue: '100'
2021-05-24 12:13:15.345 Mees: (Mees) Device LastLevel: 0
2021-05-24 12:13:15.345 Mees: (Mees) Device: 6 - ID: 29, Name: 'Mees - Care Main Brush', nValue: 100, sValue: '100'
2021-05-24 12:13:15.345 Mees: (Mees) Device ID: '29'
2021-05-24 12:13:15.345 Mees: (Mees) Device Name: 'Mees - Care Main Brush'
2021-05-24 12:13:15.345 Mees: (Mees) Device nValue: 100
2021-05-24 12:13:15.345 Mees: (Mees) Device sValue: '100'
2021-05-24 12:13:15.345 Mees: (Mees) Device LastLevel: 0
2021-05-24 12:13:15.345 Mees: (Mees) Device: 7 - ID: 30, Name: 'Mees - Care Side Brush', nValue: 100, sValue: '100'
2021-05-24 12:13:15.345 Mees: (Mees) Device ID: '30'
2021-05-24 12:13:15.345 Mees: (Mees) Device Name: 'Mees - Care Side Brush'
2021-05-24 12:13:15.345 Mees: (Mees) Device nValue: 100
2021-05-24 12:13:15.345 Mees: (Mees) Device sValue: '100'
2021-05-24 12:13:15.345 Mees: (Mees) Device LastLevel: 0
2021-05-24 12:13:15.345 Mees: (Mees) Device: 8 - ID: 31, Name: 'Mees - Care Sensors ', nValue: 97, sValue: '97'
2021-05-24 12:13:15.345 Mees: (Mees) Device ID: '31'
2021-05-24 12:13:15.345 Mees: (Mees) Device Name: 'Mees - Care Sensors '
2021-05-24 12:13:15.345 Mees: (Mees) Device nValue: 97
2021-05-24 12:13:15.345 Mees: (Mees) Device sValue: '97'
2021-05-24 12:13:15.345 Mees: (Mees) Device LastLevel: 0
2021-05-24 12:13:15.345 Mees: (Mees) Device: 9 - ID: 32, Name: 'Mees - Care Filter', nValue: 99, sValue: '99'
2021-05-24 12:13:15.345 Mees: (Mees) Device ID: '32'
2021-05-24 12:13:15.345 Mees: (Mees) Device Name: 'Mees - Care Filter'
2021-05-24 12:13:15.345 Mees: (Mees) Device nValue: 99
2021-05-24 12:13:15.345 Mees: (Mees) Device sValue: '99'
2021-05-24 12:13:15.345 Mees: (Mees) Device LastLevel: 0
2021-05-24 12:13:15.345 Mees: (Mees) Device: 10 - ID: 33, Name: 'Mees - Care Reset Control', nValue: 0, sValue: ''
2021-05-24 12:13:15.345 Mees: (Mees) Device ID: '33'
2021-05-24 12:13:15.345 Mees: (Mees) Device Name: 'Mees - Care Reset Control'
2021-05-24 12:13:15.345 Mees: (Mees) Device nValue: 0
2021-05-24 12:13:15.345 Mees: (Mees) Device sValue: ''
2021-05-24 12:13:15.345 Mees: (Mees) Device LastLevel: 0
2021-05-24 12:13:15.345 Mees: (Mees) Pushing 'ProtocolDirective' on to queue
2021-05-24 12:13:15.345 Mees: (Mees) Pushing 'PollIntervalDirective' on to queue
2021-05-24 12:13:15.345 (Mees) Processing 'ProtocolDirective' message
2021-05-24 12:13:15.345 Mees: (Mees) Protocol set to: 'None'.
2021-05-24 12:13:15.345 (Mees) Processing 'PollIntervalDirective' message
2021-05-24 12:13:15.345 Mees: (Mees) Heartbeat interval set to: 15.
2021-05-24 12:13:15.154 Status: Mees: (Mees) Stop directive received.
2021-05-24 12:13:15.157 Status: Mees: (Mees) Exiting work loop.
2021-05-24 12:13:15.254 Status: Mees: (Mees) Stopping threads.
2021-05-24 12:13:15.254 Status: Mees: (Mees) Stopped.
2021-05-24 12:13:15.254 Status: Mees: (Mees) Started.
2021-05-24 12:13:15.255 Status: Mees: (Mees) Entering work loop.
2021-05-24 12:13:15.343 Status: Mees: (Mees) Initialized version 0.1.3, author 'mrin'
2021-05-24 12:13:15.154 Error: Restarting: Mees
What can I do next?
Nefsolive
Posts: 69
Joined: Monday 04 September 2017 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Xiaomi Mi Robot Vacuum

Post by Nefsolive »

Hello,

Does this plugin work with Mi Robot Vacuum Mop Pro?
Has anyone tested it?

Ty
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Python plugin: Xiaomi Mi Robot Vacuum

Post by hoeby »

I went for a fresh install of domoticz.

What did i do:
- Installed last pi image (bullseye, Release date: October 30th 2021, Kernel version: 5.10)
- Update en Upgrade the image
- Install stable domoticz and tested in the browser --> works
- Installed Xiaomi mi Robot plugin.

Restart domoticz.service.
Went to hardware and added the xiaomi mi robot vacuum.
After saving, domoticz ui stops. Domoticz is still running when checking with "sudo service domoticz status"

Stopped domoticz.service and started manual.
Got this error. It looks like the error is made by the plugin, but does somebody know where to start to debug with this error?
Tried to install the domoticz beta version, getting the same error.

Code: Select all

Current thread 0xae9ff200 (most recent call first):
  File "/home/pi/domoticz/plugins/xiaomi-mirobot/plugin.py", line 111 in onStart
  File "/home/pi/domoticz/plugins/xiaomi-mirobot/plugin.py", line 354 in onStart
2021-11-18 12:27:22.725  Error: Domoticz(pid:9159, tid:9172('Xiaomi Mi Robot')) received fatal signal 11 (Segmentation fault)
2021-11-18 12:27:22.726  Error: siginfo address=0x23c7, address=(nil)
2021-11-18 12:27:23.023  Status: PluginSystem: 1 plugins started.
2021-11-18 12:27:24.052  Error: Did not find stack frame for thread (LWP 9172)), printing full gdb output:

2021-11-18 12:27:24.052  Error: > [New LWP 9160]
2021-11-18 12:27:24.052  Error: > [New LWP 9161]
2021-11-18 12:27:24.052  Error: > [New LWP 9162]
2021-11-18 12:27:24.052  Error: > [New LWP 9163]
2021-11-18 12:27:24.052  Error: > [New LWP 9164]
2021-11-18 12:27:24.052  Error: > [New LWP 9165]
2021-11-18 12:27:24.052  Error: > [New LWP 9166]
2021-11-18 12:27:24.052  Error: > [New LWP 9167]
2021-11-18 12:27:24.052  Error: > [New LWP 9168]
2021-11-18 12:27:24.052  Error: > [New LWP 9169]
2021-11-18 12:27:24.052  Error: > [New LWP 9170]
2021-11-18 12:27:24.052  Error: > [New LWP 9171]
2021-11-18 12:27:24.052  Error: > [New LWP 9172]
2021-11-18 12:27:24.052  Error: > [New LWP 9173]
2021-11-18 12:27:24.052  Error: > [New LWP 9174]
2021-11-18 12:27:24.052  Error: > [New LWP 9175]
2021-11-18 12:27:24.052  Error: > [New LWP 9185]
2021-11-18 12:27:24.052  Error: > [Thread debugging using libthread_db enabled]
2021-11-18 12:27:24.052  Error: > Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
2021-11-18 12:27:24.052  Error: > 0xb6940f8c in __GI___clock_nanosleep_time64 (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0xbedf8300, req@entry=0xbedf82f8, rem=0xbedf8310, rem@entry=0xbedf8308) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:52
2021-11-18 12:27:24.052  Error: > 52    ../sysdeps/unix/sysv/linux/clock_nanosleep.c: No such file or directory.
2021-11-18 12:27:24.052  Error: >   Id   Target Id                                      Frame
2021-11-18 12:27:24.052  Error: > * 1    Thread 0xb6fc3240 (LWP 9159) "domoticz"        0xb6940f8c in __GI___clock_nanosleep_time64 (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0xbedf8300, req@entry=0xbedf82f8, rem=0xbedf8310, rem@entry=0xbedf8308) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:52
2021-11-18 12:27:24.052  Error: >   2    Thread 0xb593d200 (LWP 9160) "Watchdog"        0xb6940f8c in __GI___clock_nanosleep_time64 (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0xb593cb70, req@entry=0xb593cb68, rem=0xb593cb80, rem@entry=0xb593cb78) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:52
2021-11-18 12:27:24.052  Error: >   3    Thread 0xb513c200 (LWP 9161) "SQLHelper"       syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2021-11-18 12:27:24.052  Error: >   4    Thread 0xb493b200 (LWP 9162) "PluginMgr"       syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2021-11-18 12:27:24.052  Error: >   5    Thread 0xb3bc0200 (LWP 9163) "InfluxPush"      syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2021-11-18 12:27:24.052  Error: >   6    Thread 0xb33bf200 (LWP 9164) "Webem_ssncleane" 0xb698063c in epoll_wait (epfd=14, events=0xb33be358, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
2021-11-18 12:27:24.052  Error: >   7    Thread 0xb2b60200 (LWP 9165) "WebServer_8080"  0xb698063c in epoll_wait (epfd=10, events=0xb2b5f328, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
2021-11-18 12:27:24.052  Error: >   8    Thread 0xb21ff200 (LWP 9166) "Webem_ssncleane" 0xb698063c in epoll_wait (epfd=21, events=0xb21fe358, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
2021-11-18 12:27:24.052  Error: >   9    Thread 0xb19fe200 (LWP 9167) "WebServer_443"   0xb698063c in epoll_wait (epfd=17, events=0xb19fd328, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
2021-11-18 12:27:24.052  Error: >   10   Thread 0xb0fff200 (LWP 9168) "Scheduler"       syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2021-11-18 12:27:24.052  Error: >   11   Thread 0xb07fe200 (LWP 9169) "TCPServer"       0xb698063c in epoll_wait (epfd=24, events=0xb07fd358, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
2021-11-18 12:27:24.052  Error: >   12   Thread 0xafdff200 (LWP 9170) "MainWorker"      syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2021-11-18 12:27:24.052  Error: >   13   Thread 0xaf5fe200 (LWP 9171) "MainWorkerRxMsg" futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0xaf5fdb80, clockid=<optimized out>, expected=0, futex_word=0xa7f378 <m_mainworker+3960>) at ../sysdeps/nptl/futex-internal.h:323
2021-11-18 12:27:24.052  Error: >   14   Thread 0xae9ff200 (LWP 9172) "Xiaomi Mi Robot" 0xb69474d4 in __GI___wait4 (pid=9176, stat_loc=0xaeb25918, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
2021-11-18 12:27:24.053  Error: >   15   Thread 0xae1fe200 (LWP 9173) "NotificationSys" futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0xae1fdbb0, clockid=<optimized out>, expected=0, futex_word=0xa7ee5c <m_mainworker+2652>) at ../sysdeps/nptl/futex-internal.h:323
2021-11-18 12:27:24.053  Error: >   16   Thread 0xad7ff200 (LWP 9174) "EventSystem"     syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2021-11-18 12:27:24.053  Error: >   17   Thread 0xacffe200 (LWP 9175) "EventSystemQueu" futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0xacffdac0, clockid=<optimized out>, expected=0, futex_word=0xa7e558 <m_mainworker+344>) at ../sysdeps/nptl/futex-internal.h:323
2021-11-18 12:27:24.053  Error: >   18   Thread 0xac7fd200 (LWP 9185) "Plugin_ASIO"     futex_wait_cancelable (private=0, expected=0, futex_word=0x17c2818) at ../sysdeps/nptl/futex-internal.h:186
2021-11-18 12:27:24.053  Error: >
2021-11-18 12:27:24.053  Error: > Thread 18 (Thread 0xac7fd200 (LWP 9185) "Plugin_ASIO"):
2021-11-18 12:27:24.053  Error: > #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x17c2818) at ../sysdeps/nptl/futex-internal.h:186
2021-11-18 12:27:24.053  Error: > #1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x0, cond=0x17c27f0) at pthread_cond_wait.c:508
2021-11-18 12:27:24.053  Error: > #2  __pthread_cond_wait (cond=0x17c27f0, mutex=0x0) at pthread_cond_wait.c:638
2021-11-18 12:27:24.053  Error: > #3  0x003d4464 in boost::asio::detail::scheduler::run(boost::system::error_code&) ()
2021-11-18 12:27:24.053  Error: > #4  0x00678844 in Plugins::BoostWorkers() ()
2021-11-18 12:27:24.053  Error: > #5  0x00770c30 in thread_proxy ()
2021-11-18 12:27:24.053  Error: > #6  0xb6abc300 in start_thread (arg=0xac7fd200) at pthread_create.c:477
2021-11-18 12:27:24.053  Error: > #7  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.053  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.053  Error: >
2021-11-18 12:27:24.053  Error: > Thread 17 (Thread 0xacffe200 (LWP 9175) "EventSystemQueu"):
2021-11-18 12:27:24.053  Error: > #0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0xacffdac0, clockid=<optimized out>, expected=0, futex_word=0xa7e558 <m_mainworker+344>) at ../sysdeps/nptl/futex-internal.h:323
2021-11-18 12:27:24.053  Error: > #1  __pthread_cond_wait_common (abstime=0xacffdac0, clockid=<optimized out>, mutex=0xad801294, cond=0xa7e530 <m_mainworker+304>) at pthread_cond_wait.c:520
2021-11-18 12:27:24.053  Error: > #2  __pthread_cond_timedwait (cond=0xa7e530 <m_mainworker+304>, mutex=0xad801294, abstime=0xacffdac0) at pthread_cond_wait.c:656
2021-11-18 12:27:24.053  Error: > #3  0x00211b44 in CEventSystem::EventQueueThread() ()
2021-11-18 12:27:24.053  Error: > #4  0x008f9ff4 in execute_native_thread_routine ()
2021-11-18 12:27:24.053  Error: > #5  0xb6abc300 in start_thread (arg=0xacffe200) at pthread_create.c:477
2021-11-18 12:27:24.053  Error: > #6  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.053  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.053  Error: >
2021-11-18 12:27:24.053  Error: > Thread 16 (Thread 0xad7ff200 (LWP 9174) "EventSystem"):
2021-11-18 12:27:24.053  Error: > #0  syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2021-11-18 12:27:24.053  Error: > #1  0x008d7a64 in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >) ()
2021-11-18 12:27:24.053  Error: > #2  0x00208b78 in CEventSystem::Do_Work() ()
2021-11-18 12:27:24.053  Error: > #3  0x008f9ff4 in execute_native_thread_routine ()
2021-11-18 12:27:24.053  Error: > #4  0xb6abc300 in start_thread (arg=0xad7ff200) at pthread_create.c:477
2021-11-18 12:27:24.053  Error: > #5  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.053  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.053  Error: >
2021-11-18 12:27:24.053  Error: > Thread 15 (Thread 0xae1fe200 (LWP 9173) "NotificationSys"):
2021-11-18 12:27:24.053  Error: > #0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0xae1fdbb0, clockid=<optimized out>, expected=0, futex_word=0xa7ee5c <m_mainworker+2652>) at ../sysdeps/nptl/futex-internal.h:323
2021-11-18 12:27:24.053  Error: > #1  __pthread_cond_wait_common (abstime=0xae1fdbb0, clockid=<optimized out>, mutex=0x0, cond=0xa7ee30 <m_mainworker+2608>) at pthread_cond_wait.c:520
2021-11-18 12:27:24.053  Error: > #2  __pthread_cond_timedwait (cond=0xa7ee30 <m_mainworker+2608>, mutex=0x0, abstime=0xae1fdbb0) at pthread_cond_wait.c:656
2021-11-18 12:27:24.053  Error: > #3  0x00275a40 in CNotificationSystem::QueueThread() ()
2021-11-18 12:27:24.053  Error: > #4  0x008f9ff4 in execute_native_thread_routine ()
2021-11-18 12:27:24.053  Error: > #5  0xb6abc300 in start_thread (arg=0xae1fe200) at pthread_create.c:477
2021-11-18 12:27:24.053  Error: > #6  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.054  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.054  Error: >
2021-11-18 12:27:24.054  Error: > Thread 14 (Thread 0xae9ff200 (LWP 9172) "Xiaomi Mi Robot"):
2021-11-18 12:27:24.054  Error: > #0  0xb69474d4 in __GI___wait4 (pid=9176, stat_loc=0xaeb25918, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
2021-11-18 12:27:24.054  Error: > #1  0x0028f944 in dumpstack_gdb(bool) ()
2021-11-18 12:27:24.054  Error: > #2  0x0028ff10 in signal_handler(int, siginfo_t*, void*) ()
2021-11-18 12:27:24.054  Error: > #3  <signal handler called>
2021-11-18 12:27:24.054  Error: > #4  raise (sig=11) at ../sysdeps/unix/sysv/linux/raise.c:50
2021-11-18 12:27:24.054  Error: > #5  <signal handler called>
2021-11-18 12:27:24.054  Error: > #6  0x0000000c in ?? ()
2021-11-18 12:27:24.054  Error: > #7  0xb59bf47c in _PyEval_EvalFrameDefault () from /lib/arm-linux-gnueabihf/libpython3.9.so
2021-11-18 12:27:24.054  Error: > #8  0xb117d88c in ?? ()
2021-11-18 12:27:24.054  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.054  Error: >
2021-11-18 12:27:24.054  Error: > Thread 13 (Thread 0xaf5fe200 (LWP 9171) "MainWorkerRxMsg"):
2021-11-18 12:27:24.054  Error: > #0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0xaf5fdb80, clockid=<optimized out>, expected=0, futex_word=0xa7f378 <m_mainworker+3960>) at ../sysdeps/nptl/futex-internal.h:323
2021-11-18 12:27:24.054  Error: > #1  __pthread_cond_wait_common (abstime=0xaf5fdb80, clockid=<optimized out>, mutex=0xb6ab7a1c, cond=0xa7f350 <m_mainworker+3920>) at pthread_cond_wait.c:520
2021-11-18 12:27:24.054  Error: > #2  __pthread_cond_timedwait (cond=0xa7f350 <m_mainworker+3920>, mutex=0xb6ab7a1c, abstime=0xaf5fdb80) at pthread_cond_wait.c:656
2021-11-18 12:27:24.054  Error: > #3  0x00261f38 in MainWorker::Do_Work_On_Rx_Messages() ()
2021-11-18 12:27:24.054  Error: > #4  0x008f9ff4 in execute_native_thread_routine ()
2021-11-18 12:27:24.054  Error: > #5  0xb6abc300 in start_thread (arg=0xaf5fe200) at pthread_create.c:477
2021-11-18 12:27:24.054  Error: > #6  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.054  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.054  Error: >
2021-11-18 12:27:24.054  Error: > Thread 12 (Thread 0xafdff200 (LWP 9170) "MainWorker"):
2021-11-18 12:27:24.054  Error: > #0  syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2021-11-18 12:27:24.054  Error: > #1  0x008d7a64 in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >) ()
2021-11-18 12:27:24.054  Error: > #2  0x0025de08 in MainWorker::Do_Work() ()
2021-11-18 12:27:24.054  Error: > #3  0x008f9ff4 in execute_native_thread_routine ()
2021-11-18 12:27:24.054  Error: > #4  0xb6abc300 in start_thread (arg=0xafdff200) at pthread_create.c:477
2021-11-18 12:27:24.054  Error: > #5  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.054  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.054  Error: >
2021-11-18 12:27:24.054  Error: > Thread 11 (Thread 0xb07fe200 (LWP 9169) "TCPServer"):
2021-11-18 12:27:24.054  Error: > #0  0xb698063c in epoll_wait (epfd=24, events=0xb07fd358, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
2021-11-18 12:27:24.054  Error: > #1  0x003d2384 in boost::asio::detail::epoll_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) ()
2021-11-18 12:27:24.054  Error: > #2  0x003d437c in boost::asio::detail::scheduler::run(boost::system::error_code&) ()
2021-11-18 12:27:24.054  Error: > #3  0x006d4d50 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<tcp::server::CTCPServer::StartServer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::{lambda()#1}> > >::_M_run() ()
2021-11-18 12:27:24.054  Error: > #4  0x008f9ff4 in execute_native_thread_routine ()
2021-11-18 12:27:24.054  Error: > #5  0xb6abc300 in start_thread (arg=0xb07fe200) at pthread_create.c:477
2021-11-18 12:27:24.054  Error: > #6  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.054  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.054  Error: >
2021-11-18 12:27:24.054  Error: > Thread 10 (Thread 0xb0fff200 (LWP 9168) "Scheduler"):
2021-11-18 12:27:24.055  Error: > #0  syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2021-11-18 12:27:24.055  Error: > #1  0x008d7a64 in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >) ()
2021-11-18 12:27:24.055  Error: > #2  0x00286db8 in CScheduler::Do_Work() ()
2021-11-18 12:27:24.055  Error: > #3  0x008f9ff4 in execute_native_thread_routine ()
2021-11-18 12:27:24.055  Error: > #4  0xb6abc300 in start_thread (arg=0xb0fff200) at pthread_create.c:477
2021-11-18 12:27:24.055  Error: > #5  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.055  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.055  Error: >
2021-11-18 12:27:24.055  Error: > Thread 9 (Thread 0xb19fe200 (LWP 9167) "WebServer_443"):
2021-11-18 12:27:24.055  Error: > #0  0xb698063c in epoll_wait (epfd=17, events=0xb19fd328, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
2021-11-18 12:27:24.055  Error: > #1  0x003d2384 in boost::asio::detail::epoll_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) ()
2021-11-18 12:27:24.055  Error: > #2  0x003d437c in boost::asio::detail::scheduler::run(boost::system::error_code&) ()
2021-11-18 12:27:24.055  Error: > #3  0x0071fe68 in http::server::server_base::run() ()
2021-11-18 12:27:24.055  Error: > #4  0x002d7b80 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<http::server::CWebServer::StartServer(http::server::server_settings&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)::{lambda()#280}> > >::_M_run() ()
2021-11-18 12:27:24.055  Error: > #5  0x008f9ff4 in execute_native_thread_routine ()
2021-11-18 12:27:24.055  Error: > #6  0xb6abc300 in start_thread (arg=0xb19fe200) at pthread_create.c:477
2021-11-18 12:27:24.055  Error: > #7  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.055  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.055  Error: >
2021-11-18 12:27:24.055  Error: > Thread 8 (Thread 0xb21ff200 (LWP 9166) "Webem_ssncleane"):
2021-11-18 12:27:24.055  Error: > #0  0xb698063c in epoll_wait (epfd=21, events=0xb21fe358, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
2021-11-18 12:27:24.055  Error: > #1  0x003d2384 in boost::asio::detail::epoll_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) ()
2021-11-18 12:27:24.055  Error: > #2  0x003d437c in boost::asio::detail::scheduler::run(boost::system::error_code&) ()
2021-11-18 12:27:24.055  Error: > #3  0x006effe0 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<http::server::cWebem::cWebem(http::server::server_settings const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::{lambda()#2}> > >::_M_run() ()
2021-11-18 12:27:24.055  Error: > #4  0x008f9ff4 in execute_native_thread_routine ()
2021-11-18 12:27:24.055  Error: > #5  0xb6abc300 in start_thread (arg=0xb21ff200) at pthread_create.c:477
2021-11-18 12:27:24.055  Error: > #6  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.055  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.055  Error: >
2021-11-18 12:27:24.055  Error: > Thread 7 (Thread 0xb2b60200 (LWP 9165) "WebServer_8080"):
2021-11-18 12:27:24.055  Error: > #0  0xb698063c in epoll_wait (epfd=10, events=0xb2b5f328, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
2021-11-18 12:27:24.055  Error: > #1  0x003d2384 in boost::asio::detail::epoll_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) ()
2021-11-18 12:27:24.055  Error: > #2  0x003d437c in boost::asio::detail::scheduler::run(boost::system::error_code&) ()
2021-11-18 12:27:24.055  Error: > #3  0x0071fe68 in http::server::server_base::run() ()
2021-11-18 12:27:24.055  Error: > #4  0x002d7b80 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<http::server::CWebServer::StartServer(http::server::server_settings&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)::{lambda()#280}> > >::_M_run() ()
2021-11-18 12:27:24.055  Error: > #5  0x008f9ff4 in execute_native_thread_routine ()
2021-11-18 12:27:24.055  Error: > #6  0xb6abc300 in start_thread (arg=0xb2b60200) at pthread_create.c:477
2021-11-18 12:27:24.055  Error: > #7  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.055  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.055  Error: >
2021-11-18 12:27:24.055  Error: > Thread 6 (Thread 0xb33bf200 (LWP 9164) "Webem_ssncleane"):
2021-11-18 12:27:24.055  Error: > #0  0xb698063c in epoll_wait (epfd=14, events=0xb33be358, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
2021-11-18 12:27:24.055  Error: > #1  0x003d2384 in boost::asio::detail::epoll_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) ()
2021-11-18 12:27:24.055  Error: > #2  0x003d437c in boost::asio::detail::scheduler::run(boost::system::error_code&) ()
2021-11-18 12:27:24.056  Error: > #3  0x006effe0 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<http::server::cWebem::cWebem(http::server::server_settings const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::{lambda()#2}> > >::_M_run() ()
2021-11-18 12:27:24.056  Error: > #4  0x008f9ff4 in execute_native_thread_routine ()
2021-11-18 12:27:24.056  Error: > #5  0xb6abc300 in start_thread (arg=0xb33bf200) at pthread_create.c:477
2021-11-18 12:27:24.056  Error: > #6  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.056  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.056  Error: >
2021-11-18 12:27:24.056  Error: > Thread 5 (Thread 0xb3bc0200 (LWP 9163) "InfluxPush"):
2021-11-18 12:27:24.056  Error: > #0  syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2021-11-18 12:27:24.056  Error: > #1  0x008d7a64 in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >) ()
2021-11-18 12:27:24.056  Error: > #2  0x003915e8 in CInfluxPush::Do_Work() ()
2021-11-18 12:27:24.056  Error: > #3  0x008f9ff4 in execute_native_thread_routine ()
2021-11-18 12:27:24.056  Error: > #4  0xb6abc300 in start_thread (arg=0xb3bc0200) at pthread_create.c:477
2021-11-18 12:27:24.056  Error: > #5  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.056  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.056  Error: >
2021-11-18 12:27:24.056  Error: > Thread 4 (Thread 0xb493b200 (LWP 9162) "PluginMgr"):
2021-11-18 12:27:24.056  Error: > #0  syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2021-11-18 12:27:24.056  Error: > #1  0x008d7a64 in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >) ()
2021-11-18 12:27:24.056  Error: > #2  0x00679054 in Plugins::CPluginSystem::Do_Work() ()
2021-11-18 12:27:24.056  Error: > #3  0x008f9ff4 in execute_native_thread_routine ()
2021-11-18 12:27:24.056  Error: > #4  0xb6abc300 in start_thread (arg=0xb493b200) at pthread_create.c:477
2021-11-18 12:27:24.056  Error: > #5  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.056  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.056  Error: >
2021-11-18 12:27:24.056  Error: > Thread 3 (Thread 0xb513c200 (LWP 9161) "SQLHelper"):
2021-11-18 12:27:24.056  Error: > #0  syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2021-11-18 12:27:24.056  Error: > #1  0x008d7a64 in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >) ()
2021-11-18 12:27:24.056  Error: > #2  0x002a6d70 in CSQLHelper::Do_Work() ()
2021-11-18 12:27:24.056  Error: > #3  0x008f9ff4 in execute_native_thread_routine ()
2021-11-18 12:27:24.056  Error: > #4  0xb6abc300 in start_thread (arg=0xb513c200) at pthread_create.c:477
2021-11-18 12:27:24.056  Error: > #5  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.056  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.056  Error: >
2021-11-18 12:27:24.056  Error: > Thread 2 (Thread 0xb593d200 (LWP 9160) "Watchdog"):
2021-11-18 12:27:24.056  Error: > #0  0xb6940f8c in __GI___clock_nanosleep_time64 (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0xb593cb70, req@entry=0xb593cb68, rem=0xb593cb80, rem@entry=0xb593cb78) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:52
2021-11-18 12:27:24.056  Error: > #1  0xb6941080 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=<optimized out>, rem=0xb593cbb0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:92
2021-11-18 12:27:24.056  Error: > #2  0xb6947830 in __GI___nanosleep (requested_time=<optimized out>, remaining=<optimized out>) at nanosleep.c:27
2021-11-18 12:27:24.056  Error: > #3  0x00223704 in sleep_milliseconds(long) ()
2021-11-18 12:27:24.056  Error: > #4  0x00290078 in Do_Watchdog_Work() ()
2021-11-18 12:27:24.056  Error: > #5  0x008f9ff4 in execute_native_thread_routine ()
2021-11-18 12:27:24.056  Error: > #6  0xb6abc300 in start_thread (arg=0xb593d200) at pthread_create.c:477
2021-11-18 12:27:24.056  Error: > #7  0xb6980208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
2021-11-18 12:27:24.056  Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2021-11-18 12:27:24.056  Error: >
2021-11-18 12:27:24.056  Error: > Thread 1 (Thread 0xb6fc3240 (LWP 9159) "domoticz"):
2021-11-18 12:27:24.057  Error: > #0  0xb6940f8c in __GI___clock_nanosleep_time64 (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0xbedf8300, req@entry=0xbedf82f8, rem=0xbedf8310, rem@entry=0xbedf8308) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:52
2021-11-18 12:27:24.057  Error: > #1  0xb6941080 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=<optimized out>, rem=0xbedf8340) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:92
2021-11-18 12:27:24.057  Error: > #2  0xb6947830 in __GI___nanosleep (requested_time=<optimized out>, remaining=<optimized out>) at nanosleep.c:27
2021-11-18 12:27:24.057  Error: > #3  0x00223670 in sleep_seconds(long) ()
2021-11-18 12:27:24.057  Error: > #4  0x001ae4ac in main ()
2021-11-18 12:27:24.057  Error: >
2021-11-18 12:27:24.057  Error: > Main thread:
2021-11-18 12:27:24.057  Error: > #0  0xb6940f8c in __GI___clock_nanosleep_time64 (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0xbedf8300, req@entry=0xbedf82f8, rem=0xbedf8310, rem@entry=0xbedf8308) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:52
2021-11-18 12:27:24.057  Error: > #1  0xb6941080 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=<optimized out>, rem=0xbedf8340) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:92
2021-11-18 12:27:24.057  Error: > #2  0xb6947830 in __GI___nanosleep (requested_time=<optimized out>, remaining=<optimized out>) at nanosleep.c:27
2021-11-18 12:27:24.057  Error: > #3  0x00223670 in sleep_seconds(long) ()
2021-11-18 12:27:24.057  Error: > #4  0x001ae4ac in main ()
2021-11-18 12:27:24.057  Error: > [Inferior 1 (process 9159) detached]
Segmentation fault
after deleting the plugin folder xiaomi-mirobot, domoticz comes back to live.
The problem is in the plugin i would say.
Last edited by hoeby on Thursday 18 November 2021 18:59, edited 1 time in total.
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Python plugin: Xiaomi Mi Robot Vacuum

Post by hoeby »

Think i found a part of the issue.
Maybe it is not plugin related.

Read the next thread, image bullseye gives more people problems
https://domoticz.com/forum/viewtopic.php?f=6&t=37376
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Python plugin: Xiaomi Mi Robot Vacuum

Post by hoeby »

maomanna wrote: Monday 24 May 2021 12:15 I read the whole thread and other sites discussing this plugin, but I still get this error.

Reinstalled everything.
Updated all the packages.

Code: Select all

test: python modules path: ././.env/lib/python3.8/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.8/socket.py", line 808, in create_connection
    raise err
  File "/usr/lib/python3.8/socket.py", line 796, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
What can I do next?
A very late reaction.
I installed the plugin on the latest buster.
Without modification of the pip_req.txt i receive the errors you also have.

Change the pip_req.txt to

Code: Select all

android-backup==0.2.0
asn1crypto==1.4.0
attrs==21.2.0
cffi==1.15.0
click==7.1.2
construct==2.10.67
cryptography==3.4.8
enum-compat==0.0.3
gevent==21.8.0
greenlet==1.1.2
idna==3.3
msgpack-python==0.5.6
netifaces==0.11.0
pretty-cron==1.2.0
pycparser==2.21
pycrypto==2.6.1
python-miio==0.5.8
pytz==2021.3
six==1.16.0
typing==3.7.4.3
zeroconf==0.36.13
This works for now, but future installations can give the same problems.
Then check the package versions in pip_req.txt and update them
When the OS is new, the packages also have to be new. So they work together
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest