When foscam camera is off, and if we call 'enable_motion_detection()' then code returns an exception. code should gracefully handle it and return error code.
Send Foscam command: http://192.168.86.134:88/cgi-bin/CGIProxy.fcgi?usr=<username>&pwd=<password>&cmd=getMotionDetectConfig
Foscam exception:
Traceback (most recent call last):
File "./test.py", line 4, in <module>
result = mycam.enable_motion_detection()
File "/usr/local/lib/python3.5/dist-packages/foscam/foscam.py", line 626, in enable_motion_detection
result = self.set_motion_detection(1)
File "/usr/local/lib/python3.5/dist-packages/foscam/foscam.py", line 618, in set_motion_detection
current_config['isEnable'] = enabled
TypeError: 'NoneType' object does not support item assignment