sincze / Domoticz-Growatt-Webserver-Plugin

16 stars 10 forks source link

thread seems to have ended unexpectedl #5

Closed bertinholland closed 4 years ago

bertinholland commented 4 years ago

@sincze

After successfull installation (with debug mode on) domoticz logfile reports "thread seems to have ended unexpectedly". How can I analyse what the problem is/fix this issue. I would appreciate any help.

Details:

2020-02-16 09:59:46.904 Error: PluginSystem: Exception processing message. 2020-02-16 10:00:49.605 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:01:03.608 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:01:17.611 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:01:31.614 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:01:45.618 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:01:59.621 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:02:13.624 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:02:27.628 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:02:41.631 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:02:55.634 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:03:09.637 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:03:23.640 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:03:37.644 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:03:51.647 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:04:05.650 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:04:19.654 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:04:33.657 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:04:47.661 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 10:04:47.661 Error: Growatt hardware (14) nothing received for more than 5 Minutes!.... 2020-02-16 10:04:48.662 Error: Restarting: Growatt 2020-02-16 10:09:48.194 Error: mainworker seems to have ended or hung unexpectedly (last update 301.000000 seconds ago) 2020-02-16 10:09:48.194 Error: Domoticz(10591) is exiting due to watchdog triggered...

pi@be:/domoticz/plugins/Domoticz-Growatt-Webserver-Plugin $ sudo ls -als pycache/ totaal 20 4 drwxr-x--- 2 root root 4096 feb 16 02:36 . 4 drwxr-xr-x 4 pi pi 4096 feb 16 02:27 .. 12 -rw-r----- 1 root root 11911 feb 16 02:27 plugin.cpython-35.pyc pi@be:/domoticz/plugins/Domoticz-Growatt-Webserver-Plugin $

pi@be:/domoticz/plugins/Domoticz-Growatt-Webserver-Plugin $ python --version Python 2.7.13 pi@be:/domoticz/plugins/Domoticz-Growatt-Webserver-Plugin $ python3 --version Python 3.5.3 pi@be:/domoticz/plugins/Domoticz-Growatt-Webserver-Plugin $

cat /etc/debian_version 9.11

Domoticz V4.10717

bertinholland commented 4 years ago

I have additional debug information:

2020-02-16 19:13:50.904 Status: (Growatt) Entering work loop. 2020-02-16 19:13:50.904 Status: (Growatt) Initialized version 1.0.0, author 'sincze' 2020-02-16 19:13:51.958 (Growatt) >'Status':'200' 2020-02-16 19:13:51.959 (Growatt) >'Data':'b'{"back":{"isOpenDeviceList":1,"isOpenDeviceParams":0,"data":[{"plantName":"xxxxxxxx","plantId":"999999"}],"service":"1","quality":"0","isOpenSmartFamily":0,"totalData":{},"success":true,"user":{"uid":"","userLanguage":"ho","inverterGroup":[],"timeZone":1,"lng":"","dataAcqList":[],"type":0,"password":"e69f9adc8b3010542f7cc5bccfa259bc","isValiPhone":0,"kind":0,"mailNotice":true,"id":425711,"lastLoginIp":"999.99.99.999","phoneNum":"","approved":false,"area":"Europe","smsNotice":false,"isAgent":0,"token":"","nickName":"null","parentUserId":0,"customerCode":"","counrty":"Netherlands","isPhoneNumReg":0,"createDate":"2020-02-13 18:46:45","rightlevel":1,"appType":"c","serverUrl":"","lat":"","lastLoginTime":"2020-02-17 02:13:51","enabled":true,"agentCode":"","inverterList":[],"isValiEmail":0,"accountName":"aaaa","email":"mijnemail@gmail.com","company":"xxx","activeName":"AAA","codeIndex":1,"appAlias":"loginnaam","isBigCustomer":0,"noticeType":""},"msg":"","app_code":"15"}}'' 2020-02-16 19:13:51.959 (Growatt) >'Headers': 2020-02-16 19:13:51.959 (Growatt) ---->'Connection':'keep-alive' 2020-02-16 19:13:51.959 (Growatt) ---->'Content-Type':'application/json;charset=UTF-8' 2020-02-16 19:13:51.959 (Growatt) ---->'Transfer-Encoding':'chunked' 2020-02-16 19:13:51.959 (Growatt) ---->'Set-Cookie':'JSESSIONID=D60711340DFFB44CC516AA41; Path=/; HttpOnly 2020-02-16 19:13:51.959 SERVERID=02bf6c443706f311f87f9d65|158831|158;Path=/' 2020-02-16 19:13:51.959 (Growatt) ---->'Date':'Sun, 16 Feb 2020 18:13:51 GMT' 2020-02-16 19:13:51.960 (Growatt) Retrieved following json: {"back": {"totalData": {}, "isOpenSmartFamily": 0, "success": true, "data": [{"plantName": "xxxxxxxx", "plantId": "999999"}], "service": "1", "isOpenDeviceParams": 0, "isOpenDeviceList": 1, "user": {"phoneNum": "", "codeIndex": 1, "lastLoginIp": "999.99.99.99", "approved": false, "inverterList": [], "id": 425711, "isBigCustomer": 0, "appAlias": "xxxx", "serverUrl": "", "uid": "", "noticeType": "", "dataAcqList": [], "rightlevel": 1, "lastLoginTime": "2020-02-17 02:13:51", "area": "Europe", "agentCode": "", "accountName": "loggie", "lat": "", "activeName": "AAA", "company": "AAA", "mailNotice": true, "isPhoneNumReg": 0, "smsNotice": false, "isValiPhone": 0, "enabled": true, "isValiEmail": 0, "isAgent": 0, "kind": 0, "email": "mijnmail@gmail.com", "createDate": "2020-02-13 18:46:45", "appType": "c", "timeZone": 1, "parentUserId": 0, "nickName": "null", "customerCode": "", "type": 0, "inverterGroup": [], "userLanguage": "ho", "token": "", "counrty": "Netherlands", "lng": "", "password": "99999999999999"}, "quality": "0", "msg": "", "app_code": "15"}} 2020-02-16 19:13:51.960 (Growatt) Login Succesfull 2020-02-16 19:13:51.960 (Growatt) Plant ID: 259865 was found 2020-02-16 19:13:51.960 (Growatt) Analyzing Data (3): 2020-02-16 19:13:51.960 (Growatt) ---> Headers found 2020-02-16 19:13:51.960 (Growatt) ---> Process Cookie Started 2020-02-16 19:13:51.962 (Growatt) ---> SessionID found: D60711340DFFB44CCA455162E2589999 2020-02-16 19:13:51.964 (Growatt) ---> ServerID found: 02bf6c443706f2465311f42c387f9999|1581876831|1581879999 2020-02-16 19:13:51.964 (Growatt) Request Data with retrieved cookie! 2020-02-16 19:13:51.964 (Growatt) Pushing 'WriteDirective' on to queue 2020-02-16 19:13:51.964 (Growatt) Processing 'WriteDirective' message 2020-02-16 19:13:51.965 Error: PluginSystem: Exception processing message. 2020-02-16 19:14:58.673 Error: Growatt hardware (14) thread seems to have ended unexpectedly 2020-02-16 19:14:58.673 Error: Growatt hardware (14) nothing received for more than 1 Minute!....

sincze commented 4 years ago

This is interesting indeed. Is this still an issue with 2020.1 for you running on a Raspberry Pi?

bertinholland commented 4 years ago

@sincze Thanks for your reply. I have enabled yhe plugin again and now im running a few minutes and everything looks fine. Switch status is updates and switched to on and also the electric power (Kwh en watt) is updated!

The changes on my raspberry platform is: I have upgraded raspberry from stretch to buster. And i have upgraded domoticz to version V2020.1 (production - stable release). No errors in the logfile.

Tomorrow after running 24 hours I will check of the counters are correct. I keep you updated ;-)

bertinholland commented 4 years ago

@sincze After 24 hours testing, all works great, thanks for this nice plugin! Happy easter!