mrin / domoticz-mirobot-plugin

Xiaomi Mi Robot Vacuum plugin for Domoticz
57 stars 28 forks source link

Domoticz hang when domoticz-mirobot-plugin enabled #4

Closed donprezes closed 6 years ago

donprezes commented 6 years ago

Hi, I observe issue with domoticz-mirobot-plugin. When i enable this, my domoticz instance hangs.

How can i investigate this? Is there any logs for plugin itself? Using debug option save log in "domoticz log", which i loose when its hang ;(

Running plugin in console - works fine.

BR, Krzysztof

mrin commented 6 years ago

Domoticz version? I'm using 8.153 on RPI3 Jessie. Usually the domoticz should start in anyway... Firstly check permissions on plugin folder/files.

donprezes commented 6 years ago

Domoticz 8.153 on RPI2b+. Debian Jessie. Service looks like it's started, but i can't reach domoticz by WWW or other clients. For now (I have changed permissions) It works fine for few minutes and then hangs.

When i set "datatime limit" parameter i can see in logs:

2017-10-23 18:32:05.194 (Odkurzacz) Initialized version 0.0.5, author 'mrin' 2017-10-23 18:32:05.299 (Odkurzacz) Debug log level set to: 'true'. 2017-10-23 18:32:05.299 (Odkurzacz) 'Mode2':'600' 2017-10-23 18:32:05.299 (Odkurzacz) 'Author':'mrin' 2017-10-23 18:32:05.300 (Odkurzacz) 'HomeFolder':'/home/pi/domoticz/plugins/xiaomi-mirobot/' 2017-10-23 18:32:05.300 (Odkurzacz) 'Mode4':'Debug' 2017-10-23 18:32:05.300 (Odkurzacz) 'Mode1':'here was hash' 2017-10-23 18:32:05.300 (Odkurzacz) 'Port':'0' 2017-10-23 18:32:05.301 (Odkurzacz) 'Mode3':'/usr/bin/python3' 2017-10-23 18:32:05.301 (Odkurzacz) 'Key':'xiaomi-mi-robot-vacuum' 2017-10-23 18:32:05.301 (Odkurzacz) 'Address':'here was miroboIP' 2017-10-23 18:32:05.311 Error: EventSystem - Python: Failed to create interpreter. 2017-10-23 18:32:05.312 (Odkurzacz) 'HardwareID':'12' 2017-10-23 18:32:05.312 (Odkurzacz) 'Name':'Odkurzacz' 2017-10-23 18:32:05.312 (Odkurzacz) 'Mode5':'selector' 2017-10-23 18:32:05.312 (Odkurzacz) 'Version':'0.0.5' 2017-10-23 18:32:05.313 (Odkurzacz) Device count: 4 2017-10-23 18:32:05.313 (Odkurzacz) Device: 1 - ID: 966, Name: 'Odkurzacz - Status', nValue: 0, sValue: 'Charging' 2017-10-23 18:32:05.314 (Odkurzacz) Device ID: '966' 2017-10-23 18:32:05.314 (Odkurzacz) Device Name: 'Odkurzacz - Status' 2017-10-23 18:32:05.314 (Odkurzacz) Device nValue: 0 2017-10-23 18:32:05.314 (Odkurzacz) Device sValue: 'Charging' 2017-10-23 18:32:05.315 (Odkurzacz) Device LastLevel: 0 2017-10-23 18:32:05.315 (Odkurzacz) Device: 2 - ID: 967, Name: 'Odkurzacz - Sterowanie', nValue: 0, sValue: '' 2017-10-23 18:32:05.315 (Odkurzacz) Device ID: '967' 2017-10-23 18:32:05.315 (Odkurzacz) Device Name: 'Odkurzacz - Sterowanie' 2017-10-23 18:32:05.316 (Odkurzacz) Device nValue: 0 2017-10-23 18:32:05.316 (Odkurzacz) Device sValue: '' 2017-10-23 18:32:05.316 (Odkurzacz) Device LastLevel: 0 2017-10-23 18:32:05.316 (Odkurzacz) Device: 4 - ID: 968, Name: 'Odkurzacz - Siła ciągu', nValue: 1, sValue: '20' 2017-10-23 18:32:05.317 (Odkurzacz) Device ID: '968' 2017-10-23 18:32:05.317 (Odkurzacz) Device Name: 'Odkurzacz - Siła ciągu' 2017-10-23 18:32:05.317 (Odkurzacz) Device nValue: 1 2017-10-23 18:32:05.317 (Odkurzacz) Device sValue: '20' 2017-10-23 18:32:05.318 (Odkurzacz) Device LastLevel: 20 2017-10-23 18:32:05.318 (Odkurzacz) Device: 5 - ID: 969, Name: 'Odkurzacz - Bateria', nValue: 100, sValue: '100' 2017-10-23 18:32:05.318 (Odkurzacz) Device ID: '969' 2017-10-23 18:32:05.318 (Odkurzacz) Device Name: 'Odkurzacz - Bateria' 2017-10-23 18:32:05.319 (Odkurzacz) Device nValue: 100 2017-10-23 18:32:05.319 (Odkurzacz) Device sValue: '100' 2017-10-23 18:32:05.319 (Odkurzacz) Device LastLevel: 0 2017-10-23 18:32:05.320 (Odkurzacz) Heartbeat interval set to: 600. 2017-10-23 18:32:05.320 EventSystem: Started 2017-10-23 18:32:14.748 (Odkurzacz) Calling message handler 'onHeartbeat'. 2017-10-23 18:33:30.342 Error: Odkurzacz hardware (12) thread seems to have ended unexpectedly 2017-10-23 18:33:30.343 Error: Odkurzacz hardware (12) nothing received for more than 1 Minute!.... 2017-10-23 18:33:31.345 Error: Restarting: Odkurzacz

mrin commented 6 years ago

Can you try: sudo python3 mirobo-wrapper.py 192.168.0.100 TOKEN_HERE status and python3 .vendors/mirobo/vacuum_cli.py --ip 192.168.0.100 --token TOKEN_HERE

I really don't know what happened with domoticz plugin system... Also I have plan to update plugin soon to support latest core-lib.

donprezes commented 6 years ago

First command works fine, but take 30sec.

Second command: ERROR:main:Unable to read the stored msgid: [Errno 2] No such file or directory: '/tmp/python-mirobo.seq' State: Charging Battery: 100 % Fanspeed: 60 % ...

mrin commented 6 years ago

Check the new version 0.1.0 Also check readme, in new version updated communication with python-miio lib. I hope this help.