DanalEstes / DuetLapse

Time Lapse camera support for Duet based 3D printers
23 stars 16 forks source link

Installation help #3

Open IdefixRC opened 4 years ago

IdefixRC commented 4 years ago

Hi,

first of all big thanks for making this available. I previously used Octopi and timelabs was always on my wish list since I moved fully to Duet.

My setup runs a duetwifi on release 3 firmware. I have a Raspberry pi running with RPi Cam Control as my web cam and it is linked to the duet wifi web interface (webcam page) via a simple URL (http://192.168.2.95/html/cam_pic_new.php) and working fine.

I installed your script and ensured dependencies are available (python, FFmpeg) and tried to get the script to run but so far without luck. I tried just the script and the IP address of the duet as well as script plus the web URL etc.

When running it I get the following error:

./DuetLapse.py -duet 192.168.2.98                  Traceback (most recent call last):
  File "./DuetLapse.py", line 21, in <module>
    import DuetWebAPI as DWA
  File "/home/pi/DuetLapse/DuetWebAPI.py", line 27
    URL=(f'{self._base_url}'+'/rr_status?type=1')
                           ^
SyntaxError: invalid syntax

I assume that something with the communication between the script and the duet board does not work. Is there something that needs to be enabled on the Deut side on top? Or an API key provided in the script etc?

Thanks !

IdefixRC commented 4 years ago

Got it to start. Not sure what did it but it start now :-) However after 2 layers it throws this error (Duetwifi is on FW 3.1.1):

`./DuetLapse.py -camera web -weburl http://192.168.2 .95/html/cam.jpg -detect layer -duet 192.168.2.98 Attempting to connect to printer at 192.168.2.98 Connected to a Duet V2 printer at http://192.168.2.98

################################## Options in force for this run: # camera = web # printer = 192.168.2.98 # seconds = 0 # detect = layer # pause = no # camparms = # vidparms = # movehead = 0.00 0.00 # dontwait = False # ##################################

Waiting for print to start on printer 192.168.2.98 Will take pictures when printing starts, and make video when printing ends. Or, press Ctrl+C one time to move directly to conversion step.

Print start sensed. End of print will be sensed, and frames will be converted into video. Or, press Ctrl+C one time to move directly to conversion step.

Capturing frame 0 at X0.00 Y0.00 Z525.00 Layer 0 2020-06-09 03:15:45 URL:http://192.168.2.95/html/cam.jpg [14824/14824] -> "/tmp/ DuetLapse/IMG00000001.jpeg" [1] Capturing frame 1 at X24.44 Y56.83 Z0.13 Layer 1 2020-06-09 03:21:51 URL:http://192.168.2.95/html/cam.jpg [26688/26688] -> "/tmp/ DuetLapse/IMG00000002.jpeg" [1] Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 384, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 380, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.7/http/client.py", line 1321, in getresponse response.begin() File "/usr/lib/python3.7/http/client.py", line 296, in begin version, status, reason = self._read_status() File "/usr/lib/python3.7/http/client.py", line 257, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.7/socket.py", line 589, in readinto return self._sock.recv_into(b) ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/requests/adapters.py", line 449, in send timeout=timeout File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 638, in urlopen _stacktrace=sys.exc_info()[2]) File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 367, in incr ement raise six.reraise(type(error), error, _stacktrace) File "/usr/lib/python3/dist-packages/six.py", line 692, in reraise raise value.with_traceback(tb) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 384, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 380, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.7/http/client.py", line 1321, in getresponse response.begin() File "/usr/lib/python3.7/http/client.py", line 296, in begin version, status, reason = self._read_status() File "/usr/lib/python3.7/http/client.py", line 257, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.7/socket.py", line 589, in readinto return self._sock.recv_into(b) urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(1 04, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "./DuetLapse.py", line 301, in status=printer.getStatus() File "/home/pi/DuetLapse/DuetWebAPI.py", line 137, in getStatus r = self.requests.get(URL) File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get return request('get', url, params=params, kwargs) File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in reque st resp = self.send(prep, send_kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send r = adapter.send(request, kwargs) File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetErro r(104, 'Connection reset by peer')) `