lolautruche / SurveillanceStationDomoticz

Synology SurveillanceStation plugin for Domoticz
MIT License
4 stars 1 forks source link

Error 'AttributeError':''NoneType' object has no attribute 'Connected''. #4

Closed xavierlp closed 4 years ago

xavierlp commented 4 years ago

Hello

After a reboot of my RPI, I've got theses errors.

I'm using Domoticz on a RPI4 on buster, Synology DSM 6 on same network. User is dedicated and tested to open surveillance station.

Debug is activated but no more logs. I could use it during several days with succes since a git pull to have less logs.

I can't confirm that the issue is after this update.

Any ideas to debug ?

Thanks

2020-04-23 00:47:46.867 (Surveillance Monitor) Calling message handler 'onHeartbeat'. 2020-04-23 00:47:46.867 Error: (Surveillance Monitor) 'onHeartbeat' failed 'AttributeError':''NoneType' object has no attribute 'Connected''. 2020-04-23 00:47:46.867 Error: (Surveillance Monitor) ----> Line 224 in '/home/pi/domoticz/plugins/SurveillanceStationDomoticz/plugin.py', function onHeartbeat 2020-04-23 00:47:46.867 Error: (Surveillance Monitor) ----> Line 182 in '/home/pi/domoticz/plugins/SurveillanceStationDomoticz/plugin.py', function onHeartbeat 2020-04-23 00:47:56.922 (Surveillance Monitor) Pushing 'onHeartbeatCallback' on to queue 2020-04-23 00:47:56.947 (Surveillance Monitor) Processing 'onHeartbeatCallback' message 2020-04-23 00:47:56.947 (Surveillance Monitor) Calling message handler 'onHeartbeat'. 2020-04-23 00:47:56.947 Error: (Surveillance Monitor) 'onHeartbeat' failed 'AttributeError':''NoneType' object has no attribute 'Connected''. 2020-04-23 00:47:56.947 Error: (Surveillance Monitor) ----> Line 224 in '/home/pi/domoticz/plugins/SurveillanceStationDomoticz/plugin.py', function onHeartbeat 2020-04-23 00:47:56.947 Error: (Surveillance Monitor) ----> Line 182 in '/home/pi/domoticz/plugins/SurveillanceStationDomoticz/plugin.py', function onHeartbeat

xavierlp commented 4 years ago

Message after a fresh start

2020-04-23 01:01:14.713 (Surveillance Syno) Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL 2020-04-23 01:01:14.713 (Surveillance Syno) 'HardwareID':'28' 2020-04-23 01:01:14.713 (Surveillance Syno) 'HomeFolder':'/home/pi/domoticz/plugins/SurveillanceStationDomoticz/' 2020-04-23 01:01:14.713 (Surveillance Syno) 'StartupFolder':'/home/pi/domoticz/' 2020-04-23 01:01:14.713 (Surveillance Syno) 'UserDataFolder':'/home/pi/domoticz/' 2020-04-23 01:01:14.713 (Surveillance Syno) 'Database':'/home/pi/domoticz/domoticz.db' 2020-04-23 01:01:14.713 (Surveillance Syno) 'Language':'fr' 2020-04-23 01:01:14.713 (Surveillance Syno) 'Version':'0.1' 2020-04-23 01:01:14.713 (Surveillance Syno) 'Author':'lolautruche' 2020-04-23 01:01:14.713 (Surveillance Syno) 'Name':'Surveillance Syno' 2020-04-23 01:01:14.713 (Surveillance Syno) 'Address':'192.168.0.9' 2020-04-23 01:01:14.713 (Surveillance Syno) 'Port':'5001' 2020-04-23 01:01:14.713 (Surveillance Syno) 'Key':'SurveillanceStation' 2020-04-23 01:01:14.713 (Surveillance Syno) 'Mode1':'HTTPS' 2020-04-23 01:01:14.713 (Surveillance Syno) 'Mode2':'user_raspberry' 2020-04-23 01:01:14.713 (Surveillance Syno) 'Mode3':'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2020-04-23 01:01:14.713 (Surveillance Syno) 'Mode4':'Debug' 2020-04-23 01:01:14.713 (Surveillance Syno) 'DomoticzVersion':'2020.1' 2020-04-23 01:01:14.713 (Surveillance Syno) 'DomoticzHash':'63fa969e4' 2020-04-23 01:01:14.713 (Surveillance Syno) 'DomoticzBuildTime':'2020-03-22 15:16:16' 2020-04-23 01:01:14.713 (Surveillance Syno) Device count: 0 2020-04-23 01:01:14.713 (Surveillance Syno) Creating images from file '/home/pi/domoticz/plugins/SurveillanceStationDomoticz/SurvStationHomeMode.zip'. 2020-04-23 01:01:14.723 (Surveillance Syno) Creating device 'HomeMode'. 2020-04-23 01:01:14.574 Status: (Surveillance Syno) Started. 2020-04-23 01:01:14.711 Status: (Surveillance Syno) Entering work loop. 2020-04-23 01:01:14.712 Status: (Surveillance Syno) Initialized version 0.1, author 'lolautruche' 2020-04-23 01:01:14.724 Error: (Surveillance Syno) 'onStart' failed 'KeyError'. 2020-04-23 01:01:14.724 Error: (Surveillance Syno) ----> Line 196 in '/home/pi/domoticz/plugins/SurveillanceStationDomoticz/plugin.py', function onStart 2020-04-23 01:01:14.724 Error: (Surveillance Syno) ----> Line 74 in '/home/pi/domoticz/plugins/SurveillanceStationDomoticz/plugin.py', function onStart

xavierlp commented 4 years ago

Other thing If I open a browser with this url https://192.168.0.9:5001/webapi/auth.cgi?api=SYNO.API.Auth&method=Login&version=2&account=user_raspberry&passwd=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&session=SurveillanceStation&format=sid

return is : {"data":{"sid":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},"success":true}

lolautruche commented 4 years ago

Hello

I think I kind of understand the issue. Would you be able to edit plugin.py to do some debug tests?

lolautruche commented 4 years ago

I guess the plugin is not working at all for you right now, is it?

xavierlp commented 4 years ago

Hello

Thanks for your feedback , I appreciated a lot.

Yes I can edit plugin.py

I can confirm that Plugin is not working

xavierlp commented 4 years ago

I found the error. I could remove the images in customs icones.

Then restart the plugin and now all is OK

lolautruche commented 4 years ago

I think there is actually an issue. I’ll reopen current issue ans will investigate. Thanks for the report!